mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
Webatrice: fix saved password (#4563)
* fix saved label, and fix using hashedPassword when Save is unchecked * update host only after successful login * cleanup * fix ability to deselect saved password on successful login * cleanup * clear options after connection * fix registration saved username * cleanup * change label * fix tests Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
9577ada171
commit
2a54e9d7d1
15 changed files with 170 additions and 169 deletions
|
|
@ -29,7 +29,8 @@ const initialState: ServerState = {
|
|||
sortUsersBy: {
|
||||
field: UserSortField.NAME,
|
||||
order: SortDirection.ASC
|
||||
}
|
||||
},
|
||||
connectOptions: {},
|
||||
};
|
||||
|
||||
export const serverReducer = (state = initialState, action: any) => {
|
||||
|
|
@ -40,6 +41,21 @@ export const serverReducer = (state = initialState, action: any) => {
|
|||
initialized: true
|
||||
}
|
||||
}
|
||||
case Types.ACCOUNT_AWAITING_ACTIVATION: {
|
||||
return {
|
||||
...state,
|
||||
connectOptions: {
|
||||
...action.options
|
||||
}
|
||||
}
|
||||
}
|
||||
case Types.ACCOUNT_ACTIVATION_FAILED:
|
||||
case Types.ACCOUNT_ACTIVATION_SUCCESS: {
|
||||
return {
|
||||
...state,
|
||||
connectOptions: {}
|
||||
}
|
||||
}
|
||||
case Types.CLEAR_STORE: {
|
||||
return {
|
||||
...initialState,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue