Prep for pin drop location sharing (#7919)

* add labs flag feature_location_share_pin_drop

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

* split LocationButton into two components

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

* rethemendex

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

* copyright

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

* one more (c)

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

* i18n

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

* empty line

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

* use same matrix client import

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-01 18:00:07 +01:00 committed by GitHub
parent 8f128ef0dc
commit 3f1951b5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 510 additions and 71 deletions

View file

@ -30,7 +30,7 @@ import ErrorDialog from '../dialogs/ErrorDialog';
import { findMapStyleUrl } from '../messages/MLocationBody';
import { tileServerFromWellKnown } from '../../../utils/WellKnownUtils';
interface IProps {
export interface ILocationPickerProps {
sender: RoomMember;
onChoose(uri: string, ts: number): boolean;
onFinished(ev?: SyntheticEvent): void;
@ -50,14 +50,14 @@ interface IState {
*/
@replaceableComponent("views.location.LocationPicker")
class LocationPicker extends React.Component<IProps, IState> {
class LocationPicker extends React.Component<ILocationPickerProps, IState> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
private map?: maplibregl.Map = null;
private geolocate?: maplibregl.GeolocateControl = null;
private marker?: maplibregl.Marker = null;
constructor(props: IProps) {
constructor(props: ILocationPickerProps) {
super(props);
this.state = {