mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Fix MatchActionsBanPicker styles gone in the migration
This commit is contained in:
parent
3c95f3c15c
commit
52d41cfcc1
|
|
@ -0,0 +1,85 @@
|
|||
.mapPoolPicker {
|
||||
--map-width: 90px;
|
||||
--map-height: 50px;
|
||||
}
|
||||
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
border-bottom: 2px dotted var(--color-bg-higher);
|
||||
}
|
||||
|
||||
.divider {
|
||||
font-size: var(--font-xs);
|
||||
font-weight: var(--weight-semi);
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
gap: var(--s-2);
|
||||
}
|
||||
|
||||
.mapButton {
|
||||
background-image: var(--map-image-url);
|
||||
background-size: cover;
|
||||
height: var(--map-height);
|
||||
width: var(--map-width);
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
transition:
|
||||
filter,
|
||||
opacity 0.2s;
|
||||
border-radius: var(--radius-box);
|
||||
}
|
||||
|
||||
.mapButton:active {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.mapButtonGreyedOut {
|
||||
filter: grayscale(100%) !important;
|
||||
opacity: 0.4 !important;
|
||||
}
|
||||
|
||||
.mapButtonIcon {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
color: var(--color-success);
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mapButtonIconError {
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.mapButtonNumber {
|
||||
position: absolute;
|
||||
background-color: var(--color-text-accent);
|
||||
border-radius: 100%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--color-text-inverse);
|
||||
font-size: var(--font-2xs);
|
||||
font-weight: var(--weight-semi);
|
||||
top: -5px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mapButtonFrom {
|
||||
position: absolute;
|
||||
bottom: -15px;
|
||||
font-size: var(--font-xs);
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
|
||||
.mapButtonContainer {
|
||||
width: var(--map-width);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mapButtonLabel {
|
||||
font-size: var(--font-2xs);
|
||||
color: var(--color-text-high);
|
||||
font-weight: var(--weight-semi);
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ import { stageImageUrl } from "~/utils/urls";
|
|||
import * as PickBan from "../core/PickBan";
|
||||
import type { TournamentDataTeam } from "../core/Tournament.server";
|
||||
import type { TournamentMatchLoaderData } from "../loaders/to.$id.matches.$mid.server";
|
||||
import styles from "./MatchActionsBanPicker.module.css";
|
||||
|
||||
export function MatchActionsBanPicker({
|
||||
teams,
|
||||
|
|
@ -129,8 +130,8 @@ function MapPicker({
|
|||
.sort((a, b) => a.stageId - b.stageId);
|
||||
|
||||
return (
|
||||
<div key={mode} className="map-pool-picker stack sm">
|
||||
<Divider className="map-pool-picker__divider">
|
||||
<div key={mode} className={clsx(styles.mapPoolPicker, "stack sm")}>
|
||||
<Divider className={styles.divider}>
|
||||
<ModeImage mode={mode} size={32} />
|
||||
</Divider>
|
||||
<div
|
||||
|
|
@ -199,10 +200,12 @@ function MapButton({
|
|||
const { t } = useTranslation(["game-misc"]);
|
||||
|
||||
return (
|
||||
<div className="stack items-center relative">
|
||||
<div
|
||||
className={clsx("stack items-center relative", styles.mapButtonContainer)}
|
||||
>
|
||||
<button
|
||||
className={clsx("map-pool-picker__map-button", {
|
||||
"map-pool-picker__map-button__greyed-out": selected || disabled,
|
||||
className={clsx(styles.mapButton, {
|
||||
[styles.mapButtonGreyedOut]: selected || disabled,
|
||||
})}
|
||||
style={{ "--map-image-url": `url("${stageImageUrl(stageId)}.png")` }}
|
||||
onClick={onClick}
|
||||
|
|
@ -211,20 +214,15 @@ function MapButton({
|
|||
data-testid={!disabled && onClick ? "pick-ban-button" : undefined}
|
||||
/>
|
||||
{selected ? (
|
||||
<Check
|
||||
className="map-pool-picker__map-button__icon"
|
||||
onClick={onClick}
|
||||
/>
|
||||
<Check className={styles.mapButtonIcon} onClick={onClick} />
|
||||
) : null}
|
||||
{disabled ? (
|
||||
<X className="map-pool-picker__map-button__icon map-pool-picker__map-button__icon__error" />
|
||||
) : null}
|
||||
{number ? (
|
||||
<span className="map-pool-picker__map-button__number">{number}</span>
|
||||
<X className={clsx(styles.mapButtonIcon, styles.mapButtonIconError)} />
|
||||
) : null}
|
||||
{number ? <span className={styles.mapButtonNumber}>{number}</span> : null}
|
||||
{from ? (
|
||||
<span
|
||||
className={clsx("map-pool-picker__map-button__from", {
|
||||
className={clsx(styles.mapButtonFrom, {
|
||||
"text-theme": from === "BOTH",
|
||||
"text-success": from === "US",
|
||||
"text-error": from === "THEM",
|
||||
|
|
@ -233,8 +231,8 @@ function MapButton({
|
|||
{from === "BOTH" ? "Both" : from === "THEM" ? "Them" : "Us"}
|
||||
</span>
|
||||
) : null}
|
||||
<div className="map-pool-picker__map-button__label">
|
||||
{t(`game-misc:STAGE_${stageId}`)}
|
||||
<div className={styles.mapButtonLabel}>
|
||||
{t(`game-misc:STAGE_${stageId}`).split(" ")[0]}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user