From 2ec84edb5e271e7ba73ffc37e79ba4fb092b186a Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Mon, 6 Jan 2025 20:00:42 -0700 Subject: [PATCH 1/4] Add: episode pubdate validation before saving --- client/components/modals/podcast/tabs/EpisodeDetails.vue | 6 ++++++ client/components/ui/TextInputWithLabel.vue | 9 +++++---- client/strings/en-us.json | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/client/components/modals/podcast/tabs/EpisodeDetails.vue b/client/components/modals/podcast/tabs/EpisodeDetails.vue index 85cfb4ff..9eaef85e 100644 --- a/client/components/modals/podcast/tabs/EpisodeDetails.vue +++ b/client/components/modals/podcast/tabs/EpisodeDetails.vue @@ -150,6 +150,12 @@ export default { this.$toast.info(this.$strings.ToastNoUpdatesNecessary) return false } + + // Check pubdate is valid if it is being updated. Cannot be set to null in the web client + if (updatedDetails.pubDate === null) { + this.$toast.error(this.$strings.ToastEpisodePubDateUpdateFailed) + return null + } return this.updateDetails(updatedDetails) }, async updateDetails(updatedDetails) { diff --git a/client/components/ui/TextInputWithLabel.vue b/client/components/ui/TextInputWithLabel.vue index f653a18b..ee9ffb7a 100644 --- a/client/components/ui/TextInputWithLabel.vue +++ b/client/components/ui/TextInputWithLabel.vue @@ -1,9 +1,10 @@