mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
feat: migrate from rollup to electron-vite (#1364)
* feat: electron-vite PoC * fix: fix preload path * remove rollup deps and config * fix: debug mode * fix: build mode, asset path * fix: remove unused dependencies * feat: use `executeJavaScriptInIsolatedWorld` instead of `executeJavaScript` * feat: enable `minify` * fix(actions): update task name * fix: fix dev mode check * fix: remove unused variable
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import { Menu, nativeImage, Tray } from 'electron';
|
||||
|
||||
import { restart } from './providers/app-controls';
|
||||
import config from './config';
|
||||
import getSongControls from './providers/song-controls';
|
||||
|
||||
import { getAssetsDirectoryLocation } from './plugins/utils';
|
||||
import youtubeMusicTrayIcon from '../assets/youtube-music-tray.png?asset';
|
||||
|
||||
import type { MenuTemplate } from './menu';
|
||||
|
||||
@ -41,9 +39,8 @@ export const setUpTray = (app: Electron.App, win: Electron.BrowserWindow) => {
|
||||
}
|
||||
|
||||
const { playPause, next, previous } = getSongControls(win);
|
||||
const iconPath = path.join(getAssetsDirectoryLocation(), 'youtube-music-tray.png');
|
||||
|
||||
const trayIcon = nativeImage.createFromPath(iconPath).resize({
|
||||
const trayIcon = nativeImage.createFromPath(youtubeMusicTrayIcon).resize({
|
||||
width: 16,
|
||||
height: 16,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user