Files
Ely-GPUI-Components/examples/gallery/pages/mod.rs
T
ZacharyZhang-NY c137ddb0f7 DB & Dev Tools · Databases: connections, schemas, queries, structure, Redis
A new chapter, src/devtools. ConnectionManager lists saved connections
with their engine and address, or why one failed, and connects on Enter;
ConnectionForm fills a connection with a port checked from 1 to 65535,
tests it and saves it. SchemaTree shows schemas, tables, views and
fields with keys marked; ERDiagram draws tables and their foreign keys
on NodeGraph, whose fixed wires show only the sockets that hold one.
QueryHistory finds past runs and runs one again; QueryPlanViewer shows
each step's share of the cost. TableStructureEditor edits fields in
place; IndexManager lists and draws up indexes; RedisKeyBrowser finds
keys by glob and lays out each type. QueryEditor is editor::CodeEditor,
whose lexer now knows SQL's words, and QueryResultGrid is
tables::DataGrid. lists::row_action keeps a row's button its own.
2026-09-27 08:51:45 -04:00

92 lines
1.5 KiB
Rust

mod agent;
mod buttons;
mod calendar;
mod canvas;
mod charts;
mod chat;
mod collab;
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,
theme::PAGE,
];
pub use shell::{open_about, open_managed};
pub fn find(slug: &str) -> Option<usize> {
ALL.iter().position(|page| page.slug == slug)
}