mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 03:35:12 +00:00
fix TypeScript and ESLint errors in instance-info.vue
This commit is contained in:
parent
fb9b6b1208
commit
66a88c89b5
1 changed files with 23 additions and 18 deletions
|
@ -363,41 +363,46 @@ function refreshMetadata(): void {
|
|||
});
|
||||
}
|
||||
|
||||
async function deleteAllFiles(): void {
|
||||
async function deleteAllFiles(): Promise<void> {
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
|
||||
const confirm = await os.confirm({
|
||||
type: 'danger',
|
||||
type: 'warning',
|
||||
text: i18n.ts.deleteAllFilesConfirm,
|
||||
});
|
||||
if (confirm.canceled) return;
|
||||
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
await misskeyApi('admin/federation/delete-all-files', {
|
||||
await Promise.all([
|
||||
misskeyApi('admin/federation/delete-all-files', {
|
||||
host: instance.value.host,
|
||||
});
|
||||
await os.alert({
|
||||
}),
|
||||
os.alert({
|
||||
text: i18n.ts.deleteAllFilesQueued,
|
||||
});
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
async function severAllFollowRelations(): void {
|
||||
async function severAllFollowRelations(): Promise<void> {
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
|
||||
const confirm = await os.confirm({
|
||||
type: 'danger',
|
||||
type: 'warning',
|
||||
text: i18n.tsx.severAllFollowRelationsConfirm({
|
||||
instanceName: instance.value.shortName ?? instance.value.name,
|
||||
instanceName: instance.value.name ?? instance.value.host,
|
||||
followingCount: instance.value.followingCount,
|
||||
followersCount: instance.value.followersCount,
|
||||
}),
|
||||
});
|
||||
if (confirm.canceled) return;
|
||||
|
||||
await misskeyApi('admin/federation/remove-all-following', {
|
||||
await Promise.all([
|
||||
misskeyApi('admin/federation/remove-all-following', {
|
||||
host: instance.value.host,
|
||||
});
|
||||
await os.alert({
|
||||
}),
|
||||
os.alert({
|
||||
text: i18n.tsx.severAllFollowRelationsQueued({ host: instance.value.host }),
|
||||
});
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
fetch();
|
||||
|
|
Loading…
Reference in a new issue