Files
dawnline/web/src/portal/styles/devices.css
T
Aemeath ba231e7187
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
Dawnline 0.15.0
- The device menu (⋯) is an iOS-style menu on frosted glass: the copy
  actions show the address they copy, Rename, Reconnect and Remove sit
  under them, and one highlight glides from row to row
- The language picker shows flags; pick a language with a click, or
  press the pill and slide onto one. The flag and the code change in
  place
- The page's QR code opens as a small card under its button, with Copy
  link and Share
- All dropdowns look and behave the same: frosted glass, one open at a
  time, and a press outside, Escape or the button again closes them
- Setting a device up: when it can't finish connecting or connects but
  passes no data, the sheet keeps just the status and what it means.
  No data now says the router drops its traffic because the address
  doesn't match, and the device's card says "Connected, but no data"
  right away instead of "Connected"
- Setting a phone up from another device: Download and Copy for the
  connection sit on its row, next to the arrow
- On iPhone and iPad the caret shows as soon as a field is focused, the
  page no longer zooms on a pinch or a double tap, and sheets and their
  animations run smoother
- A press near the edge of a button or a card always counts, even as it
  shrinks under the pointer
- Animations settle without a jump at the end
- New green, orange and red
- The focus ring shows only while moving around with the keyboard
2026-10-22 04:02:54 +03:00

246 lines
5.5 KiB
CSS

/* "Your devices": the grid, a card per device (its glass icon, name and one-line status, ⋯; the week
as down and up over bars, or Connect or Reconnect), the card that adds one, the first device. */
.dgrid {
display: grid;
gap: 10px;
grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) {
.dgrid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.dev {
background: var(--raised);
border-radius: var(--r-card);
padding: 8px;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
container: card / inline-size;
/* How a card glides between its full and compact shapes (a window resized across 330 or 270 px). */
--fit: var(--spring-smooth-dur, 524ms) var(--spring-smooth, ease);
}
.dev.is-here {
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent);
}
.dev.off {
opacity: 0.5;
}
.dev-top {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 6px 6px 10px;
}
.dev-top .gi {
width: 32px;
height: 32px;
}
.dev-id {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.dev-name {
font-size: 16px;
line-height: 22px;
font-weight: 500;
letter-spacing: -0.02em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Every card the same height: a one-line status. */
.dev-stat {
font-size: 13px;
line-height: 18px;
color: var(--text-2);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dev-stat.ok-t {
color: var(--ok);
}
.dev-stat.warn-t {
color: var(--warn);
}
.dev-stat.here-t {
color: var(--accent);
}
/* Why a name it was given won't do (flows/rename.ts). */
.dev-stat.bad-t {
color: var(--bad);
}
/* A name the person may change (flows/rename.ts): it hugs its words, a faint wash under the pointer says it can
be clicked; editing, it gives way to its own input in the same font and place, with nothing around it but the
field's caret and selection. */
.dev-name.can-edit {
align-self: flex-start;
max-width: calc(100% + 12px);
margin: 0 -6px;
padding: 0 6px;
border-radius: 8px;
cursor: text;
outline: none;
transition: background-color 150ms var(--ease-out);
}
.dev-name.can-edit:hover {
background: color-mix(in srgb, var(--raised), var(--text) 6%);
}
/* Not when an edit gave focus back to it (flows/rename.ts): only reached with Tab. */
.kbd .dev-name.can-edit:focus-visible:not(.quiet) {
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent);
}
.field.inline,
.field.inline:focus-within {
height: 30px;
margin: -4px -6px;
padding: 0 6px;
gap: 0;
border-radius: 8px;
background: none;
box-shadow: none;
overflow: visible;
}
.field.inline input {
font: 500 16px/22px var(--font);
letter-spacing: -0.02em;
}
.dev-use {
margin-top: auto;
background: var(--field);
border-radius: var(--r-row);
padding: 12px 14px 12px 16px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 66px;
}
/* The words take what the bars leave, never more. */
.use-txt {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.use-lbl {
font-size: 13px;
line-height: 18px;
color: var(--text-2);
white-space: nowrap;
}
.use-val {
font-size: 17px;
line-height: 24px;
font-weight: 500;
letter-spacing: -0.02em;
transition:
font-size var(--fit),
line-height var(--fit);
}
.dev .setup-btn {
margin-top: auto;
}
/* A card under 330 px (a computer's two columns; the query reads inside its 8 px padding) keeps down and up on
one line by being compact: smaller numbers, thinner bars. A phone's card stays as it is. */
@container card (max-width: 313px) {
.use-val {
font-size: 15px;
line-height: 22px;
}
.bars-week {
--gap: 3px;
}
.bars-week i {
width: 4px;
border-radius: 2px;
}
}
/* The narrowest (under 270 px): a step smaller again, so a day under the pointer fits as well as the week. */
@container card (max-width: 253px) {
.use-val {
font-size: 14px;
line-height: 22px;
}
.use-val .ud {
column-gap: 8px;
}
}
.dev.add {
align-items: center;
justify-content: center;
min-height: 144px;
gap: 10px;
color: var(--text-2);
font-weight: 500;
transition:
background-color 200ms var(--ease-out),
transform 200ms var(--ease-out);
}
.dev.add:hover {
background: color-mix(in srgb, var(--raised), var(--knob) 45%);
}
/* On light the darker step would land on the page's own grey and the card would melt into it: a touch off white,
the words up to full colour. */
@media (prefers-color-scheme: light) {
.dev.add:hover {
background: color-mix(in srgb, var(--raised), var(--text) 2.5%);
color: var(--text);
}
}
.dev.add:active {
transform: scale(0.98);
}
.dev.add .gi {
width: 36px;
height: 36px;
}
/* Nothing yet: one card across the grid, what comes and the button. */
.dev.first {
grid-column: 1 / -1;
align-items: center;
text-align: center;
padding: 28px 24px 24px;
gap: 6px;
}
.dev.first .gi {
width: 44px;
height: 44px;
margin-bottom: 8px;
}
.dev.first b {
font-size: 18px;
line-height: 24px;
font-weight: 500;
letter-spacing: -0.02em;
}
.dev.first p {
margin: 0 0 14px;
color: var(--text-2);
font-size: 14px;
line-height: 20px;
max-width: 34ch;
text-wrap: balance;
}
.dev.first .btn {
max-width: 320px;
}
/* A jump of the cards' width: the new shape at once, with the layout (page/devices.ts). */
.dgrid.snap .dev * {
transition: none;
}
@media (prefers-reduced-motion: reduce) {
.use-val {
transition: none;
}
}