styles fixed + translations

This commit is contained in:
discollizard
2024-07-03 21:10:53 -03:00
parent 3e0ca90edb
commit aa7b72c563
5 changed files with 19 additions and 14 deletions

View File

@@ -22,7 +22,7 @@
"game_has_no_executable": "Jogo não possui executável selecionado", "game_has_no_executable": "Jogo não possui executável selecionado",
"sign_in": "Login", "sign_in": "Login",
"sort_by": "Ordenar por", "sort_by": "Ordenar por",
"latest_added": "Adicionado mais recente", "latest_added": "Adicionado recente",
"alphabetically": "Alfabeticamente", "alphabetically": "Alfabeticamente",
"last_launched": "Último jogado", "last_launched": "Último jogado",
"number_of_hours": "Qtd. de horas jogadas", "number_of_hours": "Qtd. de horas jogadas",

View File

@@ -7,7 +7,7 @@ export const select = recipe({
base: { base: {
display: "inline-flex", display: "inline-flex",
transition: "all ease 0.2s", transition: "all ease 0.2s",
width: "fit-content", width: "100%",
alignItems: "center", alignItems: "center",
borderRadius: "8px", borderRadius: "8px",
border: `1px solid ${vars.color.border}`, border: `1px solid ${vars.color.border}`,

View File

@@ -34,6 +34,7 @@ export function SelectField({
<select <select
id={id} id={id}
value={value} value={value}
style={{width: "100%"}}
className={styles.option} className={styles.option}
onFocus={() => setIsFocused(true)} onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)} onBlur={() => setIsFocused(false)}

View File

@@ -51,7 +51,6 @@ export function Sidebar() {
const location = useLocation(); const location = useLocation();
const sortedLibrary = useMemo(() => { const sortedLibrary = useMemo(() => {
console.log(library);
switch (sortParam) { switch (sortParam) {
case "latest_added": case "latest_added":
return sortBy(library, (game) => game.createdAt); return sortBy(library, (game) => game.createdAt);
@@ -226,6 +225,8 @@ export function Sidebar() {
<section className={styles.section}> <section className={styles.section}>
<small className={styles.sectionTitle}>{t("my_library")}</small> <small className={styles.sectionTitle}>{t("my_library")}</small>
<div style={{width: "102%"}}>
<SelectField <SelectField
label={t("sort_by")} label={t("sort_by")}
value={sortParam} value={sortParam}
@@ -236,7 +237,7 @@ export function Sidebar() {
label: t(option), label: t(option),
}))} }))}
/> />
</div>
<TextField <TextField
placeholder={t("filter")} placeholder={t("filter")}
onChange={handleFilter} onChange={handleFilter}

View File

@@ -121,16 +121,19 @@ export function SettingsGeneral() {
} }
/> />
<SelectField <div style={{width: "22%"}}>
label={t("language")} <SelectField
value={form.language} label={t("language")}
onChange={handleLanguageChange} value={form.language}
options={languageOptions.map((language) => ({ onChange={handleLanguageChange}
key: language.option, options={languageOptions.map((language) => ({
value: language.option, key: language.option,
label: language.nativeName, value: language.option,
}))} label: language.nativeName,
/> }))}
/>
</div>
<h3>{t("notifications")}</h3> <h3>{t("notifications")}</h3>
<> <>