feat(update): mode container -> menu Update tampil dgn pesan rebuild image (bukan disembunyikan)

This commit is contained in:
oxpoe committed 2026-10-13 04:00:25 +07:00
1 parent fed81ed5f9
commit d02c9baf7b
3 files changed
+21 -6

No files matched your search

+1 -5
View File
@@ -546,9 +546,7 @@ function forceUnlockCoreMenus() {
let states = rowStates ? JSON.parse(rowStates.value) : {};
let keys = rowKeys ? JSON.parse(rowKeys.value) : {};
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 coreMenus = ['mikrotik', 'radius_server', 'whatsapp', 'broadcast', 'update', 'settings', 'backup', 'monitoring', 'audit_logs'];
const passwordHash = 'af03458614be223016c5bc1c0788eaefc6a6bfd0c11cdcd4bc520f49d0cb474a'; // hash kode aktivasi default — plaintext hanya di settings.json (activation_code)
const crypto = require('crypto');
@@ -571,8 +569,6 @@ 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);