From 3978383d8f2d00e9b8cb55afdb8bd65c464055e6 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:29:23 +0900 Subject: [PATCH 01/13] =?UTF-8?q?enhance(backend):=20meta=E3=81=ABfederati?= =?UTF-8?q?on=20mode=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E5=85=AC=E9=96=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/entities/MetaEntityService.ts | 1 + packages/backend/src/models/json-schema/meta.ts | 5 +++++ packages/misskey-js/src/autogen/types.ts | 2 ++ 3 files changed, 8 insertions(+) diff --git a/packages/backend/src/core/entities/MetaEntityService.ts b/packages/backend/src/core/entities/MetaEntityService.ts index 409dca34263b..ec0b5360f4a2 100644 --- a/packages/backend/src/core/entities/MetaEntityService.ts +++ b/packages/backend/src/core/entities/MetaEntityService.ts @@ -132,6 +132,7 @@ export class MetaEntityService { enableUrlPreview: instance.urlPreviewEnabled, noteSearchableScope: (this.config.meilisearch == null || this.config.meilisearch.scope !== 'local') ? 'global' : 'local', maxFileSize: this.config.maxFileSize, + federation: this.meta.federation, }; return packed; diff --git a/packages/backend/src/models/json-schema/meta.ts b/packages/backend/src/models/json-schema/meta.ts index e3fd63464a81..e7ae2ee8e560 100644 --- a/packages/backend/src/models/json-schema/meta.ts +++ b/packages/backend/src/models/json-schema/meta.ts @@ -261,6 +261,11 @@ export const packedMetaLiteSchema = { type: 'number', optional: false, nullable: false, }, + federation: { + type: 'string', + enum: ['all', 'specified', 'none'], + optional: false, nullable: false, + }, }, } as const; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 42ca05e05761..6358f3651520 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -5029,6 +5029,8 @@ export type components = { */ noteSearchableScope: 'local' | 'global'; maxFileSize: number; + /** @enum {string} */ + federation: 'all' | 'specified' | 'none'; }; MetaDetailedOnly: { features?: { From 92bc2e71cab9f192d5818a50fdc6e92e824c9b25 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:34:39 +0900 Subject: [PATCH 02/13] =?UTF-8?q?enhance(frontend):=20=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E6=B3=A8=E6=84=8F=E6=9B=B8=E3=81=8D?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 8 ++++++++ locales/ja-JP.yml | 2 ++ packages/frontend/src/components/MkSignupDialog.rules.vue | 6 ++++-- packages/frontend/src/components/MkVisitorDashboard.vue | 6 ++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 0ae188f1f7f8..b7168f5cdd64 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5222,6 +5222,14 @@ export interface Locale extends ILocale { * 注意事項を理解した上でオンにします。 */ "acknowledgeNotesAndEnable": string; + /** + * このサーバーはホワイトリスト連合モードで運用されています。管理者が指定したサーバー以外とは連合できません。 + */ + "federationSpecified": string; + /** + * このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。 + */ + "federationDisabled": string; "_accountSettings": { /** * コンテンツの表示にログインを必須にする diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1b59708d8530..1e5823f1680c 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1301,6 +1301,8 @@ lockdown: "ロックダウン" pleaseSelectAccount: "アカウントを選択してください" availableRoles: "利用可能なロール" acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします。" +federationSpecified: "このサーバーはホワイトリスト連合モードで運用されています。管理者が指定したサーバー以外とは連合できません。" +federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。" _accountSettings: requireSigninToViewContents: "コンテンツの表示にログインを必須にする" diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index e2a06dd91f41..999e8433250a 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -10,8 +10,10 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- {{ i18n.ts.invitationRequiredToRegister }} +
+ {{ i18n.ts.invitationRequiredToRegister }} + {{ i18n.ts.federationSpecified }} + {{ i18n.ts.federationDisabled }}
diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index 97c765d81c73..9554d6fff0bc 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -18,8 +18,10 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- {{ i18n.ts.invitationRequiredToRegister }} +
+ {{ i18n.ts.invitationRequiredToRegister }} + {{ i18n.ts.federationSpecified }} + {{ i18n.ts.federationDisabled }}
{{ i18n.ts.joinThisServer }} From 88a7d1916095499ce716e6e84af031d9d7d7bd31 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:44:22 +0900 Subject: [PATCH 03/13] =?UTF-8?q?enhance(frontend):=20about=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=BB=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC?= =?UTF-8?q?=E6=83=85=E5=A0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/about.vue | 47 +++++++++++++-------- packages/frontend/src/ui/_common_/common.ts | 18 +++++--- 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 8dfeb6d2a73e..ef0fd39ffec5 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only