feat: badge kelengkapan data pelanggan; fix IP search GenieACS; mount speedtest backend; isolir-redirect embedded; sembunyikan menu Update tanpa .git

This commit is contained in:
oxpoe
2026-10-13 03:01:16 +07:00
parent b715f48f8d
commit f27c02309e
7 changed files with 27 additions and 3 deletions

View File

@@ -546,7 +546,9 @@ function forceUnlockCoreMenus() {
let states = rowStates ? JSON.parse(rowStates.value) : {};
let keys = rowKeys ? JSON.parse(rowKeys.value) : {};
const coreMenus = ['mikrotik', 'radius_server', 'whatsapp', 'broadcast', 'update', 'settings', 'backup', 'monitoring', 'audit_logs'];
const hasGit = fs.existsSync(path.join(__dirname, '..', '.git'));
const coreMenus = ['mikrotik', 'radius_server', 'whatsapp', 'broadcast', 'settings', 'backup', 'monitoring', 'audit_logs'];
if (hasGit) coreMenus.push('update');
const passwordHash = 'af03458614be223016c5bc1c0788eaefc6a6bfd0c11cdcd4bc520f49d0cb474a'; // hash kode aktivasi default — plaintext hanya di settings.json (activation_code)
const crypto = require('crypto');
@@ -569,6 +571,8 @@ function forceUnlockCoreMenus() {
}
}
if (!hasGit && states['update'] !== 'hidden') { states['update'] = 'hidden'; changed = true; }
if (changed) {
const now = new Date().toISOString();
db.prepare('INSERT OR REPLACE INTO app_settings (key, value, updated_at) VALUES (?, ?, ?)').run(SETTINGS_KEY, JSON.stringify(states), now);