更新调用错误信息弹窗按钮文案
parent
1aeb8e29e2
commit
13ffcfbbcd
|
@ -140,6 +140,7 @@
|
||||||
"my_list": "Your Library",
|
"my_list": "Your Library",
|
||||||
"no_item": "Nothing's here...",
|
"no_item": "Nothing's here...",
|
||||||
"not_agree": "Not accept",
|
"not_agree": "Not accept",
|
||||||
|
"ok": "Ok",
|
||||||
"pagination__next": "Next page",
|
"pagination__next": "Next page",
|
||||||
"pagination__page": "Page {num}",
|
"pagination__page": "Page {num}",
|
||||||
"pagination__prev": "Previous page",
|
"pagination__prev": "Previous page",
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
"my_list": "我的列表",
|
"my_list": "我的列表",
|
||||||
"no_item": "列表竟然是空的...",
|
"no_item": "列表竟然是空的...",
|
||||||
"not_agree": "不接受",
|
"not_agree": "不接受",
|
||||||
|
"ok": "好吧",
|
||||||
"pagination__next": "下一页",
|
"pagination__next": "下一页",
|
||||||
"pagination__page": "第 {num} 页",
|
"pagination__page": "第 {num} 页",
|
||||||
"pagination__prev": "上一页",
|
"pagination__prev": "上一页",
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
"my_list": "我的列表",
|
"my_list": "我的列表",
|
||||||
"no_item": "列表竟然是空的...",
|
"no_item": "列表竟然是空的...",
|
||||||
"not_agree": "不接受",
|
"not_agree": "不接受",
|
||||||
|
"ok": "好吧",
|
||||||
"pagination__next": "下一頁",
|
"pagination__next": "下一頁",
|
||||||
"pagination__page": "第 {num} 頁",
|
"pagination__page": "第 {num} 頁",
|
||||||
"pagination__prev": "上一頁",
|
"pagination__prev": "上一頁",
|
||||||
|
|
|
@ -7,6 +7,18 @@ import { isShowPlayerDetail, setShowPlayerDetail, playMusicInfo } from '@rendere
|
||||||
import usePlaySonglist from './compositions/usePlaySonglist'
|
import usePlaySonglist from './compositions/usePlaySonglist'
|
||||||
import { dialog } from '@renderer/plugins/Dialog'
|
import { dialog } from '@renderer/plugins/Dialog'
|
||||||
|
|
||||||
|
const useDialog = () => {
|
||||||
|
const { t } = useI18n()
|
||||||
|
const errorDialog = message => {
|
||||||
|
dialog({
|
||||||
|
message: `${t('deep_link__handle_error_tip', { message })}`,
|
||||||
|
confirmButtonText: t('ok'),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return errorDialog
|
||||||
|
}
|
||||||
|
|
||||||
const sources = ['kw', 'kg', 'tx', 'wy', 'mg']
|
const sources = ['kw', 'kg', 'tx', 'wy', 'mg']
|
||||||
const sourceVerify = source => {
|
const sourceVerify = source => {
|
||||||
if (!sources.includes(source)) throw new Error('Source no match')
|
if (!sources.includes(source)) throw new Error('Source no match')
|
||||||
|
@ -58,9 +70,10 @@ export default () => {
|
||||||
const setTempPlayList = useCommit('player', 'setTempPlayList')
|
const setTempPlayList = useCommit('player', 'setTempPlayList')
|
||||||
const playNext = useAction('player', 'playNext')
|
const playNext = useAction('player', 'playNext')
|
||||||
const playSongListDetail = usePlaySonglist()
|
const playSongListDetail = usePlaySonglist()
|
||||||
const { t } = useI18n()
|
|
||||||
let isInited = false
|
let isInited = false
|
||||||
|
|
||||||
|
const showErrorDialog = useDialog()
|
||||||
|
|
||||||
const handleOpenSonglist = params => {
|
const handleOpenSonglist = params => {
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
router.replace({
|
router.replace({
|
||||||
|
@ -243,7 +256,7 @@ export default () => {
|
||||||
try {
|
try {
|
||||||
handleLinkAction(envParams.deeplink)
|
handleLinkAction(envParams.deeplink)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
dialog(`${t('deep_link__handle_error_tip', { message: err.message })}`)
|
showErrorDialog(err.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -260,7 +273,7 @@ export default () => {
|
||||||
try {
|
try {
|
||||||
handleLinkAction(envParams.deeplink)
|
handleLinkAction(envParams.deeplink)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
dialog(`${t('deep_link__handle_error_tip', { message: err.message })}`)
|
showErrorDialog(err.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isInited = true
|
isInited = true
|
||||||
|
|
Loading…
Reference in New Issue