Live location sharing: own live beacon status on maximised view (#8374)

* add floating own live sharing eacon status to maximised view

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add tests for own beacon status

Signed-off-by: Kerry Archibald <kerrya@element.io>

* stylelint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove huge snapshot

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove unused emits from test

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-04-21 09:06:57 +02:00 committed by GitHub
parent 605fbd3e4e
commit f2ec465f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 175 additions and 16 deletions

View file

@ -25,7 +25,9 @@ import AccessibleButton from '../elements/AccessibleButton';
interface Props {
displayStatus: BeaconDisplayStatus;
className?: string;
beacon?: Beacon;
withIcon?: boolean;
}
/**
@ -33,7 +35,7 @@ interface Props {
* for errors and actions available for users own live beacons
*/
const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
beacon, displayStatus, className, ...rest
beacon, displayStatus, ...rest
}) => {
const {
hasWireError,
@ -49,12 +51,10 @@ const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
displayStatus;
return <BeaconStatus
className='mx_MBeaconBody_chin'
beacon={beacon}
displayStatus={ownDisplayStatus}
label={_t('Live location enabled')}
displayLiveTimeRemaining
withIcon
{...rest}
>
{ ownDisplayStatus === BeaconDisplayStatus.Active && <AccessibleButton