Improve admin UI (#2802)
This commit is contained in:
parent
7e50e03cfb
commit
7d11c8b767
8 changed files with 91 additions and 37 deletions
|
|
@ -21,18 +21,24 @@ export default Vue.extend({
|
|||
async unverifyUser() {
|
||||
this.unverifying = true;
|
||||
|
||||
const user = await (this as any).os.api(
|
||||
"users/show",
|
||||
parseAcct(this.username)
|
||||
);
|
||||
const process = async () => {
|
||||
const user = await (this as any).os.api(
|
||||
"users/show",
|
||||
parseAcct(this.username)
|
||||
);
|
||||
|
||||
await (this as any).os.api("admin/unverify-user", {
|
||||
userId: user.id
|
||||
await (this as any).os.api("admin/unverify-user", {
|
||||
userId: user.id
|
||||
});
|
||||
|
||||
(this as any).os.apis.dialog({ text: "%i18n:@unverified%" });
|
||||
};
|
||||
|
||||
await process().catch(e => {
|
||||
(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
||||
});
|
||||
|
||||
this.unverifying = false;
|
||||
|
||||
(this as any).os.apis.dialog({ text: "%i18n:@unverified%" });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue