Use icons for selecting stage items (#1221)

![image](https://github.com/user-attachments/assets/e5f224d9-cd66-4f98-80f9-81a541c8a325)

Use icons for stage items in modal to create stage items to improve UX.
I made the icons myself so they're not very beautiful
This commit is contained in:
Erik Vroon
2025-05-10 16:29:40 +02:00
committed by GitHub
parent 7387bdcbb5
commit f962804118
8 changed files with 1041 additions and 15 deletions

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="197.44826"
height="128"
viewBox="0 0 52.241518 33.866667"
version="1.1"
id="svg22318"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="group-stage-item.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview22320"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="3.659624"
inkscape:cx="57.656196"
inkscape:cy="0.40987817"
inkscape:window-width="3840"
inkscape:window-height="2091"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs22315" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-78.614945,-114.63747)">
<g
id="g36552"
transform="translate(-0.02338255,0.04677646)">
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.140328"
id="rect7820"
width="51.42952"
height="33.257893"
x="79.044327"
y="114.89508"
rx="1.8054012"
ry="1.8054012" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7822"
width="40.311382"
height="5.8411336"
x="80.428673"
y="116.78795"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.527615;stroke-dasharray:none"
id="rect7824"
width="7.1454802"
height="5.8411336"
x="121.94402"
y="116.78795"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7826"
width="40.311382"
height="5.8411336"
x="80.428673"
y="124.7054"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.5279;stroke-dasharray:none"
id="rect7828"
width="7.1454802"
height="5.8411336"
x="121.94402"
y="124.7054"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7834"
width="40.311382"
height="5.8411336"
x="80.437431"
y="132.51678"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.527615;stroke-dasharray:none"
id="rect7836"
width="7.1454802"
height="5.8411336"
x="121.95278"
y="132.51678"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7838"
width="40.311382"
height="5.8411336"
x="80.437431"
y="140.43425"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.5279;stroke-dasharray:none"
id="rect7840"
width="7.1454802"
height="5.8411336"
x="121.95278"
y="140.43425"
rx="1.1488117"
ry="1.1488117" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="62.189377mm"
height="40.215961mm"
viewBox="0 0 62.189377 40.215962"
version="1.1"
id="svg25466"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="single-elimination-stage-item.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview25468"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="3.659624"
inkscape:cx="109.02759"
inkscape:cy="67.356646"
inkscape:window-width="3840"
inkscape:window-height="2091"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs25463" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-64.445557,-98.050957)">
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.0776002"
id="rect4151"
width="28.440058"
height="9.7018461"
x="64.6763"
y="106.61565"
rx="0.99837047"
ry="0.99837047" />
<g
id="g4161"
transform="matrix(0.32032162,0,0,0.32032162,45.262561,97.972759)">
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4153"
width="69.592018"
height="10.083908"
x="62.996906"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#ff5555;stroke-width:0.911347;stroke-dasharray:none"
id="rect4155"
width="12.335682"
height="10.083908"
x="134.66742"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4157"
width="69.592018"
height="10.083908"
x="62.996906"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#b3ff80;stroke-width:0.911347;stroke-dasharray:none"
id="rect4159"
width="12.335682"
height="10.083908"
x="134.66742"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
</g>
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.0776002"
id="rect4163"
width="28.440058"
height="9.7018461"
x="64.6763"
y="118.22886"
rx="0.99837047"
ry="0.99837047" />
<rect
style="fill:#f2f2f2;stroke-width:0.291924;stroke-dasharray:none"
id="rect4165"
width="22.291828"
height="3.2300937"
x="65.441833"
y="119.27558"
rx="0.6352824"
ry="0.6352824" />
<rect
style="fill:#b3ff80;fill-opacity:1;stroke-width:0.291766;stroke-dasharray:none"
id="rect4167"
width="3.9513855"
height="3.2300937"
x="88.399445"
y="119.27558"
rx="0.6352824"
ry="0.6352824" />
<rect
style="fill:#f2f2f2;stroke-width:0.291924;stroke-dasharray:none"
id="rect4169"
width="22.291828"
height="3.2300937"
x="65.441833"
y="123.65386"
rx="0.6352824"
ry="0.6352824" />
<rect
style="fill:#ff5555;stroke-width:0.291924;stroke-dasharray:none"
id="rect4171"
width="3.9513855"
height="3.2300937"
x="88.399445"
y="123.65386"
rx="0.6352824"
ry="0.6352824" />
<path
style="fill:none;stroke:#333333;stroke-width:0.441307;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 92.133171,111.43723 h 3.40609 v 11.68053 h -3.52922"
id="path5439"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#333333;stroke-width:0.441307;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="M 100.04818,117.21574 H 95.524281"
id="path5441" />
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.0776002"
id="rect4175"
width="28.440058"
height="9.7018461"
x="98.077682"
y="112.4571"
rx="0.99837047"
ry="0.99837047" />
<g
id="g4185"
transform="matrix(0.32032162,0,0,0.32032162,78.663951,103.81422)">
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4177"
width="69.592018"
height="10.083908"
x="62.996906"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#ff5555;stroke-width:0.911347;stroke-dasharray:none"
id="rect4179"
width="12.335682"
height="10.083908"
x="134.66742"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4181"
width="69.592018"
height="10.083908"
x="62.996906"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#b3ff80;stroke-width:0.911347;stroke-dasharray:none"
id="rect4183"
width="12.335682"
height="10.083908"
x="134.66742"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,439 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg5"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="stage-items.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.70710678"
inkscape:cx="395.9798"
inkscape:cy="724.78445"
inkscape:window-width="3840"
inkscape:window-height="2091"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2">
<marker
style="overflow:visible"
id="marker14126"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="Arrow4"
markerWidth="5"
markerHeight="6"
viewBox="0 0 5 6"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
d="m 1,0 -3,3 h -2 l 3,-3 -3,-3 h 2 z"
id="path14124" />
</marker>
<marker
style="overflow:visible"
id="Arrow4"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="Arrow4"
markerWidth="5"
markerHeight="6"
viewBox="0 0 5 6"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
d="m 1,0 -3,3 h -2 l 3,-3 -3,-3 h 2 z"
id="path1741" />
</marker>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.242257"
id="rect111"
width="88.78595"
height="30.287827"
x="67.441246"
y="14.147595"
rx="3.1167753"
ry="3.1167753" />
<g
id="g4145"
transform="translate(6.8342175,-12.834283)">
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect269"
width="69.592018"
height="10.083908"
x="62.996906"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#ff5555;stroke-width:0.911347;stroke-dasharray:none"
id="rect4127"
width="12.335682"
height="10.083908"
x="134.66742"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4133"
width="69.592018"
height="10.083908"
x="62.996906"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#b3ff80;stroke-width:0.911347;stroke-dasharray:none"
id="rect4135"
width="12.335682"
height="10.083908"
x="134.66742"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
</g>
<rect
style="fill:#b380ff;fill-opacity:1;stroke:#b380ff;stroke-width:0.950286;stroke-dasharray:none;stroke-opacity:1"
id="rect24017"
width="51.291233"
height="32.916382"
x="26.233229"
y="65.07193"
rx="0.92546844"
ry="1.1767077" />
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.140328"
id="rect27669"
width="51.42952"
height="33.257893"
x="137.4998"
y="64.901169"
rx="1.8054012"
ry="1.8054012" />
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.064174"
id="rect4151"
width="23.519426"
height="8.0232563"
x="137.69061"
y="71.937256"
rx="0.82563484"
ry="0.82563484" />
<g
id="g4161"
transform="matrix(0.26490034,0,0,0.26490034,121.63579,64.789746)">
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4153"
width="69.592018"
height="10.083908"
x="62.996906"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#ff5555;stroke-width:0.911347;stroke-dasharray:none"
id="rect4155"
width="12.335682"
height="10.083908"
x="134.66742"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4157"
width="69.592018"
height="10.083908"
x="62.996906"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#b3ff80;stroke-width:0.911347;stroke-dasharray:none"
id="rect4159"
width="12.335682"
height="10.083908"
x="134.66742"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
</g>
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.064174"
id="rect4163"
width="23.519426"
height="8.0232563"
x="137.69061"
y="81.541168"
rx="0.82563484"
ry="0.82563484" />
<rect
style="fill:#f2f2f2;stroke-width:0.241416;stroke-dasharray:none"
id="rect4165"
width="18.43495"
height="2.6712308"
x="138.3237"
y="82.406799"
rx="0.52536738"
ry="0.52536738" />
<rect
style="fill:#b3ff80;fill-opacity:1;stroke-width:0.241285;stroke-dasharray:none"
id="rect4167"
width="3.2677264"
height="2.6712308"
x="157.30923"
y="82.406799"
rx="0.52536738"
ry="0.52536738" />
<rect
style="fill:#f2f2f2;stroke-width:0.241416;stroke-dasharray:none"
id="rect4169"
width="18.43495"
height="2.6712308"
x="138.3237"
y="86.027557"
rx="0.52536738"
ry="0.52536738" />
<rect
style="fill:#ff5555;stroke-width:0.241416;stroke-dasharray:none"
id="rect4171"
width="3.2677264"
height="2.6712308"
x="157.30923"
y="86.027557"
rx="0.52536738"
ry="0.52536738" />
<path
style="fill:none;stroke:#333333;stroke-width:0.364953;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 160.39696,75.924616 h 2.81678 v 9.6596 h -2.91861"
id="path5439"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#333333;stroke-width:0.364953;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 166.94253,80.703346 h -3.74118"
id="path5441" />
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.064174"
id="rect4175"
width="23.519426"
height="8.0232563"
x="165.31297"
y="76.768021"
rx="0.82563484"
ry="0.82563484" />
<g
id="g4185"
transform="matrix(0.26490034,0,0,0.26490034,149.25815,69.620526)">
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4177"
width="69.592018"
height="10.083908"
x="62.996906"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#ff5555;stroke-width:0.911347;stroke-dasharray:none"
id="rect4179"
width="12.335682"
height="10.083908"
x="134.66742"
y="30.249641"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#f2f2f2;stroke-width:0.911347;stroke-dasharray:none"
id="rect4181"
width="69.592018"
height="10.083908"
x="62.996906"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
<rect
style="fill:#b3ff80;stroke-width:0.911347;stroke-dasharray:none"
id="rect4183"
width="12.335682"
height="10.083908"
x="134.66742"
y="43.918034"
rx="1.9832643"
ry="1.9832643" />
</g>
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.140328"
id="rect7820"
width="51.42952"
height="33.257893"
x="26.187468"
y="64.854401"
rx="1.8054012"
ry="1.8054012" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7822"
width="40.311382"
height="5.8411336"
x="27.571812"
y="66.747269"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.527615;stroke-dasharray:none"
id="rect7824"
width="7.1454802"
height="5.8411336"
x="69.087158"
y="66.747269"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7826"
width="40.311382"
height="5.8411336"
x="27.571812"
y="74.664719"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.5279;stroke-dasharray:none"
id="rect7828"
width="7.1454802"
height="5.8411336"
x="69.087158"
y="74.664719"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7834"
width="40.311382"
height="5.8411336"
x="27.580572"
y="82.476105"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.527615;stroke-dasharray:none"
id="rect7836"
width="7.1454802"
height="5.8411336"
x="69.095924"
y="82.476105"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect7838"
width="40.311382"
height="5.8411336"
x="27.580572"
y="90.39357"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke-width:0.5279;stroke-dasharray:none"
id="rect7840"
width="7.1454802"
height="5.8411336"
x="69.095924"
y="90.39357"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#b380ff;fill-opacity:1;stroke:#b380ff;stroke-width:0.950286;stroke-dasharray:none;stroke-opacity:1"
id="rect24047"
width="51.291233"
height="32.916382"
x="81.134354"
y="65.07193"
rx="0.92546844"
ry="1.1767077" />
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.140328"
id="rect12924"
width="51.42952"
height="33.257893"
x="81.044083"
y="64.854401"
rx="1.8054012"
ry="1.8054012" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12926"
width="40.311382"
height="5.8411336"
x="82.428429"
y="66.747269"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12930"
width="40.311382"
height="5.8411336"
x="82.428429"
y="74.664719"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12934"
width="40.311382"
height="5.8411336"
x="82.437187"
y="82.476105"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12938"
width="40.311382"
height="5.8411336"
x="82.437187"
y="90.39357"
rx="1.1488117"
ry="1.1488117" />
<path
style="fill:#b380ff;fill-opacity:1;stroke:#b380ff;stroke-width:1.04613;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker14126);marker-end:url(#Arrow4)"
d="m 127.45763,67.717006 v 27.74304"
id="path12942"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="200"
height="128"
viewBox="0 0 52.916667 33.866666"
version="1.1"
id="svg24588"
sodipodi:docname="swiss-stage-item.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview24590"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="5.1754899"
inkscape:cx="34.199661"
inkscape:cy="52.845239"
inkscape:window-width="3840"
inkscape:window-height="2091"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs24585">
<marker
style="overflow:visible"
id="marker14126"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="Arrow4"
markerWidth="5"
markerHeight="6"
viewBox="0 0 5 6"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
d="m 1,0 -3,3 h -2 l 3,-3 -3,-3 h 2 z"
id="path14124" />
</marker>
<marker
style="overflow:visible"
id="Arrow4"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="Arrow4"
markerWidth="5"
markerHeight="6"
viewBox="0 0 5 6"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
d="m 1,0 -3,3 h -2 l 3,-3 -3,-3 h 2 z"
id="path1741" />
</marker>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-77.521393,-114.10947)">
<g
id="g36418"
transform="translate(0.74357368,0.30439048)">
<rect
style="fill:#333333;fill-rule:evenodd;stroke-width:0.140328"
id="rect12924"
width="51.42952"
height="33.257893"
x="77.521393"
y="114.10947"
rx="1.8054012"
ry="1.8054012" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12926"
width="40.311382"
height="5.8411336"
x="78.905716"
y="116.00233"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12930"
width="40.311382"
height="5.8411336"
x="78.905716"
y="123.91978"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12934"
width="40.311382"
height="5.8411336"
x="78.914482"
y="131.73117"
rx="1.1488117"
ry="1.1488117" />
<rect
style="fill:#f2f2f2;stroke-width:0.5279;stroke-dasharray:none"
id="rect12938"
width="40.311382"
height="5.8411336"
x="78.914482"
y="139.64864"
rx="1.1488117"
ry="1.1488117" />
<path
style="fill:#b380ff;fill-opacity:1;stroke:#b380ff;stroke-width:1.04613;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker14126);marker-end:url(#Arrow4)"
d="M 123.93493,116.97206 V 144.7151"
id="path12942"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -211,6 +211,7 @@
"results_title": "Results",
"round_name_input_placeholder": "Best Round Ever",
"round_robin_label": "Round Robin",
"round_robin_description": "Each team plays every other team once.",
"save_button": "Save",
"save_players_button": "Save players",
"save_ranking_button": "Save Ranking",
@@ -221,6 +222,7 @@
"set_to_new_button": "Set To Now",
"sign_in_title": "Sign in",
"single_elimination_label": "Single Elimination",
"single_elimination_description": "Teams play against each other, where one loss results in elimination.",
"single_player_title": "Single Player",
"single_team": "Single Team",
"special_character_required": "Includes special character",
@@ -233,6 +235,7 @@
"status": "Status",
"swiss_difference": "Swiss Difference",
"swiss_label": "Swiss",
"swiss_description": "Teams play against equal teams, based on the results of previous matches.",
"swiss_score": "Swiss score",
"team_count_input_round_robin_label": "Number of teams advancing from the previous stage",
"team_count_select_elimination_label": "Number of teams advancing from the previous stage",

View File

@@ -3,7 +3,11 @@ import { Text } from '@mantine/core';
import { TeamInterface } from '../../interfaces/team';
export default function PlayerList({ team }: { team: TeamInterface }) {
const getPlayerNames = () => team.players.map(p => p.name).sort().join(", ") || "-";
const getPlayerNames = () =>
team.players
.map((p) => p.name)
.sort()
.join(', ') || '-';
return (
<Text lineClamp={1} title={getPlayerNames()}>

View File

@@ -0,0 +1,14 @@
.socialLink {
padding: 1rem;
border-radius: 1rem;
text-align: center;
font-size: 30px;
font-weight: bold;
text-decoration: none;
display: block;
border: 3px solid #333;
}
.socialLink:hover {
border: 3px solid #8545c7;
}

View File

@@ -1,4 +1,15 @@
import { Button, Modal, NumberInput, Select } from '@mantine/core';
import {
Button,
Card,
Divider,
Grid,
Image,
Modal,
NumberInput,
Select,
Text,
UnstyledButton,
} from '@mantine/core';
import { UseFormReturnType, useForm } from '@mantine/form';
import { GoPlus } from '@react-icons/all-files/go/GoPlus';
import { useTranslation } from 'next-i18next';
@@ -9,6 +20,96 @@ import { StageWithStageItems } from '../../interfaces/stage';
import { Tournament } from '../../interfaces/tournament';
import { getStageItemLookup, getTeamsLookup } from '../../services/lookups';
import { createStageItem } from '../../services/stage_item';
import { Translator } from '../utils/types';
import classes from './create_stage_item.module.css';
function StageSelectCard({
title,
description,
image,
selected,
onClick,
}: {
title: string;
description: string;
image: string;
selected: boolean;
onClick: () => void;
}) {
return (
<UnstyledButton onClick={onClick} w="100%">
<Card
shadow="sm"
padding="lg"
radius="lg"
h="23rem"
withBorder
className={classes.socialLink}
style={{ border: selected ? '3px solid var(--mantine-color-green-7)' : '' }}
>
<Card.Section style={{ backgroundColor: '#dde' }}>
<Image src={image} h={212} style={{ padding: '1.5rem' }} fit="fill"></Image>
</Card.Section>
<Text fw={800} size="xl" mt="md" lineClamp={1}>
{title}
</Text>
<Text mt="xs" c="dimmed" size="md" lineClamp={3}>
{description}
</Text>
</Card>
</UnstyledButton>
);
}
export function CreateStagesFromTemplateButtons({
selectedType,
setSelectedType,
t,
}: {
selectedType: 'ROUND_ROBIN' | 'SWISS' | 'SINGLE_ELIMINATION';
setSelectedType: (type: 'ROUND_ROBIN' | 'SWISS' | 'SINGLE_ELIMINATION') => void;
t: Translator;
}) {
return (
<Grid grow>
<Grid.Col span={{ base: 12, sm: 4 }}>
<StageSelectCard
title={t('round_robin_label')}
description={t('round_robin_description')}
image="/icons/group-stage-item.svg"
selected={selectedType === 'ROUND_ROBIN'}
onClick={() => {
setSelectedType('ROUND_ROBIN');
}}
/>
</Grid.Col>
<Grid.Col span={{ base: 12, sm: 4 }}>
<StageSelectCard
title={t('single_elimination_label')}
description={t('single_elimination_description')}
image="/icons/single-elimination-stage-item.svg"
selected={selectedType === 'SINGLE_ELIMINATION'}
onClick={() => {
setSelectedType('SINGLE_ELIMINATION');
}}
/>
</Grid.Col>
<Grid.Col span={{ base: 12, sm: 4 }}>
<StageSelectCard
title={t('swiss_label')}
description={t('swiss_description')}
image="/icons/swiss-stage-item.svg"
selected={selectedType === 'SWISS'}
onClick={() => {
setSelectedType('SWISS');
}}
/>
</Grid.Col>
</Grid>
);
}
function TeamCountSelectElimination({ form }: { form: UseFormReturnType<any> }) {
const { t } = useTranslation();
@@ -27,7 +128,8 @@ function TeamCountSelectElimination({ form }: { form: UseFormReturnType<any> })
placeholder={t('team_count_select_elimination_placeholder')}
searchable
limit={20}
mt={24}
mt="1rem"
maw="50%"
{...form.getInputProps('team_count_elimination')}
/>
);
@@ -40,7 +142,8 @@ function TeamCountInputRoundRobin({ form }: { form: UseFormReturnType<any> }) {
withAsterisk
label={t('team_count_input_round_robin_label')}
placeholder=""
mt={24}
mt="1rem"
maw="50%"
{...form.getInputProps('team_count_round_robin')}
/>
);
@@ -62,6 +165,11 @@ function getTeamCount(values: any) {
);
}
interface FormValues {
type: 'ROUND_ROBIN' | 'SWISS' | 'SINGLE_ELIMINATION';
team_count_round_robin: number;
team_count_elimination: number;
}
export function CreateStageItemModal({
tournament,
stage,
@@ -76,7 +184,7 @@ export function CreateStageItemModal({
const { t } = useTranslation();
const [opened, setOpened] = useState(false);
const form = useForm({
const form = useForm<FormValues>({
initialValues: { type: 'ROUND_ROBIN', team_count_round_robin: 4, team_count_elimination: 2 },
validate: {
team_count_round_robin: (value) => (value >= 2 ? null : t('at_least_two_team_validation')),
@@ -98,6 +206,7 @@ export function CreateStageItemModal({
opened={opened}
onClose={() => setOpened(false)}
title={t('add_stage_item_modal_title')}
size="60rem"
>
<form
onSubmit={form.onSubmit(async (values) => {
@@ -118,17 +227,14 @@ export function CreateStageItemModal({
setOpened(false);
})}
>
<Select
withAsterisk
label={t('stage_type_select_label')}
allowDeselect={false}
data={[
{ value: 'ROUND_ROBIN', label: t('round_robin_label') },
{ value: 'SINGLE_ELIMINATION', label: t('single_elimination_label') },
{ value: 'SWISS', label: t('swiss_label') },
]}
{...form.getInputProps('type')}
<CreateStagesFromTemplateButtons
t={t}
selectedType={form.values.type}
setSelectedType={(_type) => {
form.setFieldValue('type', _type);
}}
/>
<Divider mt="1rem" />
<TeamCountInput form={form} />
<Button fullWidth mt="1.5rem" color="green" type="submit">