mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-13 02:21:14 +01:00
966c3d4811
- localstorage is now cleared at every launch: this prevents some clay configuration pages to send back to the watch a number of keys that were set by other configuration pages - only execute JS on document ready: this prevents some race conditions - added dummy getTimelineToken function to Pebble JS object - corrected (hopefully!) a few logic errors in the JS code (this referenced where it wasn't) - refactored the steps visualization in JS - lifecycle changes to the java activity: now the configuration page gets closed as soon as the settings have been sent, and there is only one instance of it
80 lines
2.3 KiB
HTML
80 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta name='viewport' content='initial-scale=1.0, maximum-scale=1.0'>
|
|
<script type="text/javascript" src="js/Uri.js">
|
|
</script>
|
|
<script type="text/javascript" src="js/gadgetbridge_boilerplate.js">
|
|
</script>
|
|
<script type="text/javascript">
|
|
</script>
|
|
<style>
|
|
body {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
-webkit-touch-callout: none;
|
|
}
|
|
#config_url,#jsondata {
|
|
word-wrap: break-word;
|
|
margin: 20px 0;
|
|
width: 90%;
|
|
}
|
|
.btn {
|
|
display: inline-block;
|
|
position: relative;
|
|
height: 32px;
|
|
line-height: 32px;
|
|
border-radius: 2px;
|
|
font-size: 0.9em;
|
|
background-color: #eee;
|
|
color: #646464;
|
|
text-align: center;
|
|
border-style: none;
|
|
}
|
|
.btn:active {
|
|
border-style: none;
|
|
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2)inset;
|
|
transition-delay: 0s;
|
|
}
|
|
p {
|
|
width: 90%;
|
|
}
|
|
#pastereturn {
|
|
width: 90%;
|
|
min-height: 3em;
|
|
}
|
|
#step1compat, #step2 {
|
|
display: none;
|
|
}
|
|
<!-- TODO -->
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="step1" class="step">
|
|
<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="open config" value="open config" onclick="Pebble.actuallyOpenURL()">
|
|
Open configuration website
|
|
</button>
|
|
</div>
|
|
<div id="step1compat" class="step">
|
|
<p>In case of "network error" after saving settings in the wathchapp, copy the "network error"
|
|
URL and paste it here:</p>
|
|
<textarea id="pastereturn"></textarea><br/>
|
|
<button class="btn" name="parse" onclick="Pebble.parseReturnedPebbleJS()">Parse legacy app
|
|
configuration
|
|
</button>
|
|
</div>
|
|
<div id="step2" class="step">
|
|
<h2>Incoming configuration data:</h2>
|
|
<div id="jsondata"></div>
|
|
<button class="btn" name="send config" value="send config" onclick="Pebble.actuallySendData()">
|
|
Send data to pebble
|
|
</button>
|
|
</div>
|
|
</body>
|