Even more changes

This commit is contained in:
Tulir Asokan 2025-01-03 14:22:25 +02:00
parent f48a76e373
commit 7d2993c203
2 changed files with 11 additions and 11 deletions

View file

@ -72,14 +72,6 @@ div.right-panel-content.user {
} }
} }
input.text-input {
border: 0;
padding: 0; /* Necessary to prevent alignment issues with other cells */
width: 100%;
box-sizing: border-box;
border-bottom: 1px solid var(--blockquote-border-color);
}
div.displayname { div.displayname {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: bold; font-weight: bold;
@ -103,6 +95,14 @@ div.right-panel-content.user {
display: grid; display: grid;
gap: 0.25rem; gap: 0.25rem;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
> input {
border: 0;
padding: 0; /* Necessary to prevent alignment issues with other cells */
width: 100%;
box-sizing: border-box;
border-bottom: 1px solid var(--blockquote-border-color);
}
} }
hr { hr {

View file

@ -65,15 +65,15 @@ const SetTimeZoneElement = ({ tz, client, refreshProfile }: SetTimezoneProps) =>
) )
} }
const defaultValue = tz || getCurrentTimezone()
return <> return <>
<label htmlFor="userprofile-timezone-input">Set time zone:</label> <label htmlFor="userprofile-timezone-input">Set time zone:</label>
<input <input
list="timezones" list="timezones"
className="text-input"
id="userprofile-timezone-input" id="userprofile-timezone-input"
defaultValue={tz || getCurrentTimezone()} defaultValue={defaultValue}
onKeyDown={evt => evt.key === "Enter" && saveTz(evt.currentTarget.value)} onKeyDown={evt => evt.key === "Enter" && saveTz(evt.currentTarget.value)}
onBlur={evt => evt.currentTarget.value !== tz && saveTz(evt.currentTarget.value)} onBlur={evt => evt.currentTarget.value !== defaultValue && saveTz(evt.currentTarget.value)}
/> />
<datalist id="timezones"> <datalist id="timezones">
{zones.map((zone) => <option key={zone} value={zone} />)} {zones.map((zone) => <option key={zone} value={zone} />)}