From d3bf2d09f740221771806789b00bf915c9f5f2e3 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 26 Jan 2024 14:51:36 +0100 Subject: initial commit --- mobile-ns/app/app-root.xml | 2 ++ mobile-ns/app/app.css | 6 ++++ mobile-ns/app/app.ts | 14 ++++++++ mobile-ns/app/gallery-page.ts | 7 ++++ mobile-ns/app/gallery-page.xml | 7 ++++ mobile-ns/app/gallery-view-model.ts | 65 +++++++++++++++++++++++++++++++++++++ mobile-ns/app/main-page.ts | 7 ++++ mobile-ns/app/main-page.xml | 17 ++++++++++ mobile-ns/app/main-view-model.ts | 50 ++++++++++++++++++++++++++++ 9 files changed, 175 insertions(+) create mode 100644 mobile-ns/app/app-root.xml create mode 100644 mobile-ns/app/app.css create mode 100644 mobile-ns/app/app.ts create mode 100644 mobile-ns/app/gallery-page.ts create mode 100644 mobile-ns/app/gallery-page.xml create mode 100644 mobile-ns/app/gallery-view-model.ts create mode 100644 mobile-ns/app/main-page.ts create mode 100644 mobile-ns/app/main-page.xml create mode 100644 mobile-ns/app/main-view-model.ts (limited to 'mobile-ns/app') diff --git a/mobile-ns/app/app-root.xml b/mobile-ns/app/app-root.xml new file mode 100644 index 0000000..54e70d9 --- /dev/null +++ b/mobile-ns/app/app-root.xml @@ -0,0 +1,2 @@ + + diff --git a/mobile-ns/app/app.css b/mobile-ns/app/app.css new file mode 100644 index 0000000..14de482 --- /dev/null +++ b/mobile-ns/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-ns/app/app.ts b/mobile-ns/app/app.ts new file mode 100644 index 0000000..1947b6e --- /dev/null +++ b/mobile-ns/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-ns/app/gallery-page.ts b/mobile-ns/app/gallery-page.ts new file mode 100644 index 0000000..517ac8a --- /dev/null +++ b/mobile-ns/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-ns/app/gallery-page.xml b/mobile-ns/app/gallery-page.xml new file mode 100644 index 0000000..aa545e8 --- /dev/null +++ b/mobile-ns/app/gallery-page.xml @@ -0,0 +1,7 @@ + + + + +