about summary refs log tree commit diff
path: root/src/lib/hooks/useAccountSwitcher.ts
Commit message (Collapse)AuthorAgeFilesLines
* Remove Segment (#5518)Hailey2024-09-271-4/+1
|
* Handle failed resumeSession case when switching accounts (#4047)Eric Bailey2024-05-161-0/+5
|
* [Session] Code cleanup (#3854)dan2024-05-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split utils into files * Move reducer to another file * Write types explicitly * Remove unnnecessary check * Move things around a bit * Move more stuff into agent factories * Move more stuff into agent * Fix gates await * Clarify comments * Enforce more via types * Nit * initSession -> resumeSession * Protect against races * Make agent opaque to reducer * Check using plain condition
* [Session] Align state and global agent switchpoints (#3845)dan2024-05-031-10/+2
| | | | | | | | | | | | | * Adopt synced accounts unconditionally * Remove try/catch around resuming session * Move to login form on resume failure * Restructure code flow for easier reading --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Don't clear toasts when changing users (#3843)dan2024-05-031-6/+1
| | | | | | | | | | | * Move ThemeProvider to the top * Move RootSiblingParent above the remounted part * Move ToastContainer outside the remounted part * Remove setTimeout around toasts * Consistently handle dropped session
* Improve account switcher pending state (#3827)dan2024-05-021-6/+16
| | | | | | | | | * Protect against races * Reduce UI jank when switching accounts * Add pending state to selected account * Disable presses while pending
* [Session] Extract selectAccount out (#3812)dan2024-05-021-5/+11
|
* Session fixes, pt. 1 (#3762)dan2024-04-301-5/+14
| | | | | | | | | | | | | | | | | * Update persisted schema for new source of truth, implement in existing session (cherry picked from commit b1e5f12baee932721d66c60dd51c981b46b0c274) * Improve toasts, log caught error, during switch account (cherry picked from commit fe0d1507063d2e532b7b1a447670b689292d1dc3) * Handle thrown errors from initSession during login (cherry picked from commit 2c85c045917e923901284b9ba310a82e28f37b5c) --------- Co-authored-by: Eric Bailey <git@esb.lol>
* properly close the switch account dialog (#3558)Hailey2024-04-221-14/+4
| | | | | | | | | | | | | | | | | | | * properly close the switch account dialog * use it for switch account as well * ensure dialog is closed on unmount Revert "properly check if the ref is null" This reverts commit 8f563808a5d39389b0bc47a31e73cd147d1e7e8b. properly check if the ref is null ensure dialog is closed on unmount * Revert "ensure dialog is closed on unmount" This reverts commit a48548fd8ed53ae3eb08a0e05bb89f641c112b95.
* [Statsig] Track login/logout (#3286)dan2024-03-191-2/+6
| | | | | * [Statsig] Track login/logout * Fix missing attribution
* Fixes issue with (#2119)Ansh2023-12-071-3/+3
| | | | | | | | | | | * Allow going directly to password input screen when switching accounts and password is required * Revise state handling * Handle logged out states, enable clearing requestedAccount --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Navigate Home on account switch (#2138)dan2023-12-071-12/+7
|
* Improve account switching on mobile (#2135)Eric Bailey2023-12-071-1/+9
| | | | | * Improve account switching on mobile * Clarify comment
* Close modals if switching to unauthed account (#2039)Eric Bailey2023-11-291-0/+1
|
* Show logged out view when adding accounts (#2020)Ansh2023-11-291-5/+18
| | | | | | | | | | | | | * show logged out view when adding accounts * Handle existing signed-in account * Show which account is currently logged in * Fix showing toasts --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Nav home after switch accounts (#2002)Eric Bailey2023-11-271-2/+14
|
* Close active elems (react-query refactor) (#1926)Paul Frazee2023-11-161-18/+4
| | | | | | | | | * Refactor closeAny and closeAllActiveElements * Add close lightbox * Switch to hooks * Fixes
* Web login/signup and shellEric Bailey2023-11-091-30/+27
|
* Add modal state provider, replace usage except methods (#1833)Eric Bailey2023-11-081-1/+4
| | | | | | | | | | | | | * Add modal state provider, replace usage except methods * Replace easy spots * Fix sticky spots * Replace final usages * Memorize context objects * Add more warnings
* Extract shell state into separate context (#1824)Eric Bailey2023-11-071-2/+4
| | | | | | | | | | | | | | | | | * WIP * Add shell state * Integrate new shell state for drawer and minimal shell mode * Replace isDrawerSwipeDisabled * Split shell state into separate contexts to avoid needless re-renders * Fix typo --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Account quick switch modal (#1567)Paul Frazee2023-09-281-0/+41
* quick switch menu * Some small tweaks and fixes to the account switch modal * Factor out the account switcher logic to a hook * Add haptic feedback on account switcher open * Fix bad merge --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>