Skip to content

Commit f764ad5

Browse files
committed
Merge branch 'main' of https://github.com/pickle-com/glass
2 parents bcc8a59 + c464098 commit f764ad5

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
src/assets
1+
src/ui/assets
22
node_modules

aec

Submodule aec updated 1 file

electron-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ asarUnpack:
3939

4040
# Windows configuration
4141
win:
42-
icon: src/assets/logo.ico
42+
icon: src/ui/assets/logo.ico
4343
target:
4444
- target: nsis
4545
arch: x64
@@ -67,7 +67,7 @@ mac:
6767
# The application category type
6868
category: public.app-category.utilities
6969
# Path to the .icns icon file
70-
icon: src/assets/logo.icns
70+
icon: src/ui/assets/logo.icns
7171
# Minimum macOS version (supports both Intel and Apple Silicon)
7272
minimumSystemVersion: '11.0'
7373
hardenedRuntime: true

src/bridge/windowBridge.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// src/bridge/windowBridge.js
2-
const { ipcMain, BrowserWindow } = require('electron');
2+
const { ipcMain, shell } = require('electron');
33
const windowManager = require('../window/windowManager');
44

55
module.exports = {
@@ -15,6 +15,7 @@ module.exports = {
1515
ipcMain.handle('open-personalize-page', () => windowManager.openLoginPage());
1616
ipcMain.handle('move-window-step', (event, direction) => windowManager.moveWindowStep(direction));
1717
ipcMain.on('close-shortcut-editor', () => windowManager.closeWindow('shortcut-settings'));
18+
ipcMain.handle('open-external', (event, url) => shell.openExternal(url));
1819

1920
// Newly moved handlers from windowManager
2021
ipcMain.on('header-state-changed', (event, state) => windowManager.handleHeaderStateChanged(state));

src/preload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ contextBridge.exposeInMainWorld('api', {
1919

2020
// App Control
2121
quitApplication: () => ipcRenderer.invoke('quit-application'),
22+
openExternal: (url) => ipcRenderer.invoke('open-external', url),
2223

2324
// User state listener (used by multiple components)
2425
onUserStateChanged: (callback) => ipcRenderer.on('user-state-changed', callback),

src/ui/app/ApiKeyHeader.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export class ApiKeyHeader extends LitElement {
256256
.footer-link {
257257
text-decoration: underline;
258258
cursor: pointer;
259+
-webkit-app-region: no-drag;
259260
}
260261
.error-message,
261262
.success-message {
@@ -1904,8 +1905,9 @@ export class ApiKeyHeader extends LitElement {
19041905
}
19051906

19061907
openPrivacyPolicy() {
1907-
if (window.require) {
1908-
window.require('electron').shell.openExternal('https://pickleglass.com/privacy');
1908+
console.log('🔊 openPrivacyPolicy ApiKeyHeader');
1909+
if (window.api?.common) {
1910+
window.api.common.openExternal('https://pickle.com/privacy-policy');
19091911
}
19101912
}
19111913

src/ui/app/WelcomeHeader.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class WelcomeHeader extends LitElement {
156156
.footer-link {
157157
text-decoration: underline;
158158
cursor: pointer;
159+
-webkit-app-region: no-drag;
159160
}
160161
`;
161162

@@ -177,8 +178,8 @@ export class WelcomeHeader extends LitElement {
177178
}
178179

179180
handleClose() {
180-
if (window.require) {
181-
window.require('electron').ipcRenderer.invoke('quit-application');
181+
if (window.api?.common) {
182+
window.api.common.quitApplication();
182183
}
183184
}
184185

@@ -225,8 +226,9 @@ export class WelcomeHeader extends LitElement {
225226
}
226227

227228
openPrivacyPolicy() {
228-
if (window.require) {
229-
window.require('electron').shell.openExternal('https://pickleglass.com/privacy');
229+
console.log('🔊 openPrivacyPolicy WelcomeHeader');
230+
if (window.api?.common) {
231+
window.api.common.openExternal('https://pickle.com/privacy-policy');
230232
}
231233
}
232234
}

src/window/windowManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ function createWindows() {
640640
frame: false,
641641
transparent: true,
642642
vibrancy: false,
643+
hasShadow: false,
643644
alwaysOnTop: true,
644645
skipTaskbar: true,
645646
hiddenInMissionControl: true,

0 commit comments

Comments
 (0)