game-details: Support adding games

This commit is contained in:
Jamie Gravendeel
2025-12-03 00:41:48 +01:00
committed by Laura Kramolis
parent 1383384cb5
commit fe8e41ecb7
5 changed files with 72 additions and 20 deletions

View File

@@ -15,6 +15,11 @@ template $Window: Adw.ApplicationWindow {
action: "action(win.show-hidden)";
}
Shortcut {
trigger: "<Control>n";
action: "action(win.add)";
}
Shortcut {
trigger: "<Control>w";
action: "action(window.close)";
@@ -22,8 +27,6 @@ template $Window: Adw.ApplicationWindow {
}
content: Adw.NavigationView navigation_view {
popped => $_edit_done();
Adw.NavigationPage {
title: bind template.title;
@@ -97,6 +100,13 @@ template $Window: Adw.ApplicationWindow {
};
};
[start]
Button {
icon-name: "list-add-symbolic";
tooltip-text: _("Add Game");
action-name: "win.add";
}
[end]
MenuButton {
icon-name: "open-menu-symbolic";
@@ -203,6 +213,7 @@ template $Window: Adw.ApplicationWindow {
child: Adw.StatusPage {
icon-name: bind template.application as <Application>.application-id;
title: _("No Games");
description: _("Use the + button to add games");
};
}
};