mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-29 11:26:13 +08:00
feat(commandline): add sign out (@fehmer)
This commit is contained in:
parent
d11bdaa710
commit
61a7fe4676
1 changed files with 12 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ import * as FPSCounter from "../elements/fps-counter";
|
|||
import { Command, CommandsSubgroup } from "./types";
|
||||
import { buildCommandForConfigKey } from "./util";
|
||||
import { CommandlineConfigMetadataObject } from "./commandline-metadata";
|
||||
import { isAuthAvailable, isAuthenticated, signOut } from "../firebase";
|
||||
|
||||
const challengesPromise = JSONData.getChallengeList();
|
||||
challengesPromise
|
||||
|
|
@ -366,6 +367,17 @@ export const commands: CommandsSubgroup = {
|
|||
window.open("https://discord.gg/monkeytype");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "signOut",
|
||||
display: "Sign out",
|
||||
icon: "fa-sign-out-alt",
|
||||
exec: (): void => {
|
||||
void signOut();
|
||||
},
|
||||
available: () => {
|
||||
return isAuthAvailable() && isAuthenticated();
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue