Compare commits

..

2 Commits

Author SHA1 Message Date
syuilo
90429b787c 10.49.6 2018-11-14 20:40:21 +09:00
syuilo
7a2ef04ec3 [Client] Improve UI 2018-11-14 20:36:15 +09:00
4 changed files with 36 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
{ {
"name": "misskey", "name": "misskey",
"author": "syuilo <i@syuilo.com>", "author": "syuilo <i@syuilo.com>",
"version": "10.49.5", "version": "10.49.6",
"clientVersion": "2.0.11781", "clientVersion": "2.0.11783",
"codename": "nighthike", "codename": "nighthike",
"main": "./built/index.js", "main": "./built/index.js",
"private": true, "private": true,

View File

@@ -93,12 +93,19 @@ export default Vue.extend({
}, },
del() { 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', { this.$root.api('notes/delete', {
noteId: this.note.id noteId: this.note.id
}).then(() => { }).then(() => {
this.destroyDom(); this.destroyDom();
}); });
});
}, },
favorite() { favorite() {

View File

@@ -73,7 +73,13 @@ export default Vue.extend({
}, },
block() { 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', { this.$root.api('blocking/create', {
userId: this.user.id userId: this.user.id
}).then(() => { }).then(() => {
@@ -81,6 +87,7 @@ export default Vue.extend({
}, () => { }, () => {
alert('error'); alert('error');
}); });
});
}, },
unblock() { unblock() {

View File

@@ -23,10 +23,15 @@ export default Vue.extend({
}, },
methods: { methods: {
fn() { fn() {
const ok = window.confirm(this.$t('read-all')); this.$root.alert({
if (!ok) return; type: 'warning',
text: this.$t('read-all'),
showCancelButton: true
}).then(res => {
if (!res) return;
this.$root.api('notifications/mark_all_as_read'); this.$root.api('notifications/mark_all_as_read');
});
}, },
onFetched() { onFetched() {
Progress.done(); Progress.done();