-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
145 lines (137 loc) · 6.67 KB
/
Copy pathindex.html
File metadata and controls
145 lines (137 loc) · 6.67 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>{{title}} - {{slogan}}</title>
<meta name="description" content="{{description}}">
<script>
if(navigator.language.indexOf('zh') === 0 && location.pathname === '/'){
let url = './zh_cn.html';
let [p1, p2] = location.href.split('?');
if(p2) url += '?'+p2;
if(location.hash) url += '#'+location.hash;
location.href = url;
}
</script>
<style>
:root { --primary: #35e149; --bg: #f8fafc; }
body { font-family: system-ui, sans-serif; background: var(--bg); }
.card { box-sizing: border-box; width: 100%; padding: 1.5rem; margin-inline: auto; }
h1 { margin-top: 0; color: #1e293b; font-size: 1.25rem; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.5rem; }
.controls { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
@media (min-width:481px) {
body { padding: 2em;}
.card { max-width: 600px; background: white; border-radius: 12px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.controls {
flex-direction: row;
}
}
button { background: var(--primary); color: white; text-shadow: 1px 1px 8px #888; border: none; padding: 0.6rem 1.2rem; border-radius: 6px; cursor: pointer; font-weight: 600; flex: 1; }
button.dim { opacity: .8; filter: grayscale(1); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; margin-right: 0.5rem; }
.connected .status-dot { background: #35e149; }
#premise { margin: 8px auto; padding: 8px; background: #ffc; color: #f33; border-radius: 8px; }
#premise p { margin-block: 8px; }
.connected #premise,
.tcp-ready #premise { display: none; }
#logs { position:relative; background: #2f374a; color: #aaa; padding: 1rem; border-radius: 8px; height: 300px; overflow-y: auto; font-family: ui-monospace, monospace; font-size: 0.75rem; white-space: pre-wrap; word-wrap: break-word; margin-top: 1rem; transition: all .2s ease; }
#logs:empty { opacity: 0;}
.error { color: red; }
.warn { color: orange; }
.succ { color: var(--primary); }
.hide { display: none; }
#logs .info {color: #aaa;}
#logs .time {color: gray!important;}
#cleanBtn { position: absolute; right: 8px; top: 8px; padding: 8px; border-radius: 8px; width: 32px; height: 32px; background: rgba(255,255,255,.2); }
code {outline: 1px dotted currentColor; padding-inline: 4px;}
a {color: var(--primary);}
dialog { position: fixed; z-index: 999; top: 25%; transform: translateY(-50%); width: 85%; max-width: 400px; padding: 0; border-radius: 8px; border: none; outline: none; box-shadow: 0 0 1em #666; transition: all .4s ease; }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog.top { top: 0px; margin-top: 0; transform: translateY(-1px); border-radius: 0 0 8px 8px; }
@starting-style {
dialog[open] { transform: translateY(-200%); opacity: 0; }
}
dialog .x { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; font-size: 1.2rem; padding: 0; background: rgba(255,255,255,.1); color: #bbb; outline: none; }
dialog .hd { margin: 0; padding: 0 3rem 0 1rem; height: 48px; line-height: 48px; border-bottom: 1px solid #ddd; }
dialog .title { margin: 0; padding: 0; }
dialog .bd { padding: 1rem; color: #333; font-size: 14px; }
dialog .ft {padding: 1rem; display: flex; justify-content: flex-end; }
dialog .ft button { max-width: 100px; margin-inline-start: 1rem; }
dialog .btn-confirm { background-color: var(--primary); }
dialog .btn-cancel { background-color: #ccc; }
dialog a,
dialog button { outline: none; }
#ft {margin: 2em auto; padding: 1em; text-align: center; font-size: 12px; }
.copyright { color: #999;}
.sepa { color: #ccc; display: inline-block; margin-inline: .5rem; }
</style>
</head>
<body>
<main class="card" id="mainCard">
<h1 id="title">{{title}}</h1>
<div class="status-container">
<span class="status-dot"></span><span id="statusText">{{msg_not_connected}}</span>
</div>
<div id="premise">
<p>{{msg_checkif_usb_cable}}</p>
<p>{{msg_checkif_usb_debugging}}</p>
</div>
<div class="controls">
<button id="shizukuBtn" data-key="shizuku" data-name="Shizuku" data-pkg="moe.shizuku.privileged.api" data-version="v13.6" data-so="libshizuku.so" data-url="https://app.apkz.com/app/moe.shizuku.privileged.api">{{btn_start_shizuku}}</button>
<button id="stellarBtn" data-key="stellar" data-name="Stellar" data-pkg="roro.stellar.manager" data-version="v1.0.16" data-so="libstellar.so" data-url="https://app.apkz.com/app/roro.stellar.manager">{{btn_start_stellar}}</button>
<button id="tcpipBtn" class="dim">{{btn_tcpip}}</button>
</div>
<div id="logs"></div>
</main>
<footer id="ft">
<a class="copyright" href="https://www.apkz.com">©APKZ</a>
<span class="sepa"> | </span>
<a href="https://github.com/APKZCOM/shizuku-starter">{{source_code}}</a>
<span class="sepa"> | </span>
<a href="{{link_download_apkz}}">{{txt_download_apkz}}</a>
</footer>
<dialog id="disclaimer" class="top" tabindex="-1">
<!--button class="x" onclick="disclaimer.close('cancel');">✕</button-->
<header class="hd"><h2 class="title">⚠️ {{title_disclaimer}}:</h2></header>
<div class="bd">
{{msg_disclaimer}}
</div>
<footer class="ft">
<form method="dialog">
<button class="btn-cancel" type="reset" value="cancel" onclick="disclaimer.close('cancel');">{{btn_disagree}}</button>
<button class="btn-confirm" type="submit" value="confirm">{{btn_agree}}</button>
</form>
</footer>
</dialog>
<dialog id="legacyBrowser" class="top">
<header class="hd"><h2 class="title">{{title}}</h2></header>
<div class="bd">
<p class="error">{{msg_browser_not_support_webusb}}</p>
</div>
</dialog>
<dialog id="remote" class="top">
<button class="x" onclick="remote.close('cancel');">✕</button>
<header class="hd"><h2 class="title">{{title}}</h2></header>
<div class="bd">
<p class="error">{{msg_remote}}</p>
<hr>
<p style="text-align:center;">https://shizuku-starter.apkz.app</p>
<p style="text-align:center">
<img src="https://img.apkz.com/qr?size=200&margin=2&text=https%3A%2F%2Fshizuku-starter.apkz.app%23APKZ" width=200 height=200 />
</p>
</div>
</dialog>
<script id="i18n-data"></script>
<script>
if(location.hash.indexOf('device=this')>-1){
remote.showModal();
}else if(!navigator.usb){
legacyBrowser.showModal();
}else{
disclaimer.showModal();
}
</script>
<script type="module" src="./js/main.js"></script>
</body>
</html>