mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
added gpx dialog
This commit is contained in:
parent
947ec69e60
commit
e995b46641
33 changed files with 11687 additions and 131 deletions
|
@ -8,6 +8,7 @@ import { TrashDialog } from '~/components/dialogs/TrashDialog';
|
|||
import { LogoDialog } from '~/components/dialogs/LogoDialog';
|
||||
import { SaveDialog } from '~/components/dialogs/SaveDialog';
|
||||
import { CancelDialog } from '~/components/dialogs/CancelDialog';
|
||||
import { GpxDialog } from '~/components/dialogs/GpxDialog';
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
@ -31,6 +32,7 @@ const DIALOG_CONTENTS: { [x: string]: any } = {
|
|||
[MODES.PROVIDER]: ProviderDialog,
|
||||
[MODES.SHOT_PREFETCH]: ShotPrefetchDialog,
|
||||
[MODES.POLY]: PolylineDialog,
|
||||
[MODES.GPX]: GpxDialog,
|
||||
};
|
||||
|
||||
const EditorDialogUnconnected = (props: Props) =>
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
editorSetDialogActive,
|
||||
editorGetGPXTrack,
|
||||
editorSearchNominatim,
|
||||
editorChangeMode,
|
||||
} from '~/redux/editor/actions';
|
||||
import { connect } from 'react-redux';
|
||||
import { Icon } from '~/components/panels/Icon';
|
||||
|
@ -22,6 +23,7 @@ import { Tooltip } from '~/components/panels/Tooltip';
|
|||
import { TitleDialog } from '~/components/dialogs/TitleDialog';
|
||||
import { NominatimSearchPanel } from '~/components/dialogs/NominatimSearchPanel';
|
||||
import { IState } from '~/redux/store';
|
||||
import { MODES } from '~/constants/modes';
|
||||
|
||||
const mapStateToProps = ({
|
||||
user: { user },
|
||||
|
@ -46,6 +48,7 @@ const mapDispatchToProps = {
|
|||
openMapDialog,
|
||||
editorGetGPXTrack,
|
||||
editorSearchNominatim,
|
||||
editorChangeMode,
|
||||
};
|
||||
|
||||
type Props = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
|
||||
|
@ -118,13 +121,17 @@ export class UserPanelUnconnected extends PureComponent<Props, State> {
|
|||
);
|
||||
};
|
||||
|
||||
openGpxDialog = () => {
|
||||
this.props.editorChangeMode(MODES.GPX);
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
props: { user, dialog, dialog_active, route, stickers, features },
|
||||
state: { menuOpened },
|
||||
} = this;
|
||||
|
||||
const is_empty = !route.length && !stickers.length;
|
||||
// const is_empty = !route.length && !stickers.length;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
@ -171,8 +178,9 @@ export class UserPanelUnconnected extends PureComponent<Props, State> {
|
|||
|
||||
<div className="control-bar">
|
||||
<button
|
||||
className={classnames({ inactive: is_empty })}
|
||||
onClick={this.props.editorGetGPXTrack}
|
||||
// className={classnames({ inactive: is_empty })}
|
||||
onClick={this.openGpxDialog}
|
||||
// onClick={this.props.editorGetGPXTrack}
|
||||
>
|
||||
<Tooltip>Экспорт GPX</Tooltip>
|
||||
<Icon icon="icon-gpx-1" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue