|
1 | 1 | <template> |
2 | | - <div class="flex align-center"> |
| 2 | + <div class="flex align-center top-about"> |
3 | 3 | <el-button |
4 | 4 | round |
5 | 5 | @click="toUrl('https://maxkb.cn/pricing.html')" |
|
9 | 9 | <AppIcon iconName="app-pricing" class="mr-8"></AppIcon> |
10 | 10 | {{ $t('common.upgrade') }} |
11 | 11 | </el-button> |
12 | | - <el-tooltip effect="dark" :content="$t('layout.trigger', '触发器')" placement="top" v-if="true"> |
13 | | - <AppIcon |
14 | | - iconName="app-trigger" |
15 | | - class="cursor color-secondary mr-8 ml-8" |
16 | | - style="font-size: 20px" |
17 | | - @click="" |
18 | | - ></AppIcon> |
| 12 | + <el-tooltip effect="dark" :content="$t('views.trigger.title')" placement="top"> |
| 13 | + <el-button |
| 14 | + text |
| 15 | + :class="route.path.includes('trigger') ? 'active' : ''" |
| 16 | + > |
| 17 | + <AppIcon |
| 18 | + iconName="app-trigger" |
| 19 | + :class="route.path.includes('trigger') ? 'color-primary' : 'color-secondary'" |
| 20 | + style="font-size: 20px" |
| 21 | + ></AppIcon> |
| 22 | + </el-button> |
19 | 23 | </el-tooltip> |
20 | 24 | <el-tooltip |
21 | 25 | effect="dark" |
22 | 26 | :content="$t('layout.github')" |
23 | 27 | placement="top" |
24 | 28 | v-if="theme.themeInfo?.showProject" |
25 | 29 | > |
26 | | - <AppIcon |
27 | | - iconName="app-github" |
28 | | - class="cursor color-secondary mr-8 ml-8" |
29 | | - style="font-size: 20px" |
30 | | - @click="toUrl(theme.themeInfo?.projectUrl)" |
31 | | - ></AppIcon> |
| 30 | + <el-button text @click="toUrl(theme.themeInfo?.projectUrl)"> |
| 31 | + <AppIcon |
| 32 | + iconName="app-github" |
| 33 | + class="cursor color-secondary" |
| 34 | + style="font-size: 20px" |
| 35 | + ></AppIcon> |
| 36 | + </el-button> |
32 | 37 | </el-tooltip> |
33 | 38 | <el-tooltip |
34 | 39 | effect="dark" |
35 | 40 | :content="$t('layout.wiki')" |
36 | 41 | placement="top" |
37 | 42 | v-if="theme.themeInfo?.showUserManual" |
38 | 43 | > |
39 | | - <AppIcon |
40 | | - iconName="app-user-manual" |
41 | | - class="cursor color-secondary mr-8 ml-8" |
42 | | - style="font-size: 20px" |
43 | | - @click="toUrl(theme.themeInfo?.userManualUrl)" |
44 | | - ></AppIcon> |
| 44 | + <el-button text @click="toUrl(theme.themeInfo?.userManualUrl)"> |
| 45 | + <AppIcon |
| 46 | + iconName="app-user-manual" |
| 47 | + class="cursor color-secondary" |
| 48 | + style="font-size: 20px" |
| 49 | + ></AppIcon> |
| 50 | + </el-button> |
45 | 51 | </el-tooltip> |
46 | 52 | <el-tooltip |
47 | 53 | effect="dark" |
48 | 54 | :content="$t('layout.forum')" |
49 | 55 | placement="top" |
50 | 56 | v-if="theme.themeInfo?.showForum" |
51 | 57 | > |
52 | | - <AppIcon |
53 | | - iconName="app-help" |
54 | | - class="cursor color-secondary mr-8 ml-8" |
55 | | - style="font-size: 20px" |
56 | | - @click="toUrl(theme.themeInfo?.forumUrl)" |
57 | | - ></AppIcon> |
| 58 | + <el-button text @click="toUrl(theme.themeInfo?.forumUrl)"> |
| 59 | + <AppIcon |
| 60 | + iconName="app-help" |
| 61 | + class="cursor color-secondary" |
| 62 | + style="font-size: 20px" |
| 63 | + ></AppIcon> |
| 64 | + </el-button> |
58 | 65 | </el-tooltip> |
59 | 66 | </div> |
60 | 67 | </template> |
61 | 68 | <script setup lang="ts"> |
62 | 69 | import useStore from '@/stores' |
63 | 70 | import { EditionConst, RoleConst } from '@/utils/permission/data' |
| 71 | +import { useRoute, useRouter } from 'vue-router' |
| 72 | +const route = useRoute() |
| 73 | +const router = useRouter() |
64 | 74 | const { theme, user } = useStore() |
65 | 75 |
|
66 | 76 | function toUrl(url: string) { |
67 | 77 | window.open(url, '_blank') |
68 | 78 | } |
69 | 79 | </script> |
70 | 80 | <style scoped lang="scss"> |
| 81 | +.top-about { |
| 82 | + .el-button.is-text { |
| 83 | + max-height: 32px; |
| 84 | + padding: 6px !important; |
| 85 | + } |
| 86 | + .el-button + .el-button { |
| 87 | + margin-left: 4px !important; |
| 88 | + } |
| 89 | + .active { |
| 90 | + background: #ffffff; |
| 91 | + &:hover { |
| 92 | + background: #ffffff; |
| 93 | + } |
| 94 | + } |
| 95 | +} |
71 | 96 | .pricing-button { |
72 | 97 | background: linear-gradient(90deg, #3370ff 0%, #7f3bf5 100%); |
73 | 98 | color: #ffffff; |
|
0 commit comments