Skip to content

Commit f790887

Browse files
committed
feat: update view label to specify what is being viewed
1 parent 7f1d341 commit f790887

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/view/action_page.rs

+12
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ mod imp {
3030
pub(super) show_view_artifact: Cell<bool>,
3131
#[template_child]
3232
pub(super) status_page: TemplateChild<adw::StatusPage>,
33+
#[template_child]
34+
pub(super) view_artifact_button: TemplateChild<gtk::Button>,
3335
}
3436

3537
#[glib::object_subclass]
@@ -183,6 +185,16 @@ impl ActionPage {
183185
PruneVolumes => gettext("Volumes Pruned"),
184186
_ => unreachable!(),
185187
});
188+
imp.view_artifact_button
189+
.set_label(&match action.action_type() {
190+
DownloadImage => gettext("View Image"),
191+
BuildImage => gettext("View Image"),
192+
CreateContainer => gettext("View Container"),
193+
CreateAndRunContainer => gettext("View Container"),
194+
Pod => gettext("View Pod"),
195+
Volume => gettext("View Volume"),
196+
_ => unreachable!(),
197+
});
186198
}
187199
Aborted => {
188200
imp.status_page.set_title(&match action.action_type() {

0 commit comments

Comments
 (0)