header privacy button fix

This commit is contained in:
samtiz 2025-07-14 03:00:28 +09:00
parent aa14a1d0b6
commit 2a3c7db200
6 changed files with 15 additions and 8 deletions

2
aec

@ -1 +1 @@
Subproject commit 9e11f4f95707714464194bdfc9db0222ec5c6163
Subproject commit f00bb1fb948053c752b916adfee19f90644a0b2f

View File

@ -1,5 +1,5 @@
// src/bridge/windowBridge.js
const { ipcMain, BrowserWindow } = require('electron');
const { ipcMain, shell } = require('electron');
const windowManager = require('../window/windowManager');
module.exports = {
@ -15,6 +15,7 @@ module.exports = {
ipcMain.handle('open-personalize-page', () => windowManager.openLoginPage());
ipcMain.handle('move-window-step', (event, direction) => windowManager.moveWindowStep(direction));
ipcMain.on('close-shortcut-editor', () => windowManager.closeWindow('shortcut-settings'));
ipcMain.handle('open-external', (event, url) => shell.openExternal(url));
// Newly moved handlers from windowManager
ipcMain.on('header-state-changed', (event, state) => windowManager.handleHeaderStateChanged(state));

View File

@ -19,6 +19,7 @@ contextBridge.exposeInMainWorld('api', {
// App Control
quitApplication: () => ipcRenderer.invoke('quit-application'),
openExternal: (url) => ipcRenderer.invoke('open-external', url),
// User state listener (used by multiple components)
onUserStateChanged: (callback) => ipcRenderer.on('user-state-changed', callback),

View File

@ -256,6 +256,7 @@ export class ApiKeyHeader extends LitElement {
.footer-link {
text-decoration: underline;
cursor: pointer;
-webkit-app-region: no-drag;
}
.error-message,
.success-message {
@ -1904,8 +1905,9 @@ export class ApiKeyHeader extends LitElement {
}
openPrivacyPolicy() {
if (window.require) {
window.require('electron').shell.openExternal('https://pickleglass.com/privacy');
console.log('🔊 openPrivacyPolicy ApiKeyHeader');
if (window.api?.common) {
window.api.common.openExternal('https://pickle.com/privacy-policy');
}
}

View File

@ -156,6 +156,7 @@ export class WelcomeHeader extends LitElement {
.footer-link {
text-decoration: underline;
cursor: pointer;
-webkit-app-region: no-drag;
}
`;
@ -177,8 +178,8 @@ export class WelcomeHeader extends LitElement {
}
handleClose() {
if (window.require) {
window.require('electron').ipcRenderer.invoke('quit-application');
if (window.api?.common) {
window.api.common.quitApplication();
}
}
@ -225,8 +226,9 @@ export class WelcomeHeader extends LitElement {
}
openPrivacyPolicy() {
if (window.require) {
window.require('electron').shell.openExternal('https://pickleglass.com/privacy');
console.log('🔊 openPrivacyPolicy WelcomeHeader');
if (window.api?.common) {
window.api.common.openExternal('https://pickle.com/privacy-policy');
}
}
}

View File

@ -640,6 +640,7 @@ function createWindows() {
frame: false,
transparent: true,
vibrancy: false,
hasShadow: false,
alwaysOnTop: true,
skipTaskbar: true,
hiddenInMissionControl: true,