summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-14 20:36:15 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-14 20:36:15 +0900
commit7a2ef04ec31c3ff02de3d45c94afeb3da34c670b (patch)
tree37e30abdf77b21f4dbfba92a8a5c3ccc5ac5dda9 /src/client/app/common
parent10.49.5 (diff)
downloadsharkey-7a2ef04ec31c3ff02de3d45c94afeb3da34c670b.tar.gz
sharkey-7a2ef04ec31c3ff02de3d45c94afeb3da34c670b.tar.bz2
sharkey-7a2ef04ec31c3ff02de3d45c94afeb3da34c670b.zip
[Client] Improve UI
Diffstat (limited to 'src/client/app/common')
-rw-r--r--src/client/app/common/views/components/note-menu.vue17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue
index d45c9c8835..72063c8758 100644
--- a/src/client/app/common/views/components/note-menu.vue
+++ b/src/client/app/common/views/components/note-menu.vue
@@ -93,11 +93,18 @@ export default Vue.extend({
},
del() {
- if (!window.confirm(this.$t('delete-confirm'))) return;
- this.$root.api('notes/delete', {
- noteId: this.note.id
- }).then(() => {
- this.destroyDom();
+ this.$root.alert({
+ type: 'warning',
+ text: this.$t('delete-confirm'),
+ showCancelButton: true
+ }).then(res => {
+ if (!res) return;
+
+ this.$root.api('notes/delete', {
+ noteId: this.note.id
+ }).then(() => {
+ this.destroyDom();
+ });
});
},