v2.3: persistenter Header-Trigger fuer die Strg+K-Palette (Entdeckbarkeit, BS-08)
This commit is contained in:
@@ -39,6 +39,10 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a10 10 0 100 20 4 4 0 01-1-7.9 1 1 0 011-.1h1a2 2 0 002-2V7a5 5 0 00-3-4.5"/><circle cx="7" cy="10" r="1.5"/><circle cx="13" cy="6" r="1.5"/><circle cx="17" cy="10" r="1.5"/><circle cx="9" cy="17" r="1.5"/></svg>
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a10 10 0 100 20 4 4 0 01-1-7.9 1 1 0 011-.1h1a2 2 0 002-2V7a5 5 0 00-3-4.5"/><circle cx="7" cy="10" r="1.5"/><circle cx="13" cy="6" r="1.5"/><circle cx="17" cy="10" r="1.5"/><circle cx="9" cy="17" r="1.5"/></svg>
|
||||||
<span data-i18n="header.theme">Darstellung</span>
|
<span data-i18n="header.theme">Darstellung</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn-icon" id="btnPalette" title="Lesezeichen durchsuchen (Strg+K)" data-i18n-title="palette.discover">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||||
|
<span data-i18n="palette.discover_label">Suchen</span>
|
||||||
|
</button>
|
||||||
<button class="btn-icon" id="btnSettings" title="Einstellungen" data-i18n-title="header.settings_title">
|
<button class="btn-icon" id="btnSettings" title="Einstellungen" data-i18n-title="header.settings_title">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/></svg>
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/></svg>
|
||||||
<span data-i18n="header.settings">Settings</span>
|
<span data-i18n="header.settings">Settings</span>
|
||||||
|
|||||||
+6
-2
@@ -438,7 +438,9 @@ const STRINGS = {
|
|||||||
'palette.hint': 'Strg+K zum Öffnen · ↑↓ zum Navigieren · Enter öffnet · Esc schließt',
|
'palette.hint': 'Strg+K zum Öffnen · ↑↓ zum Navigieren · Enter öffnet · Esc schließt',
|
||||||
'palette.count': '{count} Treffer',
|
'palette.count': '{count} Treffer',
|
||||||
'palette.count_one': '1 Treffer',
|
'palette.count_one': '1 Treffer',
|
||||||
'palette.board_prefix': 'Board:'
|
'palette.board_prefix': 'Board:',
|
||||||
|
'palette.discover': 'Lesezeichen & Boards durchsuchen (Strg+K)',
|
||||||
|
'palette.discover_label': 'Suchen'
|
||||||
},
|
},
|
||||||
|
|
||||||
en: {
|
en: {
|
||||||
@@ -875,7 +877,9 @@ const STRINGS = {
|
|||||||
'palette.hint': 'Ctrl+K to open · ↑↓ to navigate · Enter opens · Esc closes',
|
'palette.hint': 'Ctrl+K to open · ↑↓ to navigate · Enter opens · Esc closes',
|
||||||
'palette.count': '{count} results',
|
'palette.count': '{count} results',
|
||||||
'palette.count_one': '1 result',
|
'palette.count_one': '1 result',
|
||||||
'palette.board_prefix': 'Board:'
|
'palette.board_prefix': 'Board:',
|
||||||
|
'palette.discover': 'Search bookmarks & boards (Ctrl+K)',
|
||||||
|
'palette.discover_label': 'Search'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -213,4 +213,14 @@ function initPalette() {
|
|||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Persistenter Header-Trigger (BS-08): Klick toggelt die Palette wie Strg+K.
|
||||||
|
const paletteBtn = document.getElementById('btnPalette');
|
||||||
|
if (paletteBtn) {
|
||||||
|
paletteBtn.addEventListener('click', () => {
|
||||||
|
if (overlay) { close(); return; }
|
||||||
|
if (isBlocked()) return;
|
||||||
|
open();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user