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:
Kerry 2022-05-27 11:58:39 +02:00 committed by GitHub
parent 12abbf4042
commit 15c2fb6b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 254 additions and 31 deletions

View file

@ -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>;
};