refactor dialogs
This commit is contained in:
@@ -13,9 +13,9 @@ use person::PersonRegistry;
|
||||
use state::NostrRegistry;
|
||||
use theme::ActiveTheme;
|
||||
use ui::button::{Button, ButtonVariants};
|
||||
use ui::dialog::DialogButtonProps;
|
||||
use ui::dock::{DockArea, DockPlacement, PanelHandle};
|
||||
use ui::input::{Input, InputEvent, InputState};
|
||||
use ui::modal::ModalButtonProps;
|
||||
use ui::nav::Nav;
|
||||
use ui::{Disableable, IconName, Selectable, Sizable, WindowExtension, h_flex, v_flex};
|
||||
|
||||
@@ -27,14 +27,14 @@ const MAX_MEMBERS: usize = 3;
|
||||
pub fn open(dock: WeakEntity<DockArea>, window: &mut Window, cx: &mut App) {
|
||||
let view = cx.new(|cx| NewChat::new(dock, window, cx));
|
||||
|
||||
window.open_modal(cx, {
|
||||
window.open_dialog(cx, {
|
||||
let view = view.clone();
|
||||
move |this, _window, _cx| {
|
||||
this.width(px(420.))
|
||||
.title("New chat")
|
||||
.confirm()
|
||||
.button_props(
|
||||
ModalButtonProps::default()
|
||||
DialogButtonProps::default()
|
||||
.cancel_text("Cancel")
|
||||
.ok_text("Start"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user