fix: add retry and show warning on description saving error (#7070)

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2025-07-03 11:47:28 +02:00
committed by GitHub
parent 7799854df4
commit 62a9ce3131
3 changed files with 36 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ import HomeIcon from 'vue-material-design-icons/Home.vue'
import CommentIcon from 'vue-material-design-icons/Comment.vue'
import ActivityIcon from 'vue-material-design-icons/LightningBolt.vue'
import { showError } from '@nextcloud/dialogs'
import { showError, showWarning } from '@nextcloud/dialogs'
import { getLocale } from '@nextcloud/l10n'
import CardMenuEntries from '../cards/CardMenuEntries.vue'
@@ -139,6 +139,7 @@ export default {
...mapState({
isFullApp: (state) => state.isFullApp,
currentBoard: (state) => state.currentBoard,
hasCardSaveError: (state) => state.hasCardSaveError,
}),
...mapGetters(['canEdit', 'assignables', 'cardActions', 'stackById']),
currentCard() {
@@ -198,6 +199,10 @@ export default {
},
closeSidebar() {
if (this.hasCardSaveError) {
showWarning(t('deck', 'Cannot close unsaved card!'))
return
}
this.$router?.push({ name: 'board' })
this.$emit('close')
},