From: Chris Duncan Date: Thu, 10 Oct 2024 21:41:31 +0000 (-0700) Subject: Extend Settings page to feature each setting item details on a separate page. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=6be4b0858da227bc400913187a0a129406cfca0d;p=nemo-wallet.git Extend Settings page to feature each setting item details on a separate page. --- diff --git a/app/settings/settings-item-detail/settings-item-detail-page.ts b/app/settings/settings-item-detail/settings-item-detail-page.ts new file mode 100644 index 0000000..6964552 --- /dev/null +++ b/app/settings/settings-item-detail/settings-item-detail-page.ts @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2024 Chris Duncan +// SPDX-License-Identifier: GPL-3.0-or-later + +import { EventData, View, NavigatedData, Page } from '@nativescript/core' +import { Item } from '../shared/item' + +export function onNavigatingTo (args: NavigatedData) { + const page = args.object as Page + const item = args.context as Item + page.bindingContext = item +} + +export function onBackButtonTap (args: EventData) { + const view = args.object as View + const page = view.page as Page + + page.frame.goBack() +} diff --git a/app/settings/settings-page.xml b/app/settings/settings-item-detail/settings-item-detail-page.xml similarity index 57% rename from app/settings/settings-page.xml rename to app/settings/settings-item-detail/settings-item-detail-page.xml index 45e30bf..b22e936 100644 --- a/app/settings/settings-page.xml +++ b/app/settings/settings-item-detail/settings-item-detail-page.xml @@ -8,16 +8,17 @@ SPDX-License-Identifier: GPL-3.0-or-later xmlns="http://schemas.nativescript.org/tns.xsd" > - - -