* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wop

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* add notes

* wip

* wip

* wip

* wip

* sound

* wip

* add kick_gaba2

* wip
This commit is contained in:
syuilo
2020-08-18 22:44:21 +09:00
committed by GitHub
parent 122076e8ea
commit 9855405b89
70 changed files with 2191 additions and 184 deletions

View File

@@ -53,7 +53,7 @@ export default Vue.extend({
};
},
computed: {
draftId(): string {
draftKey(): string {
return this.user ? 'user:' + this.user.id : 'group:' + this.group.id;
},
canSend(): boolean {
@@ -79,7 +79,7 @@ export default Vue.extend({
autosize(this.$refs.text);
// 書きかけの投稿を復元
const draft = JSON.parse(localStorage.getItem('message_drafts') || '{}')[this.draftId];
const draft = JSON.parse(localStorage.getItem('message_drafts') || '{}')[this.draftKey];
if (draft) {
this.text = draft.data.text;
this.file = draft.data.file;
@@ -199,7 +199,7 @@ export default Vue.extend({
saveDraft() {
const data = JSON.parse(localStorage.getItem('message_drafts') || '{}');
data[this.draftId] = {
data[this.draftKey] = {
updatedAt: new Date(),
data: {
text: this.text,
@@ -213,7 +213,7 @@ export default Vue.extend({
deleteDraft() {
const data = JSON.parse(localStorage.getItem('message_drafts') || '{}');
delete data[this.draftId];
delete data[this.draftKey];
localStorage.setItem('message_drafts', JSON.stringify(data));
},