Add avatar menu logout
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m10s

This commit is contained in:
Ruslan Bakiev
2026-05-08 20:01:32 +07:00
parent 2abfb92f17
commit f11cfd768f
3 changed files with 54 additions and 12 deletions

View File

@@ -10,6 +10,8 @@ String telegramLoginTokenFromUrl() => '';
void saveMapflowSessionToken(String token) {}
void clearMapflowSession() {}
void savePendingTelegramLoginToken(String token) {}
void clearPendingTelegramLoginToken() {}

View File

@@ -37,6 +37,12 @@ void saveMapflowSessionToken(String token) {
web.window.localStorage.setItem(mapflowSessionStorageKey, token);
}
void clearMapflowSession() {
web.window.localStorage.removeItem(mapflowSessionStorageKey);
web.window.localStorage.removeItem(telegramLoginStorageKey);
clearPendingTelegramLoginToken();
}
void savePendingTelegramLoginToken(String token) {
web.window.localStorage.setItem(pendingTelegramLoginStorageKey, token);
}