|
1 | 1 | <template> |
2 | 2 | <div class="sidebar"> |
3 | | - <div ref='logoContainer' class="draggable logo-container" @dblclick="dblclick"> |
| 3 | + <div ref="logoContainer" class="draggable logo-container" @dblclick="dblclick"> |
4 | 4 | <img src="@/renderer/assets/img/icons/icon-trans.png" alt="icon" /> |
5 | | - <span class='color-text'>{{ APP_NAME }} </span> |
| 5 | + <span class="color-text">{{ APP_NAME }} </span> |
6 | 6 | </div> |
7 | 7 | <a-menu mode="vertical" @select="menuItemSelect" v-model:selectedKeys="selectedKeys"> |
8 | 8 | <div style="flex: 1" class="non-draggable"> |
9 | 9 | <a-menu-item key="/"> |
10 | | - <template #icon><home-two-tone /> </template>{{$t("Home")}} |
| 10 | + <template #icon><home-two-tone /> </template>{{ $t('Home') }} |
11 | 11 | </a-menu-item> |
12 | 12 | <a-menu-item key="/website"> |
13 | | - <template #icon><layout-two-tone /> </template>{{$t("Website")}} |
| 13 | + <template #icon><layout-two-tone /> </template>{{ $t('Website') }} |
14 | 14 | </a-menu-item> |
15 | 15 | <a-menu-item key="/tool"> |
16 | | - <template #icon><tool-two-tone /> </template>{{$t("Tools")}} |
| 16 | + <template #icon><tool-two-tone /> </template>{{ $t('Tools') }} |
17 | 17 | </a-menu-item> |
18 | 18 | <a-menu-item key="/appStore"> |
19 | | - <template #icon><appstore-two-tone /> </template>{{$t("AppStore")}} |
| 19 | + <template #icon><appstore-two-tone /> </template>{{ $t('AppStore') }} |
20 | 20 | </a-menu-item> |
21 | 21 | <a-menu-item key="/customApp"> |
22 | | - <template #icon><appstore-two-tone /> </template>{{mt('Custom','ws','App')}} |
| 22 | + <template #icon><appstore-two-tone /> </template>{{ mt('Custom', 'ws', 'App') }} |
23 | 23 | </a-menu-item> |
24 | 24 | </div> |
25 | | - <div style="margin-bottom: 25px;" class="non-draggable"> |
| 25 | + <div style="margin-bottom: 25px" class="non-draggable"> |
26 | 26 | <a-menu-item key="/settings"> |
27 | | - <template #icon><setting-two-tone /> </template>{{$t("Settings")}} |
| 27 | + <template #icon><setting-two-tone /> </template>{{ $t('Settings') }} |
28 | 28 | </a-menu-item> |
29 | 29 | <a-menu-item key="/about"> |
30 | | - <template #icon><exclamation-circle-two-tone /> </template>{{$t("About")}} |
| 30 | + <template #icon><exclamation-circle-two-tone /> </template>{{ $t('About') }} |
| 31 | + </a-menu-item> |
| 32 | + <a-menu-item key="/donate"> |
| 33 | + <template #icon><DollarTwoTone /> </template>{{ $t('Donate') }} |
31 | 34 | </a-menu-item> |
32 | 35 | </div> |
33 | 36 | </a-menu> |
|
36 | 39 |
|
37 | 40 | <script setup> |
38 | 41 | import { APP_NAME } from '@/shared/helpers/constant' |
39 | | -import { |
40 | | - AppstoreTwoTone, |
41 | | - ExclamationCircleTwoTone, |
42 | | - HomeTwoTone, |
43 | | - LayoutTwoTone, |
44 | | - SettingTwoTone, |
45 | | - ToolTwoTone |
46 | | -} from "@ant-design/icons-vue"; |
| 42 | +import { AppstoreTwoTone, ExclamationCircleTwoTone, HomeTwoTone, LayoutTwoTone, SettingTwoTone, ToolTwoTone, DollarTwoTone } from '@ant-design/icons-vue' |
47 | 43 | import { defineAsyncComponent, onMounted, ref } from 'vue' |
48 | | -import {useRouter} from "vue-router"; |
| 44 | +import { useRouter } from 'vue-router' |
49 | 45 | const call = Ipc.call |
50 | | -const router = useRouter(); |
51 | | -const selectedKeys = ref(['/']); |
52 | | -import { isWindows ,isMacOS} from '@/shared/utils/utils2' |
| 46 | +const router = useRouter() |
| 47 | +const selectedKeys = ref(['/']) |
| 48 | +import { isWindows, isMacOS } from '@/shared/utils/utils2' |
53 | 49 | import { mt } from '../utils/i18n' |
54 | 50 | import Ipc from '@/renderer/utils/Ipc' |
55 | 51 |
|
@@ -77,12 +73,9 @@ const AMenuItem = defineAsyncComponent(() => { |
77 | 73 | }) |
78 | 74 | }) |
79 | 75 |
|
80 | | -const menuItemSelect = e =>{ |
81 | | - router.push({path:e.key}) |
| 76 | +const menuItemSelect = (e) => { |
| 77 | + router.push({ path: e.key }) |
82 | 78 | } |
83 | | -
|
84 | 79 | </script> |
85 | 80 |
|
86 | | -<style scoped lang="less"> |
87 | | -
|
88 | | -</style> |
| 81 | +<style scoped lang="less"></style> |
0 commit comments