wip
This commit is contained in:
parent
b2a6257f93
commit
a1e57841e7
22 changed files with 304 additions and 372 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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%'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('プロフィールを更新しました');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue