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:
parent
605fbd3e4e
commit
f2ec465f87
7 changed files with 175 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue