diff --git a/main.js b/main.js index 2dbfa55..82088eb 100644 --- a/main.js +++ b/main.js @@ -636,6 +636,18 @@ ipcMain.handle('get-app-version', () => { return app.getVersion(); }); +ipcMain.handle('get-app-info', () => { + return { + version: app.getVersion(), + electron: process.versions.electron, + chrome: process.versions.chrome, + node: process.versions.node, + v8: process.versions.v8, + platform: process.platform, + arch: process.arch + }; +}); + // --- window control handlers (only registered once now) ipcMain.handle('window-minimize', event => { BrowserWindow.fromWebContents(event.sender).minimize(); @@ -706,6 +718,23 @@ ipcMain.on('homepage-changed', (event, url) => { console.log('[MAIN] homepage-changed →', url); }); +// Handle theme changes - broadcast to all windows +ipcMain.on('theme-changed', (event, theme) => { + console.log('[MAIN] theme-changed →', theme?.name || 'unknown'); + // Broadcast theme change to all browser windows + BrowserWindow.getAllWindows().forEach(win => { + if (win.webContents && win.webContents.id !== event.sender.id) { + win.webContents.send('theme-changed', theme); + } + }); +}); + +// Handle display scale changes +ipcMain.on('set-display-scale', (event, scale) => { + console.log('[MAIN] set-display-scale →', scale); + // Could be used to persist scale setting or apply to all webviews +}); + // Bookmark management ipcMain.handle('load-bookmarks', async () => { try { diff --git a/renderer/bigpicture.css b/renderer/bigpicture.css index c3e3b45..f24f426 100644 --- a/renderer/bigpicture.css +++ b/renderer/bigpicture.css @@ -386,7 +386,15 @@ body.mouse-active { } .bp-section.active { - display: block; + display: flex; + flex-direction: column; +} + +/* Special layout for settings section */ +#section-settings.active { + display: flex; + flex-direction: column; + height: 100%; } @keyframes fadeIn { @@ -940,7 +948,7 @@ body.mouse-active { margin-left: auto; } -/* Settings grid */ +/* Settings grid (legacy) */ .settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); @@ -984,6 +992,328 @@ body.mouse-active { color: var(--bp-text); } +/* New Settings UI */ +.settings-tabs { + display: flex; + gap: var(--bp-spacing-sm); + margin-bottom: var(--bp-spacing-lg); + padding-bottom: var(--bp-spacing-md); + border-bottom: 1px solid var(--bp-border); + flex-wrap: wrap; +} + +.settings-tab { + display: flex; + align-items: center; + gap: var(--bp-spacing-sm); + padding: var(--bp-spacing-sm) var(--bp-spacing-md); + background: transparent; + border: 2px solid transparent; + border-radius: var(--bp-radius-md); + color: var(--bp-text-muted); + font-size: 1rem; + font-weight: 500; + cursor: pointer; + transition: all var(--bp-transition-fast); +} + +.settings-tab:hover { + background: var(--bp-surface); + color: var(--bp-text); +} + +.settings-tab.active { + background: var(--bp-surface); + border-color: var(--bp-primary); + color: var(--bp-text); +} + +.settings-tab:focus { + outline: none; + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); +} + +.settings-tab.focused { + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); + background: var(--bp-surface); + color: var(--bp-text); +} + +.settings-tab .material-symbols-outlined { + font-size: 24px; +} + +.settings-panels { + flex: 1; + overflow-y: auto; +} + +.settings-panel { + display: none; + animation: fadeIn var(--bp-transition-normal); +} + +.settings-panel.active { + display: block; +} + +.settings-panel-title { + font-size: 1.25rem; + font-weight: 600; + color: var(--bp-text); + margin-bottom: var(--bp-spacing-md); +} + +/* Theme Grid */ +.theme-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); + gap: var(--bp-spacing-md); +} + +.theme-card { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--bp-spacing-sm); + padding: var(--bp-spacing-md); + background: var(--bp-surface); + border: 2px solid var(--bp-border); + border-radius: var(--bp-radius-lg); + cursor: pointer; + transition: all var(--bp-transition-fast); +} + +.theme-card:hover { + background: var(--bp-surface-hover); + transform: translateY(-2px); +} + +.theme-card:focus { + outline: none; + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); + transform: translateY(-2px) scale(1.02); +} + +.theme-card.focused { + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); + transform: translateY(-2px) scale(1.02); +} + +.theme-card.active { + border-color: var(--bp-accent); + box-shadow: 0 0 0 2px var(--bp-accent); +} + +.theme-preview { + width: 100%; + height: 60px; + border-radius: var(--bp-radius-sm); + box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); +} + +.theme-name { + font-size: 0.9rem; + font-weight: 500; + color: var(--bp-text); +} + +/* Settings Options */ +.settings-option { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bp-spacing-md); + background: var(--bp-surface); + border: 1px solid var(--bp-border); + border-radius: var(--bp-radius-md); + margin-bottom: var(--bp-spacing-sm); +} + +.option-info { + display: flex; + align-items: center; + gap: var(--bp-spacing-md); +} + +.option-info > .material-symbols-outlined { + font-size: 28px; + color: var(--bp-accent); +} + +.option-text { + display: flex; + flex-direction: column; + gap: 2px; +} + +.option-label { + font-size: 1rem; + font-weight: 600; + color: var(--bp-text); +} + +.option-description { + font-size: 0.85rem; + color: var(--bp-text-muted); +} + +.option-control { + display: flex; + align-items: center; + gap: var(--bp-spacing-sm); +} + +.scale-btn { + display: flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + background: var(--bp-surface-hover); + border: 2px solid var(--bp-border); + border-radius: var(--bp-radius-sm); + color: var(--bp-text); + cursor: pointer; + transition: all var(--bp-transition-fast); +} + +.scale-btn:hover { + background: var(--bp-primary); + border-color: var(--bp-primary); +} + +.scale-btn:focus { + outline: none; + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); +} + +.scale-btn.focused { + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); + background: var(--bp-primary); +} + +.scale-value { + min-width: 60px; + text-align: center; + font-size: 1.1rem; + font-weight: 600; + color: var(--bp-text); +} + +.action-button { + display: flex; + align-items: center; + gap: var(--bp-spacing-sm); + padding: var(--bp-spacing-sm) var(--bp-spacing-md); + background: var(--bp-surface-hover); + border: 2px solid var(--bp-border); + border-radius: var(--bp-radius-md); + color: var(--bp-text); + font-size: 0.95rem; + font-weight: 500; + cursor: pointer; + transition: all var(--bp-transition-fast); +} + +.action-button:hover { + background: var(--bp-primary); + border-color: var(--bp-primary); +} + +.action-button:focus { + outline: none; + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); +} + +.action-button.focused { + border-color: var(--bp-primary); + box-shadow: var(--bp-focus-ring); + background: var(--bp-primary); +} + +.action-button.danger:hover { + background: #dc3545; + border-color: #dc3545; +} + +/* About Panel */ +.about-info { + display: flex; + flex-direction: column; + gap: var(--bp-spacing-lg); +} + +.about-logo { + display: flex; + align-items: center; + gap: var(--bp-spacing-md); + padding: var(--bp-spacing-md); + background: var(--bp-surface); + border-radius: var(--bp-radius-lg); +} + +.about-logo-img { + width: 64px; + height: 64px; +} + +.about-title h3 { + font-size: 1.5rem; + font-weight: 600; + color: var(--bp-text); + margin: 0; +} + +.about-title span { + font-size: 0.9rem; + color: var(--bp-text-muted); +} + +.about-details { + display: flex; + flex-direction: column; + gap: var(--bp-spacing-xs); + padding: var(--bp-spacing-md); + background: var(--bp-surface); + border-radius: var(--bp-radius-md); +} + +.about-row { + display: flex; + justify-content: space-between; + padding: var(--bp-spacing-xs) 0; + border-bottom: 1px solid var(--bp-border); +} + +.about-row:last-child { + border-bottom: none; +} + +.about-label { + color: var(--bp-text-muted); + font-size: 0.9rem; +} + +.about-value { + color: var(--bp-text); + font-weight: 500; + font-size: 0.9rem; +} + +.about-actions { + display: flex; + gap: var(--bp-spacing-md); + flex-wrap: wrap; +} + /* Footer controller hints */ .bp-footer { position: relative; diff --git a/renderer/bigpicture.html b/renderer/bigpicture.html index 551bc9e..88a0c0f 100644 --- a/renderer/bigpicture.html +++ b/renderer/bigpicture.html @@ -211,22 +211,212 @@
Configure your browser
-