feat(commandline): add sign out (@fehmer) (#7283)

This commit is contained in:
Christian Fehmer 2025-12-21 10:54:24 +01:00 committed by GitHub
parent d11bdaa710
commit ef5ef0c427
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
},
},
],
};