From 2d2144fc05b709ae253461d68f6bc30739e66f6a Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Thu, 4 Jul 2024 13:28:33 +0100 Subject: [PATCH] [~] Dynamic framework icon handling. --- src/assets/frameworks/vanilla.png | Bin 0 -> 3219 bytes src/components/serverCard/serverCard.jsx | 25 +++++++++++------- .../serverCard/serverCard.module.scss | 1 - 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 src/assets/frameworks/vanilla.png diff --git a/src/assets/frameworks/vanilla.png b/src/assets/frameworks/vanilla.png new file mode 100644 index 0000000000000000000000000000000000000000..8480c8977d8344eb9f712cac3e9a7de00e6ca608 GIT binary patch literal 3219 zcmZ{mXHXN^7RR#-E3vSI$P(fLO2?%oASI!QA%O%8h!h1DNkSk-N&*QjG(n^zo4|r} z7AcC6CRmZ80wPF@6e%t>q6mnT08(Cj^FHi*GjHykduGo0{r~sePxmIBv$YaGbnFlS z01(Gv(dUKv#P7_r&Ivf}bcgA@;;@{l$Tea7+Pi-K%-ZW+a?Bf7WaTZ14<@QzZHgU~zMVY~H5 zxmN3_^HGP?V{tOzBPB_ev5<|r_`}ucqqNj@SKc3!X-NYzzuk!qB{n2N(4{c6dQabv zeiRnJ8$pSF_IK~9+3`zf_2H@)-5+W!6zy+Q?s3;4jcuFvPVYmf=K~Zqug$7G11{T@ zZYQDxtH$^9%6;}Op_{hfT1AKNe$cqHKO!iO4zI9O2*8xG~&o@^E*>N}it{wYv4tcJioQ zbNc$?pO3!u&0SBLxfNW$tda6g3R_2*Xu=ApHnH18xH0vcWFW4%zHU-|4*|~Q8p-1CayOh9X zpVrNWK1H(?ha!~8%7t_Wd?LCVEzn?ZGOoXtzp0GrU(;%!N}jJV%&|y)Ymvf9o;NAb zFHPc4@BIYm`6O-@`kIOIa?Nd0iGQ{A4h)gSWa)LLG(F@Slce@TgYQRe>IrW}a#-&p@>_}g3L0d8Rs6<-#hZ;TBcp|ioj`?i ze7!iSS*oQEGM-rc1&YGOfgRoPv?G;v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tau0Y7jd}kdm2l7J5QS=uc)-(S2z|GDAn-KnG=qwy;J7=;#_C5ITNTe=pBKqBqmSmqwv^P(5k>9&iIAgyAV| V;au(dGxkDP01jh|u0j!F{{_At=m`J- literal 0 HcmV?d00001 diff --git a/src/components/serverCard/serverCard.jsx b/src/components/serverCard/serverCard.jsx index 083fdef..6263973 100644 --- a/src/components/serverCard/serverCard.jsx +++ b/src/components/serverCard/serverCard.jsx @@ -1,18 +1,25 @@ import React from 'react'; import styles from './serverCard.module.scss'; -import paper_mc from '../../assets/frameworks/paper_mc.png' +import paper from '../../assets/frameworks/paper_mc.png' +import spigot from '../../assets/frameworks/spigot.png' +import bukkit from '../../assets/frameworks/bukkit.png' +import vanilla from '../../assets/frameworks/vanilla.png' -const ServerCard = ({status, version, link, name, onRunClick, onStopClick, onDeleteClick }) => { +const ServerCard = ({status, version, link, name, framework, onRunClick, onStopClick, onDeleteClick }) => { - const getStatusColor = () => { - switch (status) { - case true: - return 'green'; + const getFrameworkSource = () => { + switch (framework) { + case "bukkit": + return bukkit; + case "spigot": + return spigot; + case "paper": + return paper; default: - return 'gray'; + return vanilla; } - }; + } const handleRun = async () => { try { @@ -43,7 +50,7 @@ const ServerCard = ({status, version, link, name, onRunClick, onStopClick, onDel
{name}
- {`${name} + {`${name}
diff --git a/src/components/serverCard/serverCard.module.scss b/src/components/serverCard/serverCard.module.scss index e8b6b58..5fdf92c 100644 --- a/src/components/serverCard/serverCard.module.scss +++ b/src/components/serverCard/serverCard.module.scss @@ -30,7 +30,6 @@ .statusInnerDot { width: 27px; height: 27px; - border-radius: 50%; } .name {