From 06b66f020916eb73919c64278e07fe51d80ecc3e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 7 Nov 2018 01:12:26 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=86=E3=83=8A=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92DB=E3=81=AB=E4=BF=9D=E5=AD=98=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/example.yml | 7 ----- locales/ja-JP.yml | 3 ++ src/client/app/admin/views/instance.vue | 11 +++++++ .../app/common/views/components/signup.vue | 2 +- .../app/common/views/widgets/donation.vue | 2 +- .../app/common/views/widgets/server.info.vue | 2 +- .../app/desktop/views/components/settings.vue | 2 +- .../app/desktop/views/pages/welcome.vue | 2 +- src/client/app/mobile/views/pages/welcome.vue | 2 +- src/config/types.ts | 18 ++---------- src/models/meta.ts | 29 +++++++++++++++++++ src/push-sw.ts | 2 +- src/server/api/endpoints/admin/update-meta.ts | 24 ++++++++++++++- src/server/api/endpoints/meta.ts | 2 +- src/server/api/mastodon/index.ts | 2 +- 15 files changed, 77 insertions(+), 33 deletions(-) diff --git a/.config/example.yml b/.config/example.yml index 2fd57094b..072885af0 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -1,10 +1,3 @@ -maintainer: - name: example-maitainer-name # Your name - url: http://example.com/ # Your contact (http or mailto) - repository_url: https://github.com/syuilo/misskey # Repository URL - feedback_url: https://github.com/syuilo/misskey/issues # Feedback URL (e.g. github issue) - - # Final accessible URL seen by a user. url: https://example.tld/ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2d0cf60bc..b94fea1da 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1079,6 +1079,9 @@ admin/views/instance.vue: instance-name: "インスタンス名" instance-description: "インスタンスの紹介" banner-url: "バナー画像URL" + maintainer-config: "管理者情報" + maintainer-name: "管理者名" + maintainer-email: "管理者の連絡先" drive-config: "ドライブの設定" cache-remote-files: "リモートのファイルをキャッシュする" cache-remote-files-desc: "この設定を無効にすると、リモートファイルをキャッシュせず直リンクするようになります。そのためサーバーのストレージを節約できますが、プライバシー設定で直リンクを無効にしているユーザーにはファイルが見えなくなったり、サムネイルが生成されないので通信量が増加します。通常はこの設定をオンにしておくことをおすすめします。" diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index 5acb49333..c92326aa0 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -7,6 +7,11 @@ %i18n:@instance-description% %i18n:@banner-url% +
+
%i18n:@maintainer-config%
+ %i18n:@maintainer-name% + %i18n:@maintainer-email% +
%i18n:@max-note-text-length%
@@ -56,6 +61,8 @@ import Vue from "vue"; export default Vue.extend({ data() { return { + maintainerName: null, + maintainerEmail: null, disableRegistration: false, disableLocalTimeline: false, bannerUrl: null, @@ -75,6 +82,8 @@ export default Vue.extend({ created() { (this as any).os.getMeta().then(meta => { + this.maintainerName = meta.maintainer.name; + this.maintainerEmail = meta.maintainer.email; this.bannerUrl = meta.bannerUrl; this.name = meta.name; this.description = meta.description; @@ -103,6 +112,8 @@ export default Vue.extend({ updateMeta() { (this as any).api('admin/update-meta', { + maintainerName: this.maintainerName, + maintainerEmail: this.maintainerEmail, disableRegistration: this.disableRegistration, disableLocalTimeline: this.disableLocalTimeline, bannerUrl: this.bannerUrl, diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue index 91a09e14f..d743202c2 100644 --- a/src/client/app/common/views/components/signup.vue +++ b/src/client/app/common/views/components/signup.vue @@ -4,7 +4,7 @@ %i18n:@invitation-code% -

+

%i18n:@username% diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue index 4ef1557f9..3321b768e 100644 --- a/src/client/app/common/views/widgets/donation.vue +++ b/src/client/app/common/views/widgets/donation.vue @@ -5,7 +5,7 @@

%i18n:@title%

{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }} - {{ meta.maintainer.name }} + {{ meta.maintainer.name }} {{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}

diff --git a/src/client/app/common/views/widgets/server.info.vue b/src/client/app/common/views/widgets/server.info.vue index d24362950..3cb174812 100644 --- a/src/client/app/common/views/widgets/server.info.vue +++ b/src/client/app/common/views/widgets/server.info.vue @@ -1,6 +1,6 @@