-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetting.html
More file actions
229 lines (224 loc) · 7.75 KB
/
setting.html
File metadata and controls
229 lines (224 loc) · 7.75 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html>
<head>
<title>Go Patrol 設定</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery-3.1.0.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?callback=initMap"></script>
<script type="text/javascript">
$(document).ready(function() {
// 讀取 config.json,將設定值顯示於頁面中,若 config.json 不存在的話,改為讀取 default.json
// $.getJSON("./config.json", function(json) {
// console.log(json);
// });
});
// Google Maps API
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: 25.0339031,
lng: 121.5623212
},
zoom: 16
});
}
</script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header col-sm-12">
<a class="navbar-brand" href="#">Go Patrol 設定</a>
</div>
</div>
</nav>
<div class="container">
<div class="col-sm-12 text-right">
<button class="btn btn-success" id="save" style="width: 120px">儲存設定</button>
<button class="btn btn-warning" id="reload" style="width: 120px">重新讀取</button>
<button class="btn btn-danger" id="reset" style="width: 120px">還原預設值</button>
</div>
<div class="col-sm-12">
<h3>一般設定</h3>
</div>
<div class="col-sm-12">
<label for="port" class="control-label">設定頁面 Port</label>
<p>開啟本設定頁面時的 Port,跟其他軟體衝突時可修改。</p>
<input type="text" class="form-control" id="port" placeholder="3000">
</div>
<div class="col-sm-12">
<h3>巡邏設定</h3>
</div>
<div class="col-sm-12">
<label for="accounts" class="control-label">帳號</label>
<p>用來巡邏的帳號有被BAN的風險,請勿使用主帳號登入,使用多帳號可加速搜尋時間但會增加被BAN的風險。</p>
<table class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>帳號</th>
<th>密碼</th>
<th>登入類型</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td id="username">wcdqowjdciowqj@gmail.com</td>
<td id="password">1234321</td>
<td id="privoder">google</td>
</tr>
<tr>
<td>2</td>
<td id="username">xe12ex</td>
<td id="password">314323</td>
<td id="privoder">ptc</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-12">
<label for="centerLocation" class="control-label">巡邏中心</label>
</div>
<div class="col-sm-12">
<span for="latitude">緯度:</span>
<span id="latitude"></span>
</div>
<div class="col-sm-12">
<span for="longitude">經度:</span>
<span id="longitude"></span>
</div>
<!-- Google Maps -->
<div class="col-sm-12" id="map" style="height: 500px"></div>
<div class="col-sm-12">
<br>
<label for="searchSteps" class="control-label">巡邏範圍</label>
<p>請輸入整數,巡邏範圍大約會是這個數字×100公尺,範圍越大要找越久。</p>
<input type="number" class="form-control" id="searchSteps" placeholder="2">
<br>
</div>
<div class="col-sm-12">
<label for="searchDelay" class="control-label">巡邏延遲 (豪秒)</label>
<p>每次移動到新位置後,要停留多久才繼續前往下一個位置。</p>
<input type="number" class="form-control" id="searchDelay" placeholder="1000">
<br>
</div>
<div class="col-sm-12">
<label for="searchTimeout" class="control-label">自動重啟時間 (秒)</label>
<p>卡住多久要自動重新啟動,設為 0 則不使用此功能。</p>
<input type="number" class="form-control" id="searchTimeout" placeholder="0">
<br>
</div>
<!-- <div class="col-sm-12">
<label for="quickSearchTimes" class="control-label">快速搜尋次數</label>
<p>使用執行快速搜尋指令時要執行幾次巡邏。</p>
<input type="number" class="form-control" id="quickSearchTimes" placeholder="3">
<br>
</div> -->
<div class="col-sm-12">
<h3>Telegram 機器人設定</h3>
</div>
<div class="col-sm-12">
<label for="botToken" class="control-label">Bot Token</label>
<p>找 @BotFather 建立機器人,完成後會取得 Bot Token。</p>
<input type="text" class="form-control" id="botToken" placeholder="Telegram Bot Token">
<br>
</div>
<div class="col-sm-12">
<input type="checkbox" id="enableCommand" checked>
<label for="enableCommand" class="control-label">允許機器人接收指令</label>
</div>
<row>
<div class="col-sm-6">
<label for="admins" class="control-label">管理員</label>
<p>非管理員僅能使用 /getmap 指令。只使用頻道通知時可不設定。使用者名稱可在設定頁面中看到 (前面有@的),設定時不需加上@。</p>
<table class="table table-bordered" id="admins">
<thead>
<tr>
<th>#</th>
<th>使用者名稱</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>abckdco</td>
</tr>
<tr>
<td>2</td>
<td>wcdqowjdc</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<label for="channels" class="control-label">接收頻道</label>
<p>要接收通知的頻道ID (需包含@),不使用頻道時可不設定。頻道ID就是頻道的邀請連結最後的字串前面加上@。</p>
<table class="table table-bordered" id="channels">
<thead>
<tr>
<th>#</th>
<th>頻道ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>wcdqowjdc</td>
</tr>
</tbody>
</table>
</div>
</row>
<div class="col-sm-12">
<h3>通知設定</h3>
</div>
<div class="col-sm-12">
<label for="messageDelay" class="control-label">通知間格 (豪秒)</label>
<p>Pokemon 通知之間的間格時間,若有訊息交錯的現象可增加此時間。</p>
<input type="text" class="form-control" id="messageDelay" placeholder="每次傳送 Pokemon 通知之間的間格">
<br>
</div>
<div class="col-sm-12">
<input type="checkbox" id="showDistance" checked="">
<label for="showDistance" class="control-label">在通知中顯示距離</label>
<p>有些廣泛為的頻道不適合在通知中顯示距離,可設為 false 將其關閉</p>
</div>
<div class="col-sm-12">
<input type="checkbox" id="showLog" checked="">
<label for="showLog" class="control-label">允許通知執行記錄</label>
<br>
<p>啟動後可在 Telegram 接收巡邏執行結果、自動重啟等訊息通知</p>
</div>
<div class="col-sm-12">
<input type="checkbox" id="sendSticker" checked="">
<label for="enableSendSticker" class="control-label">允許傳送貼圖</label>
<p>啟動後可在 Pokemon 通知時一併傳送帖圖,並在下面的選項中決定稀有度大於多少的 Pokemon 才會通直傳送帖圖。</p>
</div>
<div class="col-sm-12">
<label for="sendStickerRarity" class="control-label">稀有度大於多少要傳送貼圖</label>
<p>可設定為只有稀有度高的 Pokemon 才傳送帖圖,設為 1 將會傳送所有 Pokemon 的貼圖。</p>
<div class="btn-toolbar" role="toolbar" aria-label="...">
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn btn-default">1</button>
<button type="button" class="btn btn-default">2</button>
<button type="button" class="btn btn-default">3</button>
<button type="button" class="btn btn-default">4</button>
<button type="button" class="btn btn-default">5</button>
</div>
</div>
</div>
<div class="col-sm-12">
<h3>Pokemon 設定</h3>
</div>
</div>
</body>
</html>