Dawnline 0.15.1
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
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
- Dropdowns (the ⋯ menu, the language picker, the page's QR card) open on a softer spring: they grow in without the wobble at the end - Renaming a device on its card: the hint under the name and a refusal take the status's place as whole words, and after a save the status comes back the same way - Cancelling a rename started while the status was still changing puts back what it said, not a mix of its old and new letters
This commit is contained in:
1 parent
3fadee87d3
commit
750564ab7e
10 files changed
+53
-44
No files matched your search
@@ -4,7 +4,7 @@
|
||||
// towards it, from where it stands), and the same ways to shut it: a press outside it and its button, Escape (the
|
||||
// sheet under it stays; focus goes back to the button), a resize (at once). Each lays out and fills its own.
|
||||
|
||||
import { EASE_IN, POP, play } from '../motion';
|
||||
import { EASE_IN, SOFT, play } from '../motion';
|
||||
|
||||
/** From its button, and from the screen's edge. */
|
||||
export const GAP = 8;
|
||||
@@ -26,7 +26,7 @@ function standing(el: Element): Keyframe {
|
||||
return { opacity: s.opacity, transform: s.transform, filter: s.filter === 'none' ? 'blur(0px)' : s.filter };
|
||||
}
|
||||
|
||||
/** In: a spring out of its transform origin. */
|
||||
/** In: a soft spring out of its transform origin (a little over, no wobble). */
|
||||
export function appear(el: Element) {
|
||||
play(
|
||||
el,
|
||||
@@ -34,7 +34,7 @@ export function appear(el: Element) {
|
||||
{ opacity: 0, transform: 'scale(.5)', filter: 'blur(6px)' },
|
||||
{ opacity: 1, transform: 'none', filter: 'blur(0px)' },
|
||||
],
|
||||
{ duration: POP.duration, easing: POP.easing },
|
||||
{ duration: SOFT.duration, easing: SOFT.easing },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -357,6 +357,8 @@ export function morphText(el: HTMLElement, next: string, from = textOf(el), o: M
|
||||
export interface Said {
|
||||
text: string;
|
||||
color: string;
|
||||
/** Its words change as a whole (`data-whole`: a hint standing in for a card's status): they blur across. */
|
||||
whole: boolean;
|
||||
}
|
||||
|
||||
/** The keyed texts under `root` (`data-t`), before a repaint rebuilds them. */
|
||||
@@ -364,7 +366,7 @@ export function textsOf(root: ParentNode): Map<string, Said> {
|
||||
return new Map(
|
||||
[...root.querySelectorAll<HTMLElement>('[data-t]')].map((el) => [
|
||||
el.dataset.t!,
|
||||
{ text: textOf(el), color: getComputedStyle(el).color },
|
||||
{ text: textOf(el), color: getComputedStyle(el).color, whole: el.hasAttribute('data-whole') },
|
||||
]),
|
||||
);
|
||||
}
|
||||
@@ -378,7 +380,7 @@ export function morphChanged(root: ParentNode, was: Map<string, Said>, fresh: El
|
||||
const before = was.get(el.dataset.t!);
|
||||
const now = textOf(el);
|
||||
if (!before || before.text === now || runs.has(el) || fresh.some((f) => f.contains(el))) return;
|
||||
morphText(el, now, before.text, { color: before.color });
|
||||
morphText(el, now, before.text, { color: before.color, whole: before.whole });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user