mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 19:33:09 +02:00
[Client] Improve UI
This commit is contained in:
parent
76a9ea8d3d
commit
7a2ef04ec3
3 changed files with 34 additions and 15 deletions
|
@ -93,12 +93,19 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
del() {
|
||||
if (!window.confirm(this.$t('delete-confirm'))) return;
|
||||
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();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
favorite() {
|
||||
|
|
|
@ -73,7 +73,13 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
block() {
|
||||
if (!window.confirm(this.$t('block-confirm'))) return;
|
||||
this.$root.alert({
|
||||
type: 'warning',
|
||||
text: this.$t('block-confirm'),
|
||||
showCancelButton: true
|
||||
}).then(res => {
|
||||
if (!res) return;
|
||||
|
||||
this.$root.api('blocking/create', {
|
||||
userId: this.user.id
|
||||
}).then(() => {
|
||||
|
@ -81,6 +87,7 @@ export default Vue.extend({
|
|||
}, () => {
|
||||
alert('error');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
unblock() {
|
||||
|
|
|
@ -23,10 +23,15 @@ export default Vue.extend({
|
|||
},
|
||||
methods: {
|
||||
fn() {
|
||||
const ok = window.confirm(this.$t('read-all'));
|
||||
if (!ok) return;
|
||||
this.$root.alert({
|
||||
type: 'warning',
|
||||
text: this.$t('read-all'),
|
||||
showCancelButton: true
|
||||
}).then(res => {
|
||||
if (!res) return;
|
||||
|
||||
this.$root.api('notifications/mark_all_as_read');
|
||||
});
|
||||
},
|
||||
onFetched() {
|
||||
Progress.done();
|
||||
|
|
Loading…
Reference in a new issue