diff --git a/src/actions/index.js b/src/actions/index.js
index fff3bd8..0a1172d 100644
--- a/src/actions/index.js
+++ b/src/actions/index.js
@@ -623,8 +623,8 @@ export function showCanvasSelectionModal(): Action {
return showModal('CANVAS_SELECTION');
}
-export function showChatModal(): Action {
- if (window.innerWidth > 604) { return toggleChatBox(); }
+export function showChatModal(forceModal: boolean = false): Action {
+ if (window.innerWidth > 604 && !forceModal) { return toggleChatBox(); }
return showModal('CHAT');
}
diff --git a/src/components/CanvasSelectModal.jsx b/src/components/CanvasSelectModal.jsx
index 3578f76..0404787 100644
--- a/src/components/CanvasSelectModal.jsx
+++ b/src/components/CanvasSelectModal.jsx
@@ -5,37 +5,31 @@
import React from 'react';
import { connect } from 'react-redux';
-// import FaFacebook from 'react-icons/lib/fa/facebook';
-// import FaTwitter from 'react-icons/lib/fa/twitter';
-// import FaRedditAlien from 'react-icons/lib/fa/reddit-alien';
-import Modal from './Modal';
import CanvasItem from './CanvasItem';
import type { State } from '../reducers';
const CanvasSelectModal = ({ canvases }) => (
-
-
- Select the canvas you want to use.
- Every canvas is unique and has different palettes,
- cooldown and requirements.
-
+
+ Select the canvas you want to use.
+ Every canvas is unique and has different palettes,
+ cooldown and requirements.
diff --git a/src/components/ChatBox.jsx b/src/components/ChatBox.jsx index b0c9f5e..2c9df81 100644 --- a/src/components/ChatBox.jsx +++ b/src/components/ChatBox.jsx @@ -3,24 +3,66 @@ * @flow */ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import type { State } from '../reducers'; +import useWindowSize from '../utils/reactHookResize'; +import { showChatModal } from '../actions'; import Chat from './Chat'; -const ChatBox = ({ chatOpen }) => ( -
Chat with other people here
--
- Enter your mail adress and we will send you a new password: -
-
Also join our Discord: - pixelplanet.fun/discord
- ++
+ Enter your mail adress and we will send you a new password: +
+
Also join our Discord: + pixelplanet.fun/discord
--
Place color pixels on a large canvas with other players online! - Our main canvas is a huge worldmap, you can place wherever you like, but you will have to wait a specific - Cooldown between pixels. You can check out the cooldown and requiremnts on the Canvas Selection menu (globe button on top). - Some canvases have a different cooldown for replacing a user-set pixels than placing on a unset pixel. i.e. 4s/7s means 4s on fresh - pixels and 7s on already set pixels. - Higher zoomlevels take some time to update, the 3D globe gets updated at least once per day. - Have fun!
-Discord: pixelplanet.fun/discord
-Source on github
-Reddit: r/PixelPlanetFun
-Map Data
-The bare map data that we use, together with converted OpenStreetMap tiles for orientation, - can be downloaded from mega.nz here: pixelplanetmap.zip (422MB)
-Detected as Proxy?
-If you got detected as proxy, but you are none, please send us an e-mail with your IP to pixelplanetdev@gmail.com. Do not post your IP anywhere else. We are sorry for the inconvenience.
-Click a color in palette to select
-Press G to toggle grid
-Press X to toggle showing of pixel activity
-Press R to copy coordinates
-Press Q or E to zoom
-Press W,A,S, D to move
-Press ↑,←,↓, → to move
-Drag mouse to move
-Scroll mouse wheel to zoom
-Click middle mouse button to current hovering color
-Pinch to zoom (on touch devices)
-Pan to move (on touch devices)
-Click or tap to place a pixel
-Press W,A,S, D to move
-Press ↑,←,↓, → to move
-Scroll mouse wheel to zoom
-Left click and drag mouse to rotate
-Middle click and drag mouse to zoom
-Right click and drag mouse to pan
-Left Click or tap to place a pixel
-Right Click of double tap to remove a pixel
-Partners: crazygames.com
-- This site is protected by reCAPTCHA and the Google - Privacy Policy and - Terms of Service apply. - -
++
Place color pixels on a large canvas with other players online! + Our main canvas is a huge worldmap, you can place wherever you like, but you will have to wait a specific + Cooldown between pixels. You can check out the cooldown and requiremnts on the Canvas Selection menu (globe button on top). + Some canvases have a different cooldown for replacing a user-set pixels than placing on a unset pixel. i.e. 4s/7s means 4s on fresh + pixels and 7s on already set pixels. + Higher zoomlevels take some time to update, the 3D globe gets updated at least once per day. + Have fun!
+Discord: pixelplanet.fun/discord
+Source on github
+Reddit: r/PixelPlanetFun
+Map Data
+The bare map data that we use, together with converted OpenStreetMap tiles for orientation, + can be downloaded from mega.nz here: pixelplanetmap.zip (422MB)
+Detected as Proxy?
+If you got detected as proxy, but you are none, please send us an e-mail with your IP to pixelplanetdev@gmail.com. Do not post your IP anywhere else. We are sorry for the inconvenience.
+Click a color in palette to select
+Press G to toggle grid
+Press X to toggle showing of pixel activity
+Press R to copy coordinates
+Press Q or E to zoom
+Press W,A,S, D to move
+Press ↑,←,↓, → to move
+Drag mouse to move
+Scroll mouse wheel to zoom
+Click middle mouse button to current hovering color
+Pinch to zoom (on touch devices)
+Pan to move (on touch devices)
+Click or tap to place a pixel
+Press W,A,S, D to move
+Press ↑,←,↓, → to move
+Scroll mouse wheel to zoom
+Left click and drag mouse to rotate
+Middle click and drag mouse to zoom
+Right click and drag mouse to pan
+Left Click or tap to place a pixel
+Right Click of double tap to remove a pixel
+Partners: crazygames.com
++ This site is protected by reCAPTCHA and the Google + Privacy Policy and + Terms of Service apply. +
--
You can also place pixels from our Minecraft Server at
- -Please Note that the Minecraft Server is down from time to time
- -+
You can also place pixels from our Minecraft Server at
+ +Please Note that the Minecraft Server is down from time to time
+ ); function mapStateToProps(state: State) { @@ -24,4 +20,9 @@ function mapStateToProps(state: State) { return { center }; } -export default connect(mapStateToProps)(MinecraftModal); +const data = { + content: connect(mapStateToProps)(MinecraftModal), + title: 'PixelPlanet Minecraft Server', +}; + +export default data; diff --git a/src/components/Modal.jsx b/src/components/Modal.jsx deleted file mode 100644 index 642cf37..0000000 --- a/src/components/Modal.jsx +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * @flow - */ - -import React from 'react'; -import Modal from 'react-modal'; -import { connect } from 'react-redux'; -import { MdClose } from 'react-icons/md'; - -import { - hideModal, -} from '../actions'; - - -function MyModal({ close, title, children }) { - return ( --
Register new account here
-
Also join our Discord: - pixelplanet.fun/discord -
++
Register new account here
+
Also join our Discord: + pixelplanet.fun/discord
-
-
- {(name === null)
- ? (
-
Also join our Discord: - pixelplanet.fun/discord -
+
+ {(name === null)
+ ? (
+
Also join our Discord: + pixelplanet.fun/discord
-