1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Resolves #7506: Disable custom PDF viewer by default

This commit is contained in:
Laurent Cozic 2023-01-17 12:08:22 +00:00
parent 8e2975d23d
commit f7682d3da3
4 changed files with 17 additions and 1 deletions

View File

@ -621,7 +621,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
contentMaxWidth: props.contentMaxWidth,
mapsToLine: true,
// Always using useCustomPdfViewer for now, we can add a new setting for it in future if we need to.
useCustomPdfViewer: true,
useCustomPdfViewer: props.useCustomPdfViewer,
noteId: props.noteId,
vendorDir: bridge().vendorDir(),
}));

View File

@ -424,6 +424,7 @@ function NoteEditor(props: NoteEditorProps) {
fontSize: Setting.value('style.editor.fontSize'),
contentMaxWidth: props.contentMaxWidth,
isSafeMode: props.isSafeMode,
useCustomPdfViewer: props.useCustomPdfViewer,
// We need it to identify the context for which media is rendered.
// It is currently used to remember pdf scroll position for each attacments of each note uniquely.
noteId: props.noteId,
@ -630,6 +631,7 @@ const mapStateToProps = (state: AppState) => {
], whenClauseContext)[0],
contentMaxWidth: state.settings['style.editor.contentMaxWidth'],
isSafeMode: state.settings.isSafeMode,
useCustomPdfViewer: state.settings.useCustomPdfViewer,
};
};

View File

@ -43,6 +43,7 @@ export interface NoteEditorProps {
richTextBannerDismissed: boolean;
contentMaxWidth: number;
isSafeMode: boolean;
useCustomPdfViewer: boolean;
}
export interface NoteBodyEditorProps {
@ -76,6 +77,7 @@ export interface NoteBodyEditorProps {
contentMaxWidth: number;
isSafeMode: boolean;
noteId: string;
useCustomPdfViewer: boolean;
}
export interface FormNote {

View File

@ -1382,6 +1382,18 @@ class Setting extends BaseModel {
};
} },
useCustomPdfViewer: {
value: false,
type: SettingItemType.Bool,
public: true,
advanced: true,
appTypes: [AppType.Desktop],
label: () => 'Use custom PDF viewer (Beta)',
description: () => 'The custom PDF viewer remembers the last page that was viewed, however it has some technical issues.',
storage: SettingStorage.File,
isGlobal: true,
},
'editor.keyboardMode': {
value: '',
type: SettingItemType.String,