Chore: refactor zoom and editor mode to use enums

This commit is contained in:
shamoon
2026-01-28 08:20:14 -08:00
parent 6859e7e3c2
commit dc9061eb97
7 changed files with 27 additions and 29 deletions

View File

@@ -1,3 +1,5 @@
import { PdfEditorEditMode } from '../components/common/pdf-editor/pdf-editor-edit-mode'
import { ZoomSetting } from '../components/document-detail/zoom-setting'
import { User } from './user'
export interface UiSettings {
@@ -297,7 +299,7 @@ export const SETTINGS: UiSetting[] = [
{
key: SETTINGS_KEYS.PDF_VIEWER_ZOOM_SETTING,
type: 'string',
default: 'page-width', // ZoomSetting from 'document-detail.component'
default: ZoomSetting.PageWidth,
},
{
key: SETTINGS_KEYS.AI_ENABLED,
@@ -307,6 +309,6 @@ export const SETTINGS: UiSetting[] = [
{
key: SETTINGS_KEYS.PDF_EDITOR_DEFAULT_EDIT_MODE,
type: 'string',
default: 'create', // PdfEditorEditMode.Create from 'pdf-editor.component'
default: PdfEditorEditMode.Create,
},
]