From 466d03a38cb01e9ff9a2d11be113a81c2bdce34a Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 25 Jan 2024 20:40:16 +0100 Subject: initial commit --- mobile/app/app-root.xml | 2 ++ mobile/app/app.css | 6 +++++ mobile/app/app.ts | 14 +++++++++++ mobile/app/gallery-page.ts | 7 ++++++ mobile/app/gallery-page.xml | 7 ++++++ mobile/app/gallery-view-model.ts | 51 ++++++++++++++++++++++++++++++++++++++++ mobile/app/main-page.ts | 7 ++++++ mobile/app/main-page.xml | 17 ++++++++++++++ mobile/app/main-view-model.ts | 29 +++++++++++++++++++++++ 9 files changed, 140 insertions(+) create mode 100644 mobile/app/app-root.xml create mode 100644 mobile/app/app.css create mode 100644 mobile/app/app.ts create mode 100644 mobile/app/gallery-page.ts create mode 100644 mobile/app/gallery-page.xml create mode 100644 mobile/app/gallery-view-model.ts create mode 100644 mobile/app/main-page.ts create mode 100644 mobile/app/main-page.xml create mode 100644 mobile/app/main-view-model.ts (limited to 'mobile/app') diff --git a/mobile/app/app-root.xml b/mobile/app/app-root.xml new file mode 100644 index 0000000..54e70d9 --- /dev/null +++ b/mobile/app/app-root.xml @@ -0,0 +1,2 @@ + + diff --git a/mobile/app/app.css b/mobile/app/app.css new file mode 100644 index 0000000..14de482 --- /dev/null +++ b/mobile/app/app.css @@ -0,0 +1,6 @@ +@import '@nativescript/theme/css/core.css'; +@import '@nativescript/theme/css/default.css'; + +Button.-primary { + font-size: 18; +} diff --git a/mobile/app/app.ts b/mobile/app/app.ts new file mode 100644 index 0000000..1947b6e --- /dev/null +++ b/mobile/app/app.ts @@ -0,0 +1,14 @@ +/* +In NativeScript, the app.ts file is the entry point to your application. +You can use this file to perform app-level initialization, but the primary +purpose of the file is to pass control to the app’s first module. +*/ + +import { Application } from '@nativescript/core'; + +Application.run({ moduleName: 'app-root' }); + +/* +Do not place any code after the application has been started as it will not +be executed on iOS. +*/ diff --git a/mobile/app/gallery-page.ts b/mobile/app/gallery-page.ts new file mode 100644 index 0000000..517ac8a --- /dev/null +++ b/mobile/app/gallery-page.ts @@ -0,0 +1,7 @@ +import { EventData, Page } from '@nativescript/core' +import { GalleryModel } from './gallery-view-model'; + +export function navigatingTo(args: EventData) { + const page = args.object; + page.bindingContext = new GalleryModel(); +} diff --git a/mobile/app/gallery-page.xml b/mobile/app/gallery-page.xml new file mode 100644 index 0000000..aa545e8 --- /dev/null +++ b/mobile/app/gallery-page.xml @@ -0,0 +1,7 @@ + + + + +