-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Platform - UI: Platform minor updates (#272)
* fix i18n and badge colours * update login to redirect to choose account page * manage account changes on dashboard page * manage account changes on application page * update login page to be configurable * reset extends option * remove close button on ualert on choose-account page * update dashboard to redirect to reg dashboard on any account changes * update change account watch on application page
- Loading branch information
Showing
12 changed files
with
197 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const useNavigate = () => { | ||
const accountStore = useConnectAccountStore() | ||
function redirect (url: string, params?: { [key: string]: string }, target = '_self') { | ||
// get account id and set in params | ||
const redirectURL = new URL(url) | ||
const accountId = accountStore.currentAccount.id | ||
if (accountId) { | ||
redirectURL.searchParams.append('accountid', accountId.toString()) | ||
} | ||
for (const [key, value] of Object.entries(params ?? {})) { | ||
redirectURL.searchParams.append(key, value) | ||
} | ||
// assume URL is always reachable | ||
window.open(redirectURL, target) | ||
} | ||
|
||
return { redirect } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.