S-Dreamer commited on
Commit
a9d9140
·
verified ·
1 Parent(s): c86b9dc

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +125 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Hackheld Web Flasher
3
- emoji: 🔥
4
  colorFrom: green
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: hackheld-web-flasher
3
+ emoji: ⚛️
4
  colorFrom: green
5
+ colorTo: green
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - QwenSite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,125 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6
+ <title>Hackheld Web Flasher</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <style>
9
+ body {
10
+ background-color: #0d0d0d;
11
+ font-family: 'Courier New', Courier, monospace;
12
+ }
13
+ .log {
14
+ height: 300px;
15
+ overflow-y: auto;
16
+ background-color: #1a1a1a;
17
+ color: #00ff00;
18
+ padding: 1rem;
19
+ font-size: 0.85rem;
20
+ border: 1px solid #333;
21
+ white-space: pre-wrap;
22
+ }
23
+ .flash-pulse {
24
+ animation: pulse 1s infinite;
25
+ }
26
+ @keyframes pulse {
27
+ 0% { opacity: 1; }
28
+ 50% { opacity: 0.4; }
29
+ 100% { opacity: 1; }
30
+ }
31
+ </style>
32
+ </head>
33
+ <body class="text-white">
34
+
35
+ <div class="container mx-auto p-6 max-w-2xl">
36
+ <h1 class="text-3xl font-bold mb-4 text-center text-green-400">Hackheld Web Flasher</h1>
37
+
38
+ <div class="flex justify-center mb-4 space-x-4">
39
+ <button id="startBtn" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded">Start Flash</button>
40
+ <button id="stopBtn" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded">Stop</button>
41
+ <button id="resetBtn" class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded">Reset</button>
42
+ </div>
43
+
44
+ <div class="log border mb-4" id="logBox">
45
+ [INFO] Hackheld Web Flasher v1.0 initialized.<br/>
46
+ [READY] Connect device and click Start Flash.
47
+ </div>
48
+
49
+ <div class="flex justify-center items-center">
50
+ <div id="statusLight" class="w-6 h-6 rounded-full bg-gray-400"></div>
51
+ <span id="statusText" class="ml-2 text-gray-400">Status: Idle</span>
52
+ </div>
53
+ </div>
54
+
55
+ <script>
56
+ const logBox = document.getElementById('logBox');
57
+ const startBtn = document.getElementById('startBtn');
58
+ const stopBtn = document.getElementById('stopBtn');
59
+ const resetBtn = document.getElementById('resetBtn');
60
+ const statusLight = document.getElementById('statusLight');
61
+ const statusText = document.getElementById('statusText');
62
+
63
+ let flashInterval = null;
64
+ let logCount = 0;
65
+
66
+ function appendLog(message) {
67
+ logBox.innerHTML += `\n[LOG] ${message}`;
68
+ logBox.scrollTop = logBox.scrollHeight;
69
+ }
70
+
71
+ function startFlash() {
72
+ if (flashInterval) return;
73
+
74
+ statusLight.classList.remove('bg-gray-400');
75
+ statusLight.classList.add('bg-green-500', 'flash-pulse');
76
+ statusText.textContent = 'Status: Flashing';
77
+ statusText.classList.remove('text-gray-400');
78
+ statusText.classList.add('text-green-400');
79
+
80
+ appendLog('Starting flash process...');
81
+ let step = 1;
82
+
83
+ flashInterval = setInterval(() => {
84
+ if (step <= 5) {
85
+ appendLog(`Flashing sector ${step}... OK`);
86
+ step++;
87
+ } else {
88
+ appendLog('Flashing complete. Device is now booting.');
89
+ stopFlash();
90
+ }
91
+ }, 1000);
92
+ }
93
+
94
+ function stopFlash() {
95
+ if (flashInterval) {
96
+ clearInterval(flashInterval);
97
+ flashInterval = null;
98
+ }
99
+
100
+ statusLight.classList.remove('bg-green-500', 'flash-pulse');
101
+ statusLight.classList.add('bg-red-500');
102
+ statusText.textContent = 'Status: Stopped';
103
+ statusText.classList.remove('text-green-400');
104
+ statusText.classList.add('text-red-400');
105
+
106
+ appendLog('Flashing stopped.');
107
+ }
108
+
109
+ function resetLog() {
110
+ logBox.innerHTML = '[INFO] Hackheld Web Flasher v1.0 initialized.\n[READY] Connect device and click Start Flash.';
111
+ stopFlash();
112
+
113
+ statusLight.classList.remove('bg-red-500');
114
+ statusLight.classList.add('bg-gray-400');
115
+ statusText.textContent = 'Status: Idle';
116
+ statusText.classList.remove('text-red-400');
117
+ statusText.classList.add('text-gray-400');
118
+ }
119
+
120
+ startBtn.addEventListener('click', startFlash);
121
+ stopBtn.addEventListener('click', stopFlash);
122
+ resetBtn.addEventListener('click', resetLog);
123
+ </script>
124
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-qwensite.hf.space/logo.svg" alt="qwensite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-qwensite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >QwenSite</a> - 🧬 <a href="https://enzostvs-qwensite.hf.space?remix=S-Dreamer/hackheld-web-flasher" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
125
+ </html>
prompts.txt ADDED
File without changes