client: put back button to remove all following

Changelog: Added
This commit is contained in:
Johann150 2022-11-28 21:47:17 +01:00
parent a6a4ae870d
commit 07370a3b84
Signed by untrusted user: Johann150
GPG Key ID: 9EE6577A2A06F8F1
1 changed files with 11 additions and 0 deletions

View File

@ -47,7 +47,11 @@
{{ i18n.ts.blockThisInstanceDescription }}
</template>
</FormSwitch>
<MkButton @click="refreshMetadata"><i class="fas fa-refresh"></i> Refresh metadata</MkButton>
<MkInfo style="margin-top: 1em;" warn>{{ i18n.t('removeAllFollowingDescription', { host: instance.host }) }}</MkInfo>
<MkButton danger @click="removeAllFollowing"><i class="fas fa-users-slash"></i> {{ i18n.ts.removeAllFollowing }}</MkButton>
</FormSection>
<FormSection>
@ -148,6 +152,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
import { i18n } from '@/i18n';
import MkUserCardMini from '@/components/user-card-mini.vue';
import MkPagination from '@/components/ui/pagination.vue';
import MkInfo from '@/components/ui/info.vue';
const props = defineProps<{
host: string;
@ -202,6 +207,12 @@ function refreshMetadata(): void {
});
}
async function removeAllFollowing() {
await os.apiWithDialog('admin/federation/remove-all-following', {
host: instance.host,
});
}
fetch();
const headerActions = $computed(() => [{