mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 00:19:42 +02:00
feat(ui): hide the Cron toolbar button by default (opt-in via Header Displays)
The Cron button now follows the same opt-in pattern as the Session Manager / Away Digest / File Viewer buttons: the template ships the btn-cron--hidden marker class and applyHeaderVisibilitySettings() removes it only when the per-device showCronButton setting (App Settings -> Display -> Header Displays) is enabled. Defaults flipped to false in the mobile defaults block and both ?? fallbacks. Cron jobs remain fully functional; only the launcher is opt-in. Verified in a live browser: fresh profile hides the button + unchecked toggle, enabling shows it immediately and persists across reload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -558,7 +558,7 @@
|
|||||||
<div class="toolbar-right">
|
<div class="toolbar-right">
|
||||||
<!-- Orchestrator button hidden until feature is ready -->
|
<!-- Orchestrator button hidden until feature is ready -->
|
||||||
<!-- <button class="btn-toolbar btn-sm" onclick="app.toggleOrchestratorPanel()" title="Orchestrator Loop">⚙ Orchestrator</button> -->
|
<!-- <button class="btn-toolbar btn-sm" onclick="app.toggleOrchestratorPanel()" title="Orchestrator Loop">⚙ Orchestrator</button> -->
|
||||||
<button class="btn-toolbar btn-sm btn-cron" onclick="app.openCron()" title="Cron Jobs">⏰ Cron</button>
|
<button class="btn-toolbar btn-sm btn-cron btn-cron--hidden" onclick="app.openCron()" title="Cron Jobs">⏰ Cron</button>
|
||||||
<span class="version-display" id="versionDisplay" title="Codeman version">v0.0.0</span>
|
<span class="version-display" id="versionDisplay" title="Codeman version">v0.0.0</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ Object.assign(CodemanApp.prototype, {
|
|||||||
// Session Manager + Away Digest buttons default OFF; Cron button defaults ON.
|
// Session Manager + Away Digest buttons default OFF; Cron button defaults ON.
|
||||||
document.getElementById('appSettingsShowSessionButton').checked = settings.showSessionButton ?? defaults.showSessionButton ?? false;
|
document.getElementById('appSettingsShowSessionButton').checked = settings.showSessionButton ?? defaults.showSessionButton ?? false;
|
||||||
document.getElementById('appSettingsShowAwayDigestButton').checked = settings.showAwayDigestButton ?? defaults.showAwayDigestButton ?? false;
|
document.getElementById('appSettingsShowAwayDigestButton').checked = settings.showAwayDigestButton ?? defaults.showAwayDigestButton ?? false;
|
||||||
document.getElementById('appSettingsShowCronButton').checked = settings.showCronButton ?? defaults.showCronButton ?? true;
|
document.getElementById('appSettingsShowCronButton').checked = settings.showCronButton ?? defaults.showCronButton ?? false;
|
||||||
// Gesture control lives in the Input section (alongside Local Echo / CJK Input)
|
// Gesture control lives in the Input section (alongside Local Echo / CJK Input)
|
||||||
// but is only available when the instance runs with CODEMAN_GESTURE=1 (server sets
|
// but is only available when the instance runs with CODEMAN_GESTURE=1 (server sets
|
||||||
// window.__codemanGestureAvailable). Hide just this item otherwise so the toggle
|
// window.__codemanGestureAvailable). Hide just this item otherwise so the toggle
|
||||||
@@ -1790,7 +1790,7 @@ Object.assign(CodemanApp.prototype, {
|
|||||||
showRedrawButton: false,
|
showRedrawButton: false,
|
||||||
showSessionButton: false,
|
showSessionButton: false,
|
||||||
showAwayDigestButton: false,
|
showAwayDigestButton: false,
|
||||||
showCronButton: true,
|
showCronButton: false,
|
||||||
// Remote auto-reconnect (COD-108) — on by default
|
// Remote auto-reconnect (COD-108) — on by default
|
||||||
remoteAutoReconnect: true,
|
remoteAutoReconnect: true,
|
||||||
// Input
|
// Input
|
||||||
@@ -1964,8 +1964,8 @@ Object.assign(CodemanApp.prototype, {
|
|||||||
awayDigestBtn.classList.toggle('btn-away-digest--hidden', !showAwayDigestButton);
|
awayDigestBtn.classList.toggle('btn-away-digest--hidden', !showAwayDigestButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron button (footer toolbar) — shown by default; hide when disabled.
|
// Cron button (footer toolbar) — opt-in, hidden by default. Same marker pattern.
|
||||||
const showCronButton = settings.showCronButton ?? defaults.showCronButton ?? true;
|
const showCronButton = settings.showCronButton ?? defaults.showCronButton ?? false;
|
||||||
const cronBtn = document.querySelector('.btn-cron');
|
const cronBtn = document.querySelector('.btn-cron');
|
||||||
if (cronBtn) {
|
if (cronBtn) {
|
||||||
cronBtn.classList.toggle('btn-cron--hidden', !showCronButton);
|
cronBtn.classList.toggle('btn-cron--hidden', !showCronButton);
|
||||||
|
|||||||
@@ -9569,9 +9569,9 @@ kbd {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "Cron" footer-toolbar button — shown by default (App Settings → Display can
|
/* "Cron" footer-toolbar button — opt-in, hidden by default (enable under App
|
||||||
hide it). Toolbar button, not a header icon, so only the hide marker is
|
Settings → Display → Header Displays). Toolbar button, not a header icon, so
|
||||||
needed; out-specify any base .btn-toolbar display. */
|
only the hide marker is needed; out-specify any base .btn-toolbar display. */
|
||||||
.btn-toolbar.btn-cron--hidden {
|
.btn-toolbar.btn-cron--hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user