Skip to content

Commit 80c22f4

Browse files
committed
feat: add FAQ link to vertical sidebar and update navigation for localization
1 parent 6e22d26 commit 80c22f4

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

dashboard/src/i18n/locales/en-US/core/navigation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"settings": "Settings",
2929
"changelog": "Changelog",
3030
"documentation": "Documentation",
31+
"faq": "FAQ",
3132
"github": "GitHub",
3233
"drag": "Drag",
3334
"groups": {

dashboard/src/i18n/locales/zh-CN/core/navigation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"settings": "设置",
2929
"changelog": "更新日志",
3030
"documentation": "官方文档",
31+
"faq": "FAQ",
3132
"github": "GitHub",
3233
"drag": "拖拽",
3334
"groups": {

dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import NavItem from './NavItem.vue';
77
import { applySidebarCustomization } from '@/utils/sidebarCustomization';
88
import ChangelogDialog from '@/components/shared/ChangelogDialog.vue';
99
10-
const { t } = useI18n();
10+
const { t, locale } = useI18n();
1111
1212
const customizer = useCustomizerStore();
1313
const sidebarMenu = shallowRef(sidebarItems);
@@ -109,6 +109,13 @@ function openIframeLink(url) {
109109
}
110110
}
111111
112+
function openFaqLink() {
113+
const faqUrl = locale.value === 'en-US'
114+
? 'https://docs.astrbot.app/en/faq.html'
115+
: 'https://docs.astrbot.app/faq.html';
116+
openIframeLink(faqUrl);
117+
}
118+
112119
let offsetX = 0;
113120
let offsetY = 0;
114121
let isDragging = false;
@@ -264,6 +271,10 @@ function openChangelogDialog() {
264271
@click="toggleIframe">
265272
{{ t('core.navigation.documentation') }}
266273
</v-btn>
274+
<v-btn class="sidebar-footer-btn" size="small" variant="text" prepend-icon="mdi-frequently-asked-questions"
275+
@click="openFaqLink">
276+
{{ t('core.navigation.faq') }}
277+
</v-btn>
267278
<v-btn class="sidebar-footer-btn" size="small" variant="text" prepend-icon="mdi-github"
268279
@click="openIframeLink('https://github.com/AstrBotDevs/AstrBot')">
269280
{{ t('core.navigation.github') }}

0 commit comments

Comments
 (0)