fix: image-ref Titel-Bug, CSP, ARIA-Labels, Onboarding i18n
- image-ref.js: .widget-title-text → .widget-title (Titel-Update war kaputt) - Alle 3 Manifests: explizites content_security_policy (script-src/object-src 'self') - i18n.js: applyLanguage() setzt aria-label synchron zu title - newtab.html: 6 Close-Buttons + Search-Submit mit data-i18n-title - i18n.js: 4 neue Keys (dialog.close, search.submit_title, onboarding.tradecenter_desc) - onboarding.js: TradeCenter-Beschreibung auf t() umgestellt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
"matches": ["<all_urls>"]
|
||||
}
|
||||
],
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self'"
|
||||
},
|
||||
"icons": {
|
||||
"16": "assets/icons/icon16.png",
|
||||
"48": "assets/icons/icon48.png",
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
"matches": ["<all_urls>"]
|
||||
}
|
||||
],
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self'"
|
||||
},
|
||||
"icons": {
|
||||
"16": "assets/icons/icon16.png",
|
||||
"48": "assets/icons/icon48.png",
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
"default_title": "Hellion Dashboard"
|
||||
},
|
||||
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self'"
|
||||
},
|
||||
"icons": {
|
||||
"16": "assets/icons/icon16.png",
|
||||
"48": "assets/icons/icon48.png",
|
||||
|
||||
+7
-7
@@ -53,7 +53,7 @@
|
||||
<span id="searchEngineIcon">G</span>
|
||||
</button>
|
||||
<input type="text" class="search-input" id="searchInput" data-i18n-placeholder="search.placeholder" placeholder="Search the web…" autocomplete="off" />
|
||||
<button class="search-submit" id="searchSubmit">
|
||||
<button class="search-submit" id="searchSubmit" data-i18n-title="search.submit_title">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -86,7 +86,7 @@
|
||||
<aside class="notebook-panel" id="notebookPanel">
|
||||
<div class="notebook-header">
|
||||
<span class="notebook-header-title"><span data-i18n="notebook.title">Notebook</span> <span class="notebook-count" id="notebookCount">0 / 5</span></span>
|
||||
<button class="btn-close" id="btnCloseNotebook">✕</button>
|
||||
<button class="btn-close" id="btnCloseNotebook" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="notebook-slots" id="notebookSlots">
|
||||
<!-- dynamisch via JS -->
|
||||
@@ -106,7 +106,7 @@
|
||||
<aside class="settings-panel" id="settingsPanel">
|
||||
<div class="panel-header">
|
||||
<span data-i18n="settings.title">Einstellungen</span>
|
||||
<button class="btn-close" id="btnCloseSettings">✕</button>
|
||||
<button class="btn-close" id="btnCloseSettings" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
<div class="theme-modal" id="themeModal">
|
||||
<div class="modal-header">
|
||||
<span data-i18n="modal.theme_header">Darstellung</span>
|
||||
<button class="btn-close" id="btnCloseTheme">✕</button>
|
||||
<button class="btn-close" id="btnCloseTheme" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="theme-grid">
|
||||
<div class="theme-card active" data-value="nebula">
|
||||
@@ -439,7 +439,7 @@
|
||||
<div class="modal">
|
||||
<div class="modal-header">
|
||||
<span data-i18n="modal.new_board">New Board</span>
|
||||
<button class="btn-close" id="btnCancelBoard">✕</button>
|
||||
<button class="btn-close" id="btnCancelBoard" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" class="text-input full-width" id="newBoardName" data-i18n-placeholder="modal.board_name" placeholder="Board name..." maxlength="40" />
|
||||
@@ -455,7 +455,7 @@
|
||||
<div class="modal">
|
||||
<div class="modal-header">
|
||||
<span data-i18n="modal.new_bookmark">New Bookmark</span>
|
||||
<button class="btn-close" id="btnCancelBookmark">✕</button>
|
||||
<button class="btn-close" id="btnCancelBookmark" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" class="text-input full-width" id="newBmTitle" data-i18n-placeholder="modal.bm_title" placeholder="Title..." maxlength="60" />
|
||||
@@ -473,7 +473,7 @@
|
||||
<div class="modal">
|
||||
<div class="modal-header">
|
||||
<span data-i18n="modal.rename">Rename</span>
|
||||
<button class="btn-close" id="btnCancelRename">✕</button>
|
||||
<button class="btn-close" id="btnCancelRename" data-i18n-title="dialog.close">✕</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" class="text-input full-width" id="renameInput" data-i18n-placeholder="modal.rename_placeholder" placeholder="New name..." maxlength="60" />
|
||||
|
||||
+9
-1
@@ -10,6 +10,7 @@ const STRINGS = {
|
||||
'dialog.ok': 'OK',
|
||||
'dialog.confirm_title': 'Bestätigung',
|
||||
'dialog.cancel': 'Abbrechen',
|
||||
'dialog.close': 'Schließen',
|
||||
|
||||
// Boards
|
||||
'boards.empty_state_pre': 'Noch keine Boards. Klicke auf ',
|
||||
@@ -56,6 +57,7 @@ const STRINGS = {
|
||||
'onboarding.s5.text': 'Deine Daten sind lokal im Browser gespeichert. Wenn du Browserdaten löschst, gehen sie verloren! Sichere regelmäßig über Settings → Data → Export. Wir erinnern dich alle 7 Tage daran.',
|
||||
'onboarding.s6.title': 'Gaming Starter Board',
|
||||
'onboarding.s6.text': 'Spielst du Games wie Satisfactory, Factorio oder Star Citizen? Ich kann ein Board mit nützlichen Community-Links anlegen.',
|
||||
'onboarding.tradecenter_desc': 'Trade Center für Star Citizen',
|
||||
'onboarding.s7.title': 'Bereit!',
|
||||
'onboarding.s7.text': 'Erstelle dein erstes Board mit „+ Board" oder importiere deine Browser-Lesezeichen über den Import-Button im Header. Viel Spaß!',
|
||||
|
||||
@@ -299,6 +301,7 @@ const STRINGS = {
|
||||
|
||||
// Suche
|
||||
'search.placeholder': 'Im Web suchen…',
|
||||
'search.submit_title': 'Suchen',
|
||||
|
||||
// Widget-Toolbar Tooltips
|
||||
'toolbar.note': 'Note erstellen',
|
||||
@@ -315,6 +318,7 @@ const STRINGS = {
|
||||
'dialog.ok': 'OK',
|
||||
'dialog.confirm_title': 'Confirmation',
|
||||
'dialog.cancel': 'Cancel',
|
||||
'dialog.close': 'Close',
|
||||
|
||||
// Boards
|
||||
'boards.empty_state_pre': 'No boards yet. Click ',
|
||||
@@ -361,6 +365,7 @@ const STRINGS = {
|
||||
'onboarding.s5.text': 'Your data is stored locally in the browser. If you clear browser data, it\'s gone! Back up regularly via Settings → Data → Export. We\'ll remind you every 7 days.',
|
||||
'onboarding.s6.title': 'Gaming Starter Board',
|
||||
'onboarding.s6.text': 'Do you play games like Satisfactory, Factorio or Star Citizen? I can create a board with useful community links.',
|
||||
'onboarding.tradecenter_desc': 'Trade Center for Star Citizen',
|
||||
'onboarding.s7.title': 'Ready!',
|
||||
'onboarding.s7.text': 'Create your first board with "+ Board" or import your browser bookmarks via the Import button in the header. Have fun!',
|
||||
|
||||
@@ -604,6 +609,7 @@ const STRINGS = {
|
||||
|
||||
// Search
|
||||
'search.placeholder': 'Search the web…',
|
||||
'search.submit_title': 'Search',
|
||||
|
||||
// Widget toolbar tooltips
|
||||
'toolbar.note': 'Create note',
|
||||
@@ -647,7 +653,9 @@ function applyLanguage() {
|
||||
el.placeholder = t(el.dataset.i18nPlaceholder);
|
||||
});
|
||||
document.querySelectorAll('[data-i18n-title]').forEach(el => {
|
||||
el.title = t(el.dataset.i18nTitle);
|
||||
const text = t(el.dataset.i18nTitle);
|
||||
el.title = text;
|
||||
el.setAttribute('aria-label', text);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@ const ImageRef = {
|
||||
// Widget-Titel aktualisieren
|
||||
const entry = WidgetManager._widgets.get(imageData.id);
|
||||
if (entry) {
|
||||
const titleEl = entry.el.querySelector('.widget-title-text');
|
||||
const titleEl = entry.el.querySelector('.widget-title');
|
||||
if (titleEl) titleEl.textContent = text || t('imageref.title');
|
||||
entry.state.title = text || t('imageref.title');
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ const Onboarding = {
|
||||
{ id: uid(), title: 'Modrinth (Mods)', url: 'https://modrinth.com', desc: '' },
|
||||
{ id: uid(), title: 'Star Citizen Wiki', url: 'https://starcitizen.tools', desc: '' },
|
||||
{ id: uid(), title: 'UEX Corp (Trading)', url: 'https://uexcorp.space', desc: '' },
|
||||
{ id: uid(), title: 'Hellion TradeCenter', url: 'https://hellion-initiative.online/tradecenter', desc: 'Trade Center f\u00FCr Star Citizen' }
|
||||
{ id: uid(), title: 'Hellion TradeCenter', url: 'https://hellion-initiative.online/tradecenter', desc: t('onboarding.tradecenter_desc') }
|
||||
],
|
||||
blurred: false
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user