Skip to content

Commit

Permalink
fix: 修改 OneDrive 授权码长度限制 (#2629)
Browse files Browse the repository at this point in the history
Refs #2626
  • Loading branch information
ssongliu authored and wanghe-fit2cloud committed Oct 23, 2023
1 parent 08fe607 commit 7716df5
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions frontend/src/views/setting/backup-account/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,18 @@
prop="varsJson.code"
:rules="rules.driveCode"
>
<el-input clearable v-model.trim="dialogData.rowData!.varsJson['code']">
<template #append>
<el-button @click="jumpAzure">{{ $t('setting.loadCode') }}</el-button>
</template>
</el-input>
<div style="width: 100%">
<el-input
style="width: calc(100% - 80px)"
:autosize="{ minRows: 3, maxRows: 15 }"
type="textarea"
clearable
v-model.trim="dialogData.rowData!.varsJson['code']"
/>
<el-button class="append-button" @click="jumpAzure">
{{ $t('setting.loadCode') }}
</el-button>
</div>
<span class="input-help">
{{ $t('setting.codeHelper') }}
<el-link
Expand Down Expand Up @@ -269,7 +276,7 @@ const rules = reactive({
driveCode: [{ validator: checkDriveCode, required: true, trigger: 'blur' }],
});
function checkDriveCode(rule: any, value: any, callback: any) {
const reg = /^[A-Za-z0-9_.-]{32,60}$/;
const reg = /^[A-Za-z0-9_.-]+$/;
if (!reg.test(value)) {
return callback(new Error(i18n.global.t('setting.codeWarning')));
}
Expand Down Expand Up @@ -421,3 +428,11 @@ defineExpose({
acceptParams,
});
</script>

<style lang="scss" scoped>
.append-button {
width: 80px;
background-color: var(--el-fill-color-light);
color: var(--el-color-info);
}
</style>

0 comments on commit 7716df5

Please sign in to comment.