mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
redux: editor-panel: login-logout
This commit is contained in:
parent
e56e49acf4
commit
185fe80fc5
15 changed files with 314 additions and 260 deletions
|
@ -7,10 +7,23 @@ import { TrashDialog } from '$components/trash/TrashDialog';
|
|||
import { LogoDialog } from '$components/logo/LogoDialog';
|
||||
import { SaveDialog } from '$components/save/SaveDialog';
|
||||
import { CancelDialog } from '$components/save/CancelDialog';
|
||||
import type { UserType } from '$constants/types';
|
||||
|
||||
type Props = {
|
||||
mode: String,
|
||||
routerPoints: Number,
|
||||
editor: Object,
|
||||
activeSticker: String,
|
||||
logo: String,
|
||||
user: UserType,
|
||||
title: String,
|
||||
address: String,
|
||||
|
||||
setLogo: Function,
|
||||
}
|
||||
export const EditorDialog = ({
|
||||
mode, routerPoints, editor, activeSticker, logo, user, title, address,
|
||||
}) => {
|
||||
mode, routerPoints, editor, activeSticker, logo, user, title, address, setLogo
|
||||
}: Props) => {
|
||||
const showDialog = (
|
||||
mode === MODES.ROUTER
|
||||
|| (mode === MODES.STICKERS && !activeSticker)
|
||||
|
@ -26,7 +39,7 @@ export const EditorDialog = ({
|
|||
{ mode === MODES.ROUTER && <RouterDialog routerPoints={routerPoints} editor={editor} /> }
|
||||
{ mode === MODES.STICKERS && <StickersDialog editor={editor} /> }
|
||||
{ mode === MODES.TRASH && <TrashDialog editor={editor} /> }
|
||||
{ mode === MODES.LOGO && <LogoDialog editor={editor} logo={logo} /> }
|
||||
{ mode === MODES.LOGO && <LogoDialog editor={editor} logo={logo} setLogo={setLogo} /> }
|
||||
{ mode === MODES.SAVE && <SaveDialog editor={editor} user={user} title={title} address={address} /> }
|
||||
{ mode === MODES.CONFIRM_CANCEL && <CancelDialog editor={editor} /> }
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue