1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +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 { #state_ModsState {
// TODO: Update dimensions to use less build-time logic
.modsGrid { .modsGrid {
display: grid; display: grid;
grid-template-columns: 1fr auto; grid-template-columns: repeat(2, 1fr);
align-items: center; @include S(gap, 10px);
> h1 {
justify-self: start;
}
.openModsFolder {
background-color: $modsColor;
}
} }
.modsStats { .modsGrid.noMods {
@include PlainText; grid-template-columns: unset;
place-items: center;
}
.title b { .mod {
@include Text; width: 100%;
} box-sizing: border-box;
@include S(padding, 10px);
.advanced { @include S(border-radius, 4px);
@include SuperSmallText; background: #eee;
}
@include DarkThemeOverride { @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()); modElements.push(this.getNoModsMessage());
} }
return ( return <div class={`modsGrid ${hasMods ? "" : "noMods"}`}>{modElements}</div>;
<div class="content">
<div class={`modsGrid ${hasMods ? "" : "noMods"}`}>{modElements}</div>
</div>
);
} }
private getModElement(mod: Mod): HTMLElement { private getModElement(mod: Mod): HTMLElement {