mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
fixed logo & provider dialogs
This commit is contained in:
parent
46a9f9daba
commit
71b6fe3a59
2 changed files with 26 additions and 36 deletions
|
@ -18,7 +18,7 @@ export const LogoDialog = ({ logo, setLogo }: Props) => (
|
|||
Object.keys(LOGOS).map(item => (
|
||||
<div
|
||||
className={classnames('helper-menu-item', { active: (item === logo) })}
|
||||
onClick={() => setLogo(item)}
|
||||
onMouseDown={() => setLogo(item)}
|
||||
key={item}
|
||||
>
|
||||
{LOGOS[item][0]}
|
||||
|
|
|
@ -2,21 +2,13 @@ import React from 'react';
|
|||
import { PROVIDERS, replaceProviderUrl } from '$constants/providers';
|
||||
import { Icon } from '$components/panels/Icon';
|
||||
import classnames from 'classnames';
|
||||
import { MODES } from '$constants/modes';
|
||||
|
||||
type Props = {
|
||||
changeProvider: Function,
|
||||
setMode: Function,
|
||||
provider: String,
|
||||
};
|
||||
|
||||
export class ProviderDialog extends React.Component<Props, void> {
|
||||
closeDialog = () => this.props.setMode(MODES.NONE);
|
||||
|
||||
render() {
|
||||
const { provider, changeProvider } = this.props;
|
||||
|
||||
return (
|
||||
export const ProviderDialog = ({ provider, changeProvider }: Props) => (
|
||||
<div className="control-dialog top right control-dialog-provider">
|
||||
<div className="helper provider-helper">
|
||||
{
|
||||
|
@ -26,7 +18,7 @@ export class ProviderDialog extends React.Component<Props, void> {
|
|||
style={{
|
||||
backgroundImage: `url(${replaceProviderUrl(item, { x: 5980, y: 2589, zoom: 13 })})`,
|
||||
}}
|
||||
onClick={() => changeProvider(item)}
|
||||
onMouseDown={() => changeProvider(item)}
|
||||
key={PROVIDERS[item].name}
|
||||
>
|
||||
{
|
||||
|
@ -41,5 +33,3 @@ export class ProviderDialog extends React.Component<Props, void> {
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue