This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 834
Device manager - add verification details to session details (PSG-644) #9187
Merged
kerryarchibald
merged 7 commits into
develop
from
psg-644/device-man-session-details-verification
Aug 16, 2022
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7dd84ff
extract security card for session verification to shared comp
30b0176
add card to device details
50f5c5b
tidy
68b8bc3
fix section spacing
bbaa871
update snapshots
f0410e4
Merge branch 'develop' into psg-644/device-man-session-details-verifi…
56495fd
use named export
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 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
47 changes: 47 additions & 0 deletions
47
src/components/views/settings/devices/DeviceVerificationStatusCard.tsx
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,47 @@ | ||
/* | ||
Copyright 2022 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { _t } from '../../../../languageHandler'; | ||
import DeviceSecurityCard from './DeviceSecurityCard'; | ||
import { | ||
DeviceSecurityVariation, | ||
DeviceWithVerification, | ||
} from './types'; | ||
|
||
interface Props { | ||
device: DeviceWithVerification; | ||
} | ||
|
||
const DeviceVerificationStatusCard: React.FC<Props> = ({ | ||
device, | ||
}) => { | ||
const securityCardProps = device?.isVerified ? { | ||
variation: DeviceSecurityVariation.Verified, | ||
heading: _t('Verified session'), | ||
description: _t('This session is ready for secure messaging.'), | ||
} : { | ||
variation: DeviceSecurityVariation.Unverified, | ||
heading: _t('Unverified session'), | ||
description: _t('Verify or sign out from this session for best security and reliability.'), | ||
}; | ||
return <DeviceSecurityCard | ||
{...securityCardProps} | ||
/>; | ||
}; | ||
|
||
export default DeviceVerificationStatusCard; | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were heading towards not doing this rather than doing this 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? Did we decide to use named exports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so, at least it appeared in some short discussion in element-dev and I thought it was generally accepted as a good practice
/me goes ask into element-dev