fix(core): disable toolbar action buttons in preview mode

- _updateModeButtons now disables edit-action buttons in preview mode
- Mode-switch buttons (edit/split/preview/fullscreen) and undo/redo remain active
- CSS: .me-btn:disabled with opacity 0.35, cursor not-allowed, pointer-events none
- Constructor calls _updateModeButtons on init for correct initial state
This commit is contained in:
2026-07-24 10:46:45 +08:00
parent a7a66e113f
commit f4921c9447
2 changed files with 27 additions and 2 deletions
+1
View File
@@ -93,6 +93,7 @@ const generateCSS = () => {
.me-btn:hover { background: var(--md-code-bg); color: var(--md-accent); }
.me-btn:active { transform: scale(0.92); }
.me-btn.me-active { background: var(--md-accent); color: #fff; }
.me-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.me-btn:focus-visible { outline: 2px solid var(--md-accent); outline-offset: 1px; }
.me-btn svg { width: 17px; height: 17px; display: block; }
.me-btn span { font-size: 12px; font-weight: 500; }