mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 11:08:13 -05:00
✨ Feature: add link for manual in main menu
This commit is contained in:
parent
731847ac3f
commit
8f9b85d467
@ -32,6 +32,9 @@ UPLOAD_AREA: Upload
|
|||||||
UPLOAD_VIEW_HINT: Click to open picbeds settings
|
UPLOAD_VIEW_HINT: Click to open picbeds settings
|
||||||
MANAGE_PAGE: Manage
|
MANAGE_PAGE: Manage
|
||||||
GALLERY: Gallery
|
GALLERY: Gallery
|
||||||
|
MANUAL: Manual
|
||||||
|
OPEN_MANUAL_LINK: Open Manual Link
|
||||||
|
OPEN_MANUAL_LINK_HINT: Will open the manual link in your browser, do you want to continue?
|
||||||
PICBEDS_SETTINGS: Picbeds
|
PICBEDS_SETTINGS: Picbeds
|
||||||
PICBEDS_MANAGE: Picbeds Manage
|
PICBEDS_MANAGE: Picbeds Manage
|
||||||
PICLIST_SETTINGS: Settings
|
PICLIST_SETTINGS: Settings
|
||||||
|
@ -32,6 +32,9 @@ UPLOAD_AREA: 上传区
|
|||||||
UPLOAD_VIEW_HINT: 点击打开图床设置
|
UPLOAD_VIEW_HINT: 点击打开图床设置
|
||||||
MANAGE_PAGE: 管理
|
MANAGE_PAGE: 管理
|
||||||
GALLERY: 相册
|
GALLERY: 相册
|
||||||
|
MANUAL: 手册
|
||||||
|
OPEN_MANUAL_LINK: 前往手册
|
||||||
|
OPEN_MANUAL_LINK_HINT: 即将打开PicList使用手册网页, 是否继续?
|
||||||
PICBEDS_SETTINGS: 图床设置
|
PICBEDS_SETTINGS: 图床设置
|
||||||
PICBEDS_MANAGE: 图床管理
|
PICBEDS_MANAGE: 图床管理
|
||||||
PICLIST_SETTINGS: PicList设置
|
PICLIST_SETTINGS: PicList设置
|
||||||
|
@ -32,6 +32,9 @@ UPLOAD_AREA: 上傳
|
|||||||
UPLOAD_VIEW_HINT: 點擊打開圖床設定
|
UPLOAD_VIEW_HINT: 點擊打開圖床設定
|
||||||
MANAGE_PAGE: 管理
|
MANAGE_PAGE: 管理
|
||||||
GALLERY: 相簿
|
GALLERY: 相簿
|
||||||
|
MANUAL: 手冊
|
||||||
|
OPEN_MANUAL_LINK: 前往手冊
|
||||||
|
OPEN_MANUAL_LINK_HINT: 即將打開PicList使用手冊網頁,是否繼續?
|
||||||
PICBEDS_SETTINGS: 圖床設定
|
PICBEDS_SETTINGS: 圖床設定
|
||||||
PICBEDS_MANAGE: 圖床管理
|
PICBEDS_MANAGE: 圖床管理
|
||||||
PICLIST_SETTINGS: PicList設定
|
PICLIST_SETTINGS: PicList設定
|
||||||
|
@ -104,6 +104,12 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
<span>{{ $T('PLUGIN_SETTINGS') }}</span>
|
<span>{{ $T('PLUGIN_SETTINGS') }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<el-menu-item index="MANUAL">
|
||||||
|
<el-icon>
|
||||||
|
<Link />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ $T('MANUAL') }}</span>
|
||||||
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="info-window"
|
class="info-window"
|
||||||
@ -228,9 +234,10 @@ import {
|
|||||||
Minus,
|
Minus,
|
||||||
CirclePlus,
|
CirclePlus,
|
||||||
Close,
|
Close,
|
||||||
PieChart
|
PieChart,
|
||||||
|
Link
|
||||||
} from '@element-plus/icons-vue'
|
} from '@element-plus/icons-vue'
|
||||||
import { ElMessage as $message } from 'element-plus'
|
import { ElMessage as $message, ElMessageBox } from 'element-plus'
|
||||||
import { T as $T } from '@/i18n/index'
|
import { T as $T } from '@/i18n/index'
|
||||||
import { ref, onBeforeUnmount, Ref, onBeforeMount, watch, nextTick, reactive } from 'vue'
|
import { ref, onBeforeUnmount, Ref, onBeforeMount, watch, nextTick, reactive } from 'vue'
|
||||||
import { onBeforeRouteUpdate, useRouter } from 'vue-router'
|
import { onBeforeRouteUpdate, useRouter } from 'vue-router'
|
||||||
@ -250,9 +257,11 @@ import {
|
|||||||
SHOW_MAIN_PAGE_MENU,
|
SHOW_MAIN_PAGE_MENU,
|
||||||
SHOW_MAIN_PAGE_QRCODE,
|
SHOW_MAIN_PAGE_QRCODE,
|
||||||
SHOW_MAIN_PAGE_DONATION,
|
SHOW_MAIN_PAGE_DONATION,
|
||||||
GET_PICBEDS
|
GET_PICBEDS,
|
||||||
|
OPEN_URL
|
||||||
} from '~/universal/events/constants'
|
} from '~/universal/events/constants'
|
||||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||||
|
import { IConfig } from 'piclist'
|
||||||
const version = ref(process.env.NODE_ENV === 'production' ? pkg.version : 'Dev')
|
const version = ref(process.env.NODE_ENV === 'production' ? pkg.version : 'Dev')
|
||||||
const routerConfig = reactive(config)
|
const routerConfig = reactive(config)
|
||||||
const defaultActive = ref(routerConfig.UPLOAD_PAGE)
|
const defaultActive = ref(routerConfig.UPLOAD_PAGE)
|
||||||
@ -294,6 +303,27 @@ const handleGetPicPeds = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSelect = (index: string) => {
|
const handleSelect = (index: string) => {
|
||||||
|
if (index === 'MANUAL') {
|
||||||
|
ElMessageBox.confirm($T('OPEN_MANUAL_LINK_HINT'), $T('OPEN_MANUAL_LINK'), {
|
||||||
|
confirmButtonText: $T('CONFIRM'),
|
||||||
|
cancelButtonText: $T('CANCEL'),
|
||||||
|
type: 'warning',
|
||||||
|
center: true
|
||||||
|
}).then(async () => {
|
||||||
|
let language = 'zh-CN'
|
||||||
|
const config = (await getConfig<IConfig>())!
|
||||||
|
if (config !== undefined) {
|
||||||
|
const settings = config.settings || {}
|
||||||
|
language = settings.language ?? 'zh-CN'
|
||||||
|
}
|
||||||
|
if (language === 'zh-CN' || language === 'zh-TW') {
|
||||||
|
sendToMain(OPEN_URL, 'https://piclist.cn/configure.html')
|
||||||
|
} else {
|
||||||
|
sendToMain(OPEN_URL, 'https://piclist.cn/en/configure.html')
|
||||||
|
}
|
||||||
|
}).catch(() => {})
|
||||||
|
return
|
||||||
|
}
|
||||||
defaultActive.value = index
|
defaultActive.value = index
|
||||||
const type = index.match(routerConfig.UPLOADER_CONFIG_PAGE)
|
const type = index.match(routerConfig.UPLOADER_CONFIG_PAGE)
|
||||||
if (type === null) {
|
if (type === null) {
|
||||||
|
3
src/universal/types/i18n.d.ts
vendored
3
src/universal/types/i18n.d.ts
vendored
@ -30,6 +30,9 @@ interface ILocales {
|
|||||||
UPLOAD_VIEW_HINT: string
|
UPLOAD_VIEW_HINT: string
|
||||||
MANAGE_PAGE: string
|
MANAGE_PAGE: string
|
||||||
GALLERY: string
|
GALLERY: string
|
||||||
|
MANUAL: string
|
||||||
|
OPEN_MANUAL_LINK: string
|
||||||
|
OPEN_MANUAL_LINK_HINT: string
|
||||||
PICBEDS_SETTINGS: string
|
PICBEDS_SETTINGS: string
|
||||||
PICBEDS_MANAGE: string
|
PICBEDS_MANAGE: string
|
||||||
PICLIST_SETTINGS: string
|
PICLIST_SETTINGS: string
|
||||||
|
Loading…
Reference in New Issue
Block a user