From 8744d5683c89e4456106b7bf07dba337acb8b4ac Mon Sep 17 00:00:00 2001 From: Katrin Yordanova Date: Wed, 14 Jun 2023 13:38:53 +0300 Subject: [PATCH] Toggle delete btn and add delete method plan --- client/web/compose/src/views/Admin/Pages/Edit.vue | 13 ++++++++----- locale/en/corteza-webapp-compose/notification.yaml | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/web/compose/src/views/Admin/Pages/Edit.vue b/client/web/compose/src/views/Admin/Pages/Edit.vue index 2523b84b7b..d7818e6a4d 100644 --- a/client/web/compose/src/views/Admin/Pages/Edit.vue +++ b/client/web/compose/src/views/Admin/Pages/Edit.vue @@ -707,7 +707,7 @@ {{ $t('general:label.cancel') }} @@ -1299,10 +1299,13 @@ export default { }, deleteIcon () { - if (this.selectedAttachmentID) { - // study altered logic - // pass ID or whatever BE needs to del icon - } + // this.attachments = this.attachments.filter(a => a.attachmentID !== this.selectedAttachmentID) + // this.$ComposeAPI.? + // .then((attachments) => { + // either api will return updated list of attachments or you'll have to refetch + // this.attachments = attachments + // this.fetchAttachments() + // }).catch(this.toastErrorHandler(this.$t('notification:page.iconUndeleteFailed'))) }, }, } diff --git a/locale/en/corteza-webapp-compose/notification.yaml b/locale/en/corteza-webapp-compose/notification.yaml index 6fe5723aea..29ed074675 100644 --- a/locale/en/corteza-webapp-compose/notification.yaml +++ b/locale/en/corteza-webapp-compose/notification.yaml @@ -86,6 +86,7 @@ page: cloneFailed: Could not clone this page deleteFailed: Could not delete this page iconFetchFailed: Could not fetch list of icons + iconUndeleteFailed: Could not delete selected icon loadFailed: Could not load the page tree noPages: No pages found saveFailed: Could not save this page