feat: inner-app dialog API support
This commit is contained in:
parent
43b478ee68
commit
29f0489c8a
3 changed files with 23 additions and 2 deletions
|
|
@ -60,7 +60,6 @@ impl SettingsApp {
|
|||
PageCommands::DesktopPanel => self.pages.page_id::<desktop::options::Page>(),
|
||||
PageCommands::Displays => self.pages.page_id::<display::Page>(),
|
||||
PageCommands::Firmware => self.pages.page_id::<system::firmware::Page>(),
|
||||
PageCommands::Keyboard => self.pages.page_id::<input::keyboard::Page>(),
|
||||
PageCommands::Mouse => self.pages.page_id::<input::mouse::Page>(),
|
||||
PageCommands::Network => None,
|
||||
PageCommands::Notifications => self.pages.page_id::<desktop::notifications::Page>(),
|
||||
|
|
@ -529,6 +528,12 @@ impl cosmic::Application for SettingsApp {
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn dialog(&self) -> Option<Element<Self::Message>> {
|
||||
self.pages
|
||||
.dialog(self.active_page)
|
||||
.map(|e| e.map(Message::PageMessage))
|
||||
}
|
||||
}
|
||||
|
||||
impl SettingsApp {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue