mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Localize the title of the configuration activity.
Auto open local settings (e.g. clay)
This commit is contained in:
parent
1aadcb958b
commit
1933e2bf10
@ -261,7 +261,7 @@
|
||||
|
||||
<activity
|
||||
android:name=".activities.ExternalPebbleJSActivity"
|
||||
android:label="external_js"
|
||||
android:label="@string/app_configure"
|
||||
android:parentActivityName=".activities.AppManagerActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
|
@ -45,7 +45,7 @@
|
||||
<div id="step1">
|
||||
<h2>Url of the configuration:</h2>
|
||||
<div id="config_url"></div>
|
||||
<button class="btn" name="show config" value="show config" onclick="Pebble.showConfiguration()" >Show config / URL</button>
|
||||
<!--<button class="btn" name="show config" value="show config" onclick="Pebble.showConfiguration()" >Show config / URL</button>-->
|
||||
<button class="btn" name="open config" value="open config" onclick="Pebble.actuallyOpenURL()" >Open configuration website</button>
|
||||
</div>
|
||||
<div id="step2">
|
||||
|
@ -111,6 +111,8 @@ function gbPebble() {
|
||||
GBjs.gbLog("app wanted to show: " + title + " body: "+ body);
|
||||
}
|
||||
|
||||
this.ready = function() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -129,6 +131,7 @@ if (jsConfigFile != null) {
|
||||
} else {
|
||||
document.getElementById('step2').style.display="none";
|
||||
Pebble.ready();
|
||||
Pebble.showConfiguration();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -96,9 +96,13 @@ public class ExternalPebbleJSActivity extends Activity {
|
||||
private class GBChromeClient extends WebChromeClient {
|
||||
@Override
|
||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||
if (ConsoleMessage.MessageLevel.ERROR.equals(consoleMessage.messageLevel())) {
|
||||
GB.toast(consoleMessage.message(), Toast.LENGTH_LONG, GB.ERROR);
|
||||
//TODO: show error page
|
||||
}
|
||||
return super.onConsoleMessage(consoleMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class GBWebClient extends WebViewClient {
|
||||
|
Loading…
Reference in New Issue
Block a user