From a006eb489d9cf0971f2ffc6afee126a1f6836ecf Mon Sep 17 00:00:00 2001 From: mfcar Date: Tue, 21 Feb 2023 21:40:15 +0000 Subject: [PATCH 1/2] Fix schedule modal info --- client/components/modals/item/tabs/Schedule.vue | 10 +++++++++- .../components/widgets/CronExpressionBuilder.vue | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/client/components/modals/item/tabs/Schedule.vue b/client/components/modals/item/tabs/Schedule.vue index 80e396c8..032936d1 100644 --- a/client/components/modals/item/tabs/Schedule.vue +++ b/client/components/modals/item/tabs/Schedule.vue @@ -59,6 +59,14 @@ export default { newMaxNewEpisodesToDownload: 0 } }, + watch: { + libraryItem: { + immediate: true, + handler(newVal) { + if (newVal) this.init() + } + } + }, computed: { isProcessing: { get() { @@ -176,4 +184,4 @@ export default { height: calc(100% - 80px); max-height: calc(100% - 80px); } - \ No newline at end of file + diff --git a/client/components/widgets/CronExpressionBuilder.vue b/client/components/widgets/CronExpressionBuilder.vue index 3997a0f3..58dcee16 100644 --- a/client/components/widgets/CronExpressionBuilder.vue +++ b/client/components/widgets/CronExpressionBuilder.vue @@ -63,6 +63,14 @@ export default { isValid: true } }, + watch: { + value: { + immediate: true, + handler(newVal) { + this.init() + } + } + }, computed: { minuteIsValid() { return !(isNaN(this.selectedMinute) || this.selectedMinute === '' || this.selectedMinute < 0 || this.selectedMinute > 59) @@ -271,6 +279,11 @@ export default { }) }, init() { + this.selectedInterval = 'custom'; + this.selectedHour = 0; + this.selectedMinute = 0; + this.selectedWeekdays = []; + if (!this.value) return const pieces = this.value.split(' ') if (pieces.length !== 5) { @@ -309,4 +322,4 @@ export default { this.init() } } - \ No newline at end of file + From 0d8917ced66caeaa2f83f935405c2fc768f25500 Mon Sep 17 00:00:00 2001 From: advplyr <67830747+advplyr@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:00:01 -0600 Subject: [PATCH 2/2] Update client/components/widgets/CronExpressionBuilder.vue --- client/components/widgets/CronExpressionBuilder.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/widgets/CronExpressionBuilder.vue b/client/components/widgets/CronExpressionBuilder.vue index 58dcee16..168ff1d0 100644 --- a/client/components/widgets/CronExpressionBuilder.vue +++ b/client/components/widgets/CronExpressionBuilder.vue @@ -279,10 +279,10 @@ export default { }) }, init() { - this.selectedInterval = 'custom'; - this.selectedHour = 0; - this.selectedMinute = 0; - this.selectedWeekdays = []; + this.selectedInterval = 'custom' + this.selectedHour = 0 + this.selectedMinute = 0 + this.selectedWeekdays = [] if (!this.value) return const pieces = this.value.split(' ')