PromptEnhancer offers a fuller prompt with the words it adds washed, split at punctuation; Use this takes it into the field, Keep mine lets it go. StylePresetPicker and AspectRatioPicker are rows of Tab stops, the chosen one in accent; a ratio chip draws its shape. SeedInput keeps digits up to u32::MAX and rolls one with a die. NegativePromptInput and ImageGenerationPanel point to forms::TagInput and forms::Form. theme.generative() holds the chapter's sizes. The gallery's preset pictures are the atrium photo in five styles.
76 lines
1.3 KiB
Rust
76 lines
1.3 KiB
Rust
mod agent;
|
|
mod buttons;
|
|
mod charts;
|
|
mod chat;
|
|
mod collab;
|
|
mod data;
|
|
mod debug;
|
|
mod documents;
|
|
mod editor;
|
|
mod feedback;
|
|
mod finance;
|
|
mod forms;
|
|
mod generative;
|
|
mod git;
|
|
mod layout;
|
|
mod lists;
|
|
mod menus;
|
|
mod motion;
|
|
mod navigation;
|
|
mod overlays;
|
|
mod primitives;
|
|
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,
|
|
theme::PAGE,
|
|
];
|
|
|
|
pub use shell::{open_about, open_managed};
|
|
|
|
pub fn find(slug: &str) -> Option<usize> {
|
|
ALL.iter().position(|page| page.slug == slug)
|
|
}
|