-
Notifications
You must be signed in to change notification settings - Fork 316
refactor: application board entries #6114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
00f65f9
feat: split wallet app entries
hanszhoou 4957651
chore: type
hanszhoou 9653259
chore: type
hanszhoou a724a45
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou a6a0438
chore: solve conflict
hanszhoou 3f84e7e
Revert "chore: solve conflict"
hanszhoou 68358ed
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou d6f5ed4
chore: solve conflict
hanszhoou c66d357
feat: recommend feature app
hanszhoou dd64f52
chore: update event
hanszhoou 1dfe7e9
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou dc84ea1
chore: persona connect
hanszhoou 086d846
fix: little fix
hanszhoou b2d96dd
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou df51ff4
fix: dialog title text center
hanszhoou 6dd82ca
fix: style
hanszhoou 7fd0bdd
chore: add comment
hanszhoou caea3be
fix: ui style
hanszhoou 321f852
chore: ui style
hanszhoou dec1140
chore: for test
hanszhoou 5e2e901
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou 1bbd1b5
refactor: use entry status context
hanszhoou 4c6d226
chore: adjust logic
hanszhoou cc146d9
chore: add persona against sns connect status hook
hanszhoou a34ca93
chore: close app board after wallet connect
hanszhoou 1d1e836
chore: close app board after wallet connect
hanszhoou e650953
fix: ui style
hanszhoou 5941365
fix: bug
hanszhoou 9b65e92
fix: mf 612
hanszhoou f988373
chore: icon
hanszhoou c61e1cf
fix: bug
hanszhoou 2d867a8
chore: little fix
hanszhoou 22b6e61
chore: transaction list ui
hanszhoou 3e9cd46
chore: tip content ui
hanszhoou 7e95326
chore: transaction list ui
hanszhoou 0a9fb7c
chore: remove debug code
hanszhoou 4122fba
fix: bug
hanszhoou 18eb26c
chore: scroll for testing
hanszhoou 6992066
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou 795a44c
chore: spell
hanszhoou 84d459e
chore: little fix
hanszhoou 3a1d2ea
chore: remove debug code
hanszhoou 8b81d3b
chore: solve type error
hanszhoou e0a0ae3
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou e972a09
chore: prevent scroll parent
hanszhoou 12edbe3
fix: style
hanszhoou 9b2db6d
chore: remove code for test
hanszhoou d5577f6
chore: reply code review
hanszhoou 08cff12
chore: reply code review
hanszhoou 0b834ed
chore: reply code review
hanszhoou 42bf5dd
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou 7dddc6f
chore: reply code review
hanszhoou 3826fd2
Merge branch 'develop' into hancheng/split-application-wallet-entry
hanszhoou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -398,6 +398,7 @@ | |
| "txreceipt", | ||
| "txts", | ||
| "uaddr", | ||
| "uipd", | ||
| "unauthenticate", | ||
| "unitoken", | ||
| "unlocklock", | ||
|
|
||
This file contains hidden or 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,35 @@ | ||
| import { createPaletteAwareIcon } from '../utils' | ||
|
|
||
| export const AccountBalanceWalletIcon = createPaletteAwareIcon( | ||
| 'AccountBalanceWalletIcon', | ||
| <svg width="27" height="26" viewBox="0 0 27 26" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
| <path | ||
| d="M2.13062 14.2392V24.498V14.2392ZM21.9248 2.17517H4.84818C3.34754 2.17517 2.13062 3.39209 2.13062 4.89273V21.1076C2.13062 22.6082 3.34754 23.8252 4.84818 23.8252H21.9248C23.4254 23.8252 24.6424 22.6082 24.6424 21.1076V4.89273C24.6424 3.39182 23.4254 2.17517 21.9248 2.17517ZM22.7401 21.1076C22.7401 21.5571 22.3743 21.9229 21.9248 21.9229H4.84818C4.39869 21.9229 4.03291 21.5571 4.03291 21.1076V4.89273C4.03291 4.44325 4.39869 4.07746 4.84818 4.07746H21.9248C22.3743 4.07746 22.7401 4.44325 22.7401 4.89273V21.1076Z" | ||
| fill="#111418" | ||
| /> | ||
| <path | ||
| d="M22.7401 15.8696H17.524C15.9418 15.8696 14.6545 14.5823 14.6545 12.9998C14.6545 11.4174 15.9415 10.1304 17.524 10.1304H22.7401V8.22806H17.524C14.8887 8.22806 12.7522 10.3643 12.7522 12.9998C12.7522 15.6353 14.8885 17.7719 17.524 17.7719H22.7401V15.8696Z" | ||
| fill="#111418" | ||
| /> | ||
| <path | ||
| d="M17.7461 13.0002C17.7461 13.2524 17.8463 13.4943 18.0247 13.6727C18.2031 13.8511 18.445 13.9513 18.6972 13.9513C18.9495 13.9513 19.1914 13.8511 19.3698 13.6727C19.5482 13.4943 19.6484 13.2524 19.6484 13.0002C19.6484 12.7479 19.5482 12.506 19.3698 12.3276C19.1914 12.1492 18.9495 12.049 18.6972 12.049C18.445 12.049 18.2031 12.1492 18.0247 12.3276C17.8463 12.506 17.7461 12.7479 17.7461 13.0002Z" | ||
| fill="#111418" | ||
| /> | ||
| </svg>, | ||
| <svg width="27" height="26" viewBox="0 0 27 26" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
| <path | ||
| d="M2.13086 14.2392V24.498V14.2392ZM21.925 2.17517H4.84842C3.34778 2.17517 2.13086 3.39209 2.13086 4.89273V21.1076C2.13086 22.6082 3.34778 23.8252 4.84842 23.8252H21.925C23.4257 23.8252 24.6426 22.6082 24.6426 21.1076V4.89273C24.6426 3.39182 23.4257 2.17517 21.925 2.17517ZM22.7403 21.1076C22.7403 21.5571 22.3745 21.9229 21.925 21.9229H4.84842C4.39894 21.9229 4.03315 21.5571 4.03315 21.1076V4.89273C4.03315 4.44325 4.39894 4.07746 4.84842 4.07746H21.925C22.3745 4.07746 22.7403 4.44325 22.7403 4.89273V21.1076Z" | ||
| fill="#EFF3F4" | ||
| /> | ||
| <path | ||
| d="M22.7403 15.8696H17.5242C15.942 15.8696 14.6547 14.5823 14.6547 12.9998C14.6547 11.4174 15.9418 10.1304 17.5242 10.1304H22.7403V8.22806H17.5242C14.889 8.22806 12.7524 10.3643 12.7524 12.9998C12.7524 15.6353 14.8887 17.7719 17.5242 17.7719H22.7403V15.8696Z" | ||
| fill="#EFF3F4" | ||
| /> | ||
| <path | ||
| d="M17.7461 13.0002C17.7461 13.2524 17.8463 13.4943 18.0247 13.6727C18.2031 13.8511 18.445 13.9513 18.6972 13.9513C18.9495 13.9513 19.1914 13.8511 19.3698 13.6727C19.5482 13.4943 19.6484 13.2524 19.6484 13.0002C19.6484 12.7479 19.5482 12.506 19.3698 12.3276C19.1914 12.1492 18.9495 12.049 18.6972 12.049C18.445 12.049 18.2031 12.1492 18.0247 12.3276C17.8463 12.506 17.7461 12.7479 17.7461 13.0002Z" | ||
| fill="#EFF3F4" | ||
| /> | ||
| </svg>, | ||
| undefined, | ||
| '0 0 27 26', | ||
| ) |
This file contains hidden or 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 hidden or 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,24 @@ | ||
| import { createIcon } from '../utils' | ||
|
|
||
| export const WarningTriangleIcon = createIcon( | ||
| 'WarningTriangleIcon', | ||
| <g> | ||
| <path | ||
| d="M8.55695 3.59847C9.19845 2.48736 10.8022 2.48736 11.4437 3.59847L17.2456 13.6476C17.8871 14.7587 17.0852 16.1476 15.8022 16.1476H4.19845C2.91545 16.1476 2.11357 14.7587 2.75507 13.6476L8.55695 3.59847Z" | ||
| fill="#FFB100" | ||
| /> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M10.0005 6.33447C10.4147 6.33447 10.7505 6.67026 10.7505 7.08447L10.7505 11.6009C10.7505 12.0152 10.4147 12.3509 10.0005 12.3509C9.58627 12.3509 9.25049 12.0152 9.25049 11.6009L9.25049 7.08447C9.25049 6.67026 9.58627 6.33447 10.0005 6.33447Z" | ||
| fill="white" | ||
| /> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M10.0005 13.2114C10.4147 13.2114 10.7505 13.5472 10.7505 13.9614L10.7505 13.9806C10.7505 14.3948 10.4147 14.7306 10.0005 14.7306C9.58627 14.7306 9.25049 14.3948 9.25049 13.9806L9.25049 13.9614C9.25049 13.5472 9.58627 13.2114 10.0005 13.2114Z" | ||
| fill="white" | ||
| /> | ||
| </g>, | ||
| '0 0 20 20', | ||
| ) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
34 changes: 34 additions & 0 deletions
34
packages/mask/src/components/DataSource/usePersonaAgainstSNSConnectStatus.ts
This file contains hidden or 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,34 @@ | ||
| import type { PersonaInformation, NextIDPlatform } from '@masknet/shared-base' | ||
| import { useAsyncRetry } from 'react-use' | ||
| import { useMemo } from 'react' | ||
| import Services from '../../extension/service' | ||
| import { activatedSocialNetworkUI } from '../../social-network' | ||
| import { useLastRecognizedIdentity } from './useActivatedUI' | ||
| import { useMyPersonas } from './useMyPersonas' | ||
| import { useSetupGuideStatusState } from './useNextID' | ||
|
|
||
| export function usePersonaAgainstSNSConnectStatus() { | ||
| const ui = activatedSocialNetworkUI | ||
| const platform = ui.configuration.nextIDConfig?.platform as NextIDPlatform | ||
| const lastState = useSetupGuideStatusState() | ||
| const lastRecognized = useLastRecognizedIdentity() | ||
| const username = useMemo(() => { | ||
| return lastState.username || lastRecognized.identifier?.userId | ||
| }, [lastState, lastRecognized]) | ||
| const personas = useMyPersonas() | ||
|
Jack-Works marked this conversation as resolved.
|
||
|
|
||
| return useAsyncRetry(async () => { | ||
| const checkSNSConnectToCurrentPersona = (persona: PersonaInformation) => | ||
| username ? persona.linkedProfiles.some((x) => x.identifier.userId === username) : false | ||
| const currentPersonaIdentifier = await Services.Settings.getCurrentPersonaIdentifier() | ||
| const currentPersona = (await Services.Identity.queryOwnedPersonaInformation(true)).find( | ||
| (x) => x.identifier === currentPersonaIdentifier, | ||
| ) | ||
| const currentSNSConnectedPersona = personas.find(checkSNSConnectToCurrentPersona) | ||
| return { | ||
| isSNSConnectToCurrentPersona: currentPersona ? checkSNSConnectToCurrentPersona(currentPersona) : false, | ||
| currentPersonaPublicKey: currentPersona?.identifier.rawPublicKey, | ||
| currentSNSConnectedPersonaPublicKey: currentSNSConnectedPersona?.identifier.rawPublicKey, | ||
| } | ||
| }, [platform, username, ui, personas]) | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.