feat(settings): 添加文档链接配置功能
- 后台系统设置新增文档链接(doc_url)配置项 - 首页顶部导航栏显示文档链接图标(条件渲染) - Footer区域添加文档链接和GitHub链接 - 支持中英文国际化
This commit is contained in:
@@ -25,6 +25,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
const siteVersion = ref<string>('');
|
||||
const contactInfo = ref<string>('');
|
||||
const apiBaseUrl = ref<string>('');
|
||||
const docUrl = ref<string>('');
|
||||
|
||||
// Version cache state
|
||||
const versionLoaded = ref<boolean>(false);
|
||||
@@ -297,6 +298,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
site_subtitle: '',
|
||||
api_base_url: apiBaseUrl.value,
|
||||
contact_info: contactInfo.value,
|
||||
doc_url: docUrl.value,
|
||||
version: siteVersion.value,
|
||||
};
|
||||
}
|
||||
@@ -314,6 +316,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
siteVersion.value = data.version || '';
|
||||
contactInfo.value = data.contact_info || '';
|
||||
apiBaseUrl.value = data.api_base_url || '';
|
||||
docUrl.value = data.doc_url || '';
|
||||
publicSettingsLoaded.value = true;
|
||||
return data;
|
||||
} catch (error) {
|
||||
@@ -347,6 +350,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
siteVersion,
|
||||
contactInfo,
|
||||
apiBaseUrl,
|
||||
docUrl,
|
||||
|
||||
// Version state
|
||||
versionLoaded,
|
||||
|
||||
Reference in New Issue
Block a user