Add Discover Integrations button
This commit is contained in:
@ -74,14 +74,26 @@ template $NotifyWindow : Adw.ApplicationWindow {
|
|||||||
Adw.StatusPage welcome_view {
|
Adw.StatusPage welcome_view {
|
||||||
title: "Notify";
|
title: "Notify";
|
||||||
description: "Subscribe to one topic and start listening for notifications";
|
description: "Subscribe to one topic and start listening for notifications";
|
||||||
child: Gtk.Button {
|
child: Gtk.Box {
|
||||||
label: "Subscribe To Topic";
|
orientation: vertical;
|
||||||
clicked => $show_add_topic() swapped;
|
spacing: 8;
|
||||||
halign: center;
|
Gtk.Button {
|
||||||
styles [
|
label: "Subscribe To Topic";
|
||||||
"suggested-action",
|
clicked => $show_add_topic() swapped;
|
||||||
"pill"
|
halign: center;
|
||||||
]
|
styles [
|
||||||
|
"suggested-action",
|
||||||
|
"pill"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Gtk.Button {
|
||||||
|
label: "Discover Integrations";
|
||||||
|
clicked => $discover_integrations() swapped;
|
||||||
|
halign: center;
|
||||||
|
styles [
|
||||||
|
"pill"
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
ScrolledWindow list_view {
|
ScrolledWindow list_view {
|
||||||
|
|||||||
@ -139,6 +139,14 @@ mod imp {
|
|||||||
None
|
None
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#[template_callback]
|
||||||
|
fn discover_integrations(&self, _btn: >k::Button) {
|
||||||
|
gtk::UriLauncher::new("https://docs.ntfy.sh/integrations/").launch(
|
||||||
|
Some(&self.obj().clone()),
|
||||||
|
gio::Cancellable::NONE,
|
||||||
|
|_| {},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[glib::object_subclass]
|
#[glib::object_subclass]
|
||||||
|
|||||||
Reference in New Issue
Block a user