Skip to content

Commit 74bb3be

Browse files
fix: trigger
1 parent e4cd6e8 commit 74bb3be

14 files changed

Lines changed: 75 additions & 35 deletions

File tree

ui/src/components/app-icon/icons/about.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export default {
3535
[
3636
h('path', {
3737
d: 'M9.16458 4.44856C9.09375 1.9795 7.06958 0 4.58333 0C2.05208 0 0 2.052 0 4.58314C0 7.06804 1.97708 9.09087 4.44458 9.1642L3.72792 7.37219C3.24691 7.22438 2.81234 6.95463 2.46643 6.58918C2.12052 6.22374 1.87505 5.77501 1.75388 5.28663C1.63271 4.79826 1.63995 4.28684 1.77492 3.80209C1.90988 3.31734 2.16797 2.87575 2.5241 2.52025C2.88022 2.16475 3.32227 1.90743 3.80727 1.77331C4.29227 1.63918 4.80372 1.63281 5.29191 1.75481C5.7801 1.87682 6.22842 2.12305 6.59329 2.46957C6.95816 2.81609 7.22717 3.25111 7.37417 3.73234L9.16458 4.44856Z',
38-
fill: '#3370FF',
38+
fill: 'currentColor',
3939
}),
4040
h('path', {
4141
d: 'M8.98125 17.1364C9.26292 17.8405 10.2629 17.8326 10.5333 17.1239L12.3442 12.3799L17.1263 10.5329C17.8325 10.26 17.8383 9.26295 17.1354 8.98171L5.35042 4.26774C4.67 3.99567 3.995 4.67106 4.26709 5.35103L8.98125 17.1364Z',
42-
fill: '#3370FF',
42+
fill: 'currentColor',
4343
}),
4444
],
4545
),

ui/src/layout/layout-header/top-about/index.vue

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="flex align-center">
2+
<div class="flex align-center top-about">
33
<el-button
44
round
55
@click="toUrl('https://maxkb.cn/pricing.html')"
@@ -9,65 +9,90 @@
99
<AppIcon iconName="app-pricing" class="mr-8"></AppIcon>
1010
{{ $t('common.upgrade') }}
1111
</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>
1923
</el-tooltip>
2024
<el-tooltip
2125
effect="dark"
2226
:content="$t('layout.github')"
2327
placement="top"
2428
v-if="theme.themeInfo?.showProject"
2529
>
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>
3237
</el-tooltip>
3338
<el-tooltip
3439
effect="dark"
3540
:content="$t('layout.wiki')"
3641
placement="top"
3742
v-if="theme.themeInfo?.showUserManual"
3843
>
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>
4551
</el-tooltip>
4652
<el-tooltip
4753
effect="dark"
4854
:content="$t('layout.forum')"
4955
placement="top"
5056
v-if="theme.themeInfo?.showForum"
5157
>
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>
5865
</el-tooltip>
5966
</div>
6067
</template>
6168
<script setup lang="ts">
6269
import useStore from '@/stores'
6370
import { EditionConst, RoleConst } from '@/utils/permission/data'
71+
import { useRoute, useRouter } from 'vue-router'
72+
const route = useRoute()
73+
const router = useRouter()
6474
const { theme, user } = useStore()
6575
6676
function toUrl(url: string) {
6777
window.open(url, '_blank')
6878
}
6979
</script>
7080
<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+
}
7196
.pricing-button {
7297
background: linear-gradient(90deg, #3370ff 0%, #7f3bf5 100%);
7398
color: #ffffff;

ui/src/locales/lang/en-US/views/chat-log.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ export default {
4646
dingtalk: 'DingTalk Application',
4747
enterpriseWechatRobot: 'Enterprise WeChat Bot',
4848
slack: 'Slack Bot',
49-
trigger: 'Trigger',
5049
}

ui/src/locales/lang/en-US/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import chatLog from './chat-log'
1515
import chatUser from './chat-user'
1616
import operateLog from './operate-log'
1717
import shared from './shared'
18+
import trigger from './trigger'
1819
export default {
1920
login,
2021
model,
@@ -33,4 +34,5 @@ export default {
3334
chatUser,
3435
operateLog,
3536
shared,
37+
trigger
3638
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
title: 'Trigger',
3+
4+
}

ui/src/locales/lang/zh-CN/views/chat-log.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ export default {
4646
dingtalk: '钉钉应用',
4747
enterpriseWeChatRobot: '企业微信机器人',
4848
slack: 'Slack 机器人',
49-
trigger: '触发器',
5049
}

ui/src/locales/lang/zh-CN/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import chatLog from './chat-log'
1515
import chatUser from './chat-user'
1616
import operateLog from './operate-log'
1717
import shared from './shared'
18+
import trigger from './trigger'
1819
export default {
1920
login,
2021
model,
@@ -33,4 +34,5 @@ export default {
3334
chatUser,
3435
operateLog,
3536
shared,
37+
trigger
3638
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
title: '触发器',
3+
4+
}

ui/src/locales/lang/zh-Hant/views/chat-log.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ export default {
4646
dingtalk: '釘釘應用',
4747
enterpriseWechatRobot: '企業微信機器人',
4848
slack: 'Slack 機器人',
49-
trigger: '觸發器',
5049
}

ui/src/locales/lang/zh-Hant/views/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import chatUser from './chat-user'
1515
import login from './login'
1616
import operateLog from './operate-log'
1717
import shared from './shared'
18+
import trigger from './trigger'
1819
export default {
1920
application,
2021
applicationOverview,
@@ -33,4 +34,5 @@ export default {
3334
workspace,
3435
chatUser,
3536
shared,
37+
trigger
3638
}

0 commit comments

Comments
 (0)