diff --git a/API.md b/API.md index 90e37ab..5af7d1d 100644 --- a/API.md +++ b/API.md @@ -1,9 +1,9 @@ # API Websocket -This websocket provides unlimited access to many functions of the site, it is used for Discord Chat Bridge and Minecraft Bridge. +This websocket provides unlimited access to many functions of the site, it is used for Discord Chat Bridge and similar stuff. Websocket url: -`https://[old.]pixelplanet.fun/mcws` +`https://[dev.]pixelplanet.fun/mcws` Connection just possible with header: diff --git a/i18n/ssr-de.po b/i18n/ssr-de.po index 4c2a329..0aeb55c 100644 --- a/i18n/ssr-de.po +++ b/i18n/ssr-de.po @@ -64,30 +64,6 @@ msgstr "Dein Land ist temporär stummgeschaltet" msgid "Stop flooding." msgstr "Stoppe zu spamen." -#: src/ssr-components/Globe.jsx:44 -msgid "Double click on globe to go back." -msgstr "Doppelklick um zurück zu gehen." - -#: src/ssr-components/Globe.jsx:45 -msgid "Loading..." -msgstr "Lade..." - -#: src/ssr-components/Globe.jsx:51 -msgid "PixelPlanet.Fun 3DGlobe" -msgstr "PixelPlanet.Fun 3D Globus" - -#: src/ssr-components/Globe.jsx:52 -msgid "A 3D globe of our whole map" -msgstr "Ein interaktvier 3D Globus unserer gesamten Karte" - -#: src/ssr-components/Main.jsx:70 -msgid "PixelPlanet.fun" -msgstr "PixelPlanet.Fun" - -#: src/ssr-components/Main.jsx:72 -msgid "Place color pixels on an map styled canvas with other players online" -msgstr "Zeichne mit farbigen Pixel auf einer Weltkarte mit anderen Spielern" - #: src/routes/reset_password.js:41 msgid "You sent an empty password or invalid data :(" msgstr "Du hast ein ungültiges Passwort oder Daten gesendet :(" @@ -120,6 +96,30 @@ msgstr "" "Dieser Passwort Wiederherstellungslink ist falsch oder abgelaufen, bitte " "beantrage einen neuen (Hinweis: Du kannst diese Links nur einmal verwenden)" +#: src/ssr-components/Globe.jsx:44 +msgid "Double click on globe to go back." +msgstr "Doppelklick um zurück zu gehen." + +#: src/ssr-components/Globe.jsx:45 +msgid "Loading..." +msgstr "Lade..." + +#: src/ssr-components/Globe.jsx:51 +msgid "PixelPlanet.Fun 3DGlobe" +msgstr "PixelPlanet.Fun 3D Globus" + +#: src/ssr-components/Globe.jsx:52 +msgid "A 3D globe of our whole map" +msgstr "Ein interaktvier 3D Globus unserer gesamten Karte" + +#: src/ssr-components/Main.jsx:70 +msgid "PixelPlanet.fun" +msgstr "PixelPlanet.Fun" + +#: src/ssr-components/Main.jsx:72 +msgid "Place color pixels on an map styled canvas with other players online" +msgstr "Zeichne mit farbigen Pixel auf einer Weltkarte mit anderen Spielern" + #: src/core/mail.js:65 #, javascript-format msgid "" @@ -243,6 +243,38 @@ msgstr "PixelPlanet.Fun Passwort Wiederherstellung" msgid "Reset your password here" msgstr "Setze hier dein Passwort zurück" +#: src/routes/api/captcha.js:22 +msgid "No captcha text given" +msgstr "Keinen Captcha Text eingegeben" + +#: src/routes/api/captcha.js:36 +msgid "You took too long, try again." +msgstr "Do hast zu lange benötigt." + +#: src/routes/api/captcha.js:42 +msgid "You failed your captcha" +msgstr "Captcha Text ist falsch" + +#: src/routes/api/captcha.js:48 +msgid "Unknown Captcha Error" +msgstr "Unbekannter Captcha Fehler" + +#: src/routes/api/captcha.js:55 +msgid "Server error occured" +msgstr "Server Fehler" + +#: src/routes/api/modtools.js:51 +msgid "You are not logged in" +msgstr "Du bist nicht angemeldet." + +#: src/routes/api/modtools.js:63 +msgid "You are not allowed to access this page" +msgstr "Du hast keinen Zugriff zu diese Seite" + +#: src/routes/api/modtools.js:129 +msgid "Just admins can do that" +msgstr "Nur Administratoren können dies tun" + #: src/utils/validation.js:18 msgid "Email can't be empty." msgstr "E-Mail Feld kann nicht leer sein." @@ -291,26 +323,6 @@ msgstr "Passwort muss mindestens 6 Zeichen lang sein." msgid "Password must be shorter than 60 characters." msgstr "Passwort muss kürzer als 60 Zeichen sein." -#: src/routes/api/captcha.js:22 -msgid "No captcha text given" -msgstr "Keinen Captcha Text eingegeben" - -#: src/routes/api/captcha.js:36 -msgid "You took too long, try again." -msgstr "Do hast zu lange benötigt." - -#: src/routes/api/captcha.js:42 -msgid "You failed your captcha" -msgstr "Captcha Text ist falsch" - -#: src/routes/api/captcha.js:48 -msgid "Unknown Captcha Error" -msgstr "Unbekannter Captcha Fehler" - -#: src/routes/api/captcha.js:55 -msgid "Server error occured" -msgstr "Server Fehler" - #: src/routes/api/auth/register.js:31 msgid "E-Mail already in use." msgstr "E-Mail wird bereits verwendet." diff --git a/i18n/template-ssr.pot b/i18n/template-ssr.pot index 8dd4829..0536e5f 100644 --- a/i18n/template-ssr.pot +++ b/i18n/template-ssr.pot @@ -53,6 +53,44 @@ msgstr "" msgid "Stop flooding." msgstr "" +#: src/routes/reset_password.js:40 +msgid "You sent an empty password or invalid data :(" +msgstr "" + +#: src/routes/reset_password.js:52 +msgid "This password-reset link isn't valid anymore :(" +msgstr "" + +#: src/routes/reset_password.js:63 +msgid "Your passwords do not match :(" +msgstr "" + +#: src/routes/reset_password.js:78 +msgid "User doesn't exist in our database :(" +msgstr "" + +#: src/routes/reset_password.js:90 +msgid "Passowrd successfully changed." +msgstr "" + +#: src/routes/reset_password.js:109 +msgid "Invalid url :( Please check your mail again." +msgstr "" + +#: src/routes/reset_password.js:122 +msgid "" +"This passwort reset link is wrong or already expired, please request a new " +"one (Note: you can use those links just once)" +msgstr "" + +#: src/ssr-components/Main.jsx:70 +msgid "PixelPlanet.fun" +msgstr "" + +#: src/ssr-components/Main.jsx:72 +msgid "Place color pixels on an map styled canvas with other players online" +msgstr "" + #: src/ssr-components/Globe.jsx:44 msgid "Double click on globe to go back." msgstr "" @@ -69,44 +107,6 @@ msgstr "" msgid "A 3D globe of our whole map" msgstr "" -#: src/ssr-components/Main.jsx:70 -msgid "PixelPlanet.fun" -msgstr "" - -#: src/ssr-components/Main.jsx:72 -msgid "Place color pixels on an map styled canvas with other players online" -msgstr "" - -#: src/routes/reset_password.js:41 -msgid "You sent an empty password or invalid data :(" -msgstr "" - -#: src/routes/reset_password.js:53 -msgid "This password-reset link isn't valid anymore :(" -msgstr "" - -#: src/routes/reset_password.js:64 -msgid "Your passwords do not match :(" -msgstr "" - -#: src/routes/reset_password.js:79 -msgid "User doesn't exist in our database :(" -msgstr "" - -#: src/routes/reset_password.js:91 -msgid "Passowrd successfully changed." -msgstr "" - -#: src/routes/reset_password.js:110 -msgid "Invalid url :( Please check your mail again." -msgstr "" - -#: src/routes/reset_password.js:123 -msgid "" -"This passwort reset link is wrong or already expired, please request a new " -"one (Note: you can use those links just once)" -msgstr "" - #: src/core/mail.js:65 #, javascript-format msgid "" @@ -218,26 +218,6 @@ msgstr "" msgid "Reset your password here" msgstr "" -#: src/routes/api/captcha.js:22 -msgid "No captcha text given" -msgstr "" - -#: src/routes/api/captcha.js:36 -msgid "You took too long, try again." -msgstr "" - -#: src/routes/api/captcha.js:42 -msgid "You failed your captcha" -msgstr "" - -#: src/routes/api/captcha.js:48 -msgid "Unknown Captcha Error" -msgstr "" - -#: src/routes/api/captcha.js:55 -msgid "Server error occured" -msgstr "" - #: src/utils/validation.js:18 msgid "Email can't be empty." msgstr "" @@ -286,6 +266,38 @@ msgstr "" msgid "Password must be shorter than 60 characters." msgstr "" +#: src/routes/api/captcha.js:22 +msgid "No captcha text given" +msgstr "" + +#: src/routes/api/captcha.js:36 +msgid "You took too long, try again." +msgstr "" + +#: src/routes/api/captcha.js:42 +msgid "You failed your captcha" +msgstr "" + +#: src/routes/api/captcha.js:48 +msgid "Unknown Captcha Error" +msgstr "" + +#: src/routes/api/captcha.js:55 +msgid "Server error occured" +msgstr "" + +#: src/routes/api/modtools.js:50 +msgid "You are not logged in" +msgstr "" + +#: src/routes/api/modtools.js:62 +msgid "You are not allowed to access this page" +msgstr "" + +#: src/routes/api/modtools.js:128 +msgid "Just admins can do that" +msgstr "" + #: src/routes/api/auth/register.js:31 msgid "E-Mail already in use." msgstr "" @@ -302,6 +314,10 @@ msgstr "" msgid "Failed to establish session after register :(" msgstr "" +#: src/routes/api/auth/logout.js:13 +msgid "You are not even logged in." +msgstr "" + #: src/routes/api/auth/change_mail.js:41 #: src/routes/api/auth/change_passwd.js:37 #: src/routes/api/auth/delete_account.js:38 @@ -314,23 +330,6 @@ msgstr "" msgid "Incorrect password!" msgstr "" -#: src/ssr-components/RedirectionPage.jsx:20 -msgid "You will be automatically redirected after 15s" -msgstr "" - -#: src/ssr-components/RedirectionPage.jsx:21 -#, javascript-format -msgid "Or ${ clickHere } to go back to pixelplanet" -msgstr "" - -#: src/ssr-components/RedirectionPage.jsx:25 -msgid "PixelPlanet.fun Accounts" -msgstr "" - -#: src/routes/api/auth/logout.js:13 -msgid "You are not even logged in." -msgstr "" - #: src/routes/api/auth/verify.js:25 #: src/routes/api/auth/verify.js:32 msgid "Mail verification" @@ -346,6 +345,19 @@ msgid "" "request a new one." msgstr "" +#: src/ssr-components/RedirectionPage.jsx:20 +msgid "You will be automatically redirected after 15s" +msgstr "" + +#: src/ssr-components/RedirectionPage.jsx:21 +#, javascript-format +msgid "Or ${ clickHere } to go back to pixelplanet" +msgstr "" + +#: src/ssr-components/RedirectionPage.jsx:25 +msgid "PixelPlanet.fun Accounts" +msgstr "" + #: src/canvasesDesc.js:18 msgid "Earth" msgstr "" diff --git a/i18n/template.pot b/i18n/template.pot index 6a62348..09f0ca2 100644 --- a/i18n/template.pot +++ b/i18n/template.pot @@ -45,22 +45,6 @@ msgstr "" msgid "Hide Hidden Canvases" msgstr "" -#: src/actions/index.js:632 -msgid "Register New Account" -msgstr "" - -#: src/actions/index.js:639 -msgid "Restore my Password" -msgstr "" - -#: src/actions/index.js:646 -msgid "Welcome to PixelPlanet.fun" -msgstr "" - -#: src/actions/index.js:652 -msgid "Look at past Canvases" -msgstr "" - #: src/ui/placePixel.js:53 msgid "Error :(" msgstr "" @@ -170,6 +154,22 @@ msgstr "" msgid "Can't render 3D canvas, do you have WebGL2 disabled?" msgstr "" +#: src/actions/index.js:628 +msgid "Register New Account" +msgstr "" + +#: src/actions/index.js:635 +msgid "Restore my Password" +msgstr "" + +#: src/actions/index.js:642 +msgid "Welcome to PixelPlanet.fun" +msgstr "" + +#: src/actions/index.js:648 +msgid "Look at past Canvases" +msgstr "" + #: src/components/Converter.jsx:559 #: src/components/CoordinatesBox.jsx:32 msgid "Copy to Clipboard" @@ -187,8 +187,8 @@ msgstr "" msgid "Pixels placed" msgstr "" -#: src/components/Admintools.jsx:224 #: src/components/ModalRoot.jsx:69 +#: src/components/Modtools.jsx:224 #: src/components/Window.jsx:138 #: src/components/contextmenus/ChannelContextMenu.jsx:67 msgid "Close" @@ -198,27 +198,6 @@ msgstr "" msgid "Restore" msgstr "" -#: src/components/buttons/CanvasSwitchButton.jsx:22 -#: src/components/windows/index.js:22 -msgid "Canvas Selection" -msgstr "" - -#: src/components/buttons/ChatButton.jsx:92 -msgid "Close Chat" -msgstr "" - -#: src/components/buttons/ChatButton.jsx:92 -msgid "Open Chat" -msgstr "" - -#: src/components/buttons/ExpandMenuButton.jsx:23 -msgid "Close Menu" -msgstr "" - -#: src/components/buttons/ExpandMenuButton.jsx:23 -msgid "Open Menu" -msgstr "" - #: src/actions/fetch.js:39 msgid "You made too many requests" msgstr "" @@ -248,6 +227,27 @@ msgstr "" msgid "Server answered with gibberish :(" msgstr "" +#: src/components/buttons/CanvasSwitchButton.jsx:22 +#: src/components/windows/index.js:22 +msgid "Canvas Selection" +msgstr "" + +#: src/components/buttons/ChatButton.jsx:92 +msgid "Close Chat" +msgstr "" + +#: src/components/buttons/ChatButton.jsx:92 +msgid "Open Chat" +msgstr "" + +#: src/components/buttons/ExpandMenuButton.jsx:23 +msgid "Close Menu" +msgstr "" + +#: src/components/buttons/ExpandMenuButton.jsx:23 +msgid "Open Menu" +msgstr "" + #: src/components/HistorySelect.jsx:144 msgid "Loading" msgstr "" @@ -256,6 +256,25 @@ msgstr "" msgid "Select Date above" msgstr "" +#: src/components/buttons/HelpButton.jsx:23 +#: src/components/windows/index.js:16 +msgid "Help" +msgstr "" + +#: src/components/buttons/SettingsButton.jsx:23 +#: src/components/windows/index.js:17 +msgid "Settings" +msgstr "" + +#: src/components/buttons/LogInButton.jsx:23 +#: src/components/windows/index.js:18 +msgid "User Area" +msgstr "" + +#: src/components/buttons/DownloadButton.jsx:37 +msgid "Make Screenshot" +msgstr "" + #: src/components/Window.jsx:117 msgid "Clone" msgstr "" @@ -272,29 +291,6 @@ msgstr "" msgid "Resize" msgstr "" -#: src/components/buttons/HelpButton.jsx:23 -#: src/components/windows/index.js:16 -msgid "Help" -msgstr "" - -#: src/components/buttons/LogInButton.jsx:23 -#: src/components/windows/index.js:18 -msgid "User Area" -msgstr "" - -#: src/components/buttons/SettingsButton.jsx:23 -#: src/components/windows/index.js:17 -msgid "Settings" -msgstr "" - -#: src/components/buttons/GlobeButton.jsx:35 -msgid "Globe View" -msgstr "" - -#: src/components/buttons/DownloadButton.jsx:37 -msgid "Make Screenshot" -msgstr "" - #: src/components/buttons/PalselButton.jsx:31 msgid "Close Palette" msgstr "" @@ -303,6 +299,10 @@ msgstr "" msgid "Open Palette" msgstr "" +#: src/components/buttons/GlobeButton.jsx:35 +msgid "Globe View" +msgstr "" + #: src/components/contextmenus/ChannelContextMenu.jsx:55 msgid "Mute" msgstr "" @@ -384,6 +384,225 @@ msgstr "" msgid "Send" msgstr "" +#: src/components/windows/Register.jsx:81 +msgid "Register new account here" +msgstr "" + +#: src/components/windows/Register.jsx:92 +msgid "Name" +msgstr "" + +#: src/components/windows/ForgotPassword.jsx:82 +#: src/components/windows/Register.jsx:100 +msgid "Email" +msgstr "" + +#: src/components/ChangeMail.jsx:80 +#: src/components/DeleteAccount.jsx:62 +#: src/components/LogInForm.jsx:83 +#: src/components/windows/Register.jsx:108 +msgid "Password" +msgstr "" + +#: src/components/windows/Register.jsx:116 +msgid "Confirm Password" +msgstr "" + +#: src/components/Modtools.jsx:311 +#: src/components/Modtools.jsx:392 +#: src/components/Modtools.jsx:467 +#: src/components/Modtools.jsx:512 +#: src/components/Modtools.jsx:595 +#: src/components/windows/ForgotPassword.jsx:86 +#: src/components/windows/Register.jsx:119 +msgid "Submit" +msgstr "" + +#: src/components/windows/Settings.jsx:133 +msgid "Show Grid" +msgstr "" + +#: src/components/windows/Settings.jsx:138 +msgid "Turn on grid to highlight pixel borders." +msgstr "" + +#: src/components/windows/Settings.jsx:141 +msgid "Show Pixel Activity" +msgstr "" + +#: src/components/windows/Settings.jsx:146 +msgid "Show circles where pixels are placed." +msgstr "" + +#: src/components/windows/Settings.jsx:149 +msgid "Disable Game Sounds" +msgstr "" + +#: src/components/windows/Settings.jsx:155 +msgid "All sound effects will be disabled." +msgstr "" + +#: src/components/windows/Settings.jsx:159 +msgid "" +"Your Browser doesn't allow us to use AudioContext to play sounds. Do you " +"have some privacy feature blocking us?" +msgstr "" + +#: src/components/windows/Settings.jsx:165 +msgid "Enable chat notifications" +msgstr "" + +#: src/components/windows/Settings.jsx:169 +msgid "Play a sound when new chat messages arrive" +msgstr "" + +#: src/components/windows/Settings.jsx:172 +msgid "Auto Zoom In" +msgstr "" + +#: src/components/windows/Settings.jsx:177 +msgid "" +"Zoom in instead of placing a pixel when you tap the canvas and your zoom is " +"small." +msgstr "" + +#: src/components/windows/Settings.jsx:180 +msgid "Compact Palette" +msgstr "" + +#: src/components/windows/Settings.jsx:185 +msgid "Display Palette in a compact form that takes less screen space." +msgstr "" + +#: src/components/windows/Settings.jsx:188 +msgid "Potato Mode" +msgstr "" + +#: src/components/windows/Settings.jsx:192 +msgid "For when you are playing on a potato." +msgstr "" + +#: src/components/Converter.jsx:374 +#: src/components/windows/Settings.jsx:195 +msgid "Light Grid" +msgstr "" + +#: src/components/windows/Settings.jsx:199 +msgid "Show Grid in white instead of black." +msgstr "" + +#: src/components/windows/Settings.jsx:203 +msgid "Historical View" +msgstr "" + +#: src/components/windows/Settings.jsx:208 +msgid "Check out past versions of the canvas." +msgstr "" + +#: src/components/windows/Settings.jsx:213 +msgid "Themes" +msgstr "" + +#: src/components/windows/Settings.jsx:218 +msgid "How pixelplanet should look like." +msgstr "" + +#: src/components/windows/Settings.jsx:225 +msgid "Select Language" +msgstr "" + +#: src/components/windows/CanvasSelect.jsx:33 +msgid "" +"Select the canvas you want to use. Every canvas is unique and has " +"different palettes, cooldown and requirements. Archive of closed canvases " +"can be accessed here:" +msgstr "" + +#: src/components/windows/CanvasSelect.jsx:41 +msgid "Archive" +msgstr "" + +#: src/components/windows/Chat.jsx:146 +msgid "Channel settings" +msgstr "" + +#: src/components/windows/Chat.jsx:161 +msgid "Start chatting here" +msgstr "" + +#: src/components/windows/Chat.jsx:198 +msgid "Chat here" +msgstr "" + +#: src/components/windows/Chat.jsx:221 +msgid "You must be logged in to chat" +msgstr "" + +#: src/components/windows/Archive.jsx:20 +msgid "" +"While we tend to not delete canvases, some canvases are started for fun or " +"as a request by users who currently like a meme. Those canvases can get " +"boring after a while and after weeks of no major change and if they really " +"aren't worth being kept active, we decide to remove them." +msgstr "" + +#: src/components/windows/Archive.jsx:22 +msgid "" +"Here we collect those canvases to archive them in a proper way (which is " +"currently just one)." +msgstr "" + +#: src/components/windows/Archive.jsx:24 +msgid "Political Compass Canvas" +msgstr "" + +#: src/components/windows/Archive.jsx:31 +msgid "" +"This canvas got requested during a time of political conflicts on the main " +"Earth canvas. It was a 1024x1024 representation of the political compass " +"with a 5s cooldown and 60s stacking. It got launched on May 11th and " +"remained active for months till it got shut down on November 30th." +msgstr "" + +#: src/components/windows/Archive.jsx:32 +msgid "" +"We decided to archive it as a timelapse with lossless encoded webm. Taking " +"a screenshot from the timelapse results in a perfect 1:1 representation of " +"how the canvas was at that time." +msgstr "" + +#: src/components/windows/ForgotPassword.jsx:60 +msgid "Sent you a mail with instructions to reset your password." +msgstr "" + +#: src/components/windows/ForgotPassword.jsx:71 +msgid "Enter your mail address and we will send you a new password:" +msgstr "" + +#: src/components/windows/UserArea.jsx:27 +msgid "Profile" +msgstr "" + +#: src/components/windows/UserArea.jsx:30 +msgid "Ranking" +msgstr "" + +#: src/components/windows/UserArea.jsx:33 +msgid "Converter" +msgstr "" + +#: src/components/windows/UserArea.jsx:39 +msgid "Modtools" +msgstr "" + +#: src/components/windows/UserArea.jsx:40 +msgid "Loading..." +msgstr "" + +#: src/components/windows/UserArea.jsx:47 +msgid "Consider joining us on Guilded:" +msgstr "" + #: src/components/windows/Help.jsx:36 msgid "your IP" msgstr "" @@ -561,229 +780,6 @@ msgstr "" msgid "Credit for the Palette of the Top10 canvas goes to ${ vinikLink }." msgstr "" -#: src/components/windows/Register.jsx:81 -msgid "Register new account here" -msgstr "" - -#: src/components/windows/Register.jsx:92 -msgid "Name" -msgstr "" - -#: src/components/windows/ForgotPassword.jsx:82 -#: src/components/windows/Register.jsx:100 -msgid "Email" -msgstr "" - -#: src/components/ChangeMail.jsx:80 -#: src/components/DeleteAccount.jsx:62 -#: src/components/LogInForm.jsx:83 -#: src/components/windows/Register.jsx:108 -msgid "Password" -msgstr "" - -#: src/components/windows/Register.jsx:116 -msgid "Confirm Password" -msgstr "" - -#: src/components/Admintools.jsx:311 -#: src/components/Admintools.jsx:392 -#: src/components/Admintools.jsx:467 -#: src/components/Admintools.jsx:512 -#: src/components/Admintools.jsx:595 -#: src/components/windows/ForgotPassword.jsx:86 -#: src/components/windows/Register.jsx:119 -msgid "Submit" -msgstr "" - -#: src/components/windows/CanvasSelect.jsx:33 -msgid "" -"Select the canvas you want to use. Every canvas is unique and has " -"different palettes, cooldown and requirements. Archive of closed canvases " -"can be accessed here:" -msgstr "" - -#: src/components/windows/CanvasSelect.jsx:41 -msgid "Archive" -msgstr "" - -#: src/components/windows/Archive.jsx:20 -msgid "" -"While we tend to not delete canvases, some canvases are started for fun or " -"as a request by users who currently like a meme. Those canvases can get " -"boring after a while and after weeks of no major change and if they really " -"aren't worth being kept active, we decide to remove them." -msgstr "" - -#: src/components/windows/Archive.jsx:22 -msgid "" -"Here we collect those canvases to archive them in a proper way (which is " -"currently just one)." -msgstr "" - -#: src/components/windows/Archive.jsx:24 -msgid "Political Compass Canvas" -msgstr "" - -#: src/components/windows/Archive.jsx:31 -msgid "" -"This canvas got requested during a time of political conflicts on the main " -"Earth canvas. It was a 1024x1024 representation of the political compass " -"with a 5s cooldown and 60s stacking. It got launched on May 11th and " -"remained active for months till it got shut down on November 30th." -msgstr "" - -#: src/components/windows/Archive.jsx:32 -msgid "" -"We decided to archive it as a timelapse with lossless encoded webm. Taking " -"a screenshot from the timelapse results in a perfect 1:1 representation of " -"how the canvas was at that time." -msgstr "" - -#: src/components/windows/Chat.jsx:146 -msgid "Channel settings" -msgstr "" - -#: src/components/windows/Chat.jsx:161 -msgid "Start chatting here" -msgstr "" - -#: src/components/windows/Chat.jsx:198 -msgid "Chat here" -msgstr "" - -#: src/components/windows/Chat.jsx:221 -msgid "You must be logged in to chat" -msgstr "" - -#: src/components/windows/ForgotPassword.jsx:60 -msgid "Sent you a mail with instructions to reset your password." -msgstr "" - -#: src/components/windows/ForgotPassword.jsx:71 -msgid "Enter your mail address and we will send you a new password:" -msgstr "" - -#: src/components/windows/Settings.jsx:133 -msgid "Show Grid" -msgstr "" - -#: src/components/windows/Settings.jsx:138 -msgid "Turn on grid to highlight pixel borders." -msgstr "" - -#: src/components/windows/Settings.jsx:141 -msgid "Show Pixel Activity" -msgstr "" - -#: src/components/windows/Settings.jsx:146 -msgid "Show circles where pixels are placed." -msgstr "" - -#: src/components/windows/Settings.jsx:149 -msgid "Disable Game Sounds" -msgstr "" - -#: src/components/windows/Settings.jsx:155 -msgid "All sound effects will be disabled." -msgstr "" - -#: src/components/windows/Settings.jsx:159 -msgid "" -"Your Browser doesn't allow us to use AudioContext to play sounds. Do you " -"have some privacy feature blocking us?" -msgstr "" - -#: src/components/windows/Settings.jsx:165 -msgid "Enable chat notifications" -msgstr "" - -#: src/components/windows/Settings.jsx:169 -msgid "Play a sound when new chat messages arrive" -msgstr "" - -#: src/components/windows/Settings.jsx:172 -msgid "Auto Zoom In" -msgstr "" - -#: src/components/windows/Settings.jsx:177 -msgid "" -"Zoom in instead of placing a pixel when you tap the canvas and your zoom is " -"small." -msgstr "" - -#: src/components/windows/Settings.jsx:180 -msgid "Compact Palette" -msgstr "" - -#: src/components/windows/Settings.jsx:185 -msgid "Display Palette in a compact form that takes less screen space." -msgstr "" - -#: src/components/windows/Settings.jsx:188 -msgid "Potato Mode" -msgstr "" - -#: src/components/windows/Settings.jsx:192 -msgid "For when you are playing on a potato." -msgstr "" - -#: src/components/Converter.jsx:374 -#: src/components/windows/Settings.jsx:195 -msgid "Light Grid" -msgstr "" - -#: src/components/windows/Settings.jsx:199 -msgid "Show Grid in white instead of black." -msgstr "" - -#: src/components/windows/Settings.jsx:203 -msgid "Historical View" -msgstr "" - -#: src/components/windows/Settings.jsx:208 -msgid "Check out past versions of the canvas." -msgstr "" - -#: src/components/windows/Settings.jsx:213 -msgid "Themes" -msgstr "" - -#: src/components/windows/Settings.jsx:218 -msgid "How pixelplanet should look like." -msgstr "" - -#: src/components/windows/Settings.jsx:225 -msgid "Select Language" -msgstr "" - -#: src/components/windows/UserArea.jsx:27 -msgid "Profile" -msgstr "" - -#: src/components/windows/UserArea.jsx:30 -msgid "Ranking" -msgstr "" - -#: src/components/windows/UserArea.jsx:33 -msgid "Converter" -msgstr "" - -#: src/components/windows/UserArea.jsx:39 -msgid "Admintools" -msgstr "" - -#: src/components/windows/UserArea.jsx:39 -msgid "Modtools" -msgstr "" - -#: src/components/windows/UserArea.jsx:40 -msgid "Loading..." -msgstr "" - -#: src/components/windows/UserArea.jsx:47 -msgid "Consider joining us on Guilded:" -msgstr "" - #: src/utils/validation.js:18 msgid "Email can't be empty." msgstr "" @@ -832,6 +828,13 @@ msgstr "" msgid "Password must be shorter than 60 characters." msgstr "" +#: src/components/ChangeMail.jsx:91 +#: src/components/ChangeName.jsx:68 +#: src/components/ChangePassword.jsx:110 +#: src/components/LanguageSelect.jsx:73 +msgid "Save" +msgstr "" + #: src/components/CanvasItem.jsx:30 msgid "Online Users" msgstr "" @@ -877,30 +880,6 @@ msgstr "" msgid "Dimensions" msgstr "" -#: src/components/LogInArea.jsx:21 -msgid "Login to access more features and stats." -msgstr "" - -#: src/components/LogInArea.jsx:23 -msgid "Login with Name or Mail:" -msgstr "" - -#: src/components/LogInArea.jsx:30 -msgid "I forgot my Password." -msgstr "" - -#: src/components/LogInArea.jsx:31 -msgid "or login with:" -msgstr "" - -#: src/components/LogInArea.jsx:72 -msgid "or register here:" -msgstr "" - -#: src/components/LogInArea.jsx:79 -msgid "Register" -msgstr "" - #: src/components/UserAreaContent.jsx:63 msgid "Todays Placed Pixels" msgstr "" @@ -958,81 +937,81 @@ msgstr "" msgid "Ranking updates every 5 min. Daily rankings get reset at midnight UTC." msgstr "" -#: src/components/Admintools.jsx:184 +#: src/components/Modtools.jsx:184 msgid "Build image on canvas." msgstr "" -#: src/components/Admintools.jsx:187 +#: src/components/Modtools.jsx:187 msgid "Build image and set it to protected." msgstr "" -#: src/components/Admintools.jsx:190 +#: src/components/Modtools.jsx:190 msgid "Build image, but reset cooldown to unset-pixel cd." msgstr "" -#: src/components/Admintools.jsx:253 +#: src/components/Modtools.jsx:253 msgid "Image Upload" msgstr "" -#: src/components/Admintools.jsx:254 +#: src/components/Modtools.jsx:254 msgid "Upload images to canvas" msgstr "" -#: src/components/Admintools.jsx:256 +#: src/components/Modtools.jsx:256 msgid "File" msgstr "" -#: src/components/Admintools.jsx:276 +#: src/components/Modtools.jsx:276 msgid "Coordinates in X_Y format:" msgstr "" -#: src/components/Admintools.jsx:316 +#: src/components/Modtools.jsx:316 msgid "Pixel Protection" msgstr "" -#: src/components/Admintools.jsx:318 +#: src/components/Modtools.jsx:318 msgid "" "Set protection of areas (if you need finer grained control, " "use protect with image upload and alpha layers)" msgstr "" -#: src/components/Admintools.jsx:398 +#: src/components/Modtools.jsx:398 msgid "Rollback to Date" msgstr "" -#: src/components/Admintools.jsx:400 +#: src/components/Modtools.jsx:400 msgid "Rollback an area of the canvas to a set date (00:00 UTC)" msgstr "" -#: src/components/Admintools.jsx:475 +#: src/components/Modtools.jsx:475 msgid "IP Actions" msgstr "" -#: src/components/Admintools.jsx:477 +#: src/components/Modtools.jsx:477 msgid "Do stuff with IPs (one IP per line)" msgstr "" -#: src/components/Admintools.jsx:516 +#: src/components/Modtools.jsx:516 msgid "Manage Moderators" msgstr "" -#: src/components/Admintools.jsx:518 +#: src/components/Modtools.jsx:518 msgid "Remove Moderator" msgstr "" -#: src/components/Admintools.jsx:550 +#: src/components/Modtools.jsx:550 msgid "There are no mods" msgstr "" -#: src/components/Admintools.jsx:555 +#: src/components/Modtools.jsx:555 msgid "Assign new Mod" msgstr "" -#: src/components/Admintools.jsx:558 +#: src/components/Modtools.jsx:558 msgid "Enter UserName of new Mod" msgstr "" -#: src/components/Admintools.jsx:567 +#: src/components/Modtools.jsx:567 msgid "User Name" msgstr "" @@ -1114,33 +1093,28 @@ msgstr "" msgid "Download Template" msgstr "" -#: src/components/ChangeMail.jsx:91 -#: src/components/ChangeName.jsx:68 -#: src/components/ChangePassword.jsx:110 -#: src/components/LanguageSelect.jsx:73 -msgid "Save" +#: src/components/LogInArea.jsx:21 +msgid "Login to access more features and stats." msgstr "" -#: src/components/LogInForm.jsx:76 -msgid "Name or Email" +#: src/components/LogInArea.jsx:23 +msgid "Login with Name or Mail:" msgstr "" -#: src/components/LogInForm.jsx:87 -msgid "LogIn" +#: src/components/LogInArea.jsx:30 +msgid "I forgot my Password." msgstr "" -#: src/components/UserMessages.jsx:28 -msgid "" -"Please verify your mail address \n" -"or your account could get deleted after a few days." +#: src/components/LogInArea.jsx:31 +msgid "or login with:" msgstr "" -#: src/components/UserMessages.jsx:49 -msgid "A new verification mail is getting sent to you." +#: src/components/LogInArea.jsx:72 +msgid "or register here:" msgstr "" -#: src/components/UserMessages.jsx:53 -msgid "Click here to request a new verification mail." +#: src/components/LogInArea.jsx:79 +msgid "Register" msgstr "" #: src/components/ChangePassword.jsx:22 @@ -1163,10 +1137,6 @@ msgstr "" msgid "Confirm New Password" msgstr "" -#: src/components/ChangeName.jsx:64 -msgid "New Username" -msgstr "" - #: src/components/ChangeMail.jsx:59 msgid "" "Changed Mail successfully. We sent you a verification mail, " @@ -1177,6 +1147,10 @@ msgstr "" msgid "New Mail" msgstr "" +#: src/components/DeleteAccount.jsx:66 +msgid "Yes, Delete My Account!" +msgstr "" + #: src/components/SocialSettings.jsx:38 msgid "Block all Private Messages" msgstr "" @@ -1189,8 +1163,30 @@ msgstr "" msgid "You have no users blocked" msgstr "" -#: src/components/DeleteAccount.jsx:66 -msgid "Yes, Delete My Account!" +#: src/components/UserMessages.jsx:28 +msgid "" +"Please verify your mail address \n" +"or your account could get deleted after a few days." +msgstr "" + +#: src/components/UserMessages.jsx:49 +msgid "A new verification mail is getting sent to you." +msgstr "" + +#: src/components/UserMessages.jsx:53 +msgid "Click here to request a new verification mail." +msgstr "" + +#: src/components/ChangeName.jsx:64 +msgid "New Username" +msgstr "" + +#: src/components/LogInForm.jsx:76 +msgid "Name or Email" +msgstr "" + +#: src/components/LogInForm.jsx:87 +msgid "LogIn" msgstr "" #: src/components/windows/Help.jsx:14 @@ -1205,6 +1201,11 @@ msgctxt "keybinds" msgid "X" msgstr "" +#: src/components/windows/Settings.jsx:150 +msgctxt "keybinds" +msgid "M" +msgstr "" + #: src/components/windows/Help.jsx:16 #: src/components/windows/Settings.jsx:205 msgctxt "keybinds" @@ -1254,9 +1255,4 @@ msgstr "" #: src/components/windows/Help.jsx:31 msgctxt "keybinds" msgid "C" -msgstr "" - -#: src/components/windows/Settings.jsx:150 -msgctxt "keybinds" -msgid "M" msgstr "" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8d4e471..1e69522 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "dependencies": { "bcrypt": "^5.0.1", "bluebird": "^3.5.0", - "body-parser": "^1.19.1", "bufferutil": "^4.0.6", "compression": "^1.7.3", "connect-redis": "^6.0.0", diff --git a/package.json b/package.json index 50a402a..7ea88b5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "dependencies": { "bcrypt": "^5.0.1", "bluebird": "^3.5.0", - "body-parser": "^1.19.1", "bufferutil": "^4.0.6", "compression": "^1.7.3", "connect-redis": "^6.0.0", diff --git a/src/actions/fetch.js b/src/actions/fetch.js index 04c9462..7a291cb 100644 --- a/src/actions/fetch.js +++ b/src/actions/fetch.js @@ -177,10 +177,10 @@ export async function requestLeaveChan(channelId) { return t`Unknown Error`; } -export async function requestSolveCaptcha(text) { +export async function requestSolveCaptcha(text, captchaid) { const res = await makeAPIPOSTRequest( 'api/captcha', - { text }, + { text, id: captchaid }, ); if (!res.errors && !res.success) { return { @@ -193,7 +193,7 @@ export async function requestSolveCaptcha(text) { export async function requestHistoricalTimes(day, canvasId) { try { const date = dateToString(day); - const url = `api/history?day=${date}&id=${canvasId}`; + const url = `history?day=${date}&id=${canvasId}`; const response = await fetchWithTimeout(url); if (response.status !== 200) { return []; @@ -271,3 +271,15 @@ export function requestDeleteAccount(password) { { password }, ); } + +export function requestRankings() { + return makeAPIGETRequest( + 'ranking', + ); +} + +export function requestMe() { + return makeAPIGETRequest( + 'api/me', + ); +} diff --git a/src/actions/index.js b/src/actions/index.js index acdb97f..0809682 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -5,6 +5,8 @@ import { requestBlock, requestBlockDm, requestLeaveChan, + requestRankings, + requestMe, } from './fetch'; export function sweetAlert( @@ -446,10 +448,8 @@ export function remFromMessages( export function fetchStats() { return async (dispatch) => { - const response = await fetch('api/ranking', { credentials: 'include' }); - if (response.ok) { - const rankings = await response.json(); - + const rankings = await requestRankings(); + if (!rankings.errors) { dispatch(receiveStats(rankings)); } }; @@ -457,12 +457,8 @@ export function fetchStats() { export function fetchMe() { return async (dispatch) => { - const response = await fetch('api/me', { - credentials: 'include', - }); - - if (response.ok) { - const me = await response.json(); + const me = await requestMe(); + if (!me.errors) { dispatch(receiveMe(me)); } }; diff --git a/src/actions/types.js b/src/actions/types.js index 3c6ee86..20330cf 100644 --- a/src/actions/types.js +++ b/src/actions/types.js @@ -113,7 +113,6 @@ export type Action = dailyTotalPixels: number, ranking: number, dailyRanking: number, - minecraftname: string, blockDm: boolean, canvases: Object, channels: Object, @@ -129,7 +128,6 @@ export type Action = dailyTotalPixels: number, ranking: number, dailyRanking: number, - minecraftname: string, blockDm: boolean, canvases: Object, channels: Object, diff --git a/src/captchaserver.js b/src/captchaserver.js index 9823411..e905e64 100644 --- a/src/captchaserver.js +++ b/src/captchaserver.js @@ -8,10 +8,12 @@ import path from 'path'; import fs from 'fs'; import process from 'process'; import http from 'http'; +import url from 'url'; import ppfunCaptcha from 'ppfun-captcha'; import { getIPFromRequest } from './utils/ip'; import { setCaptchaSolution } from './utils/captcha'; +import { getRandomString } from './core/utils'; const PORT = process.env.PORT || 8080; const HOST = process.env.HOST || 'localhost'; @@ -23,30 +25,51 @@ const font = fs.readdirSync(path.resolve(__dirname, 'captchaFonts')) )); const server = http.createServer((req, res) => { - const captcha = ppfunCaptcha.create({ - width: 500, - height: 300, - fontSize: 180, - stroke: 'black', - fill: 'none', - nodeDeviation: 2.5, - connectionPathDeviation: 10.0, - style: 'stroke-width: 4;', - background: '#EFEFEF', - font, + console.log(req.url); + + req.on('error', (err) => { + console.error(err); }); - const ip = getIPFromRequest(req); + const urlObject = url.parse(req.url, true); - setCaptchaSolution(captcha.text, ip); - console.log(`Serving ${captcha.text} to ${ip}`); + if (req.method === 'GET' && urlObject.pathname.endsWith('.svg')) { + const captcha = ppfunCaptcha.create({ + width: 500, + height: 300, + fontSize: 180, + stroke: 'black', + fill: 'none', + nodeDeviation: 2.5, + connectionPathDeviation: 10.0, + style: 'stroke-width: 4;', + background: '#EFEFEF', + font, + }); - res.writeHead(200, { - 'Content-Type': 'image/svg+xml', - 'Cache-Control': 'no-cache', - }); - res.write(captcha.data); - res.end(); + const ip = getIPFromRequest(req); + const captchaid = getRandomString(); + + setCaptchaSolution(captcha.text, ip, captchaid); + console.log(`Serving ${captcha.text} to ${ip} / ${captchaid}`); + + res.writeHead(200, { + 'Content-Type': 'image/svg+xml', + 'Cache-Control': 'no-cache', + 'Captcha-Id': captchaid, + }); + res.write(captcha.data); + res.end(); + } else { + res.writeHead(404, { + 'Content-Type': 'text/html', + 'Cache-Control': 'no-cache', + }); + res.end( + // eslint-disable-next-line max-len + '
{alertMessage}
-+