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