From e05cbd68431f82ff69e024edbf64d7b3916427b3 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Sat, 9 Oct 2021 20:18:39 +0100 Subject: [PATCH] fix(frontend): more lowercasing of branch names in branch create dialog --- .../src/components/dialogs/BranchNewDialog.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/dialogs/BranchNewDialog.vue b/packages/frontend/src/components/dialogs/BranchNewDialog.vue index 846983b40..4dc207a4b 100644 --- a/packages/frontend/src/components/dialogs/BranchNewDialog.vue +++ b/packages/frontend/src/components/dialogs/BranchNewDialog.vue @@ -61,6 +61,11 @@ export default { } }, computed: {}, + watch: { + name(val) { + this.name = val.toLowerCase() + } + }, methods: { show() { this.showDialog = true @@ -80,7 +85,7 @@ export default { variables: { params: { streamId: this.$route.params.streamId, - name: this.name, + name: this.name.toLowerCase(), description: this.description } } @@ -90,7 +95,9 @@ export default { this.loading = false this.showDialog = false this.$emit('refetch-branches') - this.$router.push(`/streams/${this.$route.params.streamId}/branches/${this.name}`) + this.$router.push( + `/streams/${this.$route.params.streamId}/branches/${this.name.toLowerCase()}` + ) } catch (err) { this.showError = true if (err.message.includes('branches_streamid_name_unique'))