From 4ae1a659588a649f9b4f795840ac70b5be081dc6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 9 Feb 2022 21:25:48 +0900 Subject: feat: インスタンスのテーマカラーを設定できるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/pages/admin/settings.vue | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/client') diff --git a/packages/client/src/pages/admin/settings.vue b/packages/client/src/pages/admin/settings.vue index a4bac93834..81204f6e2f 100644 --- a/packages/client/src/pages/admin/settings.vue +++ b/packages/client/src/pages/admin/settings.vue @@ -25,6 +25,12 @@ + + + + + + @@ -179,6 +185,7 @@ export default defineComponent({ iconUrl: null, bannerUrl: null, backgroundImageUrl: null, + themeColor: null, maxNoteTextLength: 0, enableLocalTimeline: false, enableGlobalTimeline: false, @@ -206,6 +213,7 @@ export default defineComponent({ this.iconUrl = meta.iconUrl; this.bannerUrl = meta.bannerUrl; this.backgroundImageUrl = meta.backgroundImageUrl; + this.themeColor = meta.themeColor; this.maintainerName = meta.maintainerName; this.maintainerEmail = meta.maintainerEmail; this.maxNoteTextLength = meta.maxNoteTextLength; @@ -233,6 +241,7 @@ export default defineComponent({ iconUrl: this.iconUrl, bannerUrl: this.bannerUrl, backgroundImageUrl: this.backgroundImageUrl, + themeColor: this.themeColor === '' ? null : this.themeColor, maintainerName: this.maintainerName, maintainerEmail: this.maintainerEmail, maxNoteTextLength: this.maxNoteTextLength, -- cgit v1.2.3-freya From f512b2944338378f10a56f94d59f7101afa3e33a Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 9 Feb 2022 21:27:42 +0900 Subject: chore(client): check textarea exists --- packages/client/src/components/post-form.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/client') diff --git a/packages/client/src/components/post-form.vue b/packages/client/src/components/post-form.vue index 64a6478f45..656689ddcb 100644 --- a/packages/client/src/components/post-form.vue +++ b/packages/client/src/components/post-form.vue @@ -341,8 +341,10 @@ function addTag(tag: string) { } function focus() { - textareaEl.focus(); - textareaEl.setSelectionRange(textareaEl.value.length, textareaEl.value.length); + if (textareaEl) { + textareaEl.focus(); + textareaEl.setSelectionRange(textareaEl.value.length, textareaEl.value.length); + } } function chooseFileFrom(ev) { -- cgit v1.2.3-freya