1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Plugins: Show information page before enabling plugin support (#10348)

This commit is contained in:
Henry Heino
2024-05-02 06:58:29 -07:00
committed by GitHub
parent 70c2f0a70a
commit 4056fc2281
8 changed files with 229 additions and 25 deletions

View File

@ -1216,10 +1216,10 @@ class Setting extends BaseModel {
section: 'plugins',
public: true,
appTypes: [AppType.Mobile],
show: (_settings) => {
show: (settings) => {
// Hide on iOS due to App Store guidelines. See
// https://github.com/laurent22/joplin/pull/10086 for details.
return shim.mobilePlatform() !== 'ios';
return shim.mobilePlatform() !== 'ios' && settings['plugins.pluginSupportEnabled'];
},
needRestart: true,
advanced: true,
@ -1228,6 +1228,19 @@ class Setting extends BaseModel {
description: () => _('Allows debugging mobile plugins. See %s for details.', 'https://https://joplinapp.org/help/api/references/mobile_plugin_debugging/'),
},
'plugins.pluginSupportEnabled': {
value: false,
public: true,
autoSave: true,
section: 'plugins',
advanced: true,
type: SettingItemType.Bool,
appTypes: [AppType.Mobile],
label: () => _('Enable plugin support'),
// On mobile, we have a screen that manages this setting when it's disabled.
show: (settings) => settings['plugins.pluginSupportEnabled'],
},
'plugins.devPluginPaths': {
value: '',
type: SettingItemType.String,