ReviewOS

also looking at this

stacks/vite-plugin-tauri

feat: call custom window on tray icon event

#13
Open iamzjohn wants to merge feat/custom_window into main
43 files +5245 -1
examples/tray-with-custom-tray-menu-window/src/main.jsadded+20-0
Changes to examples/tray-with-custom-tray-menu-window/src/main.js
@@ -0,0 +1,20 @@
1import { createApp } from 'vue'
2import App from './App.vue'
3import { initTray } from './tray'
4import './style.css'
5
6// Create and mount the Vue app
7const app = createApp(App)
8app.mount('#app')
9
10// Initialize the system tray
11document.addEventListener('DOMContentLoaded', async () => {
12 try {
13 await initTray()
14 // eslint-disable-next-line no-console
15 console.log('System tray initialized')
16 }
17 catch (error) {
18 console.error('Failed to initialize system tray:', error)
19 }
20})