|
@@ -42,9 +42,7 @@
|
|
import { useAppStore, useTagsViewStore, useUserStore, useSettingsStore } from '@/store'
|
|
import { useAppStore, useTagsViewStore, useUserStore, useSettingsStore } from '@/store'
|
|
import defaultSettings from '@/settings'
|
|
import defaultSettings from '@/settings'
|
|
import { DeviceEnum } from '@/enums/DeviceEnum'
|
|
import { DeviceEnum } from '@/enums/DeviceEnum'
|
|
-import { useSocket } from '@/utils/websoket'
|
|
|
|
|
|
|
|
-const { socket } = useSocket()
|
|
|
|
const appStore = useAppStore()
|
|
const appStore = useAppStore()
|
|
const tagsViewStore = useTagsViewStore()
|
|
const tagsViewStore = useTagsViewStore()
|
|
const userStore = useUserStore()
|
|
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>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.setting-item {
|
|
.setting-item {
|