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:
@@ -77,6 +77,32 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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">
|
<div class="menu-item" @click="openGithub">
|
||||||
<t-icon name="logo-github" class="menu-icon" />
|
<t-icon name="logo-github" class="menu-icon" />
|
||||||
<span class="menu-text-with-icon">
|
<span class="menu-text-with-icon">
|
||||||
@@ -173,6 +199,22 @@ const openWebsite = () => {
|
|||||||
window.open('https://weknora.weixin.qq.com/', '_blank')
|
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
|
// 打开 GitHub
|
||||||
const openGithub = () => {
|
const openGithub = () => {
|
||||||
menuVisible.value = false
|
menuVisible.value = false
|
||||||
@@ -409,6 +451,18 @@ onUnmounted(() => {
|
|||||||
height: 16px;
|
height: 16px;
|
||||||
flex-shrink: 0;
|
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 {
|
.menu-text-with-icon {
|
||||||
@@ -419,13 +473,28 @@ onUnmounted(() => {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
span {
|
> span:first-of-type {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 0;
|
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 {
|
.menu-external-icon {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
|
|||||||
@@ -1161,6 +1161,9 @@ export default {
|
|||||||
reset: 'Reset',
|
reset: 'Reset',
|
||||||
clear: 'Clear',
|
clear: 'Clear',
|
||||||
website: 'Official Website',
|
website: 'Official Website',
|
||||||
|
chromeExtension: 'Chrome extension',
|
||||||
|
clawhubSkill: 'Claw Skill',
|
||||||
|
newBadge: 'New',
|
||||||
github: 'GitHub',
|
github: 'GitHub',
|
||||||
on: 'On',
|
on: 'On',
|
||||||
off: 'Off',
|
off: 'Off',
|
||||||
|
|||||||
@@ -1004,6 +1004,9 @@ export default {
|
|||||||
reset: "초기화",
|
reset: "초기화",
|
||||||
clear: "지우기",
|
clear: "지우기",
|
||||||
website: "공식 웹사이트",
|
website: "공식 웹사이트",
|
||||||
|
chromeExtension: 'Chrome 확장 프로그램',
|
||||||
|
clawhubSkill: 'Claw Skill',
|
||||||
|
newBadge: 'New',
|
||||||
github: 'GitHub',
|
github: 'GitHub',
|
||||||
on: "켜기",
|
on: "켜기",
|
||||||
off: "끄기",
|
off: "끄기",
|
||||||
|
|||||||
@@ -1123,6 +1123,9 @@ export default {
|
|||||||
reset: 'Сбросить',
|
reset: 'Сбросить',
|
||||||
clear: 'Очистить',
|
clear: 'Очистить',
|
||||||
website: 'Официальный сайт',
|
website: 'Официальный сайт',
|
||||||
|
chromeExtension: 'Расширение Chrome',
|
||||||
|
clawhubSkill: 'Claw Skill',
|
||||||
|
newBadge: 'New',
|
||||||
github: 'GitHub',
|
github: 'GitHub',
|
||||||
on: 'Вкл',
|
on: 'Вкл',
|
||||||
off: 'Выкл',
|
off: 'Выкл',
|
||||||
|
|||||||
@@ -1008,6 +1008,9 @@ export default {
|
|||||||
reset: "重置",
|
reset: "重置",
|
||||||
clear: "清空",
|
clear: "清空",
|
||||||
website: "官方网站",
|
website: "官方网站",
|
||||||
|
chromeExtension: "Chrome 插件",
|
||||||
|
clawhubSkill: "Claw Skill",
|
||||||
|
newBadge: "New",
|
||||||
github: 'GitHub',
|
github: 'GitHub',
|
||||||
on: "开启",
|
on: "开启",
|
||||||
off: "关闭",
|
off: "关闭",
|
||||||
|
|||||||
Reference in New Issue
Block a user