feat: frameless title bar for Windows/Linux with native overlay controls
Use titleBarStyle: 'hidden' + titleBarOverlay on Win/Linux to remove the ugly native title bar and menu bar while keeping OS-rendered min/max/close buttons. Hidden Edit menu preserves keyboard shortcuts (Ctrl+C/V/X/Z/A). Title bar drag region and separator line rendered via web frontend, with colors matching the Aether Drift design system. Also adds electron-builder metadata (description, author, homepage, artifactName) and multi-size icons for cross-platform builds.
|
After Width: | Height: | Size: 701 KiB |
|
After Width: | Height: | Size: 701 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 914 B |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -1,5 +1,6 @@
|
||||
appId: com.backspace.desktop
|
||||
productName: Backspace
|
||||
artifactName: "${productName}-${version}-${arch}.${ext}"
|
||||
directories:
|
||||
output: dist-electron
|
||||
files:
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
"name": "@backspace/desktop",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Backspace — a self-hosted, open-source chat platform",
|
||||
"author": {
|
||||
"name": "youruser",
|
||||
"email": "backspace@backspace.chat"
|
||||
},
|
||||
"homepage": "https://github.com/youruser/backspace",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
"build:ts": "tsc",
|
||||
|
||||
@@ -186,7 +186,14 @@ function createWindow(): void {
|
||||
minHeight: 500,
|
||||
title: 'Backspace',
|
||||
icon: path.join(__dirname, '..', 'build', 'icon.png'),
|
||||
titleBarStyle: process.platform === 'darwin' ? 'hiddenInset' : 'default',
|
||||
titleBarStyle: process.platform === 'darwin' ? 'hiddenInset' : 'hidden',
|
||||
...(process.platform !== 'darwin' ? {
|
||||
titleBarOverlay: {
|
||||
color: '#0b0b10',
|
||||
symbolColor: '#d8d8de',
|
||||
height: 32,
|
||||
},
|
||||
} : {}),
|
||||
backgroundColor: '#313338',
|
||||
show: false,
|
||||
webPreferences: {
|
||||
@@ -561,6 +568,23 @@ if (!gotTheLock) {
|
||||
},
|
||||
]);
|
||||
Menu.setApplicationMenu(appMenu);
|
||||
} else {
|
||||
// Win/Linux: frameless window has no menu bar, but we still need an
|
||||
// application menu so keyboard accelerators (Ctrl+C/V/X/Z/A) work.
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
{ role: 'undo' },
|
||||
{ role: 'redo' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'cut' },
|
||||
{ role: 'copy' },
|
||||
{ role: 'paste' },
|
||||
{ role: 'selectAll' },
|
||||
],
|
||||
},
|
||||
]));
|
||||
}
|
||||
|
||||
// Purge ALL stale caches so Electron always loads fresh code on launch
|
||||
|
||||