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:
parent
8e2975d23d
commit
f7682d3da3
@ -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(),
|
||||
}));
|
||||
|
@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user