Skip to content

Commit 6c5f3fb

Browse files
committed
Fix summary information
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent a138393 commit 6c5f3fb

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

js/backup-adminSettings.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/backup-adminSettings.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/GeneralSettingsSection.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
:disabled="loadingFetchSettings"
3838
name="timeSlotsStart"
3939
@change="setSettings">
40-
<option v-for="(hour, index) in new Array(24)" :key="index" :value="index">{{ index | leadingZero }}:00</option>
40+
<option v-for="(hour, index) in new Array(24)" :key="index" :value="index | leadingZero">{{ index | leadingZero }}:00</option>
4141
</select>
4242
{{ t('backup', 'and') }}
4343
<select v-model.number="settings.timeSlotsEnd"
4444
:disabled="loadingFetchSettings"
4545
name="timeSlotsEnd"
4646
@change="setSettings">
47-
<option v-for="(hour, index) in new Array(24)" :key="index" :value="index">{{ index | leadingZero }}:00</option>
47+
<option v-for="(hour, index) in new Array(24)" :key="index" :value="index | leadingZero">{{ index | leadingZero }}:00</option>
4848
</select>
4949
</label>
5050

@@ -109,20 +109,17 @@
109109
<ul class="backup-settings__summary">
110110
<template v-if="settings.allowWeekdays">
111111
<li>
112-
{{ t('backup', 'A full restoring point will be created {delayFullRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00.', settings) }}
113-
</li>
114-
<li>
115-
{{ t('backup', 'A full restoring point will be created {delayPartialRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00.', settings) }}
112+
{{ t('backup', 'A full restoring point will be created {delayFullRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00 any day of the week.', settings) }}
116113
</li>
117114
</template>
118115
<template v-if="!settings.allowWeekdays">
119116
<li>
120117
{{ t('backup', 'A full restoring point will be created {delayFullRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00 during weekends.', settings) }}
121118
</li>
122-
<li>
123-
{{ t('backup', 'A full restoring point will be created {delayPartialRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00 during weekends.', settings) }}
124-
</li>
125119
</template>
120+
<li>
121+
{{ t('backup', 'A partial restoring point will be created {delayPartialRestoringPoint} days after the last one between {timeSlotsStart}:00 and {timeSlotsEnd}:00 any day of the week.', settings) }}
122+
</li>
126123
</ul>
127124

128125
<div class="backup-settings__actions">

src/models/SettingsModel.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,18 @@ export default class SettingsModel {
379379
/**
380380
* Get the start of the allowed time slots to do a backup.
381381
*
382-
* @return {number}
382+
* @return {string}
383383
* @readonly
384384
* @memberof SettingsModel
385385
*/
386386
get timeSlotsStart() {
387-
return this._timeSlots.start
387+
return (this._timeSlots.start < 10 ? '0' : '') + this._timeSlots.start
388388
}
389389

390390
/**
391391
* Set the start of the allowed time slots to do a backup.
392392
*
393-
* @param {number} value - The new value.
393+
* @param {string} value - The new value.
394394
* @memberof SettingsModel
395395
*/
396396
set timeSlotsStart(value) {
@@ -401,18 +401,18 @@ export default class SettingsModel {
401401
/**
402402
* Get the end of the allowed time slots to do a backup.
403403
*
404-
* @return {number}
404+
* @return {string}
405405
* @readonly
406406
* @memberof SettingsModel
407407
*/
408408
get timeSlotsEnd() {
409-
return this._timeSlots.end
409+
return (this._timeSlots.end < 10 ? '0' : '') + this._timeSlots.end
410410
}
411411

412412
/**
413413
* Set the end of the allowed time slots to do a backup.
414414
*
415-
* @param {number} value - The new value.
415+
* @param {string} value - The new value.
416416
* @memberof SettingsModel
417417
*/
418418
set timeSlotsEnd(value) {

0 commit comments

Comments
 (0)