From 2c232bd70d56551ff09fa70fd07adff4af9ee124 Mon Sep 17 00:00:00 2001 From: "Pavel Erokhin (MairwunNx)" Date: Fri, 19 Jun 2020 22:34:32 +0300 Subject: [PATCH] Updates --- app.css | 18 ++ app.tsx | 26 ++ components/download/download.css | 40 +++ components/download/download.tsx | 119 ++++++++ components/download/module/module.css | 54 ++++ components/download/module/module.tsx | 86 ++++++ components/home/feature/feature.css | 23 ++ components/home/feature/feature.tsx | 16 ++ components/home/home.css | 114 ++++++++ components/home/home.tsx | 70 +++++ components/link/link.css | 10 + components/link/link.tsx | 20 ++ components/manual/commands/commands.css | 22 ++ components/manual/commands/commands.json | 60 ++++ components/manual/commands/commands.tsx | 260 +++++++++++++++++ .../manual/configuration/configuration.tsx | 266 ++++++++++++++++++ components/manual/developer/developer.tsx | 66 +++++ .../manual/installation/installation.tsx | 41 +++ components/manual/manual.css | 27 ++ components/manual/manual.tsx | 32 +++ components/manual/permissions/permissions.css | 17 ++ .../manual/permissions/permissions.json | 24 ++ components/manual/permissions/permissions.tsx | 118 ++++++++ components/top/top.css | 18 ++ components/top/top.tsx | 44 +++ index.html | 27 ++ index.tsx | 11 + logo.svg | 7 + react-app-env.d.ts | 66 +++++ serviceWorker.ts | 88 ++++++ structs/pair.ts | 59 ++++ 31 files changed, 1849 insertions(+) create mode 100644 app.css create mode 100644 app.tsx create mode 100644 components/download/download.css create mode 100644 components/download/download.tsx create mode 100644 components/download/module/module.css create mode 100644 components/download/module/module.tsx create mode 100644 components/home/feature/feature.css create mode 100644 components/home/feature/feature.tsx create mode 100644 components/home/home.css create mode 100644 components/home/home.tsx create mode 100644 components/link/link.css create mode 100644 components/link/link.tsx create mode 100644 components/manual/commands/commands.css create mode 100644 components/manual/commands/commands.json create mode 100644 components/manual/commands/commands.tsx create mode 100644 components/manual/configuration/configuration.tsx create mode 100644 components/manual/developer/developer.tsx create mode 100644 components/manual/installation/installation.tsx create mode 100644 components/manual/manual.css create mode 100644 components/manual/manual.tsx create mode 100644 components/manual/permissions/permissions.css create mode 100644 components/manual/permissions/permissions.json create mode 100644 components/manual/permissions/permissions.tsx create mode 100644 components/top/top.css create mode 100644 components/top/top.tsx create mode 100644 index.html create mode 100644 index.tsx create mode 100644 logo.svg create mode 100644 react-app-env.d.ts create mode 100644 serviceWorker.ts create mode 100644 structs/pair.ts diff --git a/app.css b/app.css new file mode 100644 index 0000000..76a5ca5 --- /dev/null +++ b/app.css @@ -0,0 +1,18 @@ +@import "@jetbrains/ring-ui/components/global/variables.css"; + +html, .app-root { + height: 100%; +} + +.app-root { + margin: 0; + padding: 0; + background: var(--ring-content-background-color); + font-family: var(--ring-font-family); + font-size: var(--ring-font-size); + line-height: var(--ring-line-height); +} + +.app-content { + margin: calc(var(--ring-unit) * 4); +} diff --git a/app.tsx b/app.tsx new file mode 100644 index 0000000..45e31ee --- /dev/null +++ b/app.tsx @@ -0,0 +1,26 @@ +import React, {Component} from 'react' +import {pushStateLocationPlugin, UIRouter, UIView} from "@uirouter/react" +import Top from './components/top/top' +import Home from "./components/home/home" +import Download from "./components/download/download" +import './app.css' +import Manual from "./components/manual/manual"; + +const states = [ + {name: 'base', url: '/', component: Home}, + {name: 'download', url: '/download', component: Download}, + {name: 'manual', url: '/manual', component: Manual} +] + +const plugins = [pushStateLocationPlugin] + +export default class App extends Component { + render = () => ( +
+ + + + +
+ ) +} diff --git a/components/download/download.css b/components/download/download.css new file mode 100644 index 0000000..9e63354 --- /dev/null +++ b/components/download/download.css @@ -0,0 +1,40 @@ +.download-container { + display: flex; + flex-direction: column; +} + +.download-cards-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-self: center; + justify-content: center; + max-width: 1000px; + margin-bottom: 25px; +} + +.download-cards-container > div:nth-child(even) { + background-color: #fafbfc; +} + +.download-cards-container > div:nth-child(odd) { + background-color: #fff; +} + +.download-title { + text-align: center; + background-color: #FAFBFC; + width: 100%; + align-self: center; + justify-self: center; + padding: 26px 0; + font-size: 18px; + margin-bottom: 25px; + margin-left: 0px!important; + margin-right: 0px!important; +} + +.download-footer { + margin-top: 25px!important; + margin-bottom: -40px!important; +} diff --git a/components/download/download.tsx b/components/download/download.tsx new file mode 100644 index 0000000..b2d4089 --- /dev/null +++ b/components/download/download.tsx @@ -0,0 +1,119 @@ +import React from "react"; + +import './download.css' +import Module from "./module/module"; +import {Struct} from "../../structs/pair"; +import ImmutablePair = Struct.ImmutablePair; + +export default class Download extends React.Component { + render = () => ( +
+

{'Download the Project Essentials'}

+
+ + + + + + + + + +
+
+ ) +} diff --git a/components/download/module/module.css b/components/download/module/module.css new file mode 100644 index 0000000..07c1f53 --- /dev/null +++ b/components/download/module/module.css @@ -0,0 +1,54 @@ +.module-card { + display: flex; + flex-direction: column; + width: 16.66666666665%; + min-width: 290px; + border: 1px #e1e4e8 solid; + box-sizing: border-box; + border-radius: 6px; + padding: 40px; + margin: 10px; +} + +.module-title { + margin-bottom: 15px; + font-size: 20px; + font-weight: 500; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.module-div { + display: flex; + flex-direction: column; +} + +.download-link { + margin: 4px 0; +} + +.other-stuff-container { + display: flex; + flex-direction: column; + justify-content: flex-end; + height: 100%; +} + +.module-description-container { + display: flex; + flex-direction: column; + justify-content: center; + height: 100%; +} + +.module-description { + font-size: 14px; + color: #586069; + text-align: left; + max-width: 700px; +} + +.download-link-container { + display: flex; + flex-direction: column; + margin: 20px 0 -10px 0; +} diff --git a/components/download/module/module.tsx b/components/download/module/module.tsx new file mode 100644 index 0000000..deb6094 --- /dev/null +++ b/components/download/module/module.tsx @@ -0,0 +1,86 @@ +import React from "react"; +import Link from "../../link/link"; +import Footer from '@jetbrains/ring-ui/components/footer/footer'; + +import './module.css' +import {Struct} from "../../../structs/pair"; +import ImmutablePair = Struct.ImmutablePair; + +interface ModuleProperties { + name: string + urlend: string | null + description: string + map: Map> + previewMap: Map> +} + +export default class Module extends React.Component { + render = () => ( +
+

{this.props.name}

+
+ { + mapTheMap(this.props.map, (k: string, v: ImmutablePair) => { + return ( + `} + /> + ) + }) + } +
+ { + Array.from(this.props.previewMap.keys()).length != 0 ? ( +
+
+
+ { + mapTheMap(this.props.previewMap, (k: string, v: ImmutablePair) => { + return ( + `} + /> + ) + }) + } +
+
+ ) : null + } +
+
+
+

{this.props.description}

+
+
+
+ `} + /> + `} + /> +
+
+
+ ) +} + +function mapTheMap(map, cb) { + let i = 0; + let out = new Array(map.size); + map.forEach((val, key) => out[i++] = cb(key, val)); + return out; +} diff --git a/components/home/feature/feature.css b/components/home/feature/feature.css new file mode 100644 index 0000000..99fd23c --- /dev/null +++ b/components/home/feature/feature.css @@ -0,0 +1,23 @@ +.feature-container { + display: flex; + flex-direction: column; + text-align: center; + width: 33.3333333333%; + min-width: 300px; +} + +.feature-title { + margin-bottom: 4px; + font-size: 18px; + font-weight: 500; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.feature-description { + text-align: left; + font-size: 16px; + padding-right: 24px; + padding-left: 24px; + margin-bottom: 15px; + color: #6a737d; +} diff --git a/components/home/feature/feature.tsx b/components/home/feature/feature.tsx new file mode 100644 index 0000000..7a67310 --- /dev/null +++ b/components/home/feature/feature.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import './feature.css' + +interface FeatureProperties { + title: string + description: string +} + +export class Feature extends React.Component { + render = () => ( +
+

{this.props.title}

+

{this.props.description}

+
+ ) +} diff --git a/components/home/home.css b/components/home/home.css new file mode 100644 index 0000000..4164f7a --- /dev/null +++ b/components/home/home.css @@ -0,0 +1,114 @@ +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.greetings-container { + display: flex; + flex-direction: column; + text-align: center; + margin-top: 64px; +} + +.greetings-logo { + width: 72px; + align-self: center; + margin-bottom: 22px; +} + +.greetings-title { + font-size: 16px; + font-weight: 500; + color: #6a737d; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important; +} + +.greetings-title-badge { + border: 1px solid #34d058; + color: #28a745; + margin-left: 8px; +} + +.greetings-subtitle { + font-size: 48px; + font-weight: 500; + margin-bottom: 16px; + line-height: 1.4; + padding-left: 30px; + padding-right: 30px; + margin-top: 12px; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.download-button-container { + display: flex; + flex-direction: column; + align-content: center; + margin-top: 10px; +} + +.download-button { + height: auto; + align-self: center !important; + vertical-align: center !important; + font-weight: 500 !important; + font-size: 14px !important; + padding: 16px 24px !important; +} + +.documentation-container { + display: flex; + flex-direction: column; + text-align: center; + margin-top: 25px; +} + +.documentation-title { + font-size: 16px; + color: #586069; + padding-left: 60px; + padding-right: 60px; + align-self: center; + max-width: 700px; +} + +.documentation-link { + color: #1074e7 !important; + font-weight: 500; + font-size: 16px; + text-decoration: none; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important; +} + +.features-caption-container { + display: flex; + flex-direction: column; + background-color: #fafbfc !important; + text-align: center; + margin-top: 30px; +} + +.features-caption { + margin-left: 24px; + margin-right: 24px; + font-size: 32px; + line-height: 1.25; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.features-container { + display: flex; + flex-direction: column; + margin-top: 30px; + margin-bottom: 55px; + align-self: center; +} + +.features-sub-container { + display: flex; + flex-direction: row; + align-self: center; + text-align: center; + flex-wrap: wrap; + justify-content: space-evenly; + max-width: 950px; +} diff --git a/components/home/home.tsx b/components/home/home.tsx new file mode 100644 index 0000000..0606ad9 --- /dev/null +++ b/components/home/home.tsx @@ -0,0 +1,70 @@ +import React from "react"; +import Badge from '@jetbrains/ring-ui/components/badge/badge'; +import Button from '@jetbrains/ring-ui/components/button/button'; + +import EssLogo from '../../logo.svg' +import './home.css' +import {Feature} from "./feature/feature"; + +export default class Home extends React.Component { + render = () => ( +
+
+ {'Project +
+ {'Project Essentials'} + {'2.x'} +
+

{'Take Essentials to the Minecraft'}

+
+
+ +
+
+

+ Check out Project Essentials docs for more info and view all 59 commands and permissions. +

+ Read the manual {">"} +
+
+

{'I make forge server more powerful'}

+
+
+
+ + + + + + +
+
+
+ ) +} diff --git a/components/link/link.css b/components/link/link.css new file mode 100644 index 0000000..98433db --- /dev/null +++ b/components/link/link.css @@ -0,0 +1,10 @@ +.link { + max-width: max-content; + word-wrap: break-word; + color: #1074e7; + font-size: 14px; + font-weight: 500; + font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + text-decoration: none; + z-index: 2; +} diff --git a/components/link/link.tsx b/components/link/link.tsx new file mode 100644 index 0000000..9dbab6b --- /dev/null +++ b/components/link/link.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +import './link.css' + +interface LinkProperties { + href: string + content: string + className: string +} + +export default class Link extends React.Component { + render = () => ( + + {this.props.content.trim()} + + ) +} diff --git a/components/manual/commands/commands.css b/components/manual/commands/commands.css new file mode 100644 index 0000000..686e684 --- /dev/null +++ b/components/manual/commands/commands.css @@ -0,0 +1,22 @@ +.table-container { + margin-top: 20px; + overflow: auto; +} + +.inline-code { + margin: 5px 2px; + padding-right: 0 !important; +} + +.inline-code > code:nth-child(1) { + max-width: unset!important; + padding: 5px 10px 5px !important; +} + +.cell_a14:last-child { + max-width: unset!important; +} + +.permissions-container { + margin-top: 25px; +} diff --git a/components/manual/commands/commands.json b/components/manual/commands/commands.json new file mode 100644 index 0000000..4a3ce8e --- /dev/null +++ b/components/manual/commands/commands.json @@ -0,0 +1,60 @@ +[ + {"command": "afk [~list [page]]", "permission": "ess.afk.[set/0|~list/3]", "description": "Marks you as away-from-keyboard.", "provider": "basic"}, + {"command": "air [~players]", "permission": "ess.air.[self/2|~other/3]", "description": "Make air suppliers fully for you or given player.", "provider": "basic"}, + {"command": "back", "permission": "ess.back/2", "description": "Teleports you to your location prior to tp/spawn/warp.", "provider": "core"}, + {"command": "break", "permission": "ess.break/3", "description": "Breaks the block you are looking at.", "provider": "basic"}, + {"command": "burn ~[~~players]", "permission": "ess.burn.[~self/2|~~other/3]", "description": "Set a player on fire.", "provider": "basic"}, + {"command": "enderchest [~player]", "permission": "ess.enderchest.open/3[~.other/4]", "description": "Lets you see inside an you enderchest or other player.", "provider": "basic"}, + {"command": "ext [~players]", "permission": "ess.ext.[self/2|~other/3]", "description": "Extinguish you or given players.", "provider": "basic"}, + {"command": "feed [~players]", "permission": "ess.feed.[self/2|~other/3]", "description": "Satisfy the hunger of you or given player.", "provider": "basic"}, + {"command": "fly [~players]", "permission": "ess.fly.[self/2|~other/3]", "description": "Enables fly mode for you or given player.", "provider": "basic"}, + {"command": "glow [~players]", "permission": "ess.glow.[self/2|~other/3]", "description": "Enables glowing of you or given player.", "provider": "basic"}, + {"command": "god [~players]", "permission": "ess.god.[self/2|~other/3]", "description": "Enables god mode for you or given player.", "provider": "basic"}, + {"command": "heal [~players]", "permission": "ess.heal.[self/2|~other/3]", "description": "Heals you or the given player.", "provider": "basic"}, + {"command": "help [page]", "permission": "native.help/0", "description": "Views a list of available commands.", "provider": "basic"}, + {"command": "invsee ", "permission": "ess.inventory.see/3", "description": "See the inventory of other players.", "provider": "basic"}, + {"command": "jump", "permission": "ess.jump/3", "description": "Jumps to the nearest block in the line of sight.", "provider": "basic"}, + {"command": "kit [ ~[target]|~~list [page]]", "permission": "ess.kit.[receive./0[~.other/3]|~~list/0]", "description": "Obtains the specified kit.", "provider": "basic"}, + {"command": "lightning ", "permission": "ess.lightning/3", "description": "Strike at target players.", "provider": "basic"}, + {"command": "more", "permission": "ess.more/3", "description": "Fills the item stack in hand to maximum size.", "provider": "basic"}, + {"command": "ping", "permission": "ess.ping/0", "description": "Sends result to player his ping to server.", "provider": "basic"}, + {"command": "platform-status", "permission": "ess.platformstatus/0", "description": "Reports memory, uptime and tick info.", "provider": "basic"}, + {"command": "repair [all]", "permission": "ess.repair.[one/2|~all/3]", "description": "Repairs the durability of one or all items.", "provider": "basic"}, + {"command": "send-pos ", "permission": "ess.sendpos/0", "description": "Sends your position to other selected players.", "provider": "basic"}, + {"command": "skull ", "permission": "ess.skull/2", "description": "Gives a skull of other player by name.", "provider": "basic"}, + {"command": "suicide", "permission": "ess.suicide/2", "description": "Causes you to perish.", "provider": "basic"}, + {"command": "vanish [~players]", "permission": "ess.vanish.[self/2|~other/3]", "description": "Enables invisibility for your or given player.", "provider": "basic"}, + {"command": "workbench", "permission": "ess.workbench.open/3", "description": "Opens up a workbench.", "provider": "basic"}, + {"command": "top", "permission": "ess.teleport.top/2", "description": "Teleports you to top at current Y axis.", "provider": "basic"}, + {"command": "tp-accept", "permission": "ess.teleport.tpaccept/0", "description": "Accepts the last teleport request.", "provider": "basic"}, + {"command": "tp-all ", "permission": "ess.teleport.tpall/4", "description": "Teleports all players to target player.", "provider": "basic"}, + {"command": "tp-deny", "permission": "ess.teleport.tpdeny/0", "description": "Does deny a last teleport request.", "provider": "basic"}, + {"command": "tp-here ", "permission": "ess.teleport.tphere/3", "description": "Teleports target player to position at you stay.", "provider": "basic"}, + {"command": "tp-pos ", "permission": "ess.teleport.tppos/2", "description": "Teleports you to selected position in current world.", "provider": "basic"}, + {"command": "tp-toggle", "permission": "ess.teleport.tptoggle/3", "description": "Toggles on/off your wish to getting teleport requests.", "provider": "basic"}, + {"command": "tpa-all", "permission": "ess.teleport.tpaall/2", "description": "Sends a teleport request to the all players.", "provider": "basic"}, + {"command": "tpa-cancel", "permission": "ess.teleport.tpacancel/0", "description": "Cancels the last teleport request to somebody.", "provider": "basic"}, + {"command": "tpa ", "permission": "ess.teleport.tpa/0", "description": "Sends a teleport request to selected player.", "provider": "basic"}, + {"command": "tpa-here ", "permission": "ess.teleport.tpahere/0", "description": "Sends a \"teleport to you\" request to selected player.", "provider": "basic"}, + {"command": "set-spawn", "permission": "ess.spawn.set/4", "description": "Sets new spawn point for all players at your position in current world.", "provider": "spawn"}, + {"command": "spawn", "permission": "ess.spawn.teleport/0", "description": "Teleports you to spawn point.", "provider": "spawn"}, + {"command": "set-home ", "permission": "ess.home.set/0", "description": "Saves new home point at position you stay.", "provider": "home"}, + {"command": "del-home ", "permission": "ess.home.remove/0", "description": "Removes selected home.", "provider": "home"}, + {"command": "home [home]", "permission": "ess.home.teleport/0", "description": "Teleports you to selected home.", "provider": "home"}, + {"command": "set-warp ", "permission": "ess.warp.set/0", "description": "Saves new warp point at position you stay.", "provider": "warps"}, + {"command": "del-warp ", "permission": "ess.warp.remove/0", "description": "Removes selected warp.", "provider": "warps"}, + {"command": "warp ", "permission": "ess.warp.teleport/0", "description": "Teleports you to selected warp.", "provider": "warps"}, + {"command": "backup ", "permission": "ess.backup.[on|off|now]/4", "description": "Force makes a backup or preventing backup cycle or continue it.", "provider": "backup"}, + {"command": "chat-clear [only for you?]", "permission": "ess.chat.clear/3", "description": "Do clear chat on server and client (different effect!).", "provider": "chat"}, + {"command": "mute [reason]", "permission": "ess.chat.moderation.mute/3", "description": "Mute selected player.", "provider": "chat"}, + {"command": "unmute ", "permission": "ess.chat.moderation.unmute/3", "description": "Unmutes selected player.", "provider": "chat"}, + {"command": "unmute-all", "permission": "ess.chat.moderation.unmuteall/3", "description": "Unmutes all muted players.", "provider": "chat"}, + {"command": "muted-players [page]", "permission": "ess.chat.moderation.mutedplayers/3", "description": "Lists you muted players.", "provider": "chat"}, + {"command": "temp-mute