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
|
@ -23,10 +23,10 @@ import { useEventEmitterState } from '../../../hooks/useEventEmitter';
|
|||
import { humanizeTime } from '../../../utils/humanize';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import MemberAvatar from '../avatars/MemberAvatar';
|
||||
import CopyableText from '../elements/CopyableText';
|
||||
import BeaconStatus from './BeaconStatus';
|
||||
import { BeaconDisplayStatus } from './displayStatus';
|
||||
import StyledLiveBeaconIcon from './StyledLiveBeaconIcon';
|
||||
import ShareLatestLocation from './ShareLatestLocation';
|
||||
|
||||
interface Props {
|
||||
beacon: Beacon;
|
||||
|
@ -69,10 +69,7 @@ const BeaconListItem: React.FC<Props> = ({ beacon }) => {
|
|||
label={beaconMember?.name || beacon.beaconInfo.description || beacon.beaconInfoOwner}
|
||||
displayStatus={BeaconDisplayStatus.Active}
|
||||
>
|
||||
<CopyableText
|
||||
border={false}
|
||||
getTextToCopy={() => latestLocationState?.uri}
|
||||
/>
|
||||
<ShareLatestLocation latestLocationState={latestLocationState} />
|
||||
</BeaconStatus>
|
||||
<span className='mx_BeaconListItem_lastUpdated'>{ _t("Updated %(humanizedUpdateTime)s", { humanizedUpdateTime }) }</span>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue