forked from bcgov/bc-wallet-mobile
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ajout d'accessibilité entête (#200)
Signed-off-by: fc-santos <filipesantos@live.ca>
- Loading branch information
Showing
21 changed files
with
230 additions
and
95 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.420-2f9dd7b327.patch
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,104 @@ | ||
diff --git a/App/components/listItems/NotificationListItem.tsx b/App/components/listItems/NotificationListItem.tsx | ||
index 1c8a86091e207b58a620be00db905b4ba7d06539..b3b630f911d116a0f6ce441c0aae3abe770f2075 100644 | ||
--- a/App/components/listItems/NotificationListItem.tsx | ||
+++ b/App/components/listItems/NotificationListItem.tsx | ||
@@ -49,6 +49,8 @@ export interface NotificationListItemProps { | ||
notificationType: NotificationType | ||
notification: BasicMessageRecord | CredentialExchangeRecord | ProofExchangeRecord | CustomNotificationRecord | ||
customNotification?: CustomNotification | ||
+ openSwipeableId?: string | null, | ||
+ onOpenSwipeable?: (id: string | null) => void | ||
} | ||
|
||
type DisplayDetails = { | ||
@@ -83,6 +85,8 @@ const NotificationListItem: React.FC<NotificationListItemProps> = ({ | ||
notificationType, | ||
notification, | ||
customNotification, | ||
+ openSwipeableId, | ||
+ onOpenSwipeable, | ||
}) => { | ||
const navigation = useNavigation<StackNavigationProp<HomeStackParams>>() | ||
const [store, dispatch] = useStore() | ||
diff --git a/App/screens/Home.tsx b/App/screens/Home.tsx | ||
index ad946ed3ee1af79bbdc90fa70e30eefd6782128c..7e10dc7df06c559ae379e4f5bbf3f53f9a13ada6 100644 | ||
--- a/App/screens/Home.tsx | ||
+++ b/App/screens/Home.tsx | ||
@@ -40,6 +40,8 @@ const Home: React.FC<HomeProps> = () => { | ||
const [showTourPopup, setShowTourPopup] = useState(false) | ||
const screenIsFocused = useIsFocused() | ||
|
||
+ const [notificationItemId, setNotificationItemId] = useState<string | null>(null) | ||
+ | ||
const styles = StyleSheet.create({ | ||
flatlist: { | ||
marginBottom: 35, | ||
@@ -49,26 +51,48 @@ const Home: React.FC<HomeProps> = () => { | ||
const DisplayListItemType = useCallback((item: any): React.ReactNode => { | ||
let component: React.ReactNode | ||
if (item.type === 'BasicMessageRecord') { | ||
- component = <NotificationListItem notificationType={NotificationType.BasicMessage} notification={item} /> | ||
+ component = ( | ||
+ <NotificationListItem | ||
+ openSwipeableId={notificationItemId} | ||
+ onOpenSwipeable={setNotificationItemId} | ||
+ notificationType={NotificationType.BasicMessage} | ||
+ notification={item} /> | ||
+ ) | ||
} else if (item.type === 'CredentialRecord') { | ||
let notificationType = NotificationType.CredentialOffer | ||
if (item.revocationNotification) { | ||
notificationType = NotificationType.Revocation | ||
} | ||
- component = <NotificationListItem notificationType={notificationType} notification={item} /> | ||
- } else if (item.type === 'CustomNotification' && customNotification) { | ||
component = ( | ||
<NotificationListItem | ||
- notificationType={NotificationType.Custom} | ||
+ openSwipeableId={notificationItemId} | ||
+ onOpenSwipeable={setNotificationItemId} | ||
+ notificationType={notificationType} | ||
notification={item} | ||
- customNotification={customNotification} | ||
/> | ||
) | ||
+ } else if (item.type === 'CustomNotification' && customNotification) { | ||
+ component = ( | ||
+ <NotificationListItem | ||
+ openSwipeableId={notificationItemId} | ||
+ onOpenSwipeable={setNotificationItemId} | ||
+ notificationType={NotificationType.Custom} | ||
+ notification={item} | ||
+ customNotification={customNotification} | ||
+ /> | ||
+ ) | ||
} else { | ||
- component = <NotificationListItem notificationType={NotificationType.ProofRequest} notification={item} /> | ||
+ component = ( | ||
+ <NotificationListItem | ||
+ openSwipeableId={notificationItemId} | ||
+ onOpenSwipeable={setNotificationItemId} | ||
+ notificationType={NotificationType.ProofRequest} | ||
+ notification={item} | ||
+ /> | ||
+ ) | ||
} | ||
return component | ||
- }, [customNotification, NotificationListItem]) | ||
+ }, [customNotification, NotificationListItem, notificationItemId, setNotificationItemId]) | ||
|
||
useEffect(() => { | ||
const shouldShowTour = enableToursConfig && store.tours.enableTours && !store.tours.seenHomeTour | ||
diff --git a/App/types/proof-items.ts b/App/types/proof-items.ts | ||
index fc4db0531ba9274f65b5ff1563c7c7f18c20a840..cfc9d66233935fa186772fc729f01244f0f64abe 100644 | ||
--- a/App/types/proof-items.ts | ||
+++ b/App/types/proof-items.ts | ||
@@ -1,7 +1,7 @@ | ||
import { AnonCredsCredentialsForProofRequest } from '@credo-ts/anoncreds' | ||
import { CredentialExchangeRecord } from '@credo-ts/core' | ||
import { Attribute, Predicate } from '@hyperledger/aries-oca/build/legacy' | ||
-import { DescriptorMetadata } from 'utils/anonCredsProofRequestMapper' | ||
+import { DescriptorMetadata } from '../utils/anonCredsProofRequestMapper' | ||
|
||
export type CredentialDataForProof = { | ||
groupedProof: (ProofCredentialPredicates & ProofCredentialAttributes)[], |
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
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
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
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.