diff --git a/web/src/ui/login/VerificationScreen.tsx b/web/src/ui/login/VerificationScreen.tsx
index 2090060..d407f21 100644
--- a/web/src/ui/login/VerificationScreen.tsx
+++ b/web/src/ui/login/VerificationScreen.tsx
@@ -44,7 +44,7 @@ export const VerificationScreen = ({ client, clientState }: LoginScreenProps) =>
value={recoveryKey}
onChange={evt => setRecoveryKey(evt.target.value)}
/>
-
{error}
diff --git a/web/src/ui/settings/SettingsView.css b/web/src/ui/settings/SettingsView.css
index 8791fa2..61ae52e 100644
--- a/web/src/ui/settings/SettingsView.css
+++ b/web/src/ui/settings/SettingsView.css
@@ -72,4 +72,14 @@ div.settings-view {
}
}
}
+
+ button.logout {
+ margin-top: 1rem;
+ padding: .5rem 1rem;
+
+ &:hover, &:focus {
+ background-color: var(--error-color);
+ color: var(--inverted-text-color);
+ }
+ }
}
diff --git a/web/src/ui/settings/SettingsView.tsx b/web/src/ui/settings/SettingsView.tsx
index afc9afa..0c1d3fe 100644
--- a/web/src/ui/settings/SettingsView.tsx
+++ b/web/src/ui/settings/SettingsView.tsx
@@ -259,6 +259,14 @@ const SettingsView = ({ room }: SettingsViewProps) => {
}
}
}, [client, room])
+ const onClickLogout = useCallback(() => {
+ if (window.confirm("Really log out and delete all local data?")) {
+ client.logout().then(
+ () => console.info("Successfully logged out"),
+ err => window.alert(`Failed to log out: ${err}`),
+ )
+ }
+ }, [client])
usePreferences(client.store, room)
const globalServer = client.store.serverPreferenceCache
const globalLocal = client.store.localPreferenceCache
@@ -293,6 +301,7 @@ const SettingsView = ({ room }: SettingsViewProps) => {
+
>
}