diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java index a3f9ee4b82..5411f92cad 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java @@ -89,6 +89,22 @@ public class SWDefinition { .visibility(() -> !NSClientPlugin.getPlugin().isEnabled(PluginType.GENERAL))) .validator(() -> NSClientPlugin.getPlugin().nsClientService != null && NSClientPlugin.getPlugin().nsClientService.isConnected && NSClientPlugin.getPlugin().nsClientService.hasWriteAuth) ) + .add(NSClientPlugin.getPlugin().nsClientService != null ? new SWScreen(R.string.nsclientinternal_title) + .skippable(true) + .add(new SWButton() + .text(R.string.nsclient_prefs) + .action(() -> { + final PluginBase plugin = (PluginBase) NSClientPlugin.getPlugin(); + PasswordProtection.QueryPassword(context, R.string.settings_password, "settings_password", () -> { + Intent i = new Intent(context, PreferencesActivity.class); + i.putExtra("id", plugin.getPreferencesId()); + context.startActivity(i); + }, null); + }) + .visibility(() -> ((PluginBase) MainApp.getConfigBuilder().getActivePump()).getPreferencesId() > 0)): new SWScreen(R.string.nav_setupwizard) + .add(new SWInfotext() + .label(R.string.settings_incorrect) ) + ) .add(new SWScreen(R.string.patientage) .skippable(false) .add(new SWRadioButton() @@ -139,7 +155,7 @@ public class SWDefinition { .add(new SWPlugin() .option(PluginType.APS) .label(R.string.configbuilder_aps)) - .validator(() -> MainApp.getSpecificPluginsList(PluginType.APS) != null) + .validator(() -> MainApp.getSpecificPluginsList(PluginType.APS) != null ) ) ; } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 58293191af..9cd3e4ca58 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1061,9 +1061,11 @@ General Settings DUMMY\nCONTENT - Enable NSClient + Connect to NightScout + Additional NSClient options Welcome to setup wizard. It will guide you through the setup process Pump setup Read status + Incorrect settings! Press \'BACK\' and try again