1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00

Fix broken mods state appearance

Not a complete rework. This is just a temporary improvement.
This commit is contained in:
Даниїл Григор'єв 2025-04-13 03:44:30 +03:00
parent c9d2a16ada
commit d95fce7033
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
2 changed files with 30 additions and 24 deletions

View File

@ -1,31 +1,41 @@
#state_ModsState {
// TODO: Update dimensions to use less build-time logic
.modsGrid {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
> h1 {
justify-self: start;
}
.openModsFolder {
background-color: $modsColor;
}
grid-template-columns: repeat(2, 1fr);
@include S(gap, 10px);
}
.modsStats {
@include PlainText;
.modsGrid.noMods {
grid-template-columns: unset;
place-items: center;
}
.title b {
@include Text;
}
.mod {
width: 100%;
box-sizing: border-box;
@include S(padding, 10px);
.advanced {
@include SuperSmallText;
}
@include S(border-radius, 4px);
background: #eee;
@include DarkThemeOverride {
background-color: $darkModeGameBackground;
background: lighten($darkModeControlsBackground, 5);
}
}
.mod > .title {
text-wrap: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.mod > .description {
@include PlainText();
}
.mod > .advanced {
@include PlainText();
color: $accentColorDark;
}
}

View File

@ -22,11 +22,7 @@ export class ModsState extends TextualGameState {
modElements.push(this.getNoModsMessage());
}
return (
<div class="content">
<div class={`modsGrid ${hasMods ? "" : "noMods"}`}>{modElements}</div>
</div>
);
return <div class={`modsGrid ${hasMods ? "" : "noMods"}`}>{modElements}</div>;
}
private getModElement(mod: Mod): HTMLElement {