File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 55 * @version 1.0.0
66 */
77
8- export const isElectron = window . electronInterface != undefined ;
8+ export const isElectron = import . meta . env . VITE_ELECTRON && window . electronInterface != undefined ;
99
1010if ( isElectron ) {
1111 console . log ( "Running in Electron" ) ;
Original file line number Diff line number Diff line change 11import { PRODUCT_NAME } from "../../core/config" ;
2+ import { isElectron } from "../../electron/electron" ;
23
34export function ElectronTitleBar ( ) {
4- if ( window . electronInterface !== undefined ) {
5- return (
6- < div id = "electron-title-bar" >
7- { window . electronInterface . platform == "darwin" ? < div className = "macos-padding" > </ div > : undefined }
8- < div id = "window-title" > { PRODUCT_NAME } </ div >
9- </ div >
10- )
11- }
5+ return isElectron && (
6+ < div id = "electron-title-bar" >
7+ { window . electronInterface . platform == "darwin" && < div className = "macos-padding" > </ div > }
8+ < div id = "window-title" > { PRODUCT_NAME } </ div >
9+ </ div >
10+ )
1211}
You can’t perform that action at this time.
0 commit comments