JutarryWu 1 hafta önce
ebeveyn
işleme
3057e06ed6

+ 0 - 18
src/layout/components/NavBar/components/NavbarRight.vue

@@ -42,9 +42,7 @@
 import { useAppStore, useTagsViewStore, useUserStore, useSettingsStore } from '@/store'
 import defaultSettings from '@/settings'
 import { DeviceEnum } from '@/enums/DeviceEnum'
-import { useSocket } from '@/utils/websoket'
 
-const { socket } = useSocket()
 const appStore = useAppStore()
 const tagsViewStore = useTagsViewStore()
 const userStore = useUserStore()
@@ -77,22 +75,6 @@ function logout() {
       })
   })
 }
-
-onMounted(() => {
-  socket.on('message', (data: any) => {
-    // 若Electron关闭窗口,则注销并退出系统
-    if (data === 'close-win-after') {
-      userStore
-        .logout()
-        .then(() => {
-          tagsViewStore.delAllViews()
-        })
-        .then(() => {
-          router.push(`/login?redirect=${route.fullPath}`)
-        })
-    }
-  })
-})
 </script>
 <style lang="scss" scoped>
 .setting-item {