forked from Blendman974/faceclaw
EvenHub app uses logo; move login from the Settings app into the EvenHub app
This commit is contained in:
1 parent
83e0fa919f
commit
deac81f98f
15 files changed
+443
-90
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { ConfigSettingString } from "../../ui/dashboard-settings";
|
||||
|
||||
/**
|
||||
* EvenHub owns its account configuration. The storage keys intentionally
|
||||
* match the former Settings-app entries so existing users stay signed in.
|
||||
*/
|
||||
export const evenHubEmailSetting = new ConfigSettingString({
|
||||
id: "evenhub-email",
|
||||
label: "Email",
|
||||
storageKey: "integrations.evenhub.email",
|
||||
defaultValue: "",
|
||||
editorTitle: "Email",
|
||||
glassesEditTitle: "Edit Even email",
|
||||
inputKind: "email",
|
||||
normalize: (value) => (value ?? "").replace(/[\x00-\x1f]+/g, "").trim(),
|
||||
});
|
||||
|
||||
export const evenHubPasswordSetting = new ConfigSettingString({
|
||||
id: "evenhub-password",
|
||||
label: "Password",
|
||||
storageKey: "integrations.evenhub.password",
|
||||
defaultValue: "",
|
||||
editorTitle: "Password",
|
||||
glassesEditTitle: "Edit Even password",
|
||||
inputKind: "password",
|
||||
normalize: (value) => (value ?? "").replace(/[\x00-\x1f]+/g, ""),
|
||||
formatValue: (value) => (value ? "(set)" : "(not set)"),
|
||||
});
|
||||
|
||||
export function hasEvenHubCredentials(): boolean {
|
||||
return Boolean(evenHubEmailSetting.get().trim() && evenHubPasswordSetting.get());
|
||||
}
|
||||
|
||||
export function clearEvenHubPassword(): void {
|
||||
evenHubPasswordSetting.set("");
|
||||
}
|
||||
Reference in new issue
Block a user