mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 04:25:13 +00:00
Expose instance-moderation endpoints in UI
This commit is contained in:
parent
ac1e5a0fb5
commit
99a0f756ff
4 changed files with 51 additions and 6 deletions
|
@ -1330,6 +1330,8 @@ confirmWhenRevealingSensitiveMedia: "Confirm when revealing sensitive media"
|
|||
sensitiveMediaRevealConfirm: "This media might be sensitive. Are you sure you want to reveal it?"
|
||||
createdLists: "Created lists"
|
||||
createdAntennas: "Created antennas"
|
||||
severAllFollowRelations: "Break follow relationships"
|
||||
severAllFollowRelationsConfirm: "Really break all follow relationships? This is irreversible!"
|
||||
_delivery:
|
||||
status: "Delivery status"
|
||||
stop: "Suspend delivery"
|
||||
|
|
20
locales/index.d.ts
vendored
20
locales/index.d.ts
vendored
|
@ -3128,6 +3128,10 @@ export interface Locale extends ILocale {
|
|||
* 返信にサーバー情報を表示する
|
||||
*/
|
||||
"showTickerOnReplies": string;
|
||||
/**
|
||||
* 猫の話し方を無効にする
|
||||
*/
|
||||
"disableCatSpeak": string;
|
||||
/**
|
||||
* 検索MFMの検索エンジン
|
||||
*/
|
||||
|
@ -4429,10 +4433,6 @@ export interface Locale extends ILocale {
|
|||
* 連合なしにする
|
||||
*/
|
||||
"disableFederationOk": string;
|
||||
/**
|
||||
* 猫の話し方を無効にする
|
||||
*/
|
||||
"disableCatSpeak": string;
|
||||
/**
|
||||
* 現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。
|
||||
*/
|
||||
|
@ -5337,6 +5337,14 @@ export interface Locale extends ILocale {
|
|||
* 作成したアンテナ
|
||||
*/
|
||||
"createdAntennas": string;
|
||||
/**
|
||||
* 以下の関係をすべて断ち切る
|
||||
*/
|
||||
"severAllFollowRelations": string;
|
||||
/**
|
||||
* 本当にすべての関係を断ち切りたいのですか?これは不可逆的だ。
|
||||
*/
|
||||
"severAllFollowRelationsConfirm": string;
|
||||
"_delivery": {
|
||||
/**
|
||||
* 配信状態
|
||||
|
@ -5777,7 +5785,7 @@ export interface Locale extends ILocale {
|
|||
*/
|
||||
"social": string;
|
||||
/**
|
||||
* バッッブルタイムラインでは、管理者が選択した接続サーバーからのメモを表示できます。
|
||||
* バブルタイムラインでは、管理者が選択した接続サーバーからの投稿を表示できます。
|
||||
*/
|
||||
"bubble": string;
|
||||
/**
|
||||
|
@ -9139,7 +9147,7 @@ export interface Locale extends ILocale {
|
|||
*/
|
||||
"global": string;
|
||||
/**
|
||||
* バッッブル
|
||||
* バブル
|
||||
*/
|
||||
"bubble": string;
|
||||
};
|
||||
|
|
|
@ -1330,6 +1330,8 @@ confirmWhenRevealingSensitiveMedia: "センシティブなメディアを表示
|
|||
sensitiveMediaRevealConfirm: "センシティブなメディアです。表示しますか?"
|
||||
createdLists: "作成したリスト"
|
||||
createdAntennas: "作成したアンテナ"
|
||||
severAllFollowRelations: "以下の関係をすべて断ち切る"
|
||||
severAllFollowRelationsConfirm: "本当にすべての関係を断ち切りたいのですか?これは不可逆的だ。"
|
||||
|
||||
_delivery:
|
||||
status: "配信状態"
|
||||
|
|
|
@ -43,6 +43,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
{{ i18n.ts._delivery._type[suspensionState] }}
|
||||
</template>
|
||||
</MkKeyValue>
|
||||
<MkButton :disabled="!instance" danger @click="deleteAllFiles">{{ i18n.ts.deleteAllFilesConfirm }}</MkButton>
|
||||
<MkButton :disabled="!instance" danger @click="severAllFollowRelations">{{ i18n.ts.severAllFollowRelations }}</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>
|
||||
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
||||
|
@ -270,6 +272,37 @@ function refreshMetadata(): void {
|
|||
});
|
||||
}
|
||||
|
||||
async function deleteAllFiles(): void {
|
||||
const confirm = await os.confirm({
|
||||
type: 'danger',
|
||||
text: i18n.ts.deleteAllFilesConfirm,
|
||||
});
|
||||
if (!confirm) return;
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
await misskeyApi('admin/federation/delete-all-files', {
|
||||
host: instance.value.host,
|
||||
});
|
||||
await os.alert({
|
||||
text: 'Deletion of all files queued',
|
||||
});
|
||||
}
|
||||
|
||||
async function severAllFollowRelations(): void {
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
|
||||
const confirm = await os.confirm({
|
||||
type: 'danger',
|
||||
text: i18n.ts.severAllFollowRelationsConfirm,
|
||||
});
|
||||
if (!confirm) return;
|
||||
await misskeyApi('admin/federation/remove-all-following', {
|
||||
host: instance.value.host,
|
||||
});
|
||||
await os.alert({
|
||||
text: 'Severing all follow relations queued',
|
||||
});
|
||||
}
|
||||
|
||||
fetch();
|
||||
|
||||
const headerActions = computed(() => [{
|
||||
|
|
Loading…
Reference in a new issue