From 94f5d47e46e92a530491b802b2b182ab3cd053dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Mon, 12 Feb 2024 07:53:27 +0900 Subject: [PATCH] =?UTF-8?q?spec(frontend):=20about=E3=83=9A=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=81=AB=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=BB=E3=83=95=E3=82=A3=E3=83=BC=E3=83=89=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=81=AEURL=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=95?= =?UTF-8?q?=E3=81=9B=E3=82=8B=20(MisskeyIO#438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/en-US.yml | 5 +++++ locales/index.d.ts | 20 +++++++++++++++++++ locales/ja-JP.yml | 5 +++++ locales/ko-KR.yml | 5 +++++ .../server/api/endpoints/admin/update-meta.ts | 6 +++--- packages/frontend/src/pages/about.vue | 15 ++++++++++++++ .../frontend/src/pages/admin/branding.vue | 16 +++++++++++++++ packages/misskey-js/src/autogen/types.ts | 4 ++-- 8 files changed, 71 insertions(+), 5 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 320b1f922..26ed8dbc8 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1176,6 +1176,11 @@ hideRepliesToOthersInTimelineAll: "Hide replies to others from everyone you foll confirmShowRepliesAll: "This operation is irreversible. Would you really like to show replies to others from everyone you follow in your timeline?" confirmHideRepliesAll: "This operation is irreversible. Would you really like to hide replies to others from everyone you follow in your timeline?" externalServices: "External Services" +sourcecode: "Source code" +repositoryUrl: "Repository URL" +feedback: "Feedback" +feedbackUrl: "Feedback URL" +supportThisInstance: "Support {name}" impressum: "Impressum" impressumUrl: "Impressum URL" impressumDescription: "In some countries, like germany, the inclusion of operator contact information (an Impressum) is legally required for commercial websites." diff --git a/locales/index.d.ts b/locales/index.d.ts index 0da1bf471..2a8d6d52b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4720,6 +4720,26 @@ export interface Locale extends ILocale { * 外部サービス */ "externalServices": string; + /** + * ソースコード + */ + "sourcecode": string; + /** + * リポジトリURL + */ + "repositoryUrl": string; + /** + * フィードバック + */ + "feedback": string; + /** + * フィードバックURL + */ + "feedbackUrl": string; + /** + * {name}を支援 + */ + "supportThisInstance": ParameterizedString<"name">; /** * 運営者情報 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 4bfb98c68..4c9d17903 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1176,6 +1176,11 @@ hideRepliesToOthersInTimelineAll: "TLに現在フォロー中の人全員の返 confirmShowRepliesAll: "この操作は元に戻せません。本当にTLに現在フォロー中の人全員の返信を含めるようにしますか?" confirmHideRepliesAll: "この操作は元に戻せません。本当にTLに現在フォロー中の人全員の返信を含めないようにしますか?" externalServices: "外部サービス" +sourcecode: "ソースコード" +repositoryUrl: "リポジトリURL" +feedback: "フィードバック" +feedbackUrl: "フィードバックURL" +supportThisInstance: "{name}を支援" impressum: "運営者情報" impressumUrl: "運営者情報URL" impressumDescription: "ドイツなどの一部の国と地域では表示が義務付けられています(Impressum)。" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 19ef391ae..8395db8d8 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1174,6 +1174,11 @@ hideRepliesToOthersInTimelineAll: "타임라인에 현재 팔로우 중인 사 confirmShowRepliesAll: "이 조작은 되돌릴 수 없습니다. 정말로 타임라인에 현재 팔로우 중인 사람 전원의 답글이 나오게 하시겠습니까?" confirmHideRepliesAll: "이 조작은 되돌릴 수 없습니다. 정말로 타임라인에 현재 팔로우 중인 사람 전원의 답글이 나오지 않게 하시겠습니까?" externalServices: "외부 서비스" +sourcecode: "소스코드" +repositoryUrl: "저장소 URL" +feedback: "피드백" +feedbackUrl: "피드백 URL" +supportThisInstance: "{name} 지원하기" impressum: "운영자 정보" impressumUrl: "운영자 정보 URL" impressumDescription: "독일 등의 일부 나라와 지역에서는 꼭 표시해야 합니다(Impressum)." diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 96d087978..06052edc7 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -104,8 +104,8 @@ export const paramDef = { swPublicKey: { type: 'string', nullable: true }, swPrivateKey: { type: 'string', nullable: true }, tosUrl: { type: 'string', nullable: true }, - repositoryUrl: { type: 'string' }, - feedbackUrl: { type: 'string' }, + repositoryUrl: { type: 'string', nullable: true }, + feedbackUrl: { type: 'string', nullable: true }, impressumUrl: { type: 'string', nullable: true }, privacyPolicyUrl: { type: 'string', nullable: true }, useObjectStorage: { type: 'boolean' }, @@ -437,7 +437,7 @@ export default class extends Endpoint { // eslint- } if (ps.repositoryUrl !== undefined) { - set.repositoryUrl = ps.repositoryUrl; + set.repositoryUrl = ps.repositoryUrl ?? 'https://github.com/misskey-dev/misskey'; } if (ps.feedbackUrl !== undefined) { diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 69cb6ef64..aab312473 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -32,6 +32,21 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.aboutMisskey }} + + + {{ i18n.ts.sourcecode }} + + + + + {{ i18n.ts.feedback }} + + + + + {{ i18n.tsx.supportThisInstance({ name: instance.name ?? host }) }} + + diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue index 7f01b6021..2ce3c5fae 100644 --- a/packages/frontend/src/pages/admin/branding.vue +++ b/packages/frontend/src/pages/admin/branding.vue @@ -76,6 +76,16 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + @@ -120,6 +130,8 @@ const defaultDarkTheme = ref(null); const serverErrorImageUrl = ref(null); const infoImageUrl = ref(null); const notFoundImageUrl = ref(null); +const repositoryUrl = ref(null); +const feedbackUrl = ref(null); const manifestJsonOverride = ref('{}'); async function init() { @@ -135,6 +147,8 @@ async function init() { serverErrorImageUrl.value = meta.serverErrorImageUrl; infoImageUrl.value = meta.infoImageUrl; notFoundImageUrl.value = meta.notFoundImageUrl; + repositoryUrl.value = meta.repositoryUrl; + feedbackUrl.value = meta.feedbackUrl; manifestJsonOverride.value = meta.manifestJsonOverride === '' ? '{}' : JSON.stringify(JSON.parse(meta.manifestJsonOverride), null, '\t'); } @@ -151,6 +165,8 @@ function save() { infoImageUrl: infoImageUrl.value === '' ? null : infoImageUrl.value, notFoundImageUrl: notFoundImageUrl.value === '' ? null : notFoundImageUrl.value, serverErrorImageUrl: serverErrorImageUrl.value === '' ? null : serverErrorImageUrl.value, + repositoryUrl: repositoryUrl.value === '' ? null : repositoryUrl.value, + feedbackUrl: feedbackUrl.value === '' ? null : feedbackUrl.value, manifestJsonOverride: manifestJsonOverride.value === '' ? '{}' : JSON.stringify(JSON5.parse(manifestJsonOverride.value)), }).then(() => { fetchInstance(); diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 989718c91..75057ec41 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -8909,8 +8909,8 @@ export type operations = { swPublicKey?: string | null; swPrivateKey?: string | null; tosUrl?: string | null; - repositoryUrl?: string; - feedbackUrl?: string; + repositoryUrl?: string | null; + feedbackUrl?: string | null; impressumUrl?: string | null; privacyPolicyUrl?: string | null; useObjectStorage?: boolean;