-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (69 loc) Β· 4.45 KB
/
index.html
File metadata and controls
76 lines (69 loc) Β· 4.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="dark light">
<title>Build OpenWrt Image</title>
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22 fill=%22black%22>π</text></svg>">
</head>
<body>
<form id="tokenForm">
<h2>Setup Your GitHub Personal Access Token β οΈ</h2>
<p>1οΈβ£ Click below to open GitHub's token creation page:</p>
<button type="button" onclick="window.open('https://github.com/settings/tokens/new?scopes=repo,workflow,admin:repo_hook&description=GitHub%20Workflow%20Trigger', '_blank')">π Create Token</button>
<p>2οΈβ£ After generating your token, copy & paste it below:</p>
<input type="password" id="tokenInput" placeholder="Paste your token here">
<button type="button" onclick="saveToken()">πΎ Save Token</button>
<p>3οΈβ£ Click below to test your token:</p>
<button type="button" onclick="testToken()">π Test Token</button>
<p id="status"></p>
</form>
<button id="clearTokenButton" style="display: none;" onclick="clearToken()">ποΈ Clear Token</button>
<button id="setupTokenButton" style="display: none;" onclick="setupToken()">β οΈ Setup GitHub Token</button>
<button id="configToUciButton" onclick="location.href='config2uci/index.html'">π Config to UCI Converter</button>
<form id="buildForm" onsubmit="runWorkflow(event)">
<h2>Build OpenWrt Image</h2>
<p>1οΈβ£ Select model of your device, then select a stable build or the nightly "snapshot" build.</p>
<div class="model-version-row">
<input type="text" id="modelInput" list="modelOptions" placeholder="Start typing your model..." autocomplete="off" title="Double-click to clear this field">
<select id="versionInput" onchange="fetchModelOptions()">
<!-- Options will be populated dynamically from the provided URL -->
</select>
</div>
<datalist id="modelOptions">
<!-- Options will be populated dynamically from the provided URL -->
</datalist>
<input type="hidden" id="profileInput" name="profile">
<input type="hidden" id="targetInput" name="target">
<p id="buildInfo"></p>
<p>2οΈβ£ Include and/or exclude extra packages in the firmware image:</p>
<p><pre>The minus <code>-PACKAGE_NAME</code> prefix removes a package, no prefix adds one.</pre></p>
<input type="text" id="packagesInput" name="packages" autocomplete="on" placeholder="E.g. luci luci-app-sqm -kmod-usb3 -kmod-usb-ledtrig-usbport" title="Double-click to clear this field">
<p>3οΈβ£ Write a list of services to disable (if needed):</p>
<input type="text" id="disabled_servicesInput" name="disabled_services" autocomplete="on" placeholder="E.g. dnsmasq firewall odhcpd" title="Double-click to clear this field">
<p>4οΈβ£ Custom uci-defaults scripts:</p>
<p><pre>scripts found in <a href="" id="repoUrl">files/etc/uci-defaults</a></pre></p>
<select id="scriptsInput">
<option value=""></option>
<option value="99-custom">custom</option>
<!-- Options will be populated dynamically from the provided URL -->
</select>
<textarea id="customScriptInput" style="display: none;" name="custom_script" title="Double-click to clear this field" placeholder=""></textarea>
<p>βΆοΈ Run Workflow </p>
<button type="submit">β¨ Run Build Workflow</button>
<!-- Share Configuration Section -->
<div class="share-section">
<h3>π Share Configuration</h3>
<p>Generate a shareable URL with your current settings:</p>
<div class="button-group">
<button type="button" onclick="generateShareURL()" class="secondary-btn">π Generate Share URL</button>
<button type="button" onclick="copyShareURL()" id="copyBtn" class="success-btn" style="display: none;">π Copy URL</button>
</div>
<div id="shareURL" class="url-display" style="display: none;"></div>
</div>
</form>
<script src="assets/js/scripts.js"></script>
</body>
</html>