Live location sharing - open location in OpenStreetMap (PSF-1040) (#8695)
* share plain lat,lon string from beacon tooltip and list item Signed-off-by: Kerry Archibald <kerrya@element.io> * export makeMapSiteLink helper fn Signed-off-by: Kerry Archibald <kerrya@element.io> * use currentColor in external-link.svg Signed-off-by: Kerry Archibald <kerrya@element.io> * add open in openstreetmap link Signed-off-by: Kerry Archibald <kerrya@element.io> * fussy import ordering Signed-off-by: Kerry Archibald <kerrya@element.io> * fix icon color var Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
12abbf4042
commit
15c2fb6b71
14 changed files with 254 additions and 31 deletions
|
@ -19,9 +19,9 @@ import { Beacon } from 'matrix-js-sdk/src/matrix';
|
|||
import { LocationAssetType } from 'matrix-js-sdk/src/@types/location';
|
||||
|
||||
import MatrixClientContext from '../../../contexts/MatrixClientContext';
|
||||
import CopyableText from '../elements/CopyableText';
|
||||
import BeaconStatus from './BeaconStatus';
|
||||
import { BeaconDisplayStatus } from './displayStatus';
|
||||
import ShareLatestLocation from './ShareLatestLocation';
|
||||
|
||||
interface Props {
|
||||
beacon: Beacon;
|
||||
|
@ -50,10 +50,7 @@ const BeaconStatusTooltip: React.FC<Props> = ({ beacon }) => {
|
|||
displayLiveTimeRemaining
|
||||
className='mx_BeaconStatusTooltip_inner'
|
||||
>
|
||||
<CopyableText
|
||||
border={false}
|
||||
getTextToCopy={() => beacon.latestLocationState?.uri}
|
||||
/>
|
||||
<ShareLatestLocation latestLocationState={beacon.latestLocationState} />
|
||||
</BeaconStatus>
|
||||
</div>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue