feat(kiosk): add native settings shortcut in webapp settings page
This commit is contained in:
@@ -2337,6 +2337,9 @@ async function loadSettingsUI() {
|
||||
// Show kiosk self-update panel
|
||||
const updatePanel = document.getElementById('kiosk-update-panel');
|
||||
if (updatePanel) updatePanel.style.display = '';
|
||||
// Show kiosk native settings shortcut panel
|
||||
const nativePanel = document.getElementById('kiosk-native-settings-panel');
|
||||
if (nativePanel) nativePanel.style.display = '';
|
||||
}
|
||||
|
||||
// Populate About section version
|
||||
@@ -2356,6 +2359,19 @@ function _kioskReconfigureScale() {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Kiosk: open native SettingsActivity (server URL, BLE, screensaver) ──
|
||||
function _openKioskNativeSettings() {
|
||||
if (typeof _kioskBridge === 'undefined') return;
|
||||
if (typeof _kioskBridge.openNativeSettings === 'function') {
|
||||
try { _kioskBridge.openNativeSettings(); } catch(e) {}
|
||||
} else {
|
||||
// Older APK without openNativeSettings — make the native gear button
|
||||
// temporarily visible with a hint to tap it.
|
||||
try { _kioskBridge.setNativeSettingsVisible(true); } catch(_) {}
|
||||
showToast(t('settings.kiosk.native_tap_hint') || 'Tocca la rotella ⚙️ in alto a destra', 'info', 4000);
|
||||
}
|
||||
}
|
||||
|
||||
// ── Kiosk: manual update check ────────────────────────────────────────
|
||||
let _kioskPendingApkUrl = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user