diff --git a/src/renderer/manage/pages/bucketPage.vue b/src/renderer/manage/pages/bucketPage.vue index 2c19a2b..6724968 100644 --- a/src/renderer/manage/pages/bucketPage.vue +++ b/src/renderer/manage/pages/bucketPage.vue @@ -1,4 +1,4 @@ -ea/* +/* *UI布局和部分样式代码参考了https://github.com/willnewii/qiniuClient *感谢作者@willnewii */ diff --git a/src/renderer/manage/pages/logIn.vue b/src/renderer/manage/pages/logIn.vue index c5e1efa..873eab5 100644 --- a/src/renderer/manage/pages/logIn.vue +++ b/src/renderer/manage/pages/logIn.vue @@ -317,22 +317,19 @@ const importedNewConfig: IStringKeyMap = {} function ruleMap (options: IStringKeyMap) { const rule:any = {} - for (const key in options) { - const { options: itemOptions, configOptions } = options[key] - - for (const option of itemOptions) { + Object.keys(options).forEach((key) => { + const item = options[key].options + item.forEach((option: string) => { + const configOptions = options[key].configOptions[option] const keyName = `${key}.${option}` - const configOption = configOptions[option] - - if (configOption.rule) { - rule[keyName] = configOption.rule + if (configOptions.rule) { + rule[keyName] = configOptions.rule } - - if (configOption.default) { - configResult[keyName] = configOption.default + if (configOptions.default) { + configResult[keyName] = configOptions.default } - } - } + }) + }) return rule } @@ -483,16 +480,19 @@ const handleConfigReset = (name: string) => { } const handleConfigRemove = (name: string) => { + const commonNoticeConfig = { + title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'), + duration: 2000, + customClass: 'notification', + offset: 100 + } try { removeConfig('picBed', name) ElNotification( { - title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'), + ...commonNoticeConfig, message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_C')}${name}`, type: 'success', - duration: 2000, - customClass: 'notification', - offset: 100, position: 'bottom-right' } ) @@ -501,12 +501,9 @@ const handleConfigRemove = (name: string) => { } catch (error) { ElNotification( { - title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'), + ...commonNoticeConfig, message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_D')}${name}${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_E')}`, type: 'error', - duration: 2000, - customClass: 'notification', - offset: 100, position: 'bottom-right' } ) diff --git a/src/renderer/manage/pages/manageMain.vue b/src/renderer/manage/pages/manageMain.vue index aa3be58..85ff66a 100644 --- a/src/renderer/manage/pages/manageMain.vue +++ b/src/renderer/manage/pages/manageMain.vue @@ -501,13 +501,14 @@ function switchPicBed (picBedAlias:string) { allPicBedConfigure: JSON.stringify(allPicBedConfigure) } }) + } else { + currentAlias.value = picBedAlias + currentPicBedName.value = allPicBedConfigure[picBedAlias].picBedName + currentPagePicBedConfig = allPicBedConfigure[picBedAlias] + picBedSwitchDialogVisible.value = false + currentSelectedBucket.value = '' + getBucketList() } - currentAlias.value = picBedAlias - currentPicBedName.value = allPicBedConfigure[picBedAlias].picBedName - currentPagePicBedConfig = allPicBedConfigure[picBedAlias] - picBedSwitchDialogVisible.value = false - currentSelectedBucket.value = '' - getBucketList() } function changePicBed () { diff --git a/src/renderer/pages/Gallery.vue b/src/renderer/pages/Gallery.vue index 85e107d..a7a9c12 100644 --- a/src/renderer/pages/Gallery.vue +++ b/src/renderer/pages/Gallery.vue @@ -1160,4 +1160,3 @@ export default { color #ddd margin-bottom 10px -@/apis diff --git a/src/renderer/router/index.ts b/src/renderer/router/index.ts index 37a92cf..3791887 100644 --- a/src/renderer/router/index.ts +++ b/src/renderer/router/index.ts @@ -54,7 +54,7 @@ export default createRouter({ { path: 'manage-login-page', name: config.MANAGE_LOGIN_PAGE, - component: () => import(/* webpackChunkName: "ManageLogeinPage" */ '@/manage/pages/logIn.vue') + component: () => import(/* webpackChunkName: "ManageLoginPage" */ '@/manage/pages/logIn.vue') }, { path: 'picbeds/:type/:configId?',