Reaperxxxx commited on
Commit
4c261c5
·
verified ·
1 Parent(s): 992ca58

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +35 -4
index.html CHANGED
@@ -192,15 +192,15 @@
192
  <!-- Tool status -->
193
  <div class="tool-status" id="toolStatus"></div>
194
 
195
- <!-- Upload -->
196
- <div class="upload-zone" id="uploadZone">
197
  <div class="upload-icon">📦</div>
198
  <div class="upload-title">Drop SuperCity.apk here</div>
199
  <div class="upload-sub">or click to browse · .apk files only · max 200 MB</div>
200
  <input type="file" id="apkInput" accept=".apk">
201
  </div>
202
- <!-- URL Upload -->
203
- <div class="url-upload-wrap" id="urlUploadWrap">
204
  <div class="url-upload-inner">
205
  <span class="url-label">or load from URL</span>
206
  <input class="url-input" type="text" id="apkUrlInput" placeholder="https://example.com/SuperCity.apk">
@@ -336,6 +336,37 @@ fetch('/tools').then(r => r.json()).then(tools => {
336
  }
337
  }).catch(() => {});
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  // ── UPLOAD ─────────────────────────────────────────────────────────
340
  const uploadZone = document.getElementById('uploadZone');
341
  const apkInput = document.getElementById('apkInput');
 
192
  <!-- Tool status -->
193
  <div class="tool-status" id="toolStatus"></div>
194
 
195
+ <!-- Upload (hidden — APK loaded from server) -->
196
+ <div class="upload-zone" id="uploadZone" style="display:none;">
197
  <div class="upload-icon">📦</div>
198
  <div class="upload-title">Drop SuperCity.apk here</div>
199
  <div class="upload-sub">or click to browse · .apk files only · max 200 MB</div>
200
  <input type="file" id="apkInput" accept=".apk">
201
  </div>
202
+ <!-- URL Upload (hidden) -->
203
+ <div class="url-upload-wrap" id="urlUploadWrap" style="display:none;">
204
  <div class="url-upload-inner">
205
  <span class="url-label">or load from URL</span>
206
  <input class="url-input" type="text" id="apkUrlInput" placeholder="https://example.com/SuperCity.apk">
 
336
  }
337
  }).catch(() => {});
338
 
339
+ // ── AUTO-INIT ──────────────────────────────────────────────────────
340
+ (function initFromServer() {
341
+ const wrap = document.getElementById('progressWrap');
342
+ const bar = document.getElementById('progressBar');
343
+ const label = document.getElementById('progressLabel');
344
+ wrap.style.display = 'block';
345
+ bar.style.width = '30%';
346
+ label.textContent = 'Loading APK…';
347
+
348
+ fetch('/init')
349
+ .then(r => { if (!r.ok) return r.json().then(e => { throw new Error(e.error); }); return r.json(); })
350
+ .then(data => {
351
+ bar.style.width = '100%';
352
+ sessionToken = data.token;
353
+ originalRaw = data.characters;
354
+ parseCharacters(data.characters);
355
+ wrap.style.display = 'none';
356
+ document.getElementById('fileInfoBar').style.display = 'flex';
357
+ document.getElementById('fileInfoBar').innerHTML = `
358
+ <div class="file-info">📦 <span class="file-info-name">super-city-2.010.64-mod-t-5play.apk</span>
359
+ &nbsp;·&nbsp; ${characters.length} characters loaded</div>`;
360
+ document.getElementById('editorLayout').style.display = 'grid';
361
+ setStep(2);
362
+ showToast(`✔ Loaded ${characters.length} characters`);
363
+ })
364
+ .catch(err => {
365
+ wrap.style.display = 'none';
366
+ showToast('Failed to load APK: ' + err.message, true);
367
+ });
368
+ })();
369
+
370
  // ── UPLOAD ─────────────────────────────────────────────────────────
371
  const uploadZone = document.getElementById('uploadZone');
372
  const apkInput = document.getElementById('apkInput');