mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 09:48:12 +08:00
Remove the "coming soon" dialog and hide not-yet-ready features/tools
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
use crate::messages::layout::utility_types::widget_prelude::*;
|
||||
use crate::messages::prelude::*;
|
||||
|
||||
/// A dialog to notify users of an unfinished issue, optionally with an issue number.
|
||||
pub struct ComingSoonDialog {
|
||||
pub issue: Option<u32>,
|
||||
}
|
||||
|
||||
impl DialogLayoutHolder for ComingSoonDialog {
|
||||
const ICON: &'static str = "Delay";
|
||||
const TITLE: &'static str = "Coming Soon";
|
||||
|
||||
fn layout_buttons(&self) -> Layout {
|
||||
let widgets = vec![TextButton::new("OK").emphasized(true).on_update(|_| FrontendMessage::DisplayDialogDismiss.into()).widget_instance()];
|
||||
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
impl LayoutHolder for ComingSoonDialog {
|
||||
fn layout(&self) -> Layout {
|
||||
let header = vec![TextLabel::new("You've stumbled upon a placeholder").bold(true).widget_instance()];
|
||||
let row1 = vec![TextLabel::new("This feature is not implemented yet.").widget_instance()];
|
||||
|
||||
let mut rows = vec![LayoutGroup::Row { widgets: header }, LayoutGroup::Row { widgets: row1 }];
|
||||
|
||||
if let Some(issue) = self.issue {
|
||||
let row2 = vec![TextLabel::new("But you can help build it! Visit its issue:").widget_instance()];
|
||||
let row3 = vec![
|
||||
TextButton::new(format!("GitHub Issue #{issue}"))
|
||||
.icon(Some("Website".into()))
|
||||
.flush(true)
|
||||
.on_update(move |_| {
|
||||
FrontendMessage::TriggerVisitLink {
|
||||
url: format!("https://github.com/GraphiteEditor/Graphite/issues/{issue}"),
|
||||
}
|
||||
.into()
|
||||
})
|
||||
.widget_instance(),
|
||||
];
|
||||
|
||||
rows.push(LayoutGroup::Row { widgets: row2 });
|
||||
rows.push(LayoutGroup::Row { widgets: row3 });
|
||||
}
|
||||
|
||||
Layout(rows)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
mod about_graphite_dialog;
|
||||
mod close_all_documents_dialog;
|
||||
mod close_document_dialog;
|
||||
mod coming_soon_dialog;
|
||||
mod demo_artwork_dialog;
|
||||
mod error_dialog;
|
||||
mod licenses_dialog;
|
||||
@@ -10,7 +9,6 @@ mod licenses_third_party_dialog;
|
||||
pub use about_graphite_dialog::AboutGraphiteDialog;
|
||||
pub use close_all_documents_dialog::CloseAllDocumentsDialog;
|
||||
pub use close_document_dialog::CloseDocumentDialog;
|
||||
pub use coming_soon_dialog::ComingSoonDialog;
|
||||
pub use demo_artwork_dialog::ARTWORK;
|
||||
pub use demo_artwork_dialog::DemoArtworkDialog;
|
||||
pub use error_dialog::ErrorDialog;
|
||||
|
||||
Reference in New Issue
Block a user