warn when a domain is hard-blocked by a base domain
This commit is contained in:
parent
ac1e5a0fb5
commit
b23d650a15
|
@ -263,6 +263,8 @@ noCustomEmojis: "There are no emoji"
|
||||||
noJobs: "There are no jobs"
|
noJobs: "There are no jobs"
|
||||||
federating: "Federating"
|
federating: "Federating"
|
||||||
blocked: "Blocked"
|
blocked: "Blocked"
|
||||||
|
blockedByBase: "This host is blocked implicitly because a base domain is blocked. To unblock this host, first unblock the base domain(s)."
|
||||||
|
silencedByBase: "This host is silenced implicitly because a base domain is silenced. To un-silence this host, first un-silence the base domain(s)."
|
||||||
suspended: "Suspended"
|
suspended: "Suspended"
|
||||||
all: "All"
|
all: "All"
|
||||||
subscribing: "Subscribing"
|
subscribing: "Subscribing"
|
||||||
|
|
|
@ -1068,6 +1068,14 @@ export interface Locale extends ILocale {
|
||||||
* ブロック中
|
* ブロック中
|
||||||
*/
|
*/
|
||||||
"blocked": string;
|
"blocked": string;
|
||||||
|
/**
|
||||||
|
* This host is blocked implicitly because a base domain is blocked. To unblock this host, first unblock the base domain(s).
|
||||||
|
*/
|
||||||
|
"blockedByBase": string;
|
||||||
|
/**
|
||||||
|
* This host is silenced implicitly because a base domain is silenced. To un-silence this host, first un-silence the base domain(s).
|
||||||
|
*/
|
||||||
|
"silencedByBase": string;
|
||||||
/**
|
/**
|
||||||
* 配信停止
|
* 配信停止
|
||||||
*/
|
*/
|
||||||
|
@ -3128,6 +3136,10 @@ export interface Locale extends ILocale {
|
||||||
* 返信にサーバー情報を表示する
|
* 返信にサーバー情報を表示する
|
||||||
*/
|
*/
|
||||||
"showTickerOnReplies": string;
|
"showTickerOnReplies": string;
|
||||||
|
/**
|
||||||
|
* 猫の話し方を無効にする
|
||||||
|
*/
|
||||||
|
"disableCatSpeak": string;
|
||||||
/**
|
/**
|
||||||
* 検索MFMの検索エンジン
|
* 検索MFMの検索エンジン
|
||||||
*/
|
*/
|
||||||
|
@ -4429,10 +4441,6 @@ export interface Locale extends ILocale {
|
||||||
* 連合なしにする
|
* 連合なしにする
|
||||||
*/
|
*/
|
||||||
"disableFederationOk": string;
|
"disableFederationOk": string;
|
||||||
/**
|
|
||||||
* 猫の話し方を無効にする
|
|
||||||
*/
|
|
||||||
"disableCatSpeak": string;
|
|
||||||
/**
|
/**
|
||||||
* 現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。
|
* 現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。
|
||||||
*/
|
*/
|
||||||
|
@ -5777,7 +5785,7 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"social": string;
|
"social": string;
|
||||||
/**
|
/**
|
||||||
* バッッブルタイムラインでは、管理者が選択した接続サーバーからのメモを表示できます。
|
* バブルタイムラインでは、管理者が選択した接続サーバーからの投稿を表示できます。
|
||||||
*/
|
*/
|
||||||
"bubble": string;
|
"bubble": string;
|
||||||
/**
|
/**
|
||||||
|
@ -9139,7 +9147,7 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"global": string;
|
"global": string;
|
||||||
/**
|
/**
|
||||||
* バッッブル
|
* バブル
|
||||||
*/
|
*/
|
||||||
"bubble": string;
|
"bubble": string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -263,6 +263,8 @@ noCustomEmojis: "絵文字はありません"
|
||||||
noJobs: "ジョブはありません"
|
noJobs: "ジョブはありません"
|
||||||
federating: "連合中"
|
federating: "連合中"
|
||||||
blocked: "ブロック中"
|
blocked: "ブロック中"
|
||||||
|
blockedByBase: "This host is blocked implicitly because a base domain is blocked. To unblock this host, first unblock the base domain(s)."
|
||||||
|
silencedByBase: "This host is silenced implicitly because a base domain is silenced. To un-silence this host, first un-silence the base domain(s)."
|
||||||
suspended: "配信停止"
|
suspended: "配信停止"
|
||||||
all: "全て"
|
all: "全て"
|
||||||
subscribing: "購読中"
|
subscribing: "購読中"
|
||||||
|
|
|
@ -45,8 +45,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
<MkButton v-if="suspensionState === 'none'" :disabled="!instance" danger @click="stopDelivery">{{ i18n.ts._delivery.stop }}</MkButton>
|
<MkButton v-if="suspensionState === 'none'" :disabled="!instance" danger @click="stopDelivery">{{ i18n.ts._delivery.stop }}</MkButton>
|
||||||
<MkButton v-if="suspensionState !== 'none'" :disabled="!instance" @click="resumeDelivery">{{ i18n.ts._delivery.resume }}</MkButton>
|
<MkButton v-if="suspensionState !== 'none'" :disabled="!instance" @click="resumeDelivery">{{ i18n.ts._delivery.resume }}</MkButton>
|
||||||
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
<MkInfo v-if="isBaseBlocked" warn>{{ i18n.ts.blockedByBase }}</MkInfo>
|
||||||
<MkSwitch v-model="isSilenced" :disabled="!meta || !instance" @update:modelValue="toggleSilenced">{{ i18n.ts.silenceThisInstance }}</MkSwitch>
|
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance || isBaseBlocked" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
||||||
|
<MkInfo v-if="isBaseSilenced" warn>{{ i18n.ts.silenedByBase }}</MkInfo>
|
||||||
|
<MkSwitch v-model="isSilenced" :disabled="!meta || !instance || isBaseSilenced" @update:modelValue="toggleSilenced">{{ i18n.ts.silenceThisInstance }}</MkSwitch>
|
||||||
<MkSwitch v-model="isNSFW" :disabled="!instance" @update:modelValue="toggleNSFW">Mark as NSFW</MkSwitch>
|
<MkSwitch v-model="isNSFW" :disabled="!instance" @update:modelValue="toggleNSFW">Mark as NSFW</MkSwitch>
|
||||||
<MkSwitch v-model="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
<MkSwitch v-model="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
||||||
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
||||||
|
@ -174,6 +176,20 @@ const isMediaSilenced = ref(false);
|
||||||
const faviconUrl = ref<string | null>(null);
|
const faviconUrl = ref<string | null>(null);
|
||||||
const moderationNote = ref('');
|
const moderationNote = ref('');
|
||||||
|
|
||||||
|
const baseDomains = computed(() => {
|
||||||
|
const domains: string[] = [];
|
||||||
|
|
||||||
|
const parts = props.host.toLowerCase().split('.');
|
||||||
|
for (let s = 1; s < parts.length; s++) {
|
||||||
|
const domain = parts.slice(s).join('.');
|
||||||
|
domains.push(domain);
|
||||||
|
}
|
||||||
|
|
||||||
|
return domains;
|
||||||
|
});
|
||||||
|
const isBaseBlocked = computed(() => meta.value && baseDomains.value.some(d => meta.value?.blockedHosts.includes(d)));
|
||||||
|
const isBaseSilenced = computed(() => meta.value && meta.value.silencedHosts && baseDomains.value.some(d => meta.value?.silencedHosts?.includes(d)));
|
||||||
|
|
||||||
const usersPagination = {
|
const usersPagination = {
|
||||||
endpoint: iAmModerator ? 'admin/show-users' : 'users' as const,
|
endpoint: iAmModerator ? 'admin/show-users' : 'users' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
Loading…
Reference in New Issue