diff --git a/src/lang/en_us.json b/src/lang/en_us.json index 61cd580..1e37009 100644 --- a/src/lang/en_us.json +++ b/src/lang/en_us.json @@ -104,8 +104,9 @@ "version_label_history": "History version:", "version_tip_checking": "Checking for updates...⏳", "version_tip_downloaded": "The installation package has been downloaded.", - "version_tip_failed": "The installation package download failed. You can try again or go to the project address to manually download the new version update.", + "version_tip_failed": "The download of the installation package failed. You can try again or go to the project address to manually download the new version update.", "version_tip_unknown": "Failed to obtain the latest version information, it is recommended to manually go to the project address to check if there is a new version", + "version_tip_min": "It has been switched to background download, you can go to Settings-Software Update and reopen this pop-up window", "version_tip_latest": "The software is up to date, please enjoy it~🥂", "version_btn_new": "Update", "version_btn_downloading": "I am trying to download...{{total}}/{{current}} ({{progress}}%)", @@ -114,6 +115,7 @@ "version_btn_unknown": "Project Homepage", "version_btn_ignore": "Ignore", "version_btn_close": "Close", + "version_btn_min": "Background download", "version_title_latest": "🎉 The current version is already the latest 🎊", "version_title_checking": "⏳ Checking for updates ⏳", "version_title_new": "🌟 New version found 🌟", diff --git a/src/lang/zh_cn.json b/src/lang/zh_cn.json index 5054c97..06ae30d 100644 --- a/src/lang/zh_cn.json +++ b/src/lang/zh_cn.json @@ -106,6 +106,7 @@ "version_tip_downloaded": "安装包已经下载完毕。", "version_tip_failed": "安装包下载失败,你可以重试或者去项目地址手动下载新版更新。", "version_tip_unknown": "获取最新版本信息失败,建议手动去项目地址检查是否有新版本", + "version_tip_min": "已切换到后台下载,你可以去 设置-软件更新 重新打开本弹窗哦", "version_tip_latest": "软件已是最新,尽情地体验吧~🥂", "version_btn_new": "更新", "version_btn_downloading": "正在努力下载中...{{total}}/{{current}} ({{progress}}%)", @@ -114,6 +115,7 @@ "version_btn_unknown": "项目首页", "version_btn_ignore": "忽略", "version_btn_close": "关闭", + "version_btn_min": "后台下载", "version_title_latest": "🎉 当前版本已是最新 🎊", "version_title_checking": "⏳ 检查更新中 ⏳", "version_title_new": "🌟 发现新版本 🌟", diff --git a/src/navigation/components/VersionModal.js b/src/navigation/components/VersionModal.js index c07e752..94a6122 100644 --- a/src/navigation/components/VersionModal.js +++ b/src/navigation/components/VersionModal.js @@ -29,7 +29,7 @@ const VersionModal = ({ componentId }) => { const setVersionInfo = useDispatch('common', 'setVersionInfo') const setIgnoreVersion = useDispatch('common', 'setIgnoreVersion') const [ignoreBtn, setIgnoreBtn] = useState({ text: t('version_btn_ignore'), show: true, disabled: false }) - // const [closeBtn, setCloseBtn] = useState({ text: t('version_btn_close'), show: true, disabled: false }) + const [closeBtnText, setCloseBtnText] = useState(t('version_btn_close')) const [confirmBtn, setConfirmBtn] = useState({ text: t('version_btn_confirm'), show: true, disabled: false }) const [title, setTitle] = useState('') const [tip, setTip] = useState('') @@ -114,6 +114,7 @@ const VersionModal = ({ componentId }) => { setIgnoreBtn({ text: t('version_btn_ignore'), show: true, disabled: false }) setConfirmBtn({ text: t('version_btn_new'), show: true, disabled: false }) // setTip(t('version_btn_new')) + setCloseBtnText({ text: t('version_btn_close') }) break case VERSION_STATUS.downloading: setTitle(t('version_title_new')) @@ -124,30 +125,35 @@ const VersionModal = ({ componentId }) => { })) if (ignoreBtn.show) setIgnoreBtn({ text: t('version_btn_ignore'), show: false, disabled: true }) if (!confirmBtn.disabled) setConfirmBtn({ text: t('version_btn_update'), show: true, disabled: true }) + setCloseBtnText({ text: t('version_btn_min') }) break case VERSION_STATUS.downloaded: setTitle(t('version_title_update')) setTip('') if (ignoreBtn.show) setIgnoreBtn({ text: t('version_btn_ignore'), show: false, disabled: true }) setConfirmBtn({ text: t('version_btn_update'), show: true, disabled: false }) + setCloseBtnText({ text: t('version_btn_close') }) break case VERSION_STATUS.checking: setTitle(t('version_title_checking')) setTip(t('')) setIgnoreBtn({ text: t('version_btn_ignore'), show: false, disabled: true }) setConfirmBtn({ text: t('version_btn_new'), show: false, disabled: true }) + setCloseBtnText({ text: t('version_btn_close') }) break case VERSION_STATUS.failed: setTitle(t('version_title_failed')) setTip(t('version_tip_failed')) setIgnoreBtn({ text: t('version_btn_ignore'), show: true, disabled: false }) setConfirmBtn({ text: t('version_btn_failed'), show: true, disabled: false }) + setCloseBtnText({ text: t('version_btn_close') }) break case VERSION_STATUS.unknown: setTitle(t('version_title_unknown')) setTip(t('version_tip_unknown')) setIgnoreBtn({ text: t('version_btn_ignore'), show: false, disabled: true }) setConfirmBtn({ text: t('version_btn_unknown'), show: true, disabled: false }) + setCloseBtnText({ text: t('version_btn_close') }) break case VERSION_STATUS.latest: default: @@ -155,6 +161,7 @@ const VersionModal = ({ componentId }) => { setTip('') setIgnoreBtn({ text: t('version_btn_ignore'), show: false, disabled: true }) setConfirmBtn({ text: t('version_btn_new'), show: false, disabled: true }) + setCloseBtnText({ text: t('version_btn_close') }) break } // eslint-disable-next-line react-hooks/exhaustive-deps @@ -207,7 +214,7 @@ const VersionModal = ({ componentId }) => { : null } { confirmBtn.show diff --git a/src/store/modules/player/action.js b/src/store/modules/player/action.js index 9bbf47f..2ceb1d7 100644 --- a/src/store/modules/player/action.js +++ b/src/store/modules/player/action.js @@ -165,7 +165,7 @@ const handlePlayMusic = async({ getState, dispatch, playMusicInfo, musicInfo, is // console.log(AppState.currentState) if (!isRefresh && state.common.setting.player.togglePlayMethod == 'random') dispatch({ type: TYPES.addMusicToPlayedList, payload: playMusicInfo }) - console.log(musicInfo.img) + // console.log(musicInfo.img) if (!musicInfo.img) { dispatch(getPic(musicInfo)).then(async() => { if (playMusicId != id) return @@ -378,7 +378,7 @@ export const getUrl = ({ musicInfo, type, isRefresh }) => async(dispatch, getSta return handleGetUrl(dispatch, getState().player.listInfo.id, musicInfo, type).then(result => { saveMusicUrl(musicInfo, type, result.url) - console.log('get' + musicInfo.name + ' url success: ' + result.url) + // console.log('get' + musicInfo.name + ' url success: ' + result.url) return result.url }).catch(err => { console.log('get' + musicInfo.name + ' url fail: ' + err.message)