added NSClient followup
This commit is contained in:
parent
50f8bf2d18
commit
e3153230e0
|
@ -89,6 +89,22 @@ public class SWDefinition {
|
||||||
.visibility(() -> !NSClientPlugin.getPlugin().isEnabled(PluginType.GENERAL)))
|
.visibility(() -> !NSClientPlugin.getPlugin().isEnabled(PluginType.GENERAL)))
|
||||||
.validator(() -> NSClientPlugin.getPlugin().nsClientService != null && NSClientPlugin.getPlugin().nsClientService.isConnected && NSClientPlugin.getPlugin().nsClientService.hasWriteAuth)
|
.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)
|
.add(new SWScreen(R.string.patientage)
|
||||||
.skippable(false)
|
.skippable(false)
|
||||||
.add(new SWRadioButton()
|
.add(new SWRadioButton()
|
||||||
|
@ -139,7 +155,7 @@ public class SWDefinition {
|
||||||
.add(new SWPlugin()
|
.add(new SWPlugin()
|
||||||
.option(PluginType.APS)
|
.option(PluginType.APS)
|
||||||
.label(R.string.configbuilder_aps))
|
.label(R.string.configbuilder_aps))
|
||||||
.validator(() -> MainApp.getSpecificPluginsList(PluginType.APS) != null)
|
.validator(() -> MainApp.getSpecificPluginsList(PluginType.APS) != null )
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1061,9 +1061,11 @@
|
||||||
<string name="wear_general_settings">General Settings</string>
|
<string name="wear_general_settings">General Settings</string>
|
||||||
|
|
||||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||||
<string name="enable_nsclient">Enable NSClient</string>
|
<string name="enable_nsclient">Connect to NightScout</string>
|
||||||
|
<string name="nsclient_prefs">Additional NSClient options</string>
|
||||||
<string name="welcometosetupwizard">Welcome to setup wizard. It will guide you through the setup process</string>
|
<string name="welcometosetupwizard">Welcome to setup wizard. It will guide you through the setup process</string>
|
||||||
<string name="pumpsetup">Pump setup</string>
|
<string name="pumpsetup">Pump setup</string>
|
||||||
<string name="readstatus">Read status</string>
|
<string name="readstatus">Read status</string>
|
||||||
|
<string name="settings_incorrect">Incorrect settings! Press \'BACK\' and try again</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue