forked from KnockDroid/KnockDroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.html
46 lines (38 loc) · 1.47 KB
/
app.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<head>
<meta name="viewport" content="width=device-width">
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.1/knockout-latest.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
<script src="KnockDroid.js"></script>
<script src='file:///android_asset/app.js'></script>
<script src='file:///android_asset/mui.js'></script>
</head>
<script>
cfg.MUI, cfg.Light
host = "http://192.168.140.149:8080/"
function OnStart()
{
app.EnableBackKey( false );
kd = new KnockDroid();
kd.configure(
"modules",
host
).then( function(){
kd.start();
});
}
function OnBack(){
if( kd.defaults.module==kd.active.module || kd.defaults.route==kd.active.route ){
var yesNo = app.CreateYesNoDialog( "Exit App?" );
yesNo.SetOnTouch( result=>{
if( result=="Yes" ) app.Exit()
});
yesNo.Show();
}else{
return history.back();
}
}
</script>
<body onload="app.Start()"></body>
</html>