From f2ad1a04069119e7b66757c470c1720581b48eab Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 8 Apr 2019 20:16:00 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E6=8A=95=E7=A8=BF=E3=82=A6=E3=82=A3?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=83=88=E3=81=A7=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E3=81=BF=E3=81=AE=E5=85=AC=E9=96=8B=E7=AF=84?= =?UTF-8?q?=E5=9B=B2=E3=81=A7=E6=8A=95=E7=A8=BF=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=20(#4653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/views/widgets/post-form.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue index 5a456d8108..f1826cc59f 100644 --- a/src/client/app/common/views/widgets/post-form.vue +++ b/src/client/app/common/views/widgets/post-form.vue @@ -176,10 +176,22 @@ export default define({ post() { this.posting = true; + let visibility = 'public'; + let localOnly = false; + + const m = this.$store.state.settings.defaultNoteVisibility.match(/^local-(.+)/); + if (m) { + visibility = m[1]; + localOnly = true; + } else { + visibility = this.$store.state.settings.defaultNoteVisibility; + } + this.$root.api('notes/create', { text: this.text == '' ? undefined : this.text, fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined, - visibility: this.$store.state.settings.defaultNoteVisibility + visibility, + localOnly, }).then(data => { this.clear(); }).catch(err => {