fix: add retry and show warning on description saving error (#7070)
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
@@ -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')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user