From 62adf171ecc66f930fb83f871dc345d49b3d85cb Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 24 Apr 2022 18:09:54 +0200 Subject: [PATCH] feat: show the number of tasks we're about to remove when deleting a list --- src/components/misc/loading.vue | 7 ++- src/i18n/lang/en.json | 7 ++- src/styles/theme/loading.scss | 14 +++--- src/views/list/settings/delete.vue | 70 ++++++++++++++++++++---------- 4 files changed, 67 insertions(+), 31 deletions(-) diff --git a/src/components/misc/loading.vue b/src/components/misc/loading.vue index fe4f8e8d..6cc001a0 100644 --- a/src/components/misc/loading.vue +++ b/src/components/misc/loading.vue @@ -2,12 +2,17 @@
- \ No newline at end of file diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index d090c054..0edadba0 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -201,7 +201,9 @@ "header": "Delete this list", "text1": "Are you sure you want to delete this list and all of its contents?", "text2": "This includes all tasks and CANNOT BE UNDONE!", - "success": "The list was successfully deleted." + "success": "The list was successfully deleted.", + "tasksToDelete": "This will irrevocably remove approx. {count} tasks.", + "noTasksToDelete": "This list does not contain any tasks, it should be safe to delete." }, "duplicate": { "title": "Duplicate this list", @@ -497,7 +499,8 @@ "custom": "Custom", "id": "ID", "created": "Created at", - "actions": "Actions" + "actions": "Actions", + "cannotBeUndone": "This cannot be undone!" }, "input": { "resetColor": "Reset Color", diff --git a/src/styles/theme/loading.scss b/src/styles/theme/loading.scss index e3e91b66..10b8db39 100644 --- a/src/styles/theme/loading.scss +++ b/src/styles/theme/loading.scss @@ -14,12 +14,14 @@ border-width: 0.25rem; } - &.is-loading-small::after { - width: 1.5rem; - height: 1.5rem; - top: calc(50% - .75rem); - left: calc(50% - .75rem); - border-width: 2px; + &.is-loading-small { + &::after { + width: 1.5rem; + height: 1.5rem; + top: calc(50% - .75rem); + left: calc(50% - .75rem); + border-width: 2px; + } } } diff --git a/src/views/list/settings/delete.vue b/src/views/list/settings/delete.vue index d6e70bf9..52c4cefa 100644 --- a/src/views/list/settings/delete.vue +++ b/src/views/list/settings/delete.vue @@ -4,33 +4,59 @@ @submit="deleteList()" > - + -