mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
refactor: update custom-electron-titlebar integration
This commit is contained in:
1 parent
5396e720b4
commit
2695239559
1 file changed
+3
-10
+3
-10
@@ -1,14 +1,7 @@
|
||||
const customTitlebar = require('custom-electron-titlebar');
|
||||
const { ipcRenderer } = require('electron');
|
||||
import { Titlebar, TitlebarColor } from 'custom-electron-titlebar';
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
new customTitlebar.Titlebar({
|
||||
backgroundColor: customTitlebar.Color.fromHex('#000'),
|
||||
onMinimize: () => ipcRenderer.send('window-minimize'),
|
||||
onMaximize: () => ipcRenderer.send('window-maximize'),
|
||||
onClose: () => ipcRenderer.send('window-close'),
|
||||
isMaximized: () => ipcRenderer.sendSync('window-is-maximized'),
|
||||
onMenuItemClick: (commandId) =>
|
||||
ipcRenderer.send('menu-event', commandId),
|
||||
new Titlebar({
|
||||
backgroundColor: TitlebarColor.fromHex('#000'),
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user