mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 18:52:39 +00:00
* feat(app): streamline sidebar usage and stacked sheets * fix(app): restore compact sidebar navigation clicks The close button container emitted box-none through Unistyles as invalid CSS and intercepted New workspace clicks. Let React Native apply click-through behavior at the view boundary. Keep the import journey on its existing New workspace screen and assert only the visible transcript. * fix(app): cap menu sheets at eighty percent height Keep long sidebar usage reports recognizably sheet-sized while allowing the content to scroll. Short menu sheets retain dynamic sizing.
13 lines
456 B
TypeScript
13 lines
456 B
TypeScript
import { usedPercent } from "./model";
|
|
import type { UsageTone, UsageWindow } from "./types";
|
|
|
|
/** The source's tone for a window, or one derived from how much of it is used. */
|
|
export function windowTone(window: UsageWindow): UsageTone {
|
|
if (window.tone) return window.tone;
|
|
const usedPct = usedPercent(window);
|
|
if (usedPct == null) return "default";
|
|
if (usedPct > 90) return "danger";
|
|
if (usedPct >= 70) return "warning";
|
|
return "default";
|
|
}
|