add toast and alert overlays to the shell

This commit is contained in:
2026-11-10 16:43:48 +07:00
parent 37d95d3c75
commit 4de0029b03
8 changed files with 190 additions and 56 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ badge = []
input = ["button"]
clipboard = ["button"]
popover = []
scroll_area = []
scroll_area = ["scrollbar"]
scrollbar = ["scroll_area"]
segmented = []
separator = []
+1
View File
@@ -332,6 +332,7 @@ impl RenderOnce for AlertsView {
div()
.relative()
.w_full()
.debug_selector(|| "alert-entry".to_string())
.child(entry.alert.clone())
.with_animation(
("alert-enter", id),
+1
View File
@@ -14,6 +14,7 @@ use crate::common::v_flex;
pub type ChangeHandler = Rc<dyn Fn(bool, &mut Window, &mut App)>;
type ContentFn = Box<dyn Fn(&mut Window, &mut App) -> AnyElement>;
type ActionsFn = Box<dyn Fn(&mut Window, &mut App) -> Vec<AnyElement>>;
/// A centred panel over a dim scrim: the platform's modal.
#[derive(IntoElement)]
pub struct Dialog {
+1
View File
@@ -275,6 +275,7 @@ fn pill(entry: &ToastEntry, toasts: &Entity<Toasts>, cx: &App) -> gpui::Stateful
div()
.id(("toast", id))
.debug_selector(|| "toast-pill".to_string())
.max_w(px(480.))
.flex()
.items_center()