Files
Ely-GPUI-Components/examples/gallery/pages/mod.rs
T
ZacharyZhang-NY 9fddf4b6bf Dashboard: a grid of widgets, what fires, what is up, and the stream
DashboardGrid lays widgets on columns: a tile's strip drags it and its
corner resizes it a cell at a time, others move down and rise to fill
gaps, a focused tile steps with the arrows, and under the theme's
stack_below width the tiles stand in one column. DashboardCard frames a
widget. AlertList acknowledges a firing alert from its row and opens
one on Enter; IncidentCard shows an incident's gravity, phase and
updates. UptimeBar, ServiceStatus and HealthCheck show what is up, a
check's detail wrapping under its name when narrow. EventStream keeps
kinds and holds the list while new events count up.
RefreshIntervalSelector and DashboardFilterBar set the window, the
filters and the refresh. StatCard, MetricsChart, ResourceGauge,
LogStream, TraceWaterfall, SystemMonitor, ProcessTable and NetworkGraph
point to their homes; the maps wait for T41.
2026-09-27 11:51:19 -04:00

94 lines
1.6 KiB
Rust

mod agent;
mod buttons;
mod calendar;
mod canvas;
mod charts;
mod chat;
mod collab;
mod dashboard;
mod data;
mod debug;
mod devtools;
mod documents;
mod editor;
mod feedback;
mod files;
mod finance;
mod forms;
mod generative;
mod git;
mod layout;
mod lists;
mod mail;
mod media;
mod menus;
mod messaging;
mod motion;
mod navigation;
mod overlays;
mod primitives;
mod project;
mod shell;
mod tables;
mod terminal;
mod theme;
mod typography;
use gpui::{AnyElement, App, Window};
use crate::script::Step;
pub struct Page {
pub number: u8,
pub slug: &'static str,
pub title: &'static str,
pub summary: &'static str,
pub render: fn(&mut Window, &mut App) -> AnyElement,
/// Interactions shot after the static pages.
pub script: &'static [Step],
}
pub const ALL: &[Page] = &[
primitives::PAGE,
typography::PAGE,
layout::PAGE,
shell::PAGE,
buttons::PAGE,
forms::PAGE,
navigation::PAGE,
menus::PAGE,
overlays::PAGE,
feedback::PAGE,
motion::PAGE,
data::PAGE,
lists::PAGE,
tables::PAGE,
charts::PAGE,
finance::PAGE,
editor::PAGE,
terminal::PAGE,
git::PAGE,
debug::PAGE,
documents::PAGE,
collab::PAGE,
chat::PAGE,
agent::PAGE,
generative::PAGE,
media::PAGE,
files::PAGE,
messaging::PAGE,
mail::PAGE,
calendar::PAGE,
project::PAGE,
canvas::PAGE,
devtools::PAGE,
dashboard::PAGE,
theme::PAGE,
];
pub use shell::{open_about, open_managed};
pub fn find(slug: &str) -> Option<usize> {
ALL.iter().position(|page| page.slug == slug)
}