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

@@ -5,7 +5,8 @@ using Adw 1;
template $GameDetails: Adw.NavigationPage {
name: "details";
tag: "details";
title: bind template.game as <$Game>.name;
title: bind $_or(template.game as <$Game>.name, _("Add Game")) as <string>;
hidden => $_exit();
child: Adw.BreakpointBin {
width-request: bind template.root as <Widget>.width-request;
@@ -297,7 +298,7 @@ template $GameDetails: Adw.NavigationPage {
Button {
action-name: "details.edit-done";
label: _("Apply");
label: bind $_if_else(template.game as <$Game>.added, _("Apply"), _("Add")) as <string>;
halign: center;
styles [