This commit is contained in:
syuilo 2018-02-21 02:53:34 +09:00
parent b2a6257f93
commit a1e57841e7
22 changed files with 304 additions and 372 deletions

View file

@ -5,7 +5,7 @@
<header v-html="title"></header>
<div class="body" v-html="text"></div>
<div class="buttons">
<button v-for="button in buttons" @click="click(button)" :key="button.id">{{ button.text }}</button>
<button v-for="button in buttons" @click="click(button)">{{ button.text }}</button>
</div>
</div>
</div>

View file

@ -40,7 +40,6 @@ import Vue from 'vue';
import * as Sortable from 'sortablejs';
import Autocomplete from '../../scripts/autocomplete';
import getKao from '../../../common/scripts/get-kao';
import notify from '../../scripts/notify';
export default Vue.extend({
props: ['reply', 'repost'],
@ -200,13 +199,13 @@ export default Vue.extend({
this.clear();
this.deleteDraft();
this.$emit('posted');
notify(this.repost
(this as any).apis.notify(this.repost
? '%i18n:desktop.tags.mk-post-form.reposted%'
: this.reply
? '%i18n:desktop.tags.mk-post-form.replied%'
: '%i18n:desktop.tags.mk-post-form.posted%');
}).catch(err => {
notify(this.repost
(this as any).apis.notify(this.repost
? '%i18n:desktop.tags.mk-post-form.repost-failed%'
: this.reply
? '%i18n:desktop.tags.mk-post-form.reply-failed%'

View file

@ -16,7 +16,6 @@
<script lang="ts">
import Vue from 'vue';
import notify from '../../scripts/notify';
export default Vue.extend({
props: ['post'],
@ -33,9 +32,9 @@ export default Vue.extend({
repost_id: this.post.id
}).then(data => {
this.$emit('posted');
notify('%i18n:desktop.tags.mk-repost-form.success%');
(this as any).apis.notify('%i18n:desktop.tags.mk-repost-form.success%');
}).catch(err => {
notify('%i18n:desktop.tags.mk-repost-form.failure%');
(this as any).apis.notify('%i18n:desktop.tags.mk-repost-form.failure%');
}).then(() => {
this.wait = false;
});

View file

@ -27,7 +27,6 @@
<script lang="ts">
import Vue from 'vue';
import notify from '../../scripts/notify';
export default Vue.extend({
data() {
@ -59,7 +58,7 @@ export default Vue.extend({
description: this.description || null,
birthday: this.birthday || null
}).then(() => {
notify('プロフィールを更新しました');
(this as any).apis.notify('プロフィールを更新しました');
});
}
}

View file

@ -11,24 +11,26 @@ import * as anime from 'animejs';
export default Vue.extend({
props: ['message'],
mounted() {
anime({
targets: this.$el,
opacity: 1,
translateY: [-64, 0],
easing: 'easeOutElastic',
duration: 500
});
setTimeout(() => {
this.$nextTick(() => {
anime({
targets: this.$el,
opacity: 0,
translateY: -64,
duration: 500,
easing: 'easeInElastic',
complete: () => this.$destroy()
opacity: 1,
translateY: [-64, 0],
easing: 'easeOutElastic',
duration: 500
});
}, 6000);
setTimeout(() => {
anime({
targets: this.$el,
opacity: 0,
translateY: -64,
duration: 500,
easing: 'easeInElastic',
complete: () => this.$destroy()
});
}, 6000);
});
}
});
</script>