Add toast for element already exists

This commit is contained in:
Jason Henriquez 2023-11-25 10:15:14 -06:00
parent 1b4f4aac40
commit 0cd02806bb
2 changed files with 4 additions and 1 deletions

View File

@ -67,7 +67,9 @@ export default defineComponent({
return
}
if (!this.tagList.includes(trimmedText)) {
if (this.tagList.includes(trimmedText)) {
showToast(this.$t('Tag already exists', { tagName: trimmedText }))
} else {
const newList = this.tagList.slice(0)
newList.push(trimmedText)
this.$emit('change', newList)

View File

@ -936,6 +936,7 @@ Screenshot Error: Screenshot failed. {error}
Channel Hidden: '{channel} added to channel filter'
Channel Unhidden: '{channel} removed from channel filter'
Trimmed input must be at least N characters long: Trimmed input must be at least 1 character long | Trimmed input must be at least {length} characters long
Tag already exists: '"{tagName}" tag already exists'
Hashtag:
Hashtag: Hashtag