Skip to content

Commit 4cd2c3a

Browse files
committed
feat(ui): clean up template formatting and improve readability in Add and Edit Repository Modals
1 parent 8f24419 commit 4cd2c3a

2 files changed

Lines changed: 12 additions & 20 deletions

File tree

core/ui/src/components/backup/AddRepositoryModal.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,9 @@
314314
/>
315315
</cv-radio-group>
316316
</div>
317-
<template
318-
v-if="rclone.configuration_source == 'paste'"
319-
>
317+
<template v-if="rclone.configuration_source == 'paste'">
320318
<cv-text-area
321-
class="mg-top-md maxwidth"
319+
class="mg-top-md maxwidth"
322320
:label="$t('backup.rclone_configuration_content')"
323321
v-model.trim="rclone.rclone_conf_secret"
324322
:invalid-message="error.rclone.rclone_conf_secret"
@@ -740,7 +738,10 @@ export default {
740738
this.name = "";
741739
if (this.selectedProvider == "smb") {
742740
this.focusElement("smb_host");
743-
} else if (this.selectedProvider != "cluster" && this.selectedProvider != "rclone") {
741+
} else if (
742+
this.selectedProvider != "cluster" &&
743+
this.selectedProvider != "rclone"
744+
) {
744745
this.focusElement("url");
745746
}
746747
}
@@ -829,8 +830,6 @@ export default {
829830
this.genericS3.aws_access_key_id = "";
830831
this.genericS3.aws_secret_access_key = "";
831832
832-
833-
834833
this.smb.smb_host = "";
835834
this.smb.smb_user = "";
836835
this.smb.smb_pass = "";
@@ -1398,7 +1397,7 @@ export default {
13981397
this.$emit("repoCreated");
13991398
this.$emit("hide");
14001399
},
1401-
1400+
14021401
async listBackupEndpoints() {
14031402
this.loading.listBackupEndpoints = true;
14041403
this.error.listBackupEndpoints = "";
@@ -1471,7 +1470,7 @@ export default {
14711470

14721471
<style scoped lang="scss">
14731472
@import "../../styles/carbon-utils";
1474-
1473+
14751474
// Full width and white background for the rclone file uploader
14761475
::v-deep .bx--file {
14771476
width: 100%;

core/ui/src/components/backup/EditRepositoryModal.vue

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,14 @@
164164
/>
165165
<cv-radio-button
166166
:label="
167-
$t(
168-
'backup.rclone_configuration_source_paste_configuration'
169-
)
167+
$t('backup.rclone_configuration_source_paste_configuration')
170168
"
171169
value="paste"
172170
v-model="rclone.configuration_source"
173171
/>
174172
<cv-radio-button
175173
:label="
176-
$t(
177-
'backup.rclone_configuration_source_upload_configuration'
178-
)
174+
$t('backup.rclone_configuration_source_upload_configuration')
179175
"
180176
value="upload"
181177
v-model="rclone.configuration_source"
@@ -207,9 +203,7 @@
207203
:multiple="false"
208204
:removable="true"
209205
:clear-on-reselect="true"
210-
:drop-target-label="
211-
$t('common.drag_and_drop_or_click_to_upload')
212-
"
206+
:drop-target-label="$t('common.drag_and_drop_or_click_to_upload')"
213207
v-model="rclone.configuration_uploaded_file"
214208
accept=".conf,.txt"
215209
ref="backup_file"
@@ -388,8 +382,7 @@ export default {
388382
case "rclone":
389383
this.rclone.configuration_source = "keep";
390384
this.rclone.rclone_conf_secret = "";
391-
this.rclone.base_path =
392-
this.repository.parameters.basepath || "";
385+
this.rclone.base_path = this.repository.parameters.basepath || "";
393386
this.rclone.configuration_uploaded_file = null;
394387
this.componentKey = Date.now();
395388
break;

0 commit comments

Comments
 (0)