feat: add new menu items for Clawhub Skill and Chrome Extension with corresponding functionality and translations, enhancing user access to additional resources

This commit is contained in:
wizardchen
2026-04-11 15:25:47 +08:00
committed by lyingbug
parent 4e9769bbab
commit 3f0f69815f
5 changed files with 82 additions and 1 deletions
+70 -1
View File
@@ -77,6 +77,32 @@
</svg>
</span>
</div>
<div class="menu-item" @click="openClawhubSkill">
<span class="menu-icon menu-icon--emoji" role="img" :aria-label="$t('common.clawhubSkill')">🦞</span>
<span class="menu-text-with-icon">
<span>{{ $t('common.clawhubSkill') }}</span>
<span class="menu-new-badge">{{ $t('common.newBadge') }}</span>
<svg class="menu-external-icon" viewBox="0 0 16 16" aria-hidden="true">
<path
fill="currentColor"
d="M12.667 8a.667.667 0 0 1 .666.667v4a2.667 2.667 0 0 1-2.666 2.666H4.667a2.667 2.667 0 0 1-2.667-2.666V5.333a2.667 2.667 0 0 1 2.667-2.666h4a.667.667 0 1 1 0 1.333h-4a1.333 1.333 0 0 0-1.333 1.333v7.334A1.333 1.333 0 0 0 4.667 13.333h6a1.333 1.333 0 0 0 1.333-1.333v-4A.667.667 0 0 1 12.667 8Zm2.666-6.667v4a.667.667 0 0 1-1.333 0V3.276l-5.195 5.195a.667.667 0 0 1-.943-.943l5.195-5.195h-2.057a.667.667 0 0 1 0-1.333h4a.667.667 0 0 1 .666.666Z"
/>
</svg>
</span>
</div>
<div class="menu-item" @click="openChromeExtension">
<t-icon name="extension" class="menu-icon" />
<span class="menu-text-with-icon">
<span>{{ $t('common.chromeExtension') }}</span>
<span class="menu-new-badge">{{ $t('common.newBadge') }}</span>
<svg class="menu-external-icon" viewBox="0 0 16 16" aria-hidden="true">
<path
fill="currentColor"
d="M12.667 8a.667.667 0 0 1 .666.667v4a2.667 2.667 0 0 1-2.666 2.666H4.667a2.667 2.667 0 0 1-2.667-2.666V5.333a2.667 2.667 0 0 1 2.667-2.666h4a.667.667 0 1 1 0 1.333h-4a1.333 1.333 0 0 0-1.333 1.333v7.334A1.333 1.333 0 0 0 4.667 13.333h6a1.333 1.333 0 0 0 1.333-1.333v-4A.667.667 0 0 1 12.667 8Zm2.666-6.667v4a.667.667 0 0 1-1.333 0V3.276l-5.195 5.195a.667.667 0 0 1-.943-.943l5.195-5.195h-2.057a.667.667 0 0 1 0-1.333h4a.667.667 0 0 1 .666.666Z"
/>
</svg>
</span>
</div>
<div class="menu-item" @click="openGithub">
<t-icon name="logo-github" class="menu-icon" />
<span class="menu-text-with-icon">
@@ -173,6 +199,22 @@ const openWebsite = () => {
window.open('https://weknora.weixin.qq.com/', '_blank')
}
const CHROME_EXTENSION_URL =
'https://chromewebstore.google.com/detail/jpemjbopikggjlmikmclgbmkhhopjdgd?utm_source=item-share-cb'
const CLAWHUB_SKILL_URL = 'https://clawhub.ai/lyingbug/weknora'
// 打开 WeKnora Chrome 插件(Chrome应用商店)
const openChromeExtension = () => {
menuVisible.value = false
window.open(CHROME_EXTENSION_URL, '_blank')
}
const openClawhubSkill = () => {
menuVisible.value = false
window.open(CLAWHUB_SKILL_URL, '_blank')
}
// 打开 GitHub
const openGithub = () => {
menuVisible.value = false
@@ -409,6 +451,18 @@ onUnmounted(() => {
height: 16px;
flex-shrink: 0;
}
&--emoji {
width: 16px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 15px;
line-height: 1;
flex-shrink: 0;
color: inherit;
}
}
.menu-text-with-icon {
@@ -419,13 +473,28 @@ onUnmounted(() => {
color: inherit;
min-width: 0;
span {
> span:first-of-type {
display: inline-flex;
align-items: center;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.menu-new-badge {
flex-shrink: 0;
font-size: 10px;
font-weight: 600;
line-height: 1.2;
padding: 2px 5px;
border-radius: 4px;
background: var(--td-brand-color-light);
color: var(--td-brand-color);
letter-spacing: 0.02em;
}
.menu-external-icon {
width: 14px;
height: 14px;
+3
View File
@@ -1161,6 +1161,9 @@ export default {
reset: 'Reset',
clear: 'Clear',
website: 'Official Website',
chromeExtension: 'Chrome extension',
clawhubSkill: 'Claw Skill',
newBadge: 'New',
github: 'GitHub',
on: 'On',
off: 'Off',
+3
View File
@@ -1004,6 +1004,9 @@ export default {
reset: "초기화",
clear: "지우기",
website: "공식 웹사이트",
chromeExtension: 'Chrome 확장 프로그램',
clawhubSkill: 'Claw Skill',
newBadge: 'New',
github: 'GitHub',
on: "켜기",
off: "끄기",
+3
View File
@@ -1123,6 +1123,9 @@ export default {
reset: 'Сбросить',
clear: 'Очистить',
website: 'Официальный сайт',
chromeExtension: 'Расширение Chrome',
clawhubSkill: 'Claw Skill',
newBadge: 'New',
github: 'GitHub',
on: 'Вкл',
off: 'Выкл',
+3
View File
@@ -1008,6 +1008,9 @@ export default {
reset: "重置",
clear: "清空",
website: "官方网站",
chromeExtension: "Chrome 插件",
clawhubSkill: "Claw Skill",
newBadge: "New",
github: 'GitHub',
on: "开启",
off: "关闭",