reaper-arcade-hub 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +3 -27
- package/js/app.js +2 -43
- package/main/index.html +3 -27
- package/main/js/app.js +2 -43
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -173,20 +173,14 @@
|
|
|
173
173
|
<input type="text" id="opium-search-input" class="opium-search-input" placeholder="Search 780+ games or topics..." autocomplete="off" onkeydown="if(event.key==='Enter') app.handleOpiumSearch()">
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
|
-
<!-- Quick Navigation Tiles
|
|
177
|
-
<div style="display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; max-width:
|
|
176
|
+
<!-- Quick Navigation Tiles -->
|
|
177
|
+
<div style="display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; max-width: 580px; margin-bottom: 1.25rem;">
|
|
178
178
|
<button class="btn-primary" style="padding: 0.75rem 1.4rem; font-size: 0.88rem;" onclick="app.switchTab('games')">
|
|
179
179
|
BROWSE 788 GAMES
|
|
180
180
|
</button>
|
|
181
181
|
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem;" onclick="app.switchTab('leaderboard')">
|
|
182
182
|
PLAYTIME LEADERBOARD
|
|
183
183
|
</button>
|
|
184
|
-
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem; color: #00ffaa; border-color: rgba(0,255,170,0.3);" onclick="app.exportSaveData()" title="Backup your game saves">
|
|
185
|
-
💾 BACKUP SAVES
|
|
186
|
-
</button>
|
|
187
|
-
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem; color: #ffd700; border-color: rgba(255,215,0,0.3);" onclick="app.importSaveData()" title="Restore game save data">
|
|
188
|
-
📥 RESTORE SAVES
|
|
189
|
-
</button>
|
|
190
184
|
</div>
|
|
191
185
|
</div>
|
|
192
186
|
</section>
|
|
@@ -604,7 +598,6 @@
|
|
|
604
598
|
<div style="display: flex; border-bottom: 1px solid var(--blue-border); background: #030a18; padding: 0.5rem 1.4rem; gap: 0.5rem; overflow-x: auto;">
|
|
605
599
|
<button class="nav-tab-btn active" id="st-tab-btn-shield" onclick="app.switchSettingsTab('shield')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">🛡️ Security Shield</button>
|
|
606
600
|
<button class="nav-tab-btn" id="st-tab-btn-prefs" onclick="app.switchSettingsTab('prefs')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">⚡ Preferences & Audio</button>
|
|
607
|
-
<button class="nav-tab-btn" id="st-tab-btn-saves" onclick="app.switchSettingsTab('saves')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">💾 Game Saves</button>
|
|
608
601
|
<button class="nav-tab-btn" id="st-tab-btn-identity" onclick="app.switchSettingsTab('identity')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">🔑 Device & Rank</button>
|
|
609
602
|
</div>
|
|
610
603
|
|
|
@@ -696,24 +689,7 @@
|
|
|
696
689
|
</div>
|
|
697
690
|
</div>
|
|
698
691
|
|
|
699
|
-
<!-- SUBTAB 3:
|
|
700
|
-
<div id="st-content-saves" style="display: none;">
|
|
701
|
-
<div style="display: flex; flex-direction: column; gap: 1.2rem;">
|
|
702
|
-
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
|
703
|
-
<strong style="color: #00ffaa; font-size: 0.95rem;">💾 Export & Backup Game Save Data</strong>
|
|
704
|
-
<p style="color: #88aacc; font-size: 0.8rem; margin: 0.4rem 0 0.85rem 0;">Download a single backup file containing all your local progress for Slope, Subway Surfers, BitLife, Retro Bowl, 1v1.LOL, and more.</p>
|
|
705
|
-
<button class="btn-primary" onclick="app.exportSaveData()" style="background: #00ffaa; color: #000; border-color: #00ffaa; font-size: 0.82rem;">💾 DOWNLOAD SAVE BACKUP</button>
|
|
706
|
-
</div>
|
|
707
|
-
|
|
708
|
-
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
|
709
|
-
<strong style="color: #ffd700; font-size: 0.95rem;">📥 Import & Restore Game Save Data</strong>
|
|
710
|
-
<p style="color: #88aacc; font-size: 0.8rem; margin: 0.4rem 0 0.85rem 0;">Upload a previously downloaded JSON save backup file to restore all your game saves instantly.</p>
|
|
711
|
-
<button class="btn-primary" onclick="app.importSaveData()" style="background: #ffd700; color: #000; border-color: #ffd700; font-size: 0.82rem;">📥 RESTORE SAVE BACKUP</button>
|
|
712
|
-
</div>
|
|
713
|
-
</div>
|
|
714
|
-
</div>
|
|
715
|
-
|
|
716
|
-
<!-- SUBTAB 4: IDENTITY & HWID -->
|
|
692
|
+
<!-- SUBTAB 3: IDENTITY & HWID -->
|
|
717
693
|
<div id="st-content-identity" style="display: none;">
|
|
718
694
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
719
695
|
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
package/js/app.js
CHANGED
|
@@ -961,7 +961,7 @@ class ReaperHubApp {
|
|
|
961
961
|
localStorage.setItem('reaper_playtime_' + this.currentUser.username, this.playtimeSeconds.toString());
|
|
962
962
|
this.updatePlaytimeStatusUI();
|
|
963
963
|
|
|
964
|
-
if (this.playtimeSeconds %
|
|
964
|
+
if (this.playtimeSeconds % 5 === 0) {
|
|
965
965
|
this.syncPlaytimeToDB();
|
|
966
966
|
}
|
|
967
967
|
}
|
|
@@ -1378,47 +1378,6 @@ class ReaperHubApp {
|
|
|
1378
1378
|
this.showToast("Recently played list cleared.");
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
|
-
exportSaveData() {
|
|
1382
|
-
const backup = {};
|
|
1383
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
1384
|
-
const key = localStorage.key(i);
|
|
1385
|
-
backup[key] = localStorage.getItem(key);
|
|
1386
|
-
}
|
|
1387
|
-
const blob = new Blob([JSON.stringify(backup, null, 2)], { type: 'application/json' });
|
|
1388
|
-
const url = URL.createObjectURL(blob);
|
|
1389
|
-
const a = document.createElement('a');
|
|
1390
|
-
a.href = url;
|
|
1391
|
-
a.download = `reaper_save_backup_${new Date().toISOString().slice(0,10)}.json`;
|
|
1392
|
-
a.click();
|
|
1393
|
-
URL.revokeObjectURL(url);
|
|
1394
|
-
this.showToast("Game save data downloaded! 💾");
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
importSaveData() {
|
|
1398
|
-
const input = document.createElement('input');
|
|
1399
|
-
input.type = 'file';
|
|
1400
|
-
input.accept = '.json';
|
|
1401
|
-
input.onchange = (e) => {
|
|
1402
|
-
const file = e.target.files[0];
|
|
1403
|
-
if (!file) return;
|
|
1404
|
-
const reader = new FileReader();
|
|
1405
|
-
reader.onload = (event) => {
|
|
1406
|
-
try {
|
|
1407
|
-
const data = JSON.parse(event.target.result);
|
|
1408
|
-
Object.entries(data).forEach(([k, v]) => {
|
|
1409
|
-
localStorage.setItem(k, v);
|
|
1410
|
-
});
|
|
1411
|
-
this.showToast("Save data restored! Reloading...");
|
|
1412
|
-
setTimeout(() => window.location.reload(), 1200);
|
|
1413
|
-
} catch (err) {
|
|
1414
|
-
alert("Invalid backup file.");
|
|
1415
|
-
}
|
|
1416
|
-
};
|
|
1417
|
-
reader.readAsText(file);
|
|
1418
|
-
};
|
|
1419
|
-
input.click();
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
1381
|
toggleSoundFX() {
|
|
1423
1382
|
if (window.reaperSFX) {
|
|
1424
1383
|
const enabled = window.reaperSFX.toggleSound();
|
|
@@ -2030,7 +1989,7 @@ class ReaperHubApp {
|
|
|
2030
1989
|
}
|
|
2031
1990
|
|
|
2032
1991
|
switchSettingsTab(tabName) {
|
|
2033
|
-
['shield', 'prefs', '
|
|
1992
|
+
['shield', 'prefs', 'identity'].forEach(t => {
|
|
2034
1993
|
const btn = document.getElementById(`st-tab-btn-${t}`);
|
|
2035
1994
|
const content = document.getElementById(`st-content-${t}`);
|
|
2036
1995
|
if (btn) btn.classList.toggle('active', t === tabName);
|
package/main/index.html
CHANGED
|
@@ -173,20 +173,14 @@
|
|
|
173
173
|
<input type="text" id="opium-search-input" class="opium-search-input" placeholder="Search 780+ games or topics..." autocomplete="off" onkeydown="if(event.key==='Enter') app.handleOpiumSearch()">
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
|
-
<!-- Quick Navigation Tiles
|
|
177
|
-
<div style="display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; max-width:
|
|
176
|
+
<!-- Quick Navigation Tiles -->
|
|
177
|
+
<div style="display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; max-width: 580px; margin-bottom: 1.25rem;">
|
|
178
178
|
<button class="btn-primary" style="padding: 0.75rem 1.4rem; font-size: 0.88rem;" onclick="app.switchTab('games')">
|
|
179
179
|
BROWSE 788 GAMES
|
|
180
180
|
</button>
|
|
181
181
|
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem;" onclick="app.switchTab('leaderboard')">
|
|
182
182
|
PLAYTIME LEADERBOARD
|
|
183
183
|
</button>
|
|
184
|
-
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem; color: #00ffaa; border-color: rgba(0,255,170,0.3);" onclick="app.exportSaveData()" title="Backup your game saves">
|
|
185
|
-
💾 BACKUP SAVES
|
|
186
|
-
</button>
|
|
187
|
-
<button class="btn-stealth" style="padding: 0.75rem 1.4rem; font-size: 0.88rem; color: #ffd700; border-color: rgba(255,215,0,0.3);" onclick="app.importSaveData()" title="Restore game save data">
|
|
188
|
-
📥 RESTORE SAVES
|
|
189
|
-
</button>
|
|
190
184
|
</div>
|
|
191
185
|
</div>
|
|
192
186
|
</section>
|
|
@@ -604,7 +598,6 @@
|
|
|
604
598
|
<div style="display: flex; border-bottom: 1px solid var(--blue-border); background: #030a18; padding: 0.5rem 1.4rem; gap: 0.5rem; overflow-x: auto;">
|
|
605
599
|
<button class="nav-tab-btn active" id="st-tab-btn-shield" onclick="app.switchSettingsTab('shield')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">🛡️ Security Shield</button>
|
|
606
600
|
<button class="nav-tab-btn" id="st-tab-btn-prefs" onclick="app.switchSettingsTab('prefs')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">⚡ Preferences & Audio</button>
|
|
607
|
-
<button class="nav-tab-btn" id="st-tab-btn-saves" onclick="app.switchSettingsTab('saves')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">💾 Game Saves</button>
|
|
608
601
|
<button class="nav-tab-btn" id="st-tab-btn-identity" onclick="app.switchSettingsTab('identity')" style="padding: 0.45rem 1rem; font-size: 0.82rem;">🔑 Device & Rank</button>
|
|
609
602
|
</div>
|
|
610
603
|
|
|
@@ -696,24 +689,7 @@
|
|
|
696
689
|
</div>
|
|
697
690
|
</div>
|
|
698
691
|
|
|
699
|
-
<!-- SUBTAB 3:
|
|
700
|
-
<div id="st-content-saves" style="display: none;">
|
|
701
|
-
<div style="display: flex; flex-direction: column; gap: 1.2rem;">
|
|
702
|
-
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
|
703
|
-
<strong style="color: #00ffaa; font-size: 0.95rem;">💾 Export & Backup Game Save Data</strong>
|
|
704
|
-
<p style="color: #88aacc; font-size: 0.8rem; margin: 0.4rem 0 0.85rem 0;">Download a single backup file containing all your local progress for Slope, Subway Surfers, BitLife, Retro Bowl, 1v1.LOL, and more.</p>
|
|
705
|
-
<button class="btn-primary" onclick="app.exportSaveData()" style="background: #00ffaa; color: #000; border-color: #00ffaa; font-size: 0.82rem;">💾 DOWNLOAD SAVE BACKUP</button>
|
|
706
|
-
</div>
|
|
707
|
-
|
|
708
|
-
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
|
709
|
-
<strong style="color: #ffd700; font-size: 0.95rem;">📥 Import & Restore Game Save Data</strong>
|
|
710
|
-
<p style="color: #88aacc; font-size: 0.8rem; margin: 0.4rem 0 0.85rem 0;">Upload a previously downloaded JSON save backup file to restore all your game saves instantly.</p>
|
|
711
|
-
<button class="btn-primary" onclick="app.importSaveData()" style="background: #ffd700; color: #000; border-color: #ffd700; font-size: 0.82rem;">📥 RESTORE SAVE BACKUP</button>
|
|
712
|
-
</div>
|
|
713
|
-
</div>
|
|
714
|
-
</div>
|
|
715
|
-
|
|
716
|
-
<!-- SUBTAB 4: IDENTITY & HWID -->
|
|
692
|
+
<!-- SUBTAB 3: IDENTITY & HWID -->
|
|
717
693
|
<div id="st-content-identity" style="display: none;">
|
|
718
694
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
719
695
|
<div style="background: #040e1e; border: 1px solid var(--blue-border); padding: 1rem 1.25rem; border-radius: 8px;">
|
package/main/js/app.js
CHANGED
|
@@ -961,7 +961,7 @@ class ReaperHubApp {
|
|
|
961
961
|
localStorage.setItem('reaper_playtime_' + this.currentUser.username, this.playtimeSeconds.toString());
|
|
962
962
|
this.updatePlaytimeStatusUI();
|
|
963
963
|
|
|
964
|
-
if (this.playtimeSeconds %
|
|
964
|
+
if (this.playtimeSeconds % 5 === 0) {
|
|
965
965
|
this.syncPlaytimeToDB();
|
|
966
966
|
}
|
|
967
967
|
}
|
|
@@ -1378,47 +1378,6 @@ class ReaperHubApp {
|
|
|
1378
1378
|
this.showToast("Recently played list cleared.");
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
|
-
exportSaveData() {
|
|
1382
|
-
const backup = {};
|
|
1383
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
1384
|
-
const key = localStorage.key(i);
|
|
1385
|
-
backup[key] = localStorage.getItem(key);
|
|
1386
|
-
}
|
|
1387
|
-
const blob = new Blob([JSON.stringify(backup, null, 2)], { type: 'application/json' });
|
|
1388
|
-
const url = URL.createObjectURL(blob);
|
|
1389
|
-
const a = document.createElement('a');
|
|
1390
|
-
a.href = url;
|
|
1391
|
-
a.download = `reaper_save_backup_${new Date().toISOString().slice(0,10)}.json`;
|
|
1392
|
-
a.click();
|
|
1393
|
-
URL.revokeObjectURL(url);
|
|
1394
|
-
this.showToast("Game save data downloaded! 💾");
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
importSaveData() {
|
|
1398
|
-
const input = document.createElement('input');
|
|
1399
|
-
input.type = 'file';
|
|
1400
|
-
input.accept = '.json';
|
|
1401
|
-
input.onchange = (e) => {
|
|
1402
|
-
const file = e.target.files[0];
|
|
1403
|
-
if (!file) return;
|
|
1404
|
-
const reader = new FileReader();
|
|
1405
|
-
reader.onload = (event) => {
|
|
1406
|
-
try {
|
|
1407
|
-
const data = JSON.parse(event.target.result);
|
|
1408
|
-
Object.entries(data).forEach(([k, v]) => {
|
|
1409
|
-
localStorage.setItem(k, v);
|
|
1410
|
-
});
|
|
1411
|
-
this.showToast("Save data restored! Reloading...");
|
|
1412
|
-
setTimeout(() => window.location.reload(), 1200);
|
|
1413
|
-
} catch (err) {
|
|
1414
|
-
alert("Invalid backup file.");
|
|
1415
|
-
}
|
|
1416
|
-
};
|
|
1417
|
-
reader.readAsText(file);
|
|
1418
|
-
};
|
|
1419
|
-
input.click();
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
1381
|
toggleSoundFX() {
|
|
1423
1382
|
if (window.reaperSFX) {
|
|
1424
1383
|
const enabled = window.reaperSFX.toggleSound();
|
|
@@ -2030,7 +1989,7 @@ class ReaperHubApp {
|
|
|
2030
1989
|
}
|
|
2031
1990
|
|
|
2032
1991
|
switchSettingsTab(tabName) {
|
|
2033
|
-
['shield', 'prefs', '
|
|
1992
|
+
['shield', 'prefs', 'identity'].forEach(t => {
|
|
2034
1993
|
const btn = document.getElementById(`st-tab-btn-${t}`);
|
|
2035
1994
|
const content = document.getElementById(`st-content-${t}`);
|
|
2036
1995
|
if (btn) btn.classList.toggle('active', t === tabName);
|
package/package.json
CHANGED