mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 14:58:09 +09:00
wipo #259
This commit is contained in:
parent
cf1c21cb78
commit
925db60a7a
@ -338,6 +338,7 @@
|
|||||||
if (draft) {
|
if (draft) {
|
||||||
draft = JSON.parse(draft);
|
draft = JSON.parse(draft);
|
||||||
this.refs.text.value = draft.text;
|
this.refs.text.value = draft.text;
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -352,6 +353,7 @@
|
|||||||
this.clear = () => {
|
this.clear = () => {
|
||||||
this.refs.text.value = '';
|
this.refs.text.value = '';
|
||||||
this.files = [];
|
this.files = [];
|
||||||
|
this.poll = false;
|
||||||
this.trigger('change-files');
|
this.trigger('change-files');
|
||||||
this.update();
|
this.update();
|
||||||
};
|
};
|
||||||
@ -452,8 +454,9 @@
|
|||||||
reply_to_id: this.inReplyToPost ? this.inReplyToPost.id : undefined,
|
reply_to_id: this.inReplyToPost ? this.inReplyToPost.id : undefined,
|
||||||
poll: this.poll ? this.refs.poll.get() : undefined
|
poll: this.poll ? this.refs.poll.get() : undefined
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
localStorage.removeItem('post-draft');
|
this.clear();
|
||||||
this.trigger('post');
|
this.trigger('post');
|
||||||
|
localStorage.removeItem('post-draft');
|
||||||
this.notify(this.inReplyToPost ? '返信しました!' : '投稿しました!');
|
this.notify(this.inReplyToPost ? '返信しました!' : '投稿しました!');
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.notify('投稿できませんでした');
|
this.notify('投稿できませんでした');
|
||||||
|
Loading…
Reference in New Issue
Block a user