diff --git a/locales/en-US.yml b/locales/en-US.yml index 8aad5b2921..90ce449e74 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -258,6 +258,7 @@ defaultValueIs: "Default: {value}" noCustomEmojis: "There are no emoji" noJobs: "There are no jobs" federating: "Federating" +blockingYou: "Blocking you" blocked: "Blocked" suspended: "Suspended" all: "All" @@ -1294,7 +1295,7 @@ _delivery: none: "Publishing" manuallySuspended: "Manually suspended" goneSuspended: "Server is suspended due to server deletion" - autoSuspendedForNotResponding: "Server is suspended due to no responding" + autoSuspendedForNotResponding: "Server is suspended due to not responding" _bubbleGame: howToPlay: "How to play" hold: "Hold" diff --git a/locales/index.d.ts b/locales/index.d.ts index 82dfce0d1a..8ccdaebcb9 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1050,6 +1050,10 @@ export interface Locale extends ILocale { * 連合中 */ "federating": string; + /** + * Blocking you + */ + "blockingYou": string; /** * ブロック中 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 437586c070..4d22aa87d1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -258,6 +258,7 @@ defaultValueIs: "デフォルト: {value}" noCustomEmojis: "絵文字はありません" noJobs: "ジョブはありません" federating: "連合中" +blockingYou: "Blocking you" blocked: "ブロック中" suspended: "配信停止" all: "全て" diff --git a/packages/frontend/assets/sharkey.svg b/packages/frontend/assets/sharkey.svg index 82f8c8cfa8..ae49863e5b 100644 Binary files a/packages/frontend/assets/sharkey.svg and b/packages/frontend/assets/sharkey.svg differ diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index 469b052b61..26b894b50a 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -46,9 +46,8 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.deleteAllFiles }} {{ i18n.ts.severAllFollowRelations }} - {{ i18n.ts._delivery.stop }} - {{ i18n.ts._delivery.resume }}
+ {{ i18n.ts._delivery.stop }} {{ i18n.ts.blockedByBase }} {{ i18n.ts.blockThisInstance }} {{ i18n.ts.silencedByBase }} @@ -206,6 +205,7 @@ const chartSrc = ref('instance-requests'); const meta = ref(null); const instance = ref(null); const suspensionState = ref<'none' | 'manuallySuspended' | 'goneSuspended' | 'autoSuspendedForNotResponding'>('none'); +const isSuspended = ref(false); const isBlocked = ref(false); const isSilenced = ref(false); const isNSFW = ref(false); @@ -275,6 +275,7 @@ async function fetch(): Promise { host: props.host, }); suspensionState.value = instance.value?.suspensionState ?? 'none'; + isSuspended.value = instance.value?.suspensionState !== 'none'; isBlocked.value = instance.value?.isBlocked ?? false; isSilenced.value = instance.value?.isSilenced ?? false; isNSFW.value = instance.value?.isNSFW ?? false; @@ -316,23 +317,13 @@ async function toggleMediaSilenced(): Promise { }); } -async function stopDelivery(): Promise { +async function toggleSuspended(): Promise { if (!iAmModerator) return; if (!instance.value) throw new Error('No instance?'); - suspensionState.value = 'manuallySuspended'; + suspensionState.value = isSuspended.value ? 'manuallySuspended' : 'none'; await misskeyApi('admin/federation/update-instance', { host: instance.value.host, - isSuspended: true, - }); -} - -async function resumeDelivery(): Promise { - if (!iAmModerator) return; - if (!instance.value) throw new Error('No instance?'); - suspensionState.value = 'none'; - await misskeyApi('admin/federation/update-instance', { - host: instance.value.host, - isSuspended: false, + isSuspended: isSuspended.value, }); } diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue index 50b3bf3451..c3150dac95 100644 --- a/packages/frontend/src/pages/user/home.vue +++ b/packages/frontend/src/pages/user/home.vue @@ -30,12 +30,15 @@ SPDX-License-Identifier: AGPL-3.0-only -
- {{ i18n.ts.followsYou }} - {{ i18n.ts.muted }} - {{ i18n.ts.renoteMuted }} - {{ i18n.ts.blocked }} -
+
    +
  • {{ i18n.ts.mutuals }}
  • +
  • {{ i18n.ts.following }}
  • +
  • {{ i18n.ts.followsYou }}
  • +
  • {{ i18n.ts.muted }}
  • +
  • {{ i18n.ts.renoteMuted }}
  • +
  • {{ i18n.ts.blocked }}
  • +
  • {{ i18n.ts.blockingYou }}
  • +
@@ -474,12 +477,17 @@ onUnmounted(() => { display: flex; flex-direction: row; + padding: 0; + margin: 0; + > * { padding: 4px 8px; color: #fff; background: rgba(0, 0, 0, 0.7); font-size: 0.7em; border-radius: var(--radius-sm); + list-style-type: none; + margin-left: 0; } > :not(:first-child) {