apply s'more

This commit is contained in:
tresabhi committed 2026-10-31 16:21:18 -05:00
1 parent 4245ae4b7b
commit e1d292c954
3 files changed
+46 -47

No files matched your search

@@ -32,6 +32,7 @@
padding-left: var(--gutter); padding-left: var(--gutter);
cursor: pointer; cursor: pointer;
user-select: none;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1,29 +1,13 @@
.nation-option { .nation {
/* width="calc(100% + calc(4 * var(--space-2)))" .flag {
height="100%" position: absolute;
position="absolute" top: 0;
right="0" right: 0;
mr="-2"
style={{
backgroundImage: `url(${alias("api", `/flags/scratched/${nation}.webp`)})`,
backgroundSize: "100%",
backgroundRepeat: "no-repeat",
backgroundPosition: "5rem center",
}} */
.overlay { width: var(--space-7);
/* width="100%" height: 100%;
height="100%"
style={{ background-size: 200%;
background: `linear-gradient(90deg, var(--gray-2) 50%, transparent)`, background-position: 0% 50%;
}} */
} }
} }
.overflow-plus {
/* ml="1" */
}
.shell-icon {
display: contents;
}
@@ -193,7 +193,7 @@ function TiersFilter() {
const tiers = tiersRaw.length === 0 ? TIERS : tiersRaw; const tiers = tiersRaw.length === 0 ? TIERS : tiersRaw;
return ( return (
<DropdownMenu.Root open modal={false}> <DropdownMenu.Root modal={false}>
<DropdownMenu.Trigger asChild> <DropdownMenu.Trigger asChild>
<Button size="minor" color="gray" variant="surface"> <Button size="minor" color="gray" variant="surface">
<Flex gap="1"> <Flex gap="1">
@@ -298,6 +298,7 @@ function NationsFilter() {
return ( return (
<DropdownMenu.CheckboxItem <DropdownMenu.CheckboxItem
className={styles.nation}
onClick={(event) => { onClick={(event) => {
event.preventDefault(); event.preventDefault();
@@ -311,21 +312,23 @@ function NationsFilter() {
}} }}
checked={selected} checked={selected}
key={nation} key={nation}
style={{
position: "relative",
}}
> >
<div className={styles["nation-option"]}> <DropdownMenu.ItemIndicator>
<div className={styles.overlay} /> <CheckIcon />
</div> </DropdownMenu.ItemIndicator>
<Text style={{ zIndex: 1 }}> <div
{ className={styles.flag}
strings.common.nations[ style={{
nation as keyof typeof strings.common.nations backgroundImage: `url(${alias("api", `/flags/scratched/${nation}.webp`)})`,
] }}
} />
</Text>
{
strings.common.nations[
nation as keyof typeof strings.common.nations
]
}
</DropdownMenu.CheckboxItem> </DropdownMenu.CheckboxItem>
); );
})} })}
@@ -342,8 +345,9 @@ function NationsFilter() {
}); });
}} }}
> >
<TrashIcon />
{strings.website.common.tank_search.clear} {strings.website.common.tank_search.clear}
<TrashIcon />
</DropdownMenu.Item> </DropdownMenu.Item>
</DropdownMenu.Content> </DropdownMenu.Content>
</DropdownMenu.Root> </DropdownMenu.Root>
@@ -402,12 +406,16 @@ function ClassFilter() {
}} }}
checked={selected} checked={selected}
> >
<DropdownMenu.ItemIndicator>
<CheckIcon />
</DropdownMenu.ItemIndicator>
{strings.common.tank_class_medium[tankClass]}
<ClassIcon <ClassIcon
class={tankClass} class={tankClass}
style={{ width: "1.25em", height: "1.25em" }} style={{ width: "1.25em", height: "1.25em" }}
/> />
{strings.common.tank_class_medium[tankClass]}
</DropdownMenu.CheckboxItem> </DropdownMenu.CheckboxItem>
); );
})} })}
@@ -424,8 +432,9 @@ function ClassFilter() {
}); });
}} }}
> >
<TrashIcon />
{strings.website.common.tank_search.clear} {strings.website.common.tank_search.clear}
<TrashIcon />
</DropdownMenu.Item> </DropdownMenu.Item>
</DropdownMenu.Content> </DropdownMenu.Content>
</DropdownMenu.Root> </DropdownMenu.Root>
@@ -561,6 +570,12 @@ function TypeFilter() {
checked={selected} checked={selected}
key={tankType} key={tankType}
> >
<DropdownMenu.ItemIndicator>
<CheckIcon />
</DropdownMenu.ItemIndicator>
{strings.common.tree_type[tankType]}
<ResearchedIcon <ResearchedIcon
style={{ style={{
color: `var(--${TANK_TYPE_COLORS[tankType]}-${ color: `var(--${TANK_TYPE_COLORS[tankType]}-${
@@ -571,8 +586,6 @@ function TypeFilter() {
height: "1.25em", height: "1.25em",
}} }}
/> />
{strings.common.tree_type[tankType]}
</DropdownMenu.CheckboxItem> </DropdownMenu.CheckboxItem>
); );
})} })}
@@ -589,8 +602,9 @@ function TypeFilter() {
}); });
}} }}
> >
<TrashIcon />
{strings.website.common.tank_search.clear} {strings.website.common.tank_search.clear}
<TrashIcon />
</DropdownMenu.Item> </DropdownMenu.Item>
</DropdownMenu.Content> </DropdownMenu.Content>
</DropdownMenu.Root> </DropdownMenu.Root>