diff --git a/.gitignore b/.gitignore index 9b103d8..a1f724f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +_del +_test + 04_poc **/*del **/*bak diff --git a/03_source/mobile.trunk.1/.editorconfig b/03_source/mobile.trunk.1/.editorconfig deleted file mode 100644 index f1cc3ad..0000000 --- a/03_source/mobile.trunk.1/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false diff --git a/03_source/mobile.trunk.1/.firebaserc b/03_source/mobile.trunk.1/.firebaserc deleted file mode 100644 index 711741d..0000000 --- a/03_source/mobile.trunk.1/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "ionic-react-conference-app" - } -} diff --git a/03_source/mobile.trunk.1/.github/CONTRIBUTING.md b/03_source/mobile.trunk.1/.github/CONTRIBUTING.md deleted file mode 100644 index 20ff866..0000000 --- a/03_source/mobile.trunk.1/.github/CONTRIBUTING.md +++ /dev/null @@ -1,59 +0,0 @@ -# Contributing to the Ionic React Conference Application - -Thank you for taking the time to contribute! :tada::+1: - -The following is a set of guidelines for contributing to the conference app. These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request. - -## Table of Contents -- [Reporting Issues](#reporting-issues) - - [Before Submitting an Issue](#before-submitting-an-issue) - - [Determining the Repository](#determining-the-repository) - - [Submitting the Issue](#submitting-the-issue) -- [Submitting a Pull Request](#submitting-a-pull-request) - - [Guidelines for Submitting](#guidelines-for-submitting) - - [Code Style](#code-style) - -## Reporting Issues - -Before submitting an issue, please go through [the list below](#before-submitting-an-issue) as you might find a solution to your issue. - -### Before Submitting an Issue - -* Make sure you get the latest version of the code and run through the [Getting Started](https://github.com/ionic-team/ionic-react-conference-app#getting-started) steps to see if this resolves your issue. -* Check the [forum](https://forum.ionicframework.com) for similar questions and answers. -* Go through [all issues](https://github.com/ionic-team/ionic-react-conference-app/issues?utf8=%E2%9C%93&q=is%3Aissue) on this repository to see if the issue has already been created. It could have been closed with a resolution, so check closed issues, too. -* Chat with us on [Discord](https://ionic.link/discord) to see if we can find a solution to the problem! -* [Determine which repository](#determining-the-repository) the problem should be reported in. - -### Determining the Repository - -There are several repositories being used for Ionic, which makes it difficult to determine which one to report an issue to. Don't worry if you aren't sure, we can always move it! - -* The [Ionic Framework repository](https://github.com/ionic-team/ionic-framework) is a repository for all things related to the Ionic Framework. If you are able to reproduce the issue in any of the Ionic starters (or an existing project), you'll want to submit the issue [here](https://github.com/ionic-team/ionic-framework/issues). -* The [Ionic CLI repository](https://github.com/ionic-team/ionic-cli) contains all of the code that allows you to run `ionic` commands from a terminal window. It is safe to put any issues [here](https://github.com/ionic-team/ionic-cli/issues) that relate to running an `ionic` command. -* **This repository** is a demo of the Ionic Framework. If you find an issue with this app that does not occur on [a new app](https://ionicframework.com/docs/intro/cli#start-an-app), please submit the issue [here](https://github.com/ionic-team/ionic-react-conference-app/issues). - -### Submitting the Issue - -* **Use a clear and descriptive title** for the issue to identify the problem. This makes it easier for others to find. -* **Describe the exact steps to reproduce the problem** with as many details as needed. -* **Provide your configuration** by running `ionic info` in a terminal from *within* the project folder and pasting this information in the issue. - -## Submitting a Pull Request - -### Guidelines for Submitting - -When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, do not bundle more than one "feature" or bug fix per PR. Doing so makes it very hard to accept it if one of the fixes has issues. - -It's always best to create two smaller PRs than one big one. - -Talk to us before creating a PR that refactors the code or directory structure of the project. This project is constantly changing to reflect the latest version of Ionic Framework so sometimes it will be in the process of getting fixed. - -### Code Style - -Make sure to follow the existing code style as much as possible. - -* No underscores prefixing JS functions. -* Use flat Sass: - * **Don't** use [BEM conventions](https://css-tricks.com/bem-101/) - * Avoid nesting selectors. This is done to make it easier for users without Sass experience to understand and read. diff --git a/03_source/mobile.trunk.1/.gitignore b/03_source/mobile.trunk.1/.gitignore deleted file mode 100644 index 9b9e15d..0000000 --- a/03_source/mobile.trunk.1/.gitignore +++ /dev/null @@ -1,89 +0,0 @@ -**/*Zone.Identifier -**/*bak -**/*del -**/*log -**/*tmp - -# Logs -.firebase -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/dist - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -.stencil/ diff --git a/03_source/mobile.trunk.1/.netlify/_redirects b/03_source/mobile.trunk.1/.netlify/_redirects deleted file mode 100644 index 50a4633..0000000 --- a/03_source/mobile.trunk.1/.netlify/_redirects +++ /dev/null @@ -1 +0,0 @@ -/* /index.html 200 \ No newline at end of file diff --git a/03_source/mobile.trunk.1/.netlify/state.json b/03_source/mobile.trunk.1/.netlify/state.json deleted file mode 100644 index f97268e..0000000 --- a/03_source/mobile.trunk.1/.netlify/state.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "siteId": "86675615-6271-4145-8ffe-9c78dc4d34a3" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/.prettierrc b/03_source/mobile.trunk.1/.prettierrc deleted file mode 100644 index ecf89ac..0000000 --- a/03_source/mobile.trunk.1/.prettierrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "tabWidth": 2, - "semi": true, - "singleQuote": true, - "trailingComma": "es5", - "printWidth": 100, - "overrides": [ - { - "files": "src/App.tsx", - "options": { - "printWidth": 160 - } - }, - { - "files": "src/routes/*", - "options": { - "printWidth": 160 - } - }, - { - "files": [ - "*.html", - "legacy/**/*.js" - ], - "options": { - "tabWidth": 4 - } - } - ] -} diff --git a/03_source/mobile.trunk.1/.vscode/settings.json b/03_source/mobile.trunk.1/.vscode/settings.json deleted file mode 100644 index 3662b37..0000000 --- a/03_source/mobile.trunk.1/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "typescript.tsdk": "node_modules/typescript/lib" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/LICENSE b/03_source/mobile.trunk.1/LICENSE deleted file mode 100644 index 623c70a..0000000 --- a/03_source/mobile.trunk.1/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2015-present Drifty Co. -http://drifty.com/ - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/03_source/mobile.trunk.1/README.md b/03_source/mobile.trunk.1/README.md deleted file mode 100644 index 7a24529..0000000 --- a/03_source/mobile.trunk.1/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Ionic React Conference App - -[![Built with Ionic](https://img.shields.io/badge/-Built%20with%20Ionic-3880FF?style=flat&logo=ionic&logoColor=white)](https://ionicframework.com) -[![React](https://img.shields.io/badge/-React-61DAFB?style=flat&logo=react&logoColor=black)](https://reactjs.org) -[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) - - -This is a **kitchen-sink demo application** built with **Ionic Framework** and **React**. It showcases a wide range of Ionic components and features in the context of a fictional tech conference app. - -**Note**: There is no actual Ionic Conference. This project is purely for demonstration purposes. - -👉 [Try the Live Demo](https://ionic-react-conference-app-git-main-ionic1.vercel.app/tutorial) - -## 🧱 Framework Variants - -This app is also available in other frameworks: - -- 🔗 [Ionic Angular Conference App](https://github.com/ionic-team/ionic-conference-app) -- 🔗 [Ionic Vue Conference App](https://github.com/ionic-team/ionic-vue-conference-app) -- ✅ **You're viewing the React version** - -## ✨ Features - -- Browse conference schedule with filtering -- View speaker bios and session details -- User authentication and profile management -- Interactive maps for venue navigation -- Push notifications support -- Dark/Light mode toggling -- Cross-platform support: iOS, Android, and Web - -## ⚙️ Getting Started - -### Prerequisites - -- Node.js (LTS version recommended) → [Download](https://nodejs.org/) -- npm (included with Node.js) -- Ionic CLI → Install globally: - ```bash - npm install -g ionic - ``` - -### Installation -1. Clone the repository: - ```bash - git clone https://github.com/ionic-team/ionic-react-conference-app.git - ``` -2. Navigate into the project: - ```bash - cd ionic-react-conference-app - ``` -3. Install dependencies: - ```bash - npm install - ``` -4. Start the dev server: - ```bash - ionic serve - ``` -5. Open your browser to: - ``` - http://localhost:3000 - ``` - -## 🤝 Contributing - -We welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project. - -## 📄 License - -This project is licensed under the MIT [License](./LICENSE). diff --git a/03_source/mobile.trunk.1/android/.gitignore b/03_source/mobile.trunk.1/android/.gitignore deleted file mode 100644 index 48354a3..0000000 --- a/03_source/mobile.trunk.1/android/.gitignore +++ /dev/null @@ -1,101 +0,0 @@ -# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore - -# Built application files -*.apk -*.aar -*.ap_ -*.aab - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ -# Uncomment the following line in case you need and you don't have the release build type files in your app -# release/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# IntelliJ -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/assetWizardSettings.xml -.idea/dictionaries -.idea/libraries -# Android Studio 3 in .gitignore file. -.idea/caches -.idea/modules.xml -# Comment next line if keeping position of elements in Navigation Editor is relevant for you -.idea/navEditor.xml - -# Keystore files -# Uncomment the following lines if you do not want to check your keystore files in. -#*.jks -#*.keystore - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild -.cxx/ - -# Google Services (e.g. APIs or Firebase) -# google-services.json - -# Freeline -freeline.py -freeline/ -freeline_project_description.json - -# fastlane -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output -fastlane/readme.md - -# Version control -vcs.xml - -# lint -lint/intermediates/ -lint/generated/ -lint/outputs/ -lint/tmp/ -# lint/reports/ - -# Android Profiling -*.hprof - -# Cordova plugins for Capacitor -capacitor-cordova-android-plugins - -# Copied web assets -app/src/main/assets/public - -# Generated Config files -app/src/main/assets/capacitor.config.json -app/src/main/assets/capacitor.plugins.json -app/src/main/res/xml/config.xml diff --git a/03_source/mobile.trunk.1/android/app/.gitignore b/03_source/mobile.trunk.1/android/app/.gitignore deleted file mode 100644 index 043df80..0000000 --- a/03_source/mobile.trunk.1/android/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/build/* -!/build/.npmkeep diff --git a/03_source/mobile.trunk.1/android/app/build.gradle b/03_source/mobile.trunk.1/android/app/build.gradle deleted file mode 100644 index 6011e85..0000000 --- a/03_source/mobile.trunk.1/android/app/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -apply plugin: 'com.android.application' - -android { - namespace "io.ionic.starter" - compileSdk rootProject.ext.compileSdkVersion - defaultConfig { - applicationId "io.ionic.starter" - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - aaptOptions { - // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. - // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 - ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' - } - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -repositories { - flatDir{ - dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' - } -} - -dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" - implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" - implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" - implementation project(':capacitor-android') - testImplementation "junit:junit:$junitVersion" - androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" - androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" - implementation project(':capacitor-cordova-android-plugins') -} - -apply from: 'capacitor.build.gradle' - -try { - def servicesJSON = file('google-services.json') - if (servicesJSON.text) { - apply plugin: 'com.google.gms.google-services' - } -} catch(Exception e) { - logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") -} diff --git a/03_source/mobile.trunk.1/android/app/capacitor.build.gradle b/03_source/mobile.trunk.1/android/app/capacitor.build.gradle deleted file mode 100644 index ca48bc2..0000000 --- a/03_source/mobile.trunk.1/android/app/capacitor.build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN - -android { - compileOptions { - sourceCompatibility JavaVersion.VERSION_21 - targetCompatibility JavaVersion.VERSION_21 - } -} - -apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" -dependencies { - implementation project(':capacitor-barcode-scanner') - implementation project(':capacitor-clipboard') - implementation project(':capacitor-geolocation') - implementation project(':capacitor-google-maps') - implementation project(':capacitor-preferences') - implementation project(':capacitor-share') - -} - - -if (hasProperty('postBuildExtras')) { - postBuildExtras() -} diff --git a/03_source/mobile.trunk.1/android/app/proguard-rules.pro b/03_source/mobile.trunk.1/android/app/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/03_source/mobile.trunk.1/android/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/03_source/mobile.trunk.1/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/03_source/mobile.trunk.1/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java deleted file mode 100644 index f2c2217..0000000 --- a/03_source/mobile.trunk.1/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import android.content.Context; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.platform.app.InstrumentationRegistry; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - - assertEquals("com.getcapacitor.app", appContext.getPackageName()); - } -} diff --git a/03_source/mobile.trunk.1/android/app/src/main/AndroidManifest.xml b/03_source/mobile.trunk.1/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 340e7df..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/03_source/mobile.trunk.1/android/app/src/main/java/io/ionic/starter/MainActivity.java b/03_source/mobile.trunk.1/android/app/src/main/java/io/ionic/starter/MainActivity.java deleted file mode 100644 index 73e3a98..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/java/io/ionic/starter/MainActivity.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.ionic.starter; - -import com.getcapacitor.BridgeActivity; - -public class MainActivity extends BridgeActivity {} diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-hdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-hdpi/splash.png deleted file mode 100644 index 90e8400..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-hdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-mdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-mdpi/splash.png deleted file mode 100644 index 990610d..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-mdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xhdpi/splash.png deleted file mode 100644 index 3c67e01..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxhdpi/splash.png deleted file mode 100644 index cff9eef..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxxhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxxhdpi/splash.png deleted file mode 100644 index cd4b88d..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-land-xxxhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-hdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-hdpi/splash.png deleted file mode 100644 index fdd3184..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-hdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-mdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-mdpi/splash.png deleted file mode 100644 index 7dcce56..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-mdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xhdpi/splash.png deleted file mode 100644 index bcd0278..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxhdpi/splash.png deleted file mode 100644 index 9048412..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxxhdpi/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxxhdpi/splash.png deleted file mode 100644 index a15aaa1..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-port-xxxhdpi/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/03_source/mobile.trunk.1/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index c7bd21d..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable/ic_launcher_background.xml b/03_source/mobile.trunk.1/android/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index d5fccc5..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/drawable/splash.png b/03_source/mobile.trunk.1/android/app/src/main/res/drawable/splash.png deleted file mode 100644 index 990610d..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/drawable/splash.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/layout/activity_main.xml b/03_source/mobile.trunk.1/android/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index b5ad138..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 036d09b..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 036d09b..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index d8c727b..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 2127973..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index d8c727b..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 3b955cd..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 8ed0605..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 3b955cd..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index a080869..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index df0f158..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index a080869..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 3c46f09..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 2960cbb..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 3c46f09..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 2a94e06..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index d2ea9ab..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 2a94e06..0000000 Binary files a/03_source/mobile.trunk.1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/values/ic_launcher_background.xml b/03_source/mobile.trunk.1/android/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index c5d5899..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFF - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/values/strings.xml b/03_source/mobile.trunk.1/android/app/src/main/res/values/strings.xml deleted file mode 100644 index a15be2e..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ionic-react-conference-app - ionic-react-conference-app - io.ionic.starter - io.ionic.starter - diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/values/styles.xml b/03_source/mobile.trunk.1/android/app/src/main/res/values/styles.xml deleted file mode 100644 index be874e5..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/app/src/main/res/xml/file_paths.xml b/03_source/mobile.trunk.1/android/app/src/main/res/xml/file_paths.xml deleted file mode 100644 index bd0c4d8..0000000 --- a/03_source/mobile.trunk.1/android/app/src/main/res/xml/file_paths.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/03_source/mobile.trunk.1/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java deleted file mode 100644 index 0297327..0000000 --- a/03_source/mobile.trunk.1/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} diff --git a/03_source/mobile.trunk.1/android/build.gradle b/03_source/mobile.trunk.1/android/build.gradle deleted file mode 100644 index f1b3b0e..0000000 --- a/03_source/mobile.trunk.1/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.7.2' - classpath 'com.google.gms:google-services:4.4.2' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -apply from: "variables.gradle" - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/03_source/mobile.trunk.1/android/capacitor.settings.gradle b/03_source/mobile.trunk.1/android/capacitor.settings.gradle deleted file mode 100644 index 4d859e4..0000000 --- a/03_source/mobile.trunk.1/android/capacitor.settings.gradle +++ /dev/null @@ -1,21 +0,0 @@ -// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN -include ':capacitor-android' -project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') - -include ':capacitor-barcode-scanner' -project(':capacitor-barcode-scanner').projectDir = new File('../node_modules/@capacitor/barcode-scanner/android') - -include ':capacitor-clipboard' -project(':capacitor-clipboard').projectDir = new File('../node_modules/@capacitor/clipboard/android') - -include ':capacitor-geolocation' -project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android') - -include ':capacitor-google-maps' -project(':capacitor-google-maps').projectDir = new File('../node_modules/@capacitor/google-maps/android') - -include ':capacitor-preferences' -project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android') - -include ':capacitor-share' -project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android') diff --git a/03_source/mobile.trunk.1/android/gradle.properties b/03_source/mobile.trunk.1/android/gradle.properties deleted file mode 100644 index 2e87c52..0000000 --- a/03_source/mobile.trunk.1/android/gradle.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true diff --git a/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.jar b/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9..0000000 Binary files a/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.properties b/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index c1d5e01..0000000 --- a/03_source/mobile.trunk.1/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/03_source/mobile.trunk.1/android/gradlew b/03_source/mobile.trunk.1/android/gradlew deleted file mode 100755 index f5feea6..0000000 --- a/03_source/mobile.trunk.1/android/gradlew +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/03_source/mobile.trunk.1/android/gradlew.bat b/03_source/mobile.trunk.1/android/gradlew.bat deleted file mode 100644 index 9b42019..0000000 --- a/03_source/mobile.trunk.1/android/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/03_source/mobile.trunk.1/android/settings.gradle b/03_source/mobile.trunk.1/android/settings.gradle deleted file mode 100644 index 3b4431d..0000000 --- a/03_source/mobile.trunk.1/android/settings.gradle +++ /dev/null @@ -1,5 +0,0 @@ -include ':app' -include ':capacitor-cordova-android-plugins' -project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') - -apply from: 'capacitor.settings.gradle' \ No newline at end of file diff --git a/03_source/mobile.trunk.1/android/variables.gradle b/03_source/mobile.trunk.1/android/variables.gradle deleted file mode 100644 index 2c8e408..0000000 --- a/03_source/mobile.trunk.1/android/variables.gradle +++ /dev/null @@ -1,16 +0,0 @@ -ext { - minSdkVersion = 23 - compileSdkVersion = 35 - targetSdkVersion = 35 - androidxActivityVersion = '1.9.2' - androidxAppCompatVersion = '1.7.0' - androidxCoordinatorLayoutVersion = '1.2.0' - androidxCoreVersion = '1.15.0' - androidxFragmentVersion = '1.8.4' - coreSplashScreenVersion = '1.0.1' - androidxWebkitVersion = '1.12.1' - junitVersion = '4.13.2' - androidxJunitVersion = '1.2.1' - androidxEspressoCoreVersion = '3.6.1' - cordovaAndroidVersion = '10.1.1' -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/build.sh b/03_source/mobile.trunk.1/build.sh deleted file mode 100755 index f976783..0000000 --- a/03_source/mobile.trunk.1/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -# npm i -D - -rm -rf **/*Zone.Identifier - -# npm run format - -# npm run build - -# git add . -# git commit -m"build ok," - -echo "done" diff --git a/03_source/mobile.trunk.1/capacitor.config.json b/03_source/mobile.trunk.1/capacitor.config.json deleted file mode 100644 index 0f2dd5f..0000000 --- a/03_source/mobile.trunk.1/capacitor.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "appId": "io.ionic.starter", - "appName": "ionic-react-conference-app", - "bundledWebRuntime": false, - "npmClient": "npm", - "webDir": "dist", - "cordova": {} -} diff --git a/03_source/mobile.trunk.1/dev.sh b/03_source/mobile.trunk.1/dev.sh deleted file mode 100755 index ab73a35..0000000 --- a/03_source/mobile.trunk.1/dev.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -while true; do - yarn -D - - yarn run dev - - echo "restarting..." - sleep 1 -done diff --git a/03_source/mobile.trunk.1/dockerfile b/03_source/mobile.trunk.1/dockerfile deleted file mode 100644 index 4f0cf38..0000000 --- a/03_source/mobile.trunk.1/dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Use official Node 18 base image -FROM node:20-slim - -# Install pnpm globally -# RUN npm install -g pnpm - -# Set working directory -WORKDIR /app - -# Copy your application code (optional, comment out if not needed) -# COPY . /app -# RUN yarn - -# Default command (optional) -CMD ["npm run start"] diff --git a/03_source/mobile.trunk.1/firebase.json b/03_source/mobile.trunk.1/firebase.json deleted file mode 100644 index 49a74df..0000000 --- a/03_source/mobile.trunk.1/firebase.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "hosting": { - "public": "build", - "rewrites": [ - { - "source": "**", - "destination": "/index.html" - } - ], - "headers": [ - { - "source": "**/static/**", - "headers": [ - { - "key": "Cache-Control", - "value": "max-age=31536000" - } - ] - }, - { - "source": "**/*.@(jpg|jpeg|gif|png|svg)", - "headers": [ - { - "key": "Cache-Control", - "value": "max-age=31536000" - } - ] - } - ] - } -} diff --git a/03_source/mobile.trunk.1/index.html b/03_source/mobile.trunk.1/index.html deleted file mode 100644 index 805b105..0000000 --- a/03_source/mobile.trunk.1/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Ionic Conference App - - - - - - - - - - - - - - - -
- - - - diff --git a/03_source/mobile.trunk.1/ionic.config.json b/03_source/mobile.trunk.1/ionic.config.json deleted file mode 100644 index f610198..0000000 --- a/03_source/mobile.trunk.1/ionic.config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "ionic-react-conference-app", - "integrations": { - "capacitor": {} - }, - "type": "react" -} diff --git a/03_source/mobile.trunk.1/ios/.gitignore b/03_source/mobile.trunk.1/ios/.gitignore deleted file mode 100644 index f470299..0000000 --- a/03_source/mobile.trunk.1/ios/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -App/build -App/Pods -App/output -App/App/public -DerivedData -xcuserdata - -# Cordova plugins for Capacitor -capacitor-cordova-ios-plugins - -# Generated Config files -App/App/capacitor.config.json -App/App/config.xml diff --git a/03_source/mobile.trunk.1/ios/App/App.xcodeproj/project.pbxproj b/03_source/mobile.trunk.1/ios/App/App.xcodeproj/project.pbxproj deleted file mode 100644 index d6d8154..0000000 --- a/03_source/mobile.trunk.1/ios/App/App.xcodeproj/project.pbxproj +++ /dev/null @@ -1,408 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; }; - 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; }; - 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; }; - 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; }; - 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; }; - 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; }; - 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; }; - A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; }; - 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = ""; }; - 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = ""; }; - AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; - FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 504EC3011FED79650016851F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = { - isa = PBXGroup; - children = ( - AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 504EC2FB1FED79650016851F = { - isa = PBXGroup; - children = ( - 504EC3061FED79650016851F /* App */, - 504EC3051FED79650016851F /* Products */, - 7F8756D8B27F46E3366F6CEA /* Pods */, - 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */, - ); - sourceTree = ""; - }; - 504EC3051FED79650016851F /* Products */ = { - isa = PBXGroup; - children = ( - 504EC3041FED79650016851F /* App.app */, - ); - name = Products; - sourceTree = ""; - }; - 504EC3061FED79650016851F /* App */ = { - isa = PBXGroup; - children = ( - 50379B222058CBB4000EE86E /* capacitor.config.json */, - 504EC3071FED79650016851F /* AppDelegate.swift */, - 504EC30B1FED79650016851F /* Main.storyboard */, - 504EC30E1FED79650016851F /* Assets.xcassets */, - 504EC3101FED79650016851F /* LaunchScreen.storyboard */, - 504EC3131FED79650016851F /* Info.plist */, - 2FAD9762203C412B000D30F8 /* config.xml */, - 50B271D01FEDC1A000F3C39B /* public */, - ); - path = App; - sourceTree = ""; - }; - 7F8756D8B27F46E3366F6CEA /* Pods */ = { - isa = PBXGroup; - children = ( - FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */, - AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 504EC3031FED79650016851F /* App */ = { - isa = PBXNativeTarget; - buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */; - buildPhases = ( - 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */, - 504EC3001FED79650016851F /* Sources */, - 504EC3011FED79650016851F /* Frameworks */, - 504EC3021FED79650016851F /* Resources */, - 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = App; - productName = App; - productReference = 504EC3041FED79650016851F /* App.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 504EC2FC1FED79650016851F /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; - TargetAttributes = { - 504EC3031FED79650016851F = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 504EC2FB1FED79650016851F; - packageReferences = ( - ); - productRefGroup = 504EC3051FED79650016851F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 504EC3031FED79650016851F /* App */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 504EC3021FED79650016851F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */, - 50B271D11FEDC1A000F3C39B /* public in Resources */, - 504EC30F1FED79650016851F /* Assets.xcassets in Resources */, - 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */, - 504EC30D1FED79650016851F /* Main.storyboard in Resources */, - 2FAD9763203C412B000D30F8 /* config.xml in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 504EC3001FED79650016851F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 504EC30B1FED79650016851F /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 504EC30C1FED79650016851F /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 504EC3111FED79650016851F /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 504EC3141FED79650016851F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 504EC3151FED79650016851F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 504EC3171FED79650016851F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; - PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 504EC3181FED79650016851F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 504EC3141FED79650016851F /* Debug */, - 504EC3151FED79650016851F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 504EC3171FED79650016851F /* Debug */, - 504EC3181FED79650016851F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 504EC2FC1FED79650016851F /* Project object */; -} diff --git a/03_source/mobile.trunk.1/ios/App/App.xcworkspace/contents.xcworkspacedata b/03_source/mobile.trunk.1/ios/App/App.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b301e82..0000000 --- a/03_source/mobile.trunk.1/ios/App/App.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/03_source/mobile.trunk.1/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/03_source/mobile.trunk.1/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/03_source/mobile.trunk.1/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/03_source/mobile.trunk.1/ios/App/App/AppDelegate.swift b/03_source/mobile.trunk.1/ios/App/App/AppDelegate.swift deleted file mode 100644 index c3cd83b..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -import UIKit -import Capacitor - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { - // Called when the app was launched with a url. Feel free to add additional processing here, - // but if you want the App API to support tracking app url opens, make sure to keep this call - return ApplicationDelegateProxy.shared.application(app, open: url, options: options) - } - - func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { - // Called when the app was launched with an activity, including Universal Links. - // Feel free to add additional processing here, but if you want the App API to support - // tracking app url opens, make sure to keep this call - return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) - } - -} diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png deleted file mode 100644 index f6a7b1f..0000000 Binary files a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9b7d382..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "images" : [ - { - "filename" : "AppIcon-512@2x.png", - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Contents.json b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json deleted file mode 100644 index d7d96a6..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "splash-2732x2732-2.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "splash-2732x2732-1.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "splash-2732x2732.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png deleted file mode 100644 index 009110e..0000000 Binary files a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png deleted file mode 100644 index 009110e..0000000 Binary files a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png b/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png deleted file mode 100644 index 009110e..0000000 Binary files a/03_source/mobile.trunk.1/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/ios/App/App/Base.lproj/LaunchScreen.storyboard b/03_source/mobile.trunk.1/ios/App/App/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index e7ae5d7..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/03_source/mobile.trunk.1/ios/App/App/Base.lproj/Main.storyboard b/03_source/mobile.trunk.1/ios/App/App/Base.lproj/Main.storyboard deleted file mode 100644 index b44df7b..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Base.lproj/Main.storyboard +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/03_source/mobile.trunk.1/ios/App/App/Info.plist b/03_source/mobile.trunk.1/ios/App/App/Info.plist deleted file mode 100644 index 70a2849..0000000 --- a/03_source/mobile.trunk.1/ios/App/App/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ionic-react-conference-app - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/03_source/mobile.trunk.1/ios/App/Podfile b/03_source/mobile.trunk.1/ios/App/Podfile deleted file mode 100644 index d7565c9..0000000 --- a/03_source/mobile.trunk.1/ios/App/Podfile +++ /dev/null @@ -1,29 +0,0 @@ -require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' - -platform :ios, '14.0' -use_frameworks! - -# workaround to avoid Xcode caching of Pods that requires -# Product -> Clean Build Folder after new Cordova plugins installed -# Requires CocoaPods 1.6 or newer -install! 'cocoapods', :disable_input_output_paths => true - -def capacitor_pods - pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' - pod 'CapacitorBarcodeScanner', :path => '../../node_modules/@capacitor/barcode-scanner' - pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard' - pod 'CapacitorGeolocation', :path => '../../node_modules/@capacitor/geolocation' - pod 'CapacitorGoogleMaps', :path => '../../node_modules/@capacitor/google-maps' - pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences' - pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share' -end - -target 'App' do - capacitor_pods - # Add your Pods here -end - -post_install do |installer| - assertDeploymentTarget(installer) -end diff --git a/03_source/mobile.trunk.1/ios/App/Podfile.lock b/03_source/mobile.trunk.1/ios/App/Podfile.lock deleted file mode 100644 index 29efe53..0000000 --- a/03_source/mobile.trunk.1/ios/App/Podfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -PODS: - - Capacitor (7.0.1): - - CapacitorCordova - - CapacitorCordova (7.0.1) - - CapacitorPreferences (7.0.0): - - Capacitor - -DEPENDENCIES: - - "Capacitor (from `../../node_modules/@capacitor/ios`)" - - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" - - "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)" - -EXTERNAL SOURCES: - Capacitor: - :path: "../../node_modules/@capacitor/ios" - CapacitorCordova: - :path: "../../node_modules/@capacitor/ios" - CapacitorPreferences: - :path: "../../node_modules/@capacitor/preferences" - -SPEC CHECKSUMS: - Capacitor: de199cba6c8b20995428ad0b7cb0bc6ca625ffd4 - CapacitorCordova: 63d476958d5022d76f197031e8b7ea3519988c64 - CapacitorPreferences: 8e4bef1f937fc991a19d7ea99330c36a62edd24b - -PODFILE CHECKSUM: bc4412675d30bc194ab5961211929e1e7de79579 - -COCOAPODS: 1.16.2 diff --git a/03_source/mobile.trunk.1/package.json b/03_source/mobile.trunk.1/package.json deleted file mode 100644 index fd2dd7b..0000000 --- a/03_source/mobile.trunk.1/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "ionic-react-conference-app", - "version": "0.0.0", - "description": "Ionic Conference App", - "author": "Ionic Team ", - "license": "MIT", - "private": true, - "dependencies": { - "@capacitor/android": "7.0.1", - "@capacitor/barcode-scanner": "^2.0.3", - "@capacitor/clipboard": "^7.0.1", - "@capacitor/core": "^7.0.0", - "@capacitor/geolocation": "^7.1.2", - "@capacitor/google-maps": "^7.0.2", - "@capacitor/ios": "7.0.1", - "@capacitor/preferences": "^7.0.0", - "@capacitor/share": "^7.0.1", - "@hookform/resolvers": "^4.1.3", - "@ionic/react": "^8.5.0", - "@ionic/react-router": "^8.5.0", - "@ionic/storage": "^4.0.0", - "@mdx-js/react": "^3.1.0", - "@react-hook/window-size": "^3.1.1", - "@types/leaflet": "^1.9.17", - "@types/react-redux": "^7.1.34", - "axios": "^1.9.0", - "date-fns": "^2.25.0", - "ionicons": "^7.1.2", - "leaflet": "^1.9.4", - "pigeon-maps": "^0.22.1", - "pullstate": "^1", - "react": "19.0.0", - "react-canvas-draw": "^1.2.1", - "react-color": "^2.19.3", - "react-confetti": "^6.4.0", - "react-dom": "19.0.0", - "react-hook-form": "^7.55.0", - "react-iconly": "^2.2.10", - "react-leaflet": "^5.0.0", - "react-markdown": "^10.1.0", - "react-qr-code": "^2.0.15", - "react-qr-reader": "^3.0.0-beta-1", - "react-redux": "^9.2.0", - "react-router": "^5.3.4", - "react-router-dom": "^5.3.4", - "react-spinners": "^0.17.0", - "react-use": "^17.6.0", - "reselect": "^4.0.0", - "sass": "^1.85.1", - "swiper": "^11.2.8", - "use-sound": "^5.0.0", - "zod": "^3.24.2" - }, - "scripts": { - "start": "npm run dev", - "dev": "vite --force --host 0.0.0.0 --cors", - "ionic:serve": "vite", - "ionic:build": "tsc && vite build", - "build": "tsc && vite build", - "preview": "vite preview", - "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,md}\"", - "precommit": "npm run format && lint-staged" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ], - "devDependencies": { - "@capacitor/cli": "^7.0.0", - "@testing-library/react": "^9.3.1", - "@types/jest": "24.0.18", - "@types/react": "19.0.10", - "@types/react-dom": "19.0.4", - "@types/react-router": "^5.1.20", - "@types/react-router-dom": "^5.3.3", - "@vitejs/plugin-react": "^4.3.4", - "lint-staged": "^13.2.0", - "prettier": "^3.5.3", - "typescript": "^5.8.2", - "vite": "^6.2.0" - }, - "lint-staged": { - "src/**/*.{js,jsx,ts,tsx,json,md}": [ - "prettier --write", - "git add" - ] - } -} diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/alan.jpg b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/alan.jpg deleted file mode 100644 index 98093f9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/alan.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/chip.png b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/chip.png deleted file mode 100644 index 7861be2..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/chip.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/mastercard.png b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/mastercard.png deleted file mode 100644 index b4f6667..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/mastercard.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/visa.png b/03_source/mobile.trunk.1/public/assets/DemoBankingUi/visa.png deleted file mode 100644 index 011d6f9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoBankingUi/visa.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoDictionaryApp/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoProfileExample/.gitkeep b/03_source/mobile.trunk.1/public/assets/DemoProfileExample/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/main.png b/03_source/mobile.trunk.1/public/assets/DemoQuizApp/main.png deleted file mode 100644 index 42f8f63..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/main.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoQuizApp/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoQuizApp/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/.gitkeep b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/camera.jpeg b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/camera.jpeg deleted file mode 100644 index d212e39..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/camera.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/macbook.jpeg b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/macbook.jpeg deleted file mode 100644 index 19930e3..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/macbook.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/tv.jpeg b/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/tv.jpeg deleted file mode 100644 index 5d1f0d0..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactAddToCart/tv.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/login2.jpeg b/03_source/mobile.trunk.1/public/assets/DemoReactLogin/login2.jpeg deleted file mode 100644 index 366dcf8..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/login2.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoReactLogin/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactLogin/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/alan.jpg b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/alan.jpg deleted file mode 100644 index 98093f9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/alan.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/blue.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/blue.json deleted file mode 100644 index ec69043..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/blue.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "blue", - "tab_bar_background_color": "blue", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/coffeebrown.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/coffeebrown.json deleted file mode 100644 index 8d15f25..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/coffeebrown.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#5f361e", - "tab_bar_background_color": "#5f361e", - "toolbar_color": "#d1bfb5", - "tab_bar_color": "#886551", - "tab_bar_activated_color": "", - - "main_color": "#5f361e", - "light_color": "#886551", - - "main_color_tint": "#855a41", - "main_color_shade": "#57331e", - - "light_color_tint": "#9c7d6b", - "light_color_shade": "#61412f" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/coffeebrown.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/coffeebrown.png deleted file mode 100644 index 7e4df1d..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/coffeebrown.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/earthytones.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/earthytones.png deleted file mode 100644 index 69de1b0..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/earthytones.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/fireyred.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/fireyred.png deleted file mode 100644 index ce87056..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/fireyred.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/leafygreen.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/leafygreen.png deleted file mode 100644 index 206247c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/leafygreen.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/moodyblue.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/moodyblue.png deleted file mode 100644 index 6b3aaa8..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/moodyblue.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/peelyorange.png b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/peelyorange.png deleted file mode 100644 index a2f5685..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/covers/peelyorange.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/earthytones.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/earthytones.json deleted file mode 100644 index 262c9c1..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/earthytones.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#c4b0c4", - "tab_bar_background_color": "#c4b0c4", - "toolbar_color": "#5c4153", - "tab_bar_color": "#917788", - "tab_bar_activated_color": "#5c4153", - - "main_color": "#5c4153", - "light_color": "#917788", - - "main_color_tint": "#6b5463", - "main_color_shade": "#4d3545", - - "light_color_tint": "#a893a1", - "light_color_shade": "#74606d" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/fireyred.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/fireyred.json deleted file mode 100644 index 5d5348f..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/fireyred.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#c93608", - "tab_bar_background_color": "#c93608", - "toolbar_color": "", - "tab_bar_color": "#852506", - "tab_bar_activated_color": "", - - "main_color": "#c93608", - "light_color": "#c95834", - - "main_color_tint": "#aa614a", - "main_color_shade": "#692611", - - "light_color_tint": "#d67151", - "light_color_shade": "#a85439" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/green.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/green.json deleted file mode 100644 index cb41fcf..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/green.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "green", - "tab_bar_background_color": "green", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/leafygreen.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/leafygreen.json deleted file mode 100644 index f3e86ce..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/leafygreen.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#336b36", - "tab_bar_background_color": "#336b36", - "toolbar_color": "white", - "tab_bar_color": "#1c421d", - "tab_bar_activated_color": "white", - - "main_color": "#336b36", - "light_color": "#517953", - - "main_color_tint": "#497a4b", - "main_color_shade": "#305832", - - "light_color_tint": "#738574", - "light_color_shade": "#485849" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/moodyblue.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/moodyblue.json deleted file mode 100644 index db1ba2f..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/moodyblue.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#7baec7", - "tab_bar_background_color": "#7baec7", - "toolbar_color": "", - "tab_bar_color": "#49758b", - "tab_bar_activated_color": "", - - "main_color": "#7baec7", - "light_color": "#90bbcf", - - "main_color_tint": "#96c0d5", - "main_color_shade": "#6b93a7", - - "light_color_tint": "#c3e2f1", - "light_color_shade": "#89aec0" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/peelyorange.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/peelyorange.json deleted file mode 100644 index f7f04f2..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/peelyorange.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#fd8f38", - "tab_bar_background_color": "#fd8f38", - "toolbar_color": "#815208", - "tab_bar_color": "#ffb67c", - "tab_bar_activated_color": "#815208", - - "main_color": "#e49200", - "light_color": "#ffb67c", - - "main_color_tint": "#e6ae4b", - "main_color_shade": "#b4780c", - - "light_color_tint": "#fad4b6", - "light_color_shade": "#ff9c4e" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/red.json b/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/red.json deleted file mode 100644 index be9c737..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactProfileDashboardUi/themes/red.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "red", - "tab_bar_background_color": "red", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/blue.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/blue.json deleted file mode 100644 index ec69043..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/blue.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "blue", - "tab_bar_background_color": "blue", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/coffeebrown.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/coffeebrown.json deleted file mode 100644 index 8d15f25..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/coffeebrown.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#5f361e", - "tab_bar_background_color": "#5f361e", - "toolbar_color": "#d1bfb5", - "tab_bar_color": "#886551", - "tab_bar_activated_color": "", - - "main_color": "#5f361e", - "light_color": "#886551", - - "main_color_tint": "#855a41", - "main_color_shade": "#57331e", - - "light_color_tint": "#9c7d6b", - "light_color_shade": "#61412f" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/coffeebrown.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/coffeebrown.png deleted file mode 100644 index 7e4df1d..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/coffeebrown.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/earthytones.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/earthytones.png deleted file mode 100644 index 69de1b0..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/earthytones.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/fireyred.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/fireyred.png deleted file mode 100644 index ce87056..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/fireyred.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/leafygreen.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/leafygreen.png deleted file mode 100644 index 206247c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/leafygreen.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/moodyblue.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/moodyblue.png deleted file mode 100644 index 6b3aaa8..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/moodyblue.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/peelyorange.png b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/peelyorange.png deleted file mode 100644 index a2f5685..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/covers/peelyorange.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/earthytones.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/earthytones.json deleted file mode 100644 index 262c9c1..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/earthytones.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#c4b0c4", - "tab_bar_background_color": "#c4b0c4", - "toolbar_color": "#5c4153", - "tab_bar_color": "#917788", - "tab_bar_activated_color": "#5c4153", - - "main_color": "#5c4153", - "light_color": "#917788", - - "main_color_tint": "#6b5463", - "main_color_shade": "#4d3545", - - "light_color_tint": "#a893a1", - "light_color_shade": "#74606d" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/fireyred.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/fireyred.json deleted file mode 100644 index 5d5348f..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/fireyred.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#c93608", - "tab_bar_background_color": "#c93608", - "toolbar_color": "", - "tab_bar_color": "#852506", - "tab_bar_activated_color": "", - - "main_color": "#c93608", - "light_color": "#c95834", - - "main_color_tint": "#aa614a", - "main_color_shade": "#692611", - - "light_color_tint": "#d67151", - "light_color_shade": "#a85439" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/green.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/green.json deleted file mode 100644 index cb41fcf..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/green.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "green", - "tab_bar_background_color": "green", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/leafygreen.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/leafygreen.json deleted file mode 100644 index f3e86ce..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/leafygreen.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#336b36", - "tab_bar_background_color": "#336b36", - "toolbar_color": "white", - "tab_bar_color": "#1c421d", - "tab_bar_activated_color": "white", - - "main_color": "#336b36", - "light_color": "#517953", - - "main_color_tint": "#497a4b", - "main_color_shade": "#305832", - - "light_color_tint": "#738574", - "light_color_shade": "#485849" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/moodyblue.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/moodyblue.json deleted file mode 100644 index db1ba2f..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/moodyblue.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#7baec7", - "tab_bar_background_color": "#7baec7", - "toolbar_color": "", - "tab_bar_color": "#49758b", - "tab_bar_activated_color": "", - - "main_color": "#7baec7", - "light_color": "#90bbcf", - - "main_color_tint": "#96c0d5", - "main_color_shade": "#6b93a7", - - "light_color_tint": "#c3e2f1", - "light_color_shade": "#89aec0" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/peelyorange.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/peelyorange.json deleted file mode 100644 index f7f04f2..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/peelyorange.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "#fd8f38", - "tab_bar_background_color": "#fd8f38", - "toolbar_color": "#815208", - "tab_bar_color": "#ffb67c", - "tab_bar_activated_color": "#815208", - - "main_color": "#e49200", - "light_color": "#ffb67c", - - "main_color_tint": "#e6ae4b", - "main_color_shade": "#b4780c", - - "light_color_tint": "#fad4b6", - "light_color_shade": "#ff9c4e" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/red.json b/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/red.json deleted file mode 100644 index be9c737..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoReactThemeSwitcher/themes/red.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "toolbar_background_color": "red", - "tab_bar_background_color": "red", - "toolbar_color": "", - "tab_bar_color": "", - "tab_bar_activated_color": "", - - "main_color": "", - "light_color": "", - - "main_color_tint": "", - "main_color_shade": "", - - "light_color_tint": "", - "light_color_shade": "" -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/bookmark.png b/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/bookmark.png deleted file mode 100644 index 4077d82..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/bookmark.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/placeholder.png b/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/placeholder.png deleted file mode 100644 index 1c2791a..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/placeholder.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoRecipeApp/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/cart.png b/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/cart.png deleted file mode 100644 index dd0f595..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/cart.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shop.png b/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shop.png deleted file mode 100644 index a3a8bba..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoShopAppUi/shop.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/1.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/1.png deleted file mode 100644 index 8a5fa94..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/1.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/10.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/10.png deleted file mode 100644 index b68cff1..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/10.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/2.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/2.png deleted file mode 100644 index 79a2bc2..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/2.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/3.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/3.png deleted file mode 100644 index 52a6d66..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/3.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/4.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/4.png deleted file mode 100644 index f3cbf68..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/4.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/5.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/5.png deleted file mode 100644 index 7957e0b..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/5.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/6.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/6.png deleted file mode 100644 index 938c186..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/6.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/7.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/7.png deleted file mode 100644 index 777438b..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/7.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/8.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/8.png deleted file mode 100644 index e74c488..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/8.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/9.png b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/9.png deleted file mode 100644 index 88bdf32..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/scenery/9.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoSkeletonText/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/autumn.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/autumn.png deleted file mode 100644 index 3725b34..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/autumn.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar.jpeg deleted file mode 100644 index 9a30b74..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar1.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar1.png deleted file mode 100644 index 094634d..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar1.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar2.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar2.png deleted file mode 100644 index a787854..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar2.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar3.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar3.png deleted file mode 100644 index 084d895..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar3.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar4.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar4.png deleted file mode 100644 index c0c8738..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar4.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar5.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar5.png deleted file mode 100644 index 050e908..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar5.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar6.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar6.png deleted file mode 100644 index 8114df3..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/avatar6.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover1.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover1.jpeg deleted file mode 100644 index eeb888c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover1.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover2.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover2.jpeg deleted file mode 100644 index 2e5074e..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover2.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover4.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover4.jpeg deleted file mode 100644 index f31d1f9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover4.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover5.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover5.jpeg deleted file mode 100644 index 1e1fea9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover5.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover6.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover6.jpeg deleted file mode 100644 index e28dd31..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/cover6.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/flower.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/flower.jpeg deleted file mode 100644 index 3f56d8c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/flower.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/h.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/h.jpeg deleted file mode 100644 index a5be47e..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/h.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/icon.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/ocean.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/ocean.jpeg deleted file mode 100644 index 22892f1..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/ocean.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/shapes.svg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/spring.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/spring.png deleted file mode 100644 index 2726d11..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/spring.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/summer.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/summer.png deleted file mode 100644 index ae4def9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/summer.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/van.jpeg b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/van.jpeg deleted file mode 100644 index f73f338..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/van.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/winter.png b/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/winter.png deleted file mode 100644 index 81694c9..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/DemoSlidingProfile/winter.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/icon.png b/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/crown_ionicreacthub.png b/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/crown_ionicreacthub.png deleted file mode 100644 index f5e4faf..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/crown_ionicreacthub.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/dashboard_ionicreacthub.png b/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/dashboard_ionicreacthub.png deleted file mode 100644 index 856b78d..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/ScoreBoard/icons/dashboard_ionicreacthub.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/scoreboardheader.jpeg b/03_source/mobile.trunk.1/public/assets/ScoreBoard/scoreboardheader.jpeg deleted file mode 100644 index fe4d17c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/ScoreBoard/scoreboardheader.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/ScoreBoard/shapes.svg b/03_source/mobile.trunk.1/public/assets/ScoreBoard/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/ScoreBoard/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/icon.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/map.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/map.png deleted file mode 100644 index 585e1b7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/map.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/shapes.svg b/03_source/mobile.trunk.1/public/assets/WeatherDemo/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/WeatherDemo/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp.png deleted file mode 100644 index 981b728..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp2.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp2.png deleted file mode 100644 index 47a19c0..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/temp2.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/WeatherDemo/wind.png b/03_source/mobile.trunk.1/public/assets/WeatherDemo/wind.png deleted file mode 100644 index 9bfa6ee..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/WeatherDemo/wind.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/data/data.json b/03_source/mobile.trunk.1/public/assets/data/data.json deleted file mode 100644 index 44f6125..0000000 --- a/03_source/mobile.trunk.1/public/assets/data/data.json +++ /dev/null @@ -1,467 +0,0 @@ -{ - "schedule": [ - { - "date": "2047-05-17", - "groups": [ - { - "time": "8:00 am", - "sessions": [ - { - "name": "Breakfast", - "timeStart": "8:00 am", - "timeEnd": "9:00 am", - "location": "Dining Hall", - "tracks": ["Food"], - "id": "1" - } - ] - }, - { - "time": "9:15 am", - "sessions": [ - { - "name": "Getting Started with Ionic", - "location": "Hall 2", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Ted Turtle"], - "timeStart": "9:30 am", - "timeEnd": "9:45 am", - "tracks": ["Ionic"], - "id": "2" - }, - { - "name": "Ionic Tooling", - "location": "Executive Ballroom", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Rachel Rabbit"], - "timeStart": "9:45 am", - "timeEnd": "10:00 am", - "tracks": ["Tooling"], - "id": "3" - }, - { - "name": "University of Ionic", - "location": "Hall 3", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Ellie Elephant"], - "timeStart": "9:15 am", - "timeEnd": "9:30 am", - "tracks": ["Ionic"], - "id": "4" - } - ] - }, - { - "time": "10:00 am", - "sessions": [ - { - "name": "Migrating to Ionic", - "location": "Hall 1", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Eva Eagle", "Lionel Lion"], - "timeStart": "10:00 am", - "timeEnd": "10:15 am", - "tracks": ["Ionic"], - "id": "5" - }, - { - "name": "What's New in React", - "location": "Hall 3", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Rachel Rabbit"], - "timeStart": "10:15 am", - "timeEnd": "10:30 am", - "tracks": ["React"], - "id": "6" - }, - { - "name": "The Evolution of Ionicons", - "location": "Hall 2", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Isabella Iguana", "Eva Eagle"], - "timeStart": "10:15 am", - "timeEnd": "10:30 am", - "tracks": ["Design"], - "id": "7" - }, - { - "name": "Ionic Pro", - "location": "Grand Ballroom A", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Charlie Cheetah"], - "timeStart": "10:45 am", - "timeEnd": "11:00 am", - "tracks": ["Services"], - "id": "8" - } - ] - }, - { - "time": "11:00 am", - "sessions": [ - { - "name": "Ionic Workshop", - "location": "Hall 1", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Karl Kitten", "Lionel Lion"], - "timeStart": "11:00 am", - "timeEnd": "11:45 am", - "tracks": ["Workshop"], - "id": "9" - }, - { - "name": "Community Interaction", - "location": "Hall 3", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Lionel Lion", "Gino Giraffe"], - "timeStart": "11:30 am", - "timeEnd": "11:50 am", - "tracks": ["Communication"], - "id": "10" - }, - { - "name": "Navigation in Ionic", - "location": "Grand Ballroom A", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Rachel Rabbit", "Eva Eagle"], - "timeStart": "11:30 am", - "timeEnd": "12:00 pm", - "tracks": ["Navigation"], - "id": "11" - } - ] - }, - { - "time": "12:00 pm", - "sessions": [ - { - "name": "Lunch", - "location": "Dining Hall", - "description": "Come grab lunch with all the Ionic fanatics and talk all things Ionic", - "timeStart": "12:00 pm", - "timeEnd": "1:00 pm", - "tracks": ["Food"], - "id": "12" - } - ] - }, - { - "time": "1:00 pm", - "sessions": [ - { - "name": "Ionic in the Enterprise", - "location": "Hall 1", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Paul Puppy"], - "timeStart": "1:00 pm", - "timeEnd": "1:15 pm", - "tracks": ["Communication"], - "id": "13" - }, - { - "name": "Ionic Worldwide", - "location": "Hall 1", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Gino Giraffe"], - "timeStart": "1:15 pm", - "timeEnd": "1:30 pm", - "tracks": ["Communication"], - "id": "14" - }, - { - "name": "The Ionic Package", - "location": "Grand Ballroom B", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Molly Mouse", "Burt Bear"], - "timeStart": "1:30 pm", - "timeEnd": "2:00 pm", - "tracks": ["Services"], - "id": "15" - } - ] - }, - { - "time": "2:00 pm", - "sessions": [ - { - "name": "Push Notifications in Ionic", - "location": "Hall 2", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Burt Bear", "Charlie Cheetah"], - "timeStart": "2:00 pm", - "timeEnd": "2:30 pm", - "tracks": ["Services"], - "id": "16" - }, - { - "name": "Ionic Documentation", - "location": "Grand Ballroom B", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Donald Duck"], - "timeStart": "2:30 pm", - "timeEnd": "2:45 pm", - "tracks": ["Documentation"], - "id": "17" - }, - { - "name": "UX in Ionic", - "location": "Hall 3", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Isabella Iguana", "Ellie Elephant"], - "timeStart": "2:45 pm", - "timeEnd": "3:00 pm", - "tracks": ["Design"], - "id": "18" - } - ] - }, - { - "time": "3:00 pm", - "sessions": [ - { - "name": "Building with React and Ionic", - "location": "Hall 1", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Ted Turtle"], - "timeStart": "3:00 pm", - "timeEnd": "3:30 pm", - "tracks": ["React"], - "id": "19" - }, - { - "name": "Mobile States", - "location": "Hall 2", - "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with React, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and React.", - "speakerNames": ["Rachel Rabbit"], - "timeStart": "3:30 pm", - "timeEnd": "3:45 pm", - "tracks": ["Navigation"], - "id": "20" - } - ] - } - ] - } - ], - - "speakers": [ - { - "name": "Burt Bear", - "profilePic": "/assets/img/speakers/bear.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Burt is a Bear. Burt's interests include poetry, dashing space heroes, and lions.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "burt@example.com", - "phone": "+1-541-754-3010", - "id": "1" - }, - { - "name": "Charlie Cheetah", - "profilePic": "/assets/img/speakers/cheetah.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Charlie is a Cheetah. Charlie's interests include country music, plush animals, pyrotechnics, and skeletons.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "charlie@example.com", - "phone": "+1-541-754-3010", - "id": "2" - }, - { - "name": "Donald Duck", - "profilePic": "/assets/img/speakers/duck.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Donald is a Duck. Donald's interests include carpentry, superheroes, merpeople, and glam rock.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "donald@example.com", - "phone": "+1-541-754-3010", - "id": "3" - }, - { - "name": "Eva Eagle", - "profilePic": "/assets/img/speakers/eagle.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Eva is an Eagle. Eva's interests include ants, seashells, and cupcakes.", - "title": "Developer Advocate", - "location": "Everywhere", - "email": "eva@example.com", - "phone": "+1-541-754-3010", - "id": "4" - }, - { - "name": "Ellie Elephant", - "profilePic": "/assets/img/speakers/elephant.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Ellie is an Elephant. Ellie's interests include pocket watches, pool, hand fans, and ninjas.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "ellie@example.com", - "phone": "+1-541-754-3010", - "id": "5" - }, - { - "name": "Gino Giraffe", - "profilePic": "/assets/img/speakers/giraffe.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Gino is a Giraffe. Gino's interests include candy-making, unicorns, and birdhouses.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "gino@example.com", - "phone": "+1-541-754-3010", - "id": "6" - }, - { - "name": "Isabella Iguana", - "profilePic": "/assets/img/speakers/iguana.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Isabella is an Iguana. Isabella's interests include crystals, architecture, and candle-making.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "isabella@example.com", - "phone": "+1-541-754-3010", - "id": "7" - }, - { - "name": "Karl Kitten", - "profilePic": "/assets/img/speakers/kitten.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Karl is a Kitten. Karl's interests include skiing, jewelry, and needlepoint.", - "title": "Developer Advocate", - "location": "Everywhere", - "email": "karl@example.com", - "phone": "+1-541-754-3010", - "id": "8" - }, - { - "name": "Lionel Lion", - "profilePic": "/assets/img/speakers/lion.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Lionel is a Lion. Lionel's interests include lizards and mathematics.", - "title": "Developer Advocate", - "location": "Everywhere", - "email": "lionel@example.com", - "phone": "+1-541-754-3010", - "id": "9" - }, - { - "name": "Molly Mouse", - "profilePic": "/assets/img/speakers/mouse.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Molly is a Mouse. Molly's interests include werewolves and magic.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "molly@example.com", - "phone": "+1-541-754-3010", - "id": "10" - }, - { - "name": "Paul Puppy", - "profilePic": "/assets/img/speakers/puppy.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Paul is a Puppy. Paul's interests include maps, whales, and dragons.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "paul@example.com", - "phone": "+1-541-754-3010", - "id": "11" - }, - { - "name": "Rachel Rabbit", - "profilePic": "/assets/img/speakers/rabbit.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Rachel is a Rabbit. Rachel's interests include clowns, skeletons, and yo-yos.", - "title": "Senior Software Engineer", - "location": "Everywhere", - "email": "rachel@example.com", - "phone": "+1-541-754-3010", - "id": "12" - }, - { - "name": "Ted Turtle", - "profilePic": "/assets/img/speakers/turtle.jpg", - "instagram": "ionicframework", - "twitter": "ionicframework", - "about": "Ted is a Turtle. Ted's interests include butterflies, skiing, and cupcakes.", - "title": "Software Engineer", - "location": "Everywhere", - "email": "ted@example.com", - "phone": "+1-541-754-3010", - "id": "13" - } - ], - - "map": [ - { - "name": "Monona Terrace Convention Center", - "lat": 43.071584, - "lng": -89.38012, - "center": true - }, - { - "name": "Ionic HQ", - "lat": 43.074395, - "lng": -89.381056 - }, - { - "name": "Afterparty - Brocach Irish Pub", - "lat": 43.07336, - "lng": -89.38335 - } - ], - - "tracks": [ - { - "name": "React", - "icon": "logo-react" - }, - { - "name": "Documentation", - "icon": "document" - }, - { - "name": "Food", - "icon": "restaurant" - }, - { - "name": "Ionic", - "icon": "logo-ionic" - }, - { - "name": "Tooling", - "icon": "hammer" - }, - { - "name": "Design", - "icon": "color-palette" - }, - { - "name": "Services", - "icon": "cog" - }, - { - "name": "Workshop", - "icon": "construct" - }, - { - "name": "Communication", - "icon": "call" - }, - { - "name": "Navigation", - "icon": "compass" - } - ] -} diff --git a/03_source/mobile.trunk.1/public/assets/data/locations.json b/03_source/mobile.trunk.1/public/assets/data/locations.json deleted file mode 100644 index 7743cc9..0000000 --- a/03_source/mobile.trunk.1/public/assets/data/locations.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": 1, - "name": "Map Center", - "lat": 43.071584, - "lng": -89.380120 - }, { - "id": 2, - "name": "Monona Terrace Convention Center", - "lat": 43.071584, - "lng": -89.380120 - }, { - "id": 3, - "name": "Ionic HQ", - "lat": 43.074395, - "lng": -89.381056 - }, { - "id": 4, - "name": "Afterparty - Brocach Irish Pub", - "lat": 43.07336, - "lng": -89.38335 - } -] diff --git a/03_source/mobile.trunk.1/public/assets/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/about/austin.jpg b/03_source/mobile.trunk.1/public/assets/img/about/austin.jpg deleted file mode 100644 index b4eb329..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/about/austin.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/about/chicago.jpg b/03_source/mobile.trunk.1/public/assets/img/about/chicago.jpg deleted file mode 100644 index b982b65..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/about/chicago.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/about/madison.jpg b/03_source/mobile.trunk.1/public/assets/img/about/madison.jpg deleted file mode 100644 index c46fbf0..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/about/madison.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/about/seattle.jpg b/03_source/mobile.trunk.1/public/assets/img/about/seattle.jpg deleted file mode 100644 index 4c5946a..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/about/seattle.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/appicon.png b/03_source/mobile.trunk.1/public/assets/img/appicon.png deleted file mode 100644 index 3aa6ee2..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/appicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/appicon.svg b/03_source/mobile.trunk.1/public/assets/img/appicon.svg deleted file mode 100644 index 3d2a03b..0000000 --- a/03_source/mobile.trunk.1/public/assets/img/appicon.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-1.png b/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-1.png deleted file mode 100644 index 9233602..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-1.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-2.png b/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-2.png deleted file mode 100644 index 2fdce7d..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-2.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-3.png b/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-3.png deleted file mode 100644 index a304e88..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-3.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-4.png b/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-4.png deleted file mode 100644 index 2f263d6..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/ica-slidebox-img-4.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/ionic-logo-white.svg b/03_source/mobile.trunk.1/public/assets/img/ionic-logo-white.svg deleted file mode 100644 index 7ebf0cd..0000000 --- a/03_source/mobile.trunk.1/public/assets/img/ionic-logo-white.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/img/speaker-background.png b/03_source/mobile.trunk.1/public/assets/img/speaker-background.png deleted file mode 100644 index 220634e..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speaker-background.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/bear.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/bear.jpg deleted file mode 100755 index a968db7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/bear.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/cheetah.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/cheetah.jpg deleted file mode 100755 index f188a81..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/cheetah.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/duck.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/duck.jpg deleted file mode 100755 index b8b7c52..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/duck.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/eagle.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/eagle.jpg deleted file mode 100755 index ac839a5..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/eagle.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/elephant.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/elephant.jpg deleted file mode 100755 index 0727847..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/elephant.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/giraffe.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/giraffe.jpg deleted file mode 100755 index 30a854c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/giraffe.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/iguana.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/iguana.jpg deleted file mode 100755 index 75d528f..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/iguana.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/kitten.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/kitten.jpg deleted file mode 100755 index 3cc1359..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/kitten.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/lion.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/lion.jpg deleted file mode 100755 index f5eb632..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/lion.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/mouse.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/mouse.jpg deleted file mode 100755 index ca30177..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/mouse.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/puppy.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/puppy.jpg deleted file mode 100755 index d635a8a..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/puppy.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/rabbit.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/rabbit.jpg deleted file mode 100755 index 475d62c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/rabbit.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/img/speakers/turtle.jpg b/03_source/mobile.trunk.1/public/assets/img/speakers/turtle.jpg deleted file mode 100755 index 60c3496..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/img/speakers/turtle.jpg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/beds.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/beds.jpeg deleted file mode 100644 index 8582d80..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/beds.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/coats3.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/coats3.jpeg deleted file mode 100644 index edff4bf..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/coats3.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/coffee_table.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/coffee_table.jpeg deleted file mode 100644 index 21e9601..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/coffee_table.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/dresses3.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/dresses3.jpeg deleted file mode 100644 index 7a34676..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/dresses3.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/formal_shirts2.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/formal_shirts2.jpeg deleted file mode 100644 index 59cd44f..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/formal_shirts2.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/home.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/home.jpeg deleted file mode 100644 index 75f42a3..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/home.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/icon/favicon.png b/03_source/mobile.trunk.1/public/assets/react-shop/icon/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/icon/favicon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/icon/icon.png b/03_source/mobile.trunk.1/public/assets/react-shop/icon/icon.png deleted file mode 100644 index a7f6374..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/icon/icon.png and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/jeans.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/jeans.jpeg deleted file mode 100644 index b90bfd1..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/jeans.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/makeup2.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/makeup2.jpeg deleted file mode 100644 index e291108..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/makeup2.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/men.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/men.jpeg deleted file mode 100644 index 23bf901..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/men.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/office.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/office.jpeg deleted file mode 100644 index 486ec39..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/office.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/shapes.svg b/03_source/mobile.trunk.1/public/assets/react-shop/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/react-shop/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/sportswear2.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/sportswear2.jpeg deleted file mode 100644 index 285614c..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/sportswear2.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/react-shop/women.jpeg b/03_source/mobile.trunk.1/public/assets/react-shop/women.jpeg deleted file mode 100644 index 0ad70ef..0000000 Binary files a/03_source/mobile.trunk.1/public/assets/react-shop/women.jpeg and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/assets/shapes.svg b/03_source/mobile.trunk.1/public/assets/shapes.svg deleted file mode 100644 index d370b4d..0000000 --- a/03_source/mobile.trunk.1/public/assets/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/03_source/mobile.trunk.1/public/favicon.ico b/03_source/mobile.trunk.1/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/03_source/mobile.trunk.1/public/favicon.ico and /dev/null differ diff --git a/03_source/mobile.trunk.1/public/manifest.json b/03_source/mobile.trunk.1/public/manifest.json deleted file mode 100644 index ee4307c..0000000 --- a/03_source/mobile.trunk.1/public/manifest.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "short_name": "Ionic React Conf", - "name": "Ionic React Conf", - "icons": [ - { - "src": "assets/icon/favicon.png", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "assets/icon/icon.png", - "type": "image/png", - "sizes": "512x512", - "purpose": "maskable" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#ffffff", - "background_color": "#ffffff" -} diff --git a/03_source/mobile.trunk.1/src/App.scss b/03_source/mobile.trunk.1/src/App.scss deleted file mode 100644 index b0e2713..0000000 --- a/03_source/mobile.trunk.1/src/App.scss +++ /dev/null @@ -1,29 +0,0 @@ -/* - * App Global CSS - * ---------------------------------------------------------------------------- - * Put style rules here that you want to apply globally. These styles are for - * the entire app and not just one component. - */ - -@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+HK:wght@100..900&family=Noto+Sans+JP:wght@100..900&family=Noto+Sans+SC:wght@100..900&display=swap'); - -.noto-sans-hk-body { - font-family: 'Noto Sans HK', sans-serif; - font-optical-sizing: auto; - font-weight: unset; - font-style: normal; -} - -.noto-sans-sc-body { - font-family: 'Noto Sans SC', sans-serif; - font-optical-sizing: auto; - font-weight: unset; - font-style: normal; -} - -.noto-sans-jp-body { - font-family: 'Noto Sans JP', sans-serif; - font-optical-sizing: auto; - font-weight: unset; - font-style: normal; -} diff --git a/03_source/mobile.trunk.1/src/App.test.tsx b/03_source/mobile.trunk.1/src/App.test.tsx deleted file mode 100644 index 2ae5593..0000000 --- a/03_source/mobile.trunk.1/src/App.test.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import App from './App'; -import { render } from '@testing-library/react'; - -it('renders without crashing', () => { - const { asFragment, container } = render(); - expect(asFragment()).toMatchSnapshot(); -}); diff --git a/03_source/mobile.trunk.1/src/App.tsx b/03_source/mobile.trunk.1/src/App.tsx deleted file mode 100644 index 98fc660..0000000 --- a/03_source/mobile.trunk.1/src/App.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import React, { useEffect } from 'react'; -import { Route } from 'react-router-dom'; -import { IonApp, IonRouterOutlet, IonSplitPane, setupIonicReact } from '@ionic/react'; -import { IonReactRouter } from '@ionic/react-router'; - -import Menu from './components/Menu'; - -/* Core CSS required for Ionic components to work properly */ -import '@ionic/react/css/core.css'; - -/* Basic CSS for apps built with Ionic */ -import '@ionic/react/css/normalize.css'; -import '@ionic/react/css/structure.css'; -import '@ionic/react/css/typography.css'; - -/* Optional CSS utils that can be commented out */ -import '@ionic/react/css/padding.css'; -import '@ionic/react/css/float-elements.css'; -import '@ionic/react/css/text-alignment.css'; -import '@ionic/react/css/text-transformation.css'; -import '@ionic/react/css/flex-utils.css'; -import '@ionic/react/css/display.css'; - -/** - * Ionic Dark Mode - * ----------------------------------------------------- - * For more info, please see: - * https://ionicframework.com/docs/theming/dark-mode - */ - -// import "@ionic/react/css/palettes/dark.always.css"; -// import "@ionic/react/css/palettes/dark.system.css"; -import '@ionic/react/css/palettes/dark.class.css'; - -/* Theme variables */ -import './theme/variables.css'; - -/* Leaflet CSS */ -import 'leaflet/dist/leaflet.css'; - -/* Global styles */ -import './App.scss'; -import MainTabs from './pages/MainTabs'; -import { connect } from './data/connect'; -import { AppContextProvider } from './data/AppContext'; -import { loadConfData } from './data/sessions/sessions.actions'; -import { setIsLoggedIn, setUsername, loadUserData } from './data/user/user.actions'; -import Account from './pages/Account'; -import Login from './pages/Login'; -import MyLogin from './pages/MyLogin'; -import Signup from './pages/Signup'; -import Support from './pages/Support'; -import Tutorial from './pages/Tutorial'; -import HomeOrTutorial from './components/HomeOrTutorial'; -import { Schedule } from './models/Schedule'; -import RedirectToLogin from './components/RedirectToLogin'; -import AppRoute from './AppRoute'; - -import AppDemoRoute from './routes/DemoRoute'; -import Settings from './pages/Settings'; - -setupIonicReact(); - -const App: React.FC = () => { - return ( - - - - ); -}; - -interface StateProps { - darkMode: boolean; - schedule: Schedule; -} - -interface DispatchProps { - loadConfData: typeof loadConfData; - loadUserData: typeof loadUserData; - setIsLoggedIn: typeof setIsLoggedIn; - setUsername: typeof setUsername; -} - -interface IonicAppProps extends StateProps, DispatchProps {} - -const IonicApp: React.FC = ({ darkMode, schedule, setIsLoggedIn, setUsername, loadConfData, loadUserData }) => { - useEffect(() => { - loadUserData(); - loadConfData(); - - // eslint-disable-next-line - }, []); - - return schedule.groups.length === 0 ? ( -
- ) : ( - - - - - - {/* - We use IonRoute here to keep the tabs state intact, - which makes transitions between tabs and non tab pages smooth - */} - - - - - } /> - - - - - - - - - - - { - return ; - }} - /> - - - - - - ); -}; - -export default App; - -const IonicAppConnected = connect<{}, StateProps, DispatchProps>({ - mapStateToProps: (state) => ({ - darkMode: state.user.darkMode, - schedule: state.data.schedule, - }), - mapDispatchToProps: { - loadConfData, - loadUserData, - setIsLoggedIn, - setUsername, - }, - component: IonicApp, -}); diff --git a/03_source/mobile.trunk.1/src/AppRoute.tsx b/03_source/mobile.trunk.1/src/AppRoute.tsx deleted file mode 100644 index 070aafc..0000000 --- a/03_source/mobile.trunk.1/src/AppRoute.tsx +++ /dev/null @@ -1,39 +0,0 @@ -// -// pages without bottom tab bar -// - -import { Route } from 'react-router'; -import NotImplemented from './pages/NotImplemented'; -import EventDetail from './pages/EventDetail'; -import MemberProfile from './pages/MemberProfile'; -import PATHS from './PATHS'; -import Settings from './pages/Settings'; -import ChangeLanguage from './pages/ChangeLanguage'; -import ServiceAgreement from './pages/ServiceAgreement'; -import PrivacyAgreement from './pages/PrivacyAgreement'; -// import OrderDetails from './pages/OrderDetail'; -import OrderDetail from './pages/OrderDetail'; - -const AppRoute: React.FC = () => { - return ( - <> - - - {/* */} - - - - {/* component make the ":id" available in the "OrderDetail" */} - - {/* */} - - {/* */} - - - - - - ); -}; - -export default AppRoute; diff --git a/03_source/mobile.trunk.1/src/PATHS.ts b/03_source/mobile.trunk.1/src/PATHS.ts deleted file mode 100644 index 032b23e..0000000 --- a/03_source/mobile.trunk.1/src/PATHS.ts +++ /dev/null @@ -1,81 +0,0 @@ -const PATHS = { - NOT_IMPLEMENTED: '/not_implemented', - SETTINGS: '/settings', - CHANGE_LANGUAGE: '/change_language', - SERVICE_AGREEMENT: '/service_agreement', - PRIVACY_AGREEMENT: '/privacy_agreement', - SIGN_IN: '/mylogin', - // - ORDER_DETAIL: '/order_detail/:id', - getOrderDetail: (id: string) => `/order_detail/${id}`, - // - TAB_NOT_IMPLEMENTED: '/tabs/not_implemented', - EVENT_LIST: `/tabs/events`, - MESSAGE_LIST: `/tabs/messages`, - NEARBY_LIST: '/tabs/nearby', - ORDERS_LIST: '/tabs/orders', - FAVOURITES_LIST: `/tabs/favourites`, - PROFILE: '/tabs/my_profile', - - // - // DEMO_WEATHER_APP: '/demo-weather-app', - DEMO_WEATHER_APP_UI: '/demo-weather-app-ui', - // - - DEMO_2FA_EXAMPLE: '/demo-2fa-example', - DEMO_ACCORDION_TUTORIAL: '/demo-accordion-tutorial', - DEMO_BANKING_UI: '/demo-banking-ui', - DEMO_BLOG_POST_UI: '/demo-blog-post-ui', - DEMO_CAPACITOR_GOOGLE_MAPS_TUTORIAL: '/demo-capacitor-google-maps-tutorial', - DEMO_CLUB_HOUSE: '/demo-club-house', - DEMO_COLOR_TUTORIAL: '/demo-color-tutorial', - DEMO_DICTIONARY_APP: '/demo-dictionary-app', - DEMO_ECOMMERCE_EXAMPLE: '/demo-ecommerce-example', - DEMO_FACEBOOK_CLONE: '/demo-facebook-clone', - DEMO_FAST_FOOD_APP: '/demo-fast-food-app', - DEMO_FLOATING_TABS: '/demo-floating-tabs', - DEMO_INSTAGRAM_CLONE: '/demo-instagram-clone', - DEMO_KANBAN_BOARD: '/demo-kanban-board', - DEMO_ORDERING_APP: '/demo-ordering-app', - DEMO_PAGE: '/tabs/demo-list', - DEMO_PINTEREST_FLOATING_TAB_BAR: '/demo-pinterest-floating-tab-bar', - DEMO_PROFILE_EXAMPLE: '/demo-profile-example', - DEMO_PULLSTATE_TUTORIAL: '/demo-pullstate-tutorial', - DEMO_QUIZ_APP: '/demo-quiz-app', - DEMO_QUOTE_APP: '/demo-quote-app', - DEMO_REACT_ADD_TO_CART: '/demo-react-add-to-cart', - DEMO_REACT_CALCULATOR: '/demo-react-calculator', - DEMO_REACT_DRAWING_CANVAS: '/demo-react-drawing-canvas', - DEMO_REACT_HOOK_FORM_EXAMPLE: '/demo-react-hook-form-example', - DEMO_REACT_ITEM_LIST: '/demo-react-item-list', - DEMO_REACT_LIFECYCLES: '/demo-react-lifecycles', - DEMO_REACT_LOGIN: '/demo-react-login', - DEMO_REACT_MARVEL_APP: '/demo-react-marvel-app', - DEMO_REACT_MOVIE_APP_WITH_ALGOLIA: '/demo-react-movie-app-with-algolia', - DEMO_REACT_NOTES: '/demo-react-notes', - DEMO_REACT_ONBOARDING_UI: '/demo-react-onboarding-ui', - DEMO_REACT_OVERLAY_HOOKS: '/demo-react-overlay-hooks', - DEMO_REACT_POLL_APP: '/demo-react-poll-app', - DEMO_REACT_PROFILE_DASHBOARD_UI: '/demo-react-profile-dashboard-ui', - - DEMO_REACT_QR_CODE: '/demo-react-qr-code', - DEMO_QR_SCANNER: '/demo-qr-scanner', - - DEMO_REACT_QUOTES: '/demo-react-quotes', - DEMO_REACT_SHOP_UI: '/demo-react-shop-ui', - DEMO_REACT_SHOP: '/demo-react-shop', - DEMO_REACT_SWITCH_TABS: '/demo-react-switch-tabs', - DEMO_REACT_TABS_MENUS_CUSTOM: '/demo-react-tabs-menus-custom', - DEMO_REACT_THEME_SWITCHER: '/demo-react-theme-switcher', - DEMO_REACT_TRAVEL_APP: '/demo-react-travel-app', - DEMO_REACT_WHATSAPP_CLONE: '/demo-react-whatsapp-clone', - DEMO_RECIPE_APP: '/demo-recipe-app', - DEMO_RESTAURANT_FINDER: '/demo-restaurant-finder', - DEMO_SCORE_BOARD: '/demo-score-board', - DEMO_SHOP_APP_UI: '/demo-shop-app-ui', - DEMO_SKELETON_TEXT: '/demo-skeleton-text', - DEMO_SLIDING_PROFILE: '/demo-sliding-profile', - DEMO_STICKY_BOTTOM_SHEET_EXAMPLE: '/demo-sticky-bottom-sheet-example', - DEMO_STORAGE_EXAMPLE: '/demo-storage-example', -}; -export default PATHS; diff --git a/03_source/mobile.trunk.1/src/TabAppRoute.tsx b/03_source/mobile.trunk.1/src/TabAppRoute.tsx deleted file mode 100644 index 7f64525..0000000 --- a/03_source/mobile.trunk.1/src/TabAppRoute.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Route } from 'react-router'; -import NotImplemented from './pages/NotImplemented'; -import EventDetail from './pages/EventDetail'; -import MemberProfile from './pages/MemberProfile'; -import PATHS from './PATHS'; -import MembersNearByList from './pages/MembersNearByList'; -import OrderList from './pages/OrderList'; -import MessageList from './pages/MessageList'; -import Favourites from './pages/Favourites'; -import MyProfile from './pages/MyProfile'; -import EventList from './pages/EventList'; -import Helloworld from './pages/Helloworld'; -// import WeatherDemo from './pages/WeatherDemo/Tab1'; -import DemoList from './pages/DemoList'; -// import DemoReactShop from './pages/DemoReactShop'; - -const TabAppRoute: React.FC = () => { - return ( - <> - - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - {/* */} - } exact={true} /> - - ); -}; - -export default TabAppRoute; diff --git a/03_source/mobile.trunk.1/src/__snapshots__/App.test.tsx.snap b/03_source/mobile.trunk.1/src/__snapshots__/App.test.tsx.snap deleted file mode 100644 index 444f038..0000000 --- a/03_source/mobile.trunk.1/src/__snapshots__/App.test.tsx.snap +++ /dev/null @@ -1,280 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`renders without crashing 1`] = ` - - - - - - - - Menu - - - - - - - Navigate - - - - - - Schedule - - - - - - - - Speakers - - - - - - - - Map - - - - - - - - About - - - - - - - Account - - - - - - Account - - - - - - - - Support - - - - - - - - Logout - - - - - - - Tutorial - - - - Show Tutorial - - - - - -
-
- -
- - - - - - - - All - - - Favorites - - - - - - - - - - - - - - - - - - - No Sessions Found - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - Schedule - - - - - - Speakers - - - - - - Map - - - - - - About - - - -
-
-
-
-
-`; diff --git a/03_source/mobile.trunk.1/src/api/Helloworld.ts b/03_source/mobile.trunk.1/src/api/Helloworld.ts deleted file mode 100644 index 5c5216f..0000000 --- a/03_source/mobile.trunk.1/src/api/Helloworld.ts +++ /dev/null @@ -1,5 +0,0 @@ -function Helloworld() { - console.log('helloworld'); -} - -export { Helloworld }; diff --git a/03_source/mobile.trunk.1/src/api/getEventById.ts b/03_source/mobile.trunk.1/src/api/getEventById.ts deleted file mode 100644 index f75b2b2..0000000 --- a/03_source/mobile.trunk.1/src/api/getEventById.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0042/event-detail -// -// PURPOSE: -// - provide api access to backend db -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getEventById(id: string) { - return axios.get(`${constants.API_ENDPOINT}/v1/events/1`); -} - -export { getEventById }; diff --git a/03_source/mobile.trunk.1/src/api/getEvents.ts b/03_source/mobile.trunk.1/src/api/getEvents.ts deleted file mode 100644 index 14b9e74..0000000 --- a/03_source/mobile.trunk.1/src/api/getEvents.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0042/event-detail -// -// PURPOSE: -// - provide api access to backend db -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getEvents() { - return axios.get(`${constants.API_ENDPOINT}/v1/events`); -} - -export { getEvents }; diff --git a/03_source/mobile.trunk.1/src/api/getMemberById.ts b/03_source/mobile.trunk.1/src/api/getMemberById.ts deleted file mode 100644 index dfee0ed..0000000 --- a/03_source/mobile.trunk.1/src/api/getMemberById.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0042/event-detail -// -// PURPOSE: -// - provide api access to backend db -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getMemberById(id: string) { - return axios.get(`${constants.API_ENDPOINT}/v1/members/2`); -} - -export { getMemberById }; diff --git a/03_source/mobile.trunk.1/src/api/getMembers.ts b/03_source/mobile.trunk.1/src/api/getMembers.ts deleted file mode 100644 index b65bab8..0000000 --- a/03_source/mobile.trunk.1/src/api/getMembers.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0042/event-detail -// -// PURPOSE: -// - provide api access to backend db -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getMembers() { - return axios.get(`${constants.API_ENDPOINT}/v1/members`); -} - -export { getMembers }; diff --git a/03_source/mobile.trunk.1/src/api/getOrders.ts b/03_source/mobile.trunk.1/src/api/getOrders.ts deleted file mode 100644 index 50bb6fd..0000000 --- a/03_source/mobile.trunk.1/src/api/getOrders.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0047/order-page -// -// PURPOSE: -// - provide api access to backend db for orders -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getOrders() { - return axios.get(`${constants.API_ENDPOINT}/v1/orders`); -} - -export { getOrders }; diff --git a/03_source/mobile.trunk.1/src/api/getProfileById.ts b/03_source/mobile.trunk.1/src/api/getProfileById.ts deleted file mode 100644 index 9b09f93..0000000 --- a/03_source/mobile.trunk.1/src/api/getProfileById.ts +++ /dev/null @@ -1,17 +0,0 @@ -// REQ0053/profile-page -// -// PURPOSE: -// - Provides functionality get user profile by id -// -// RULES: -// - T.B.A. -// - -import axios from 'axios'; -import constants from '../constants'; - -function getProfileById(id: string) { - return axios.get(`${constants.API_ENDPOINT}/v1/profile/${id}`); -} - -export { getProfileById }; diff --git a/03_source/mobile.trunk.1/src/components/AboutPopover.tsx b/03_source/mobile.trunk.1/src/components/AboutPopover.tsx deleted file mode 100644 index 030106e..0000000 --- a/03_source/mobile.trunk.1/src/components/AboutPopover.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { IonList, IonItem, IonLabel } from '@ionic/react'; - -interface AboutPopoverProps { - dismiss: () => void; -} - -const AboutPopover: React.FC = ({ dismiss }) => { - const close = (url: string) => { - window.open(url, '_blank'); - dismiss(); - }; - - return ( - - close('https://ionicframework.com/docs')}> - Learn Ionic - - close('https://ionicframework.com/docs/react')}> - Documentation - - close('https://showcase.ionicframework.com')}> - Showcase - - close('https://github.com/ionic-team/ionic-framework')}> - GitHub Repo - - - Support - - - ); -}; - -export default AboutPopover; diff --git a/03_source/mobile.trunk.1/src/components/HomeOrTutorial.tsx b/03_source/mobile.trunk.1/src/components/HomeOrTutorial.tsx deleted file mode 100644 index 8d4f61e..0000000 --- a/03_source/mobile.trunk.1/src/components/HomeOrTutorial.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { connect } from '../data/connect'; -import { Redirect } from 'react-router'; - -interface StateProps { - hasSeenTutorial: boolean; -} - -const HomeOrTutorial: React.FC = ({ hasSeenTutorial }) => { - return hasSeenTutorial ? : ; -}; - -export default connect<{}, StateProps, {}>({ - mapStateToProps: (state) => ({ - hasSeenTutorial: state.user.hasSeenTutorial, - }), - component: HomeOrTutorial, -}); diff --git a/03_source/mobile.trunk.1/src/components/Loading/index.tsx b/03_source/mobile.trunk.1/src/components/Loading/index.tsx deleted file mode 100644 index f306eaf..0000000 --- a/03_source/mobile.trunk.1/src/components/Loading/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { CSSProperties, useState } from 'react'; -import { connect } from '../../data/connect'; -import { IonLoading } from '@ionic/react'; -import { GridLoader } from 'react-spinners'; - -interface OwnProps {} - -interface StateProps {} - -interface DispatchProps {} - -const override: CSSProperties = { - display: 'block', - margin: '0 auto', - borderColor: 'red', -}; - -function Loading() { - let [loading, setLoading] = useState(true); - let [color, setColor] = useState('#333333'); - - return ( - <> -
-
- -
Loading...
-
-
- - ); -} - -export default connect({ - mapStateToProps: (state) => ({}), - component: React.memo(Loading), -}); diff --git a/03_source/mobile.trunk.1/src/components/Menu.css b/03_source/mobile.trunk.1/src/components/Menu.css deleted file mode 100644 index cee89be..0000000 --- a/03_source/mobile.trunk.1/src/components/Menu.css +++ /dev/null @@ -1,89 +0,0 @@ -ion-menu ion-content { - --padding-top: 20px; - --padding-bottom: 20px; - - --background: var(--ion-item-background, var(--ion-background-color, #fff)); -} - -/* Remove background transitions for switching themes */ -ion-menu ion-item { - --transition: none; -} - -ion-item.selected { - --color: var(--ion-color-primary); -} - -/* - * Material Design Menu -*/ -ion-menu.md ion-list { - padding: 20px 0; -} - -ion-menu.md ion-list-header { - padding-left: 18px; - padding-right: 18px; - - text-transform: uppercase; - letter-spacing: 0.1em; - font-size: min(0.875rem, 32px); - font-weight: 450; -} - -ion-menu.md ion-item { - --padding-start: 18px; - - margin-right: 10px; - - border-radius: 0 50px 50px 0; - - font-weight: 500; -} - -ion-menu.md ion-item.selected { - --background: rgba(var(--ion-color-primary-rgb), 0.14); -} - -ion-menu.md ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.md ion-list-header, -ion-menu.md ion-item ion-icon { - color: var(--ion-color-step-650, #5f6368); -} - -ion-menu.md ion-list:not(:last-of-type) { - border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); -} - - -/* - * iOS Menu -*/ -ion-menu.ios ion-list-header { - padding-left: 16px; - padding-right: 16px; - - margin-bottom: 8px; - font-size: clamp(22px, 1.375rem, 40px); -} - -ion-menu.ios ion-list { - padding: 20px 0 0; -} - -ion-menu.ios ion-item { - --padding-start: 16px; - --min-height: 50px; -} - -ion-menu.ios ion-item ion-icon { - font-size: 24px; - color: #73849a; -} - -ion-menu.ios ion-item.selected ion-icon { - color: var(--ion-color-primary); -} diff --git a/03_source/mobile.trunk.1/src/components/Menu.tsx b/03_source/mobile.trunk.1/src/components/Menu.tsx deleted file mode 100644 index 717b85e..0000000 --- a/03_source/mobile.trunk.1/src/components/Menu.tsx +++ /dev/null @@ -1,145 +0,0 @@ -import React from 'react'; -import { RouteComponentProps, withRouter, useLocation } from 'react-router'; - -import { - IonContent, - IonIcon, - IonItem, - IonLabel, - IonList, - IonListHeader, - IonMenu, - IonMenuToggle, - IonToggle, -} from '@ionic/react'; -import { - calendarOutline, - hammer, - moonOutline, - help, - informationCircleOutline, - logIn, - logOut, - mapOutline, - peopleOutline, - person, - personAdd, -} from 'ionicons/icons'; - -import { connect } from '../data/connect'; -import { setDarkMode } from '../data/user/user.actions'; - -import './Menu.css'; - -const routes = { - appPages: [ - { title: 'Schedule', path: '/tabs/schedule', icon: calendarOutline }, - { title: 'Speakers', path: '/tabs/speakers', icon: peopleOutline }, - { title: 'Map', path: '/tabs/map', icon: mapOutline }, - { title: 'About', path: '/tabs/about', icon: informationCircleOutline }, - ], - loggedInPages: [ - { title: 'Account', path: '/account', icon: person }, - { title: 'Support', path: '/support', icon: help }, - { title: 'Logout', path: '/logout', icon: logOut }, - ], - loggedOutPages: [ - { title: 'Login', path: '/login', icon: logIn }, - { title: 'Support', path: '/support', icon: help }, - { title: 'Signup', path: '/signup', icon: personAdd }, - ], -}; - -interface Pages { - title: string; - path: string; - icon: string; - routerDirection?: string; -} -interface StateProps { - darkMode: boolean; - isAuthenticated: boolean; - menuEnabled: boolean; -} - -interface DispatchProps { - setDarkMode: typeof setDarkMode; -} - -interface MenuProps extends RouteComponentProps, StateProps, DispatchProps {} - -const Menu: React.FC = ({ - darkMode, - history, - isAuthenticated, - setDarkMode, - menuEnabled, -}) => { - const location = useLocation(); - - function renderlistItems(list: Pages[]) { - return list - .filter((route) => !!route.path) - .map((p) => ( - - - - {p.title} - - - )); - } - - return ( - - - - Conference - {renderlistItems(routes.appPages)} - - - Account - {isAuthenticated - ? renderlistItems(routes.loggedInPages) - : renderlistItems(routes.loggedOutPages)} - - - setDarkMode(!darkMode)}> - Dark Mode - - - - - Tutorial - { - history.push('/tutorial'); - }} - > - - Show Tutorial - - - - - ); -}; - -export default connect<{}, StateProps, {}>({ - mapStateToProps: (state) => ({ - darkMode: state.user.darkMode, - isAuthenticated: state.user.isLoggedin, - menuEnabled: state.data.menuEnabled, - }), - mapDispatchToProps: { - setDarkMode, - }, - component: withRouter(Menu), -}); diff --git a/03_source/mobile.trunk.1/src/components/NoSavedEvents/alert-svgrepo-com.svg b/03_source/mobile.trunk.1/src/components/NoSavedEvents/alert-svgrepo-com.svg deleted file mode 100644 index 4a975fe..0000000 --- a/03_source/mobile.trunk.1/src/components/NoSavedEvents/alert-svgrepo-com.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - alert - Created with Sketch Beta. - - - - - - - - - - - \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/components/NoSavedEvents/index.tsx b/03_source/mobile.trunk.1/src/components/NoSavedEvents/index.tsx deleted file mode 100644 index 2b8a86e..0000000 --- a/03_source/mobile.trunk.1/src/components/NoSavedEvents/index.tsx +++ /dev/null @@ -1,78 +0,0 @@ -// REQ0088/favorite-event-empty - -import React, { CSSProperties, useState } from 'react'; -import { connect } from '../../data/connect'; -import { IonIcon, IonLoading } from '@ionic/react'; -import { GridLoader } from 'react-spinners'; -import { alertCircleOutline, alertOutline } from 'ionicons/icons'; -// import AlertSvg from './alert-svgrepo-com.svg'; - -interface OwnProps {} - -interface StateProps {} - -interface DispatchProps {} - -const override: CSSProperties = { - display: 'block', - margin: '0 auto', - borderColor: 'red', -}; - -function NoSavedEvents() { - let [loading, setLoading] = useState(true); - let [color, setColor] = useState('#333333'); - - return ( - <> -
-
-
- -
-
You have not saved yet
-
- To add your favourites,
- simply take a look here -
-
-
-
- - ); -} - -export default connect({ - mapStateToProps: (state) => ({}), - component: React.memo(NoSavedEvents), -}); diff --git a/03_source/mobile.trunk.1/src/components/RedirectToLogin.tsx b/03_source/mobile.trunk.1/src/components/RedirectToLogin.tsx deleted file mode 100644 index ca86a65..0000000 --- a/03_source/mobile.trunk.1/src/components/RedirectToLogin.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React, { useEffect, useContext } from 'react'; -import { IonRouterContext } from '@ionic/react'; - -interface RedirectToLoginProps { - setIsLoggedIn: Function; - setUsername: Function; -} - -const RedirectToLogin: React.FC = ({ setIsLoggedIn, setUsername }) => { - const ionRouterContext = useContext(IonRouterContext); - useEffect(() => { - setIsLoggedIn(false); - setUsername(undefined); - ionRouterContext.push('/tabs/events'); - }, [setIsLoggedIn, setUsername]); - return null; -}; - -export default RedirectToLogin; diff --git a/03_source/mobile.trunk.1/src/components/SessionList.tsx b/03_source/mobile.trunk.1/src/components/SessionList.tsx deleted file mode 100644 index ac8f9fd..0000000 --- a/03_source/mobile.trunk.1/src/components/SessionList.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { - IonItemDivider, - IonItemGroup, - IonLabel, - IonList, - IonListHeader, - IonAlert, - AlertButton, -} from '@ionic/react'; -import React, { useState, useCallback, useRef, useEffect } from 'react'; -import { Schedule, Session } from '../models/Schedule'; -import SessionListItem from './SessionListItem'; -import { connect } from '../data/connect'; -import { addFavorite, removeFavorite } from '../data/sessions/sessions.actions'; - -interface OwnProps { - schedule: Schedule; - listType: 'all' | 'favorites'; - hide: boolean; -} - -interface StateProps { - favoriteSessions: number[]; -} - -interface DispatchProps { - addFavorite: typeof addFavorite; - removeFavorite: typeof removeFavorite; -} - -interface SessionListProps extends OwnProps, StateProps, DispatchProps {} - -const SessionList: React.FC = ({ - addFavorite, - removeFavorite, - favoriteSessions, - hide, - schedule, - listType, -}) => { - const scheduleListRef = useRef(null); - const [showAlert, setShowAlert] = useState(false); - const [alertHeader, setAlertHeader] = useState(''); - const [alertMessage, setAlertMessage] = useState(''); - const [alertButtons, setAlertButtons] = useState<(AlertButton | string)[]>([]); - - const handleShowAlert = useCallback((header: string, message: string, buttons: AlertButton[]) => { - setAlertHeader(header); - setAlertMessage(message); - setAlertButtons(buttons); - setShowAlert(true); - }, []); - - useEffect(() => { - if (scheduleListRef.current) { - scheduleListRef.current.closeSlidingItems(); - } - }, [hide]); - - if (schedule.groups.length === 0 && !hide) { - return ( - - No Sessions Found - - ); - } - - return ( - <> - - {schedule.groups.map((group, index: number) => ( - - - {group.time} - - {group.sessions.map((session: Session, sessionIndex: number) => ( - -1} - onAddFavorite={addFavorite} - onRemoveFavorite={removeFavorite} - key={`group-${index}-${sessionIndex}`} - session={session} - listType={listType} - /> - ))} - - ))} - - setShowAlert(false)} - > - - ); -}; - -export default connect({ - mapStateToProps: (state) => ({ - favoriteSessions: state.data.favorites, - }), - mapDispatchToProps: { - addFavorite, - removeFavorite, - }, - component: SessionList, -}); diff --git a/03_source/mobile.trunk.1/src/components/SessionListFilter.css b/03_source/mobile.trunk.1/src/components/SessionListFilter.css deleted file mode 100644 index 4516c7a..0000000 --- a/03_source/mobile.trunk.1/src/components/SessionListFilter.css +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Material Design - */ - -.md .session-list-filter ion-toolbar ion-button { - text-transform: capitalize; - letter-spacing: 0; -} - -.md .session-list-filter ion-checkbox { - --checkbox-background-checked: transparent; - --border-color: transparent; - --border-color-checked: transparent; - --checkmark-color: var(--ion-color-primary); -} - -.md .session-list-filter ion-list { - background: inherit; -} - -/* - * iOS - */ - -.ios .session-list-filter ion-list-header { - margin-top: 10px; -} - -.ios .session-list-filter ion-checkbox { - color: var(--ion-color-primary); -} diff --git a/03_source/mobile.trunk.1/src/components/SessionListFilter.tsx b/03_source/mobile.trunk.1/src/components/SessionListFilter.tsx deleted file mode 100644 index b6345c1..0000000 --- a/03_source/mobile.trunk.1/src/components/SessionListFilter.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import React from 'react'; - -import { getMode } from '@ionic/core'; -import { - IonHeader, - IonToolbar, - IonButtons, - IonButton, - IonTitle, - IonContent, - IonList, - IonListHeader, - IonItem, - IonLabel, - IonCheckbox, - IonFooter, - IonIcon, -} from '@ionic/react'; -import { - logoReact, - call, - document, - logoIonic, - hammer, - restaurant, - cog, - colorPalette, - construct, - compass, -} from 'ionicons/icons'; - -import './SessionListFilter.css'; - -import { connect } from '../data/connect'; -import { updateFilteredTracks } from '../data/sessions/sessions.actions'; - -interface OwnProps { - onDismissModal: () => void; -} - -interface StateProps { - allTracks: string[]; - filteredTracks: string[]; -} - -interface DispatchProps { - updateFilteredTracks: typeof updateFilteredTracks; -} - -type SessionListFilterProps = OwnProps & StateProps & DispatchProps; - -const SessionListFilter: React.FC = ({ - allTracks, - filteredTracks, - onDismissModal, - updateFilteredTracks, -}) => { - const ios = getMode() === 'ios'; - - const toggleTrackFilter = (track: string) => { - if (filteredTracks.indexOf(track) > -1) { - updateFilteredTracks(filteredTracks.filter((x) => x !== track)); - } else { - updateFilteredTracks([...filteredTracks, track]); - } - }; - - const handleDeselectAll = () => { - updateFilteredTracks([]); - }; - - const handleSelectAll = () => { - updateFilteredTracks([...allTracks]); - }; - - const iconMap: { [key: string]: any } = { - React: logoReact, - Documentation: document, - Food: restaurant, - Ionic: logoIonic, - Tooling: hammer, - Design: colorPalette, - Services: cog, - Workshop: construct, - Navigation: compass, - Communication: call, - }; - - return ( - <> - - - - {ios && Cancel} - {!ios && Reset} - - - Filter Sessions - - - - Done - - - - - - - - Tracks - - {allTracks.map((track) => ( - - {ios && ( - - ))} - - - - {ios && ( - - - - Deselect All - - - Select All - - - - )} - - ); -}; - -export default connect({ - mapStateToProps: (state) => ({ - allTracks: state.data.allTracks, - filteredTracks: state.data.filteredTracks, - }), - mapDispatchToProps: { - updateFilteredTracks, - }, - component: SessionListFilter, -}); diff --git a/03_source/mobile.trunk.1/src/components/SessionListItem.tsx b/03_source/mobile.trunk.1/src/components/SessionListItem.tsx deleted file mode 100644 index 32b3b25..0000000 --- a/03_source/mobile.trunk.1/src/components/SessionListItem.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import React, { useRef } from 'react'; -import { - IonItemSliding, - IonItem, - IonLabel, - IonItemOptions, - IonItemOption, - AlertButton, - useIonToast, -} from '@ionic/react'; -import { Session } from '../models/Schedule'; - -interface SessionListItemProps { - session: Session; - listType: 'all' | 'favorites'; - onAddFavorite: (id: number) => void; - onRemoveFavorite: (id: number) => void; - onShowAlert: (header: string, message: string, buttons: AlertButton[]) => void; - isFavorite: boolean; -} - -const SessionListItem: React.FC = ({ - isFavorite, - onAddFavorite, - onRemoveFavorite, - onShowAlert, - session, - listType, -}) => { - const [presentToast] = useIonToast(); - const ionItemSlidingRef = useRef(null); - - const dismissAlert = () => { - ionItemSlidingRef.current && ionItemSlidingRef.current.close(); - }; - - const removeFavoriteSession = (title: string) => { - onAddFavorite(session.id); - onShowAlert(title, 'Would you like to remove this session from your favorites?', [ - { - text: 'Cancel', - handler: dismissAlert, - }, - { - text: 'Remove', - handler: () => { - onRemoveFavorite(session.id); - dismissAlert(); - }, - }, - ]); - }; - - const addFavoriteSession = async () => { - if (isFavorite) { - // Prompt to remove favorite - removeFavoriteSession('Favorite already added'); - } else { - // Add as a favorite - onAddFavorite(session.id); - - // Close the open item - ionItemSlidingRef.current && ionItemSlidingRef.current.close(); - - // Create a toast - presentToast({ - message: `${session.name} was successfully added as a favorite.`, - duration: 3000, - buttons: [ - { - text: 'Close', - role: 'cancel', - }, - ], - }); - } - }; - - return ( - - - -

{session.name}

-

- {session.timeStart} —  - {session.timeEnd}:  - {session.location} -

-
-
- - {listType === 'favorites' ? ( - removeFavoriteSession('Remove Favorite')}> - Remove - - ) : ( - - Favorite - - )} - -
- ); -}; - -export default React.memo(SessionListItem); diff --git a/03_source/mobile.trunk.1/src/components/ShareSocialFab.tsx b/03_source/mobile.trunk.1/src/components/ShareSocialFab.tsx deleted file mode 100644 index 210c66e..0000000 --- a/03_source/mobile.trunk.1/src/components/ShareSocialFab.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { IonLoading, IonFab, IonFabButton, IonIcon, IonFabList } from '@ionic/react'; -import { shareSocial, logoVimeo, logoInstagram, logoTwitter, logoFacebook } from 'ionicons/icons'; -import React, { useState } from 'react'; - -const ShareSocialFab: React.FC = () => { - const [loadingMessage, setLoadingMessage] = useState(''); - const [showLoading, setShowLoading] = useState(false); - - const openSocial = (network: string) => { - setLoadingMessage(`Posting to ${network}`); - setShowLoading(true); - }; - - return ( - <> - setShowLoading(false)} - /> - - - - - - openSocial('Vimeo')}> - - - openSocial('Instagram')}> - - - openSocial('Twitter')}> - - - openSocial('Facebook')}> - - - - - - ); -}; - -export default ShareSocialFab; diff --git a/03_source/mobile.trunk.1/src/components/SpeakerItem.tsx b/03_source/mobile.trunk.1/src/components/SpeakerItem.tsx deleted file mode 100644 index 242a9df..0000000 --- a/03_source/mobile.trunk.1/src/components/SpeakerItem.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { Session } from '../models/Schedule'; -import { Speaker } from '../models/Speaker'; -import { - IonCard, - IonCardHeader, - IonItem, - IonLabel, - IonAvatar, - IonCardContent, - IonList, -} from '@ionic/react'; - -interface SpeakerItemProps { - speaker: Speaker; - sessions: Session[]; -} - -const SpeakerItem: React.FC = ({ speaker, sessions }) => { - return ( - <> - - - - - Speaker profile pic - - -

{speaker.name}

-

{speaker.title}

-
-
-
- - - - {sessions.map((session) => ( - - -

{session.name}

-
-
- ))} - - -

About {speaker.name}

-
-
-
-
-
- - ); -}; - -export default SpeakerItem; diff --git a/03_source/mobile.trunk.1/src/constants.ts b/03_source/mobile.trunk.1/src/constants.ts deleted file mode 100644 index b6f26ac..0000000 --- a/03_source/mobile.trunk.1/src/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -const constants = { API_ENDPOINT: import.meta.env.VITE_API_ENDPOINT }; - -export default constants; diff --git a/03_source/mobile.trunk.1/src/context/action.tsx b/03_source/mobile.trunk.1/src/context/action.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/context/index.ts b/03_source/mobile.trunk.1/src/context/index.ts deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/context/jwt/action.tsx b/03_source/mobile.trunk.1/src/context/jwt/action.tsx deleted file mode 100644 index e091237..0000000 --- a/03_source/mobile.trunk.1/src/context/jwt/action.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import axios, { endpoints } from '../../lib/axios'; - -import { setSession } from './utils'; -import { JWT_STORAGE_KEY } from './constant'; - -// ---------------------------------------------------------------------- - -export type SignInParams = { - email: string; - password: string; -}; - -export type SignUpParams = { - email: string; - password: string; - firstName: string; - lastName: string; -}; - -const ERR_ACCESS_TOKEN_NOT_FOUND = `Access token not found in response`; - -/** ************************************** - * Sign in - *************************************** */ -export const signInWithPassword = async ({ - email, - password, -}: SignInParams): Promise => { - try { - const params = { email, password }; - - const res = await axios.post(endpoints.auth.signIn, params); - - const { accessToken } = res.data; - - console.log({ t: res.data }); - - if (!accessToken) { - throw new Error(ERR_ACCESS_TOKEN_NOT_FOUND); - } - - // setSession(accessToken); - return accessToken; - } catch (error) { - console.error('Error during sign in:', error); - throw error; - } -}; - -/** ************************************** - * Sign up - *************************************** */ -export const signUp = async ({ - email, - password, - firstName, - lastName, -}: SignUpParams): Promise => { - const params = { - email, - password, - firstName, - lastName, - }; - - try { - const res = await axios.post(endpoints.auth.signUp, params); - - const { accessToken } = res.data; - - if (!accessToken) { - throw new Error('Access token not found in response'); - } - - sessionStorage.setItem(JWT_STORAGE_KEY, accessToken); - } catch (error) { - console.error('Error during sign up:', error); - throw error; - } -}; - -/** ************************************** - * Sign out - *************************************** */ -export const signOut = async (): Promise => { - try { - await setSession(null); - } catch (error) { - console.error('Error during sign out:', error); - throw error; - } -}; diff --git a/03_source/mobile.trunk.1/src/context/jwt/constant.ts b/03_source/mobile.trunk.1/src/context/jwt/constant.ts deleted file mode 100644 index c9cb827..0000000 --- a/03_source/mobile.trunk.1/src/context/jwt/constant.ts +++ /dev/null @@ -1 +0,0 @@ -export const JWT_STORAGE_KEY = 'jwt_access_token'; diff --git a/03_source/mobile.trunk.1/src/context/jwt/utils.tsx b/03_source/mobile.trunk.1/src/context/jwt/utils.tsx deleted file mode 100644 index 6bdb963..0000000 --- a/03_source/mobile.trunk.1/src/context/jwt/utils.tsx +++ /dev/null @@ -1,97 +0,0 @@ -// import { paths } from 'src/routes/paths'; - -import axios from '../../lib/axios'; - -import { JWT_STORAGE_KEY } from './constant.js'; -import PATHS from '../../PATHS.js'; - -// ---------------------------------------------------------------------- - -export function jwtDecode(token: string) { - try { - if (!token) return null; - - const parts = token.split('.'); - if (parts.length < 2) { - throw new Error('Invalid token!'); - } - - const base64Url = parts[1]; - const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); - const decoded = JSON.parse(atob(base64)); - - return decoded; - } catch (error) { - console.error('Error decoding token:', error); - throw error; - } -} - -// ---------------------------------------------------------------------- - -export function isValidToken(accessToken: string) { - if (!accessToken) { - return false; - } - - try { - const decoded = jwtDecode(accessToken); - - if (!decoded || !('exp' in decoded)) { - return false; - } - - const currentTime = Date.now() / 1000; - - return decoded.exp > currentTime; - } catch (error) { - console.error('Error during token validation:', error); - return false; - } -} - -// ---------------------------------------------------------------------- - -export function tokenExpired(exp: number) { - const currentTime = Date.now(); - const timeLeft = exp * 1000 - currentTime; - - setTimeout(() => { - try { - alert('Token expired!'); - sessionStorage.removeItem(JWT_STORAGE_KEY); - window.location.href = PATHS.SIGN_IN; - } catch (error) { - console.error('Error during token expiration:', error); - throw error; - } - }, timeLeft); -} - -// ---------------------------------------------------------------------- - -const INVALID_ACCESS_TOKEN = 'Invalid access token!'; - -export async function setSession(accessToken: string | null) { - try { - if (accessToken) { - sessionStorage.setItem(JWT_STORAGE_KEY, accessToken); - - axios.defaults.headers.common.Authorization = `Bearer ${accessToken}`; - - const decodedToken = jwtDecode(accessToken); // ~3 days by minimals server - - if (decodedToken && 'exp' in decodedToken) { - tokenExpired(decodedToken.exp); - } else { - throw new Error(INVALID_ACCESS_TOKEN); - } - } else { - sessionStorage.removeItem(JWT_STORAGE_KEY); - delete axios.defaults.headers.common.Authorization; - } - } catch (error) { - console.error('Error during set session:', error); - throw error; - } -} diff --git a/03_source/mobile.trunk.1/src/data/AppContext.tsx b/03_source/mobile.trunk.1/src/data/AppContext.tsx deleted file mode 100644 index d1375ad..0000000 --- a/03_source/mobile.trunk.1/src/data/AppContext.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React, { createContext, PropsWithChildren, useReducer } from 'react'; -import { initialState, AppState, reducers } from './state'; - -export interface AppContextState { - state: AppState; - dispatch: React.Dispatch; -} - -export const AppContext = createContext({ - state: initialState, - dispatch: () => undefined, -}); - -export const AppContextProvider: React.FC = ({ children }) => { - const [store, dispatch] = useReducer(reducers, initialState); - - return ( - - {children} - - ); -}; diff --git a/03_source/mobile.trunk.1/src/data/combineReducers.ts b/03_source/mobile.trunk.1/src/data/combineReducers.ts deleted file mode 100644 index 44769b0..0000000 --- a/03_source/mobile.trunk.1/src/data/combineReducers.ts +++ /dev/null @@ -1,18 +0,0 @@ -interface R { - [key: string]: (...args: any) => any; -} - -export function combineReducers(reducers: R) { - type keys = keyof typeof reducers; - type returnType = { [K in keys]: ReturnType<(typeof reducers)[K]> }; - const combinedReducer = (state: any, action: any) => { - const newState: returnType = {} as any; - const keys = Object.keys(reducers); - keys.forEach((key) => { - const result = reducers[key](state[key], action); - newState[key as keys] = result || state[key]; - }); - return newState; - }; - return combinedReducer; -} diff --git a/03_source/mobile.trunk.1/src/data/connect.tsx b/03_source/mobile.trunk.1/src/data/connect.tsx deleted file mode 100644 index 8d6a24a..0000000 --- a/03_source/mobile.trunk.1/src/data/connect.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React, { useContext, useMemo } from 'react'; -import { AppContext } from './AppContext'; -import { DispatchObject } from '../util/types'; -import { AppState } from './state'; - -interface ConnectParams { - mapStateToProps?: (state: AppState, props: TOwnProps) => TStateProps; - mapDispatchToProps?: TDispatchProps; - component: React.ComponentType; -} - -export function connect({ - mapStateToProps = () => ({}) as TStateProps, - mapDispatchToProps = {} as TDispatchProps, - component, -}: ConnectParams): React.FunctionComponent { - const Connect = (ownProps: TOwnProps) => { - const context = useContext(AppContext); - - const dispatchFuncs = useMemo(() => { - const dispatchFuncs: { [key: string]: any } = {}; - if (mapDispatchToProps) { - Object.keys(mapDispatchToProps).forEach((key) => { - const oldFunc = (mapDispatchToProps as any)[key]; - const newFunc = (...args: any) => { - const dispatchFunc = oldFunc(...args); - if (typeof dispatchFunc === 'object') { - context.dispatch(dispatchFunc); - } else { - const result = dispatchFunc(context.dispatch); - if (typeof result === 'object' && result.then) { - result.then((dispatchObject?: DispatchObject) => { - if (dispatchObject && dispatchObject.type) { - context.dispatch(dispatchObject); - } - }); - } - } - }; - dispatchFuncs[key] = newFunc; - }); - } - return dispatchFuncs; - // eslint-disable-next-line - }, [mapDispatchToProps]); - - const props = useMemo(() => { - return Object.assign({}, ownProps, mapStateToProps(context.state, ownProps), dispatchFuncs); - // eslint-disable-next-line - }, [ownProps, context.state]); - - return React.createElement(component, props); - }; - return React.memo(Connect as any); -} diff --git a/03_source/mobile.trunk.1/src/data/dataApi.ts b/03_source/mobile.trunk.1/src/data/dataApi.ts deleted file mode 100644 index e08558d..0000000 --- a/03_source/mobile.trunk.1/src/data/dataApi.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { GetResult, Preferences as Storage } from '@capacitor/preferences'; -import { Schedule, Session } from '../models/Schedule'; -import { Speaker } from '../models/Speaker'; -import { Location } from '../models/Location'; -import axios from 'axios'; -import constants from '../constants'; -import { IOrderItem } from '../models/Order'; -import { Event } from '../models/Event'; - -const dataUrl = '/assets/data/data.json'; -const locationsUrl = '/assets/data/locations.json'; - -const HAS_LOGGED_IN = 'hasLoggedIn'; -const HAS_SEEN_TUTORIAL = 'hasSeenTutorial'; -const USERNAME = 'username'; -const ACCESS_TOKEN = 'a_token'; -const ACTIVE_SESSION = 'a_session'; - -export const getConfData = async () => { - const response = await Promise.all([ - fetch(dataUrl), - fetch(locationsUrl), - fetch(`${constants.API_ENDPOINT}/api/order/list`), - fetch(`${constants.API_ENDPOINT}/api/event/list`), - // axios.get(`${constants.API_ENDPOINT}/v1/events`), - // axios.get(`${constants.API_ENDPOINT}/v1/members`), - // - ]); - - const responseData = await response[0].json(); - const schedule = responseData.schedule[0] as Schedule; - const sessions = parseSessions(schedule); - const speakers = responseData.speakers as Speaker[]; - const locations = (await response[1].json()) as Location[]; - const allTracks = sessions - .reduce((all, session) => all.concat(session.tracks), [] as string[]) - .filter((trackName, index, array) => array.indexOf(trackName) === index) - .sort(); - - // const events = response[2].data; - // const nearByMembers = response[3].data; - - // TODO: update this due to not use axios anymore - // the data object is not available - // const orders = response[2].data.orders as IOrderItem[]; - // const events = response[3].data.events as Event[]; - const orderResponse = response[2]; - let orders = { - result: { status: orderResponse.status, ok: orderResponse.ok }, - data: [], - }; - if (orderResponse.status == 200) { - orders = { ...orders, data: await orderResponse.json() }; - } - - const eventResponse = response[3]; - let events = { - result: { status: eventResponse.status, ok: eventResponse.ok }, - data: [], - }; - if (eventResponse.status == 200) { - events = { ...events, data: await eventResponse.json() }; - } - - const nearByMembers = []; - - const data = { - schedule, - sessions, - locations, - speakers, - allTracks, - filteredTracks: [...allTracks], - // - events, - // nearByMembers, - orders, - hello: 'world', - // - }; - - return data; -}; - -export const getUserData = async () => { - const response = await Promise.all([ - Storage.get({ key: HAS_LOGGED_IN }), - Storage.get({ key: HAS_SEEN_TUTORIAL }), - Storage.get({ key: USERNAME }), - ]); - const isLoggedin = (await response[0].value) === 'true'; - const hasSeenTutorial = (await response[1].value) === 'true'; - const username = (await response[2].value) || undefined; - const data = { - isLoggedin, - hasSeenTutorial, - username, - }; - return data; -}; - -export const setIsLoggedInData = async (isLoggedIn: boolean) => { - await Storage.set({ key: HAS_LOGGED_IN, value: JSON.stringify(isLoggedIn) }); -}; - -export const setHasSeenTutorialData = async (hasSeenTutorial: boolean) => { - await Storage.set({ - key: HAS_SEEN_TUTORIAL, - value: JSON.stringify(hasSeenTutorial), - }); -}; - -export const setUsernameData = async (username?: string) => { - if (!username) { - await Storage.remove({ key: USERNAME }); - } else { - await Storage.set({ key: USERNAME, value: username }); - } -}; - -export const setAccessTokenData = async (accessToken?: string) => { - if (!accessToken) { - await Storage.remove({ key: ACCESS_TOKEN }); - } else { - await Storage.set({ key: ACCESS_TOKEN, value: accessToken }); - } -}; - -export const getAccessTokenData = async (): Promise => { - return Storage.get({ key: ACCESS_TOKEN }); -}; - -function parseSessions(schedule: Schedule) { - const sessions: Session[] = []; - schedule.groups.forEach((g) => { - g.sessions.forEach((s) => sessions.push(s)); - }); - return sessions; -} - -export const setActiveSessionData = async (activeSession: any) => { - if (!activeSession) { - await Storage.remove({ key: ACTIVE_SESSION }); - } else { - await Storage.set({ key: ACTIVE_SESSION, value: JSON.stringify(activeSession) }); - } -}; - -export const getActiveSessionData = async (): Promise => { - return Storage.get({ key: JSON.parse(ACTIVE_SESSION) }); -}; diff --git a/03_source/mobile.trunk.1/src/data/locations/locations.actions.ts b/03_source/mobile.trunk.1/src/data/locations/locations.actions.ts deleted file mode 100644 index 62071b4..0000000 --- a/03_source/mobile.trunk.1/src/data/locations/locations.actions.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { DispatchObject } from '../../util/types'; -import { Location } from '../../models/Location'; - -export const SET_LOCATIONS = 'SET_LOCATIONS'; - -export const setLocations = (locations: Location[]): DispatchObject => ({ - type: SET_LOCATIONS, - payload: locations, -}); - -export const loadLocations = () => async (dispatch: (action: DispatchObject) => void) => { - try { - const response = await fetch('/assets/data/locations.json'); - const locations = await response.json(); - dispatch(setLocations(locations)); - } catch (error) { - console.error('Error loading locations:', error); - // Set default locations if data cannot be loaded - dispatch( - setLocations([ - { - id: 1, - name: 'Monona Terrace Convention Center', - lat: 43.071584, - lng: -89.38012, - center: true, - }, - ]) - ); - } -}; diff --git a/03_source/mobile.trunk.1/src/data/locations/locations.reducer.ts b/03_source/mobile.trunk.1/src/data/locations/locations.reducer.ts deleted file mode 100644 index 87cbf78..0000000 --- a/03_source/mobile.trunk.1/src/data/locations/locations.reducer.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { LocationState, initialState } from '../../models/Location'; -import { SET_LOCATIONS } from './locations.actions'; - -export const locationsReducer = ( - state: LocationState = initialState, - action: { type: string; payload: any } -): LocationState => { - switch (action.type) { - case SET_LOCATIONS: - return { - ...state, - locations: action.payload, - }; - default: - return state; - } -}; diff --git a/03_source/mobile.trunk.1/src/data/selectors.ts b/03_source/mobile.trunk.1/src/data/selectors.ts deleted file mode 100644 index 1b06acc..0000000 --- a/03_source/mobile.trunk.1/src/data/selectors.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { createSelector } from 'reselect'; -import { Schedule, Session, ScheduleGroup } from '../models/Schedule'; -import { Speaker } from '../models/Speaker'; -import { Location } from '../models/Location'; - -import { AppState } from './state'; -import { IOrderItem } from '../models/Order'; -import { Event } from '../models/Event'; - -const getSchedule = (state: AppState) => { - return state.data.schedule; -}; - -export const getSpeakers = (state: AppState) => state.data.speakers; - -const getSessions = (state: AppState) => state.data.sessions; -const getFilteredTracks = (state: AppState) => state.data.filteredTracks; -const getFavoriteIds = (state: AppState) => state.data.favorites; -const getSearchText = (state: AppState) => state.data.searchText; - -export const getEvents = (state: AppState) => { - return state.data.events; -}; - -export const getNearbyMembers = (state: AppState) => state.data.nearByMembers; - -export const getOrders = (state: AppState) => { - return state.data.orders; -}; - -export const getFilteredSchedule = createSelector( - getSchedule, - getFilteredTracks, - (schedule, filteredTracks) => { - const groups: ScheduleGroup[] = []; - - // Helper function to convert 12-hour time to 24-hour time for proper sorting - const convertTo24Hour = (timeStr: string) => { - const [time, period] = timeStr.toLowerCase().split(' '); - let [hours, minutes] = time.split(':').map(Number); - - if (period === 'pm' && hours !== 12) { - hours += 12; - } else if (period === 'am' && hours === 12) { - hours = 0; - } - - return `${hours.toString().padStart(2, '0')}:${minutes || '00'}`; - }; - - // Sort the groups by time - const sortedGroups = [...schedule.groups].sort((a, b) => { - const timeA = convertTo24Hour(a.time); - const timeB = convertTo24Hour(b.time); - return timeA.localeCompare(timeB); - }); - - sortedGroups.forEach((group: ScheduleGroup) => { - const sessions: Session[] = []; - group.sessions.forEach((session) => { - session.tracks.forEach((track) => { - if (filteredTracks.indexOf(track) > -1) { - sessions.push(session); - } - }); - }); - - if (sessions.length) { - // Sort sessions within each group by start time - const sortedSessions = sessions.sort((a, b) => { - const timeA = convertTo24Hour(a.timeStart); - const timeB = convertTo24Hour(b.timeStart); - return timeA.localeCompare(timeB); - }); - - const groupToAdd: ScheduleGroup = { - time: group.time, - sessions: sortedSessions, - }; - groups.push(groupToAdd); - } - }); - - return { - date: schedule.date, - groups, - } as Schedule; - } -); - -export const getSearchedSchedule = createSelector( - getFilteredSchedule, - getSearchText, - (schedule, searchText) => { - if (!searchText) { - return schedule; - } - const groups: ScheduleGroup[] = []; - schedule.groups.forEach((group) => { - const sessions = group.sessions.filter( - (s) => s.name.toLowerCase().indexOf(searchText.toLowerCase()) > -1 - ); - if (sessions.length) { - const groupToAdd: ScheduleGroup = { - time: group.time, - sessions, - }; - groups.push(groupToAdd); - } - }); - return { - date: schedule.date, - groups, - } as Schedule; - } -); - -export const getScheduleList = createSelector(getSearchedSchedule, (schedule) => schedule); - -export const getGroupedFavorites = createSelector( - getScheduleList, - getFavoriteIds, - (schedule, favoriteIds) => { - const groups: ScheduleGroup[] = []; - schedule.groups.forEach((group) => { - const sessions = group.sessions.filter((s) => favoriteIds.indexOf(s.id) > -1); - if (sessions.length) { - const groupToAdd: ScheduleGroup = { - time: group.time, - sessions, - }; - groups.push(groupToAdd); - } - }); - return { - date: schedule.date, - groups, - } as Schedule; - } -); - -const getIdParam = (_state: AppState, props: any) => { - return props.match.params['id']; -}; - -export const getSession = createSelector(getSessions, getIdParam, (sessions, id) => { - return sessions.find((s: Session) => s.id === id); -}); - -export const getSpeaker = createSelector(getSpeakers, getIdParam, (speakers, id) => - speakers.find((x: Speaker) => x.id === id) -); - -export const getEvent = createSelector(getEvents, getIdParam, (data_events, id) => { - const { - data: { events }, - } = data_events; - - return events.find((x: Event) => x.id === id); -}); - -export const getOrder = createSelector(getOrders, getIdParam, (data_orders, id) => { - const { - data: { orders }, - } = data_orders; - - return orders.find((x: IOrderItem) => x.id === id); -}); - -export const getSpeakerSessions = createSelector(getSessions, (sessions) => { - const speakerSessions: { [key: string]: Session[] } = {}; - - sessions.forEach((session: Session) => { - session.speakerNames && - session.speakerNames.forEach((name) => { - if (speakerSessions[name]) { - speakerSessions[name].push(session); - } else { - speakerSessions[name] = [session]; - } - }); - }); - return speakerSessions; -}); - -export const mapCenter = (state: AppState) => { - const item = state.data.locations.find((l: Location) => l.id === state.data.mapCenterId); - if (item == null) { - return { - id: 1, - name: 'Map Center', - lat: 43.071584, - lng: -89.38012, - }; - } - return item; -}; diff --git a/03_source/mobile.trunk.1/src/data/sessions/conf.state.ts b/03_source/mobile.trunk.1/src/data/sessions/conf.state.ts deleted file mode 100644 index 94d5c80..0000000 --- a/03_source/mobile.trunk.1/src/data/sessions/conf.state.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Location } from '../../models/Location'; -import { Speaker } from '../../models/Speaker'; -import { Schedule, Session } from '../../models/Schedule'; -// -import { Event } from '../../models/Event'; -import { IOrderItem } from '../../models/Order'; - -export interface ConfState { - schedule: Schedule; - sessions: Session[]; - speakers: Speaker[]; - favorites: number[]; - locations: Location[]; - filteredTracks: string[]; - searchText?: string; - mapCenterId?: number; - loading?: boolean; - allTracks: string[]; - menuEnabled: boolean; - // - events: Event[]; - orders: IOrderItem[]; -} diff --git a/03_source/mobile.trunk.1/src/data/sessions/orders.actions.ts b/03_source/mobile.trunk.1/src/data/sessions/orders.actions.ts deleted file mode 100644 index 38fec72..0000000 --- a/03_source/mobile.trunk.1/src/data/sessions/orders.actions.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { getConfData } from '../dataApi'; -import { ActionType } from '../../util/types'; -import { ConfState } from './conf.state'; - -export const loadConfData = () => async (dispatch: React.Dispatch) => { - dispatch(setLoading(true)); - const data = await getConfData(); - dispatch(setData(data)); - dispatch(setLoading(false)); -}; - -export const setLoading = (isLoading: boolean) => - ({ - type: 'set-conf-loading', - isLoading, - }) as const; - -export const setData = (data: Partial) => - ({ - type: 'set-conf-data', - data, - }) as const; - -export const addFavorite = (sessionId: number) => - ({ - type: 'add-favorite', - sessionId, - }) as const; - -export const removeFavorite = (sessionId: number) => - ({ - type: 'remove-favorite', - sessionId, - }) as const; - -export const updateFilteredTracks = (filteredTracks: string[]) => - ({ - type: 'update-filtered-tracks', - filteredTracks, - }) as const; - -export const setSearchText = (searchText?: string) => - ({ - type: 'set-search-text', - searchText, - }) as const; - -export const setMenuEnabled = (menuEnabled: boolean) => - ({ - type: 'set-menu-enabled', - menuEnabled, - }) as const; - -export type OrdersActions = - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType; diff --git a/03_source/mobile.trunk.1/src/data/sessions/orders.reducer.ts b/03_source/mobile.trunk.1/src/data/sessions/orders.reducer.ts deleted file mode 100644 index 3687bc0..0000000 --- a/03_source/mobile.trunk.1/src/data/sessions/orders.reducer.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { OrdersActions } from './orders.actions'; -import { ConfState } from './conf.state'; - -export const orderReducer = (state: ConfState, action: OrdersActions): ConfState => { - switch (action.type) { - case 'set-conf-loading': { - return { ...state, loading: action.isLoading }; - } - case 'set-conf-data': { - return { ...state, ...action.data }; - } - case 'add-favorite': { - return { ...state, favorites: [...state.favorites, action.sessionId] }; - } - case 'remove-favorite': { - return { - ...state, - favorites: [...state.favorites.filter((x) => x !== action.sessionId)], - }; - } - case 'update-filtered-tracks': { - return { ...state, filteredTracks: action.filteredTracks }; - } - case 'set-search-text': { - return { ...state, searchText: action.searchText }; - } - case 'set-menu-enabled': { - return { ...state, menuEnabled: action.menuEnabled }; - } - } -}; diff --git a/03_source/mobile.trunk.1/src/data/sessions/sessions.actions.ts b/03_source/mobile.trunk.1/src/data/sessions/sessions.actions.ts deleted file mode 100644 index b4badfb..0000000 --- a/03_source/mobile.trunk.1/src/data/sessions/sessions.actions.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { getConfData } from '../dataApi'; -import { ActionType } from '../../util/types'; -import { ConfState } from './conf.state'; - -export const loadConfData = () => async (dispatch: React.Dispatch) => { - dispatch(setLoading(true)); - const data = await getConfData(); - dispatch(setData(data)); - dispatch(setLoading(false)); -}; - -export const setLoading = (isLoading: boolean) => - ({ - type: 'set-conf-loading', - isLoading, - }) as const; - -export const setData = (data: Partial) => - ({ - type: 'set-conf-data', - data, - }) as const; - -export const addFavorite = (sessionId: number) => - ({ - type: 'add-favorite', - sessionId, - }) as const; - -export const removeFavorite = (sessionId: number) => - ({ - type: 'remove-favorite', - sessionId, - }) as const; - -export const updateFilteredTracks = (filteredTracks: string[]) => - ({ - type: 'update-filtered-tracks', - filteredTracks, - }) as const; - -export const setSearchText = (searchText?: string) => - ({ - type: 'set-search-text', - searchText, - }) as const; - -export const setMenuEnabled = (menuEnabled: boolean) => - ({ - type: 'set-menu-enabled', - menuEnabled, - }) as const; - -export type SessionsActions = - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType; diff --git a/03_source/mobile.trunk.1/src/data/sessions/sessions.reducer.ts b/03_source/mobile.trunk.1/src/data/sessions/sessions.reducer.ts deleted file mode 100644 index 3540821..0000000 --- a/03_source/mobile.trunk.1/src/data/sessions/sessions.reducer.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SessionsActions } from './sessions.actions'; -import { ConfState } from './conf.state'; - -export const sessionsReducer = (state: ConfState, action: SessionsActions): ConfState => { - switch (action.type) { - case 'set-conf-loading': { - return { ...state, loading: action.isLoading }; - } - case 'set-conf-data': { - return { ...state, ...action.data }; - } - case 'add-favorite': { - return { ...state, favorites: [...state.favorites, action.sessionId] }; - } - case 'remove-favorite': { - return { - ...state, - favorites: [...state.favorites.filter((x) => x !== action.sessionId)], - }; - } - case 'update-filtered-tracks': { - return { ...state, filteredTracks: action.filteredTracks }; - } - case 'set-search-text': { - return { ...state, searchText: action.searchText }; - } - case 'set-menu-enabled': { - return { ...state, menuEnabled: action.menuEnabled }; - } - } -}; diff --git a/03_source/mobile.trunk.1/src/data/state.ts b/03_source/mobile.trunk.1/src/data/state.ts deleted file mode 100644 index 0680912..0000000 --- a/03_source/mobile.trunk.1/src/data/state.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { combineReducers } from './combineReducers'; -// -import { sessionsReducer } from './sessions/sessions.reducer'; -import { userReducer } from './user/user.reducer'; -import { locationsReducer } from './locations/locations.reducer'; -// -import { orderReducer } from './sessions/orders.reducer'; - -export const initialState: AppState = { - data: { - schedule: { groups: [] } as any, - sessions: [], - speakers: [], - favorites: [], - locations: [], - allTracks: [], - filteredTracks: [], - mapCenterId: 0, - loading: false, - menuEnabled: true, - // - events: [], - nearbyMembers: [], - orders: [], - }, - user: { - hasSeenTutorial: false, - darkMode: false, - isLoggedin: false, - loading: false, - // - isSessionValid: false, - }, - locations: { - locations: [], - }, -}; - -export const reducers = combineReducers({ - data: sessionsReducer, - user: userReducer, - locations: locationsReducer, - // - order: orderReducer, -}); - -export type AppState = ReturnType; diff --git a/03_source/mobile.trunk.1/src/data/user/user.actions.ts b/03_source/mobile.trunk.1/src/data/user/user.actions.ts deleted file mode 100644 index fd303fb..0000000 --- a/03_source/mobile.trunk.1/src/data/user/user.actions.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { - getUserData, - setIsLoggedInData, - setUsernameData, - setHasSeenTutorialData, - setAccessTokenData, - getAccessTokenData, - setActiveSessionData, -} from '../dataApi'; -import { ActionType } from '../../util/types'; -import { UserState } from './user.state'; -import { isValidToken } from '../../context/jwt/utils'; -import axios from 'axios'; -import { endpoints } from '../../pages/MyLogin/endpoints'; - -export const loadUserData = () => async (dispatch: React.Dispatch) => { - dispatch(setLoading(true)); - - const data = await getUserData(); - dispatch(setData(data)); - - dispatch(setLoading(false)); -}; - -export const setLoading = (isLoading: boolean) => - ({ - type: 'set-user-loading', - isLoading, - }) as const; - -export const setData = (data: Partial) => - ({ - type: 'set-user-data', - data, - }) as const; - -export const logoutUser = () => async (dispatch: React.Dispatch) => { - // - await setIsLoggedInData(false); - dispatch(setUsername()); -}; - -export const setIsLoggedIn = (loggedIn: boolean) => async (dispatch: React.Dispatch) => { - await setIsLoggedInData(loggedIn); - return { - type: 'set-is-loggedin', - loggedIn, - } as const; -}; - -export const setUsername = (username?: string) => async (dispatch: React.Dispatch) => { - await setUsernameData(username); - console.log('setUsername triggered'); - - return { - type: 'set-username', - username, - } as const; -}; - -export const setAccessToken = (token?: string) => async (dispatch: React.Dispatch) => { - await setAccessTokenData(token); - - return { - type: 'set-access-token', - token, - } as const; -}; - -export const setActiveSession = (session: any) => async (dispatch: React.Dispatch) => { - await setActiveSessionData(session); - return { - type: 'set-active-session', - session, - } as const; -}; - -export const checkUserSession = () => async (dispatch: React.Dispatch) => { - let accessToken = (await getAccessTokenData()).value; - console.log('check user session'); - let sessionValid = false; - - try { - if (accessToken && isValidToken(accessToken)) { - const res = await axios.get(endpoints.auth.me, { - headers: { Authorization: `Bearer ${accessToken}` }, - }); - - const { user } = res.data; - - setActiveSession({ user: { ...user, accessToken }, loading: false }); - sessionValid = true; - console.log('session valid'); - } else { - setActiveSession({ user: null, loading: false }); - console.log('session not valid'); - } - } catch (error) { - console.error(error); - setActiveSession({ user: null, loading: false }); - } - - return { - type: 'check-user-session', - sessionValid, - } as const; -}; - -export const setHasSeenTutorial = - (hasSeenTutorial: boolean) => async (dispatch: React.Dispatch) => { - await setHasSeenTutorialData(hasSeenTutorial); - return { - type: 'set-has-seen-tutorial', - hasSeenTutorial, - } as const; - }; - -export const setDarkMode = (darkMode: boolean) => - ({ - type: 'set-dark-mode', - darkMode, - }) as const; - -export type UserActions = - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType - | ActionType; diff --git a/03_source/mobile.trunk.1/src/data/user/user.reducer.ts b/03_source/mobile.trunk.1/src/data/user/user.reducer.ts deleted file mode 100644 index f6e6acb..0000000 --- a/03_source/mobile.trunk.1/src/data/user/user.reducer.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { UserActions } from './user.actions'; -import { UserState } from './user.state'; - -export function userReducer(state: UserState, action: UserActions): UserState { - switch (action.type) { - case 'set-user-loading': - return { ...state, loading: action.isLoading }; - case 'set-user-data': - return { ...state, ...action.data }; - case 'set-username': - return { ...state, username: action.username }; - case 'set-has-seen-tutorial': - return { ...state, hasSeenTutorial: action.hasSeenTutorial }; - case 'set-dark-mode': - return { ...state, darkMode: action.darkMode }; - case 'set-is-loggedin': - return { ...state, isLoggedin: action.loggedIn }; - case 'set-access-token': - return { ...state, token: action.token }; - case 'check-user-session': - return { ...state, isSessionValid: action.sessionValid }; - } -} diff --git a/03_source/mobile.trunk.1/src/data/user/user.state.ts b/03_source/mobile.trunk.1/src/data/user/user.state.ts deleted file mode 100644 index 56e5666..0000000 --- a/03_source/mobile.trunk.1/src/data/user/user.state.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface UserState { - loading: boolean; - username?: string; - hasSeenTutorial: boolean; - darkMode: boolean; - isLoggedin: boolean; - isSessionValid: boolean; - session?: any; - token?: string; -} diff --git a/03_source/mobile.trunk.1/src/declarations.ts b/03_source/mobile.trunk.1/src/declarations.ts deleted file mode 100644 index dbe667a..0000000 --- a/03_source/mobile.trunk.1/src/declarations.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface AppPage { - url: string; - icon: object; - title: string; -} diff --git a/03_source/mobile.trunk.1/src/global-config.ts b/03_source/mobile.trunk.1/src/global-config.ts deleted file mode 100644 index 71b4f35..0000000 --- a/03_source/mobile.trunk.1/src/global-config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const CONFIG = { - serverUrl: '', -}; diff --git a/03_source/mobile.trunk.1/src/hooks/use-set-state.ts b/03_source/mobile.trunk.1/src/hooks/use-set-state.ts deleted file mode 100644 index f820bd2..0000000 --- a/03_source/mobile.trunk.1/src/hooks/use-set-state.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Custom hook to manage state with utility functions to set state, set a specific field, and reset state. - * - * @param {T} initialState - The initial state value. - * - * @returns {UseSetStateReturn} - An object containing: - * - `state`: The current state. - * - `resetState`: A function to reset the state to the initial value. - * - `setState`: A function to update the state. - * - `setField`: A function to update a specific field in the state. - * - * @example - * const { state, setState, setField, resetState } = useSetState({ name: '', age: 0 }); - * - * return ( - *
- *

Name: {state.name}

- *

Age: {state.age}

- * - * - *
- * ); - */ -type UseSetStateReturn = { - state: T; - resetState: (defaultState?: T) => void; - setState: (updateState: T | Partial) => void; - setField: (name: keyof T, updateValue: T[keyof T]) => void; -}; -declare function useSetState(initialState?: T): UseSetStateReturn; - -export { type UseSetStateReturn, useSetState }; diff --git a/03_source/mobile.trunk.1/src/main.tsx b/03_source/mobile.trunk.1/src/main.tsx deleted file mode 100644 index 964b804..0000000 --- a/03_source/mobile.trunk.1/src/main.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; - -ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - -); -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.register(); diff --git a/03_source/mobile.trunk.1/src/models/Event.ts b/03_source/mobile.trunk.1/src/models/Event.ts deleted file mode 100644 index 31ac548..0000000 --- a/03_source/mobile.trunk.1/src/models/Event.ts +++ /dev/null @@ -1,24 +0,0 @@ -// 03_source/mobile/src/models/Event.ts - -export type IDateValue = string | number | null; - -export interface Event { - id: string; - createdAt: IDateValue; - updatedAt: IDateValue; - // - name: string; - code: string; - price: number; - // - eventDate: Date; - joinMembers: { email: string; avatar: string; sex: string }[]; - title: string; - currency: string; - duration_m: number; - ageBottom: number; - ageTop: number; - location: string; - avatar: string; - // -} diff --git a/03_source/mobile.trunk.1/src/models/Location.ts b/03_source/mobile.trunk.1/src/models/Location.ts deleted file mode 100644 index 9bc6d77..0000000 --- a/03_source/mobile.trunk.1/src/models/Location.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface Location { - id: number; - name: string; - lat: number; - lng: number; - center?: boolean; -} - -export interface LocationState { - locations: Location[]; -} - -export const initialState: LocationState = { - locations: [], -}; diff --git a/03_source/mobile.trunk.1/src/models/Order.ts b/03_source/mobile.trunk.1/src/models/Order.ts deleted file mode 100644 index 6d4b184..0000000 --- a/03_source/mobile.trunk.1/src/models/Order.ts +++ /dev/null @@ -1,55 +0,0 @@ -export type IDateValue = string | number | null; - -export type IOrderProductItem = { - id: string; - sku: string; - name: string; - price: number; - coverUrl: string; - quantity: number; -}; - -export type IOrderHistory = { - orderTime: IDateValue; - paymentTime: IDateValue; - deliveryTime: IDateValue; - completionTime: IDateValue; - timeline: { title: string; time: IDateValue }[]; -}; - -export type IOrderDelivery = { - shipBy: string; - speedy: string; - trackingNumber: string; -}; - -export type IOrderShippingAddress = { - fullAddress: string; - phoneNumber: string; -}; - -export type IOrderPayment = { - cardType: string; - cardNumber: string; -}; - -export interface IOrderItem { - id: string; - createdAt: IDateValue; - updatedAt: IDateValue; - // - taxes: number; - status: string; - shipping: number; - discount: number; - subtotal: number; - orderNumber: string; - totalAmount: number; - totalQuantity: number; - // - items: IOrderProductItem[]; - history: IOrderHistory | undefined; - delivery: IOrderDelivery; - shippingAddress: IOrderShippingAddress; - payment: IOrderPayment; -} diff --git a/03_source/mobile.trunk.1/src/models/Schedule.ts b/03_source/mobile.trunk.1/src/models/Schedule.ts deleted file mode 100644 index f210ff8..0000000 --- a/03_source/mobile.trunk.1/src/models/Schedule.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface Schedule { - date: string; - groups: ScheduleGroup[]; -} - -export interface ScheduleGroup { - time: string; - sessions: Session[]; -} - -export interface Session { - id: number; - timeStart: string; - timeEnd: string; - name: string; - location: string; - description: string; - speakerNames: string[]; - tracks: string[]; -} diff --git a/03_source/mobile.trunk.1/src/models/SessionGroup.ts b/03_source/mobile.trunk.1/src/models/SessionGroup.ts deleted file mode 100644 index 93d46ad..0000000 --- a/03_source/mobile.trunk.1/src/models/SessionGroup.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Session } from './Schedule'; -export interface SessionGroup { - startTime: string; - sessions: Session[]; -} diff --git a/03_source/mobile.trunk.1/src/models/Speaker.ts b/03_source/mobile.trunk.1/src/models/Speaker.ts deleted file mode 100644 index 35d8c78..0000000 --- a/03_source/mobile.trunk.1/src/models/Speaker.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface Speaker { - id: number; - name: string; - profilePic: string; - twitter: string; - instagram: string; - about: string; - title: string; - location: string; - email: string; - phone: string; -} diff --git a/03_source/mobile.trunk.1/src/pages/About.scss b/03_source/mobile.trunk.1/src/pages/About.scss deleted file mode 100644 index f7d1ac0..0000000 --- a/03_source/mobile.trunk.1/src/pages/About.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url("/assets/img/about/madison.jpg"); - } - - .about-header .austin { - background-image: url("/assets/img/about/austin.jpg"); - } - - .about-header .chicago { - background-image: url("/assets/img/about/chicago.jpg"); - } - - .about-header .seattle { - background-image: url("/assets/img/about/seattle.jpg"); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/About.tsx b/03_source/mobile.trunk.1/src/pages/About.tsx deleted file mode 100644 index f7416ad..0000000 --- a/03_source/mobile.trunk.1/src/pages/About.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import React, { useState } from 'react'; -import { - IonHeader, - IonToolbar, - IonContent, - IonPage, - IonButtons, - IonMenuButton, - IonButton, - IonIcon, - IonDatetime, - IonSelectOption, - IonList, - IonItem, - IonLabel, - IonSelect, - IonPopover, - IonText, -} from '@ionic/react'; -import './About.scss'; -import { ellipsisHorizontal, ellipsisVertical } from 'ionicons/icons'; -import AboutPopover from '../components/AboutPopover'; -import { format, parseISO } from 'date-fns'; - -interface AboutProps {} - -const About: React.FC = () => { - const [showPopover, setShowPopover] = useState(false); - const [popoverEvent, setPopoverEvent] = useState(); - const [location, setLocation] = useState<'madison' | 'austin' | 'chicago' | 'seattle'>('madison'); - const [conferenceDate, setConferenceDate] = useState('2047-05-17T00:00:00-05:00'); - - const selectOptions = { - header: 'Select a Location', - }; - - const presentPopover = (e: React.MouseEvent) => { - setPopoverEvent(e.nativeEvent); - setShowPopover(true); - }; - - function displayDate(date: string, dateFormat: string) { - return format(parseISO(date), dateFormat); - } - - return ( - - - - - - - - - - - - - - - -
- {/* Instead of loading an image each time the select changes, use opacity to transition them */} -
-
-
-
-
-
-

About

- -

- The Ionic Conference is a one-day event happening on{' '} - {displayDate(conferenceDate, 'MMM dd, yyyy')}, featuring talks from the Ionic team. The - conference focuses on building applications with Ionic Framework, including topics such - as app migration to the latest version, React best practices, Webpack, Sass, and other - technologies commonly used in the Ionic ecosystem. Tickets are completely sold out, and - we're expecting over 1,000 developers — making this the largest Ionic conference to - date! -

- -

Details

- - - - setLocation(e.detail.value as any)} - > - Madison, WI - Austin, TX - Chicago, IL - Seattle, WA - - - - Date - {displayDate(conferenceDate, 'MMM dd, yyyy')} - - setConferenceDate(e.detail.value! as string)} - presentation="date" - > - - - - -

Internet

- - - - Wifi network - ica{displayDate(conferenceDate, 'y')} - - - Password - makegoodthings - - -
-
- - setShowPopover(false)} - > - setShowPopover(false)} /> - -
- ); -}; - -export default React.memo(About); diff --git a/03_source/mobile.trunk.1/src/pages/Account.scss b/03_source/mobile.trunk.1/src/pages/Account.scss deleted file mode 100644 index e3c2761..0000000 --- a/03_source/mobile.trunk.1/src/pages/Account.scss +++ /dev/null @@ -1,6 +0,0 @@ -#account-page { - img { - max-width: 140px; - border-radius: 50%; - } -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/Account.tsx b/03_source/mobile.trunk.1/src/pages/Account.tsx deleted file mode 100644 index 7c74df4..0000000 --- a/03_source/mobile.trunk.1/src/pages/Account.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import React, { useState } from 'react'; -import { - IonHeader, - IonToolbar, - IonTitle, - IonContent, - IonPage, - IonButtons, - IonMenuButton, - IonList, - IonItem, - IonAlert, -} from '@ionic/react'; -import './Account.scss'; -import { setUsername } from '../data/user/user.actions'; -import { connect } from '../data/connect'; -import { RouteComponentProps } from 'react-router'; - -interface OwnProps extends RouteComponentProps {} - -interface StateProps { - username?: string; -} - -interface DispatchProps { - setUsername: typeof setUsername; -} - -interface AccountProps extends OwnProps, StateProps, DispatchProps {} - -const Account: React.FC = ({ setUsername, username }) => { - const [showAlert, setShowAlert] = useState(false); - - const clicked = (text: string) => { - console.log(`Clicked ${text}`); - }; - - return ( - - - - - - - Account - - - - {username && ( -
- avatar -

{username}

- - clicked('Update Picture')}>Update Picture - setShowAlert(true)}>Change Username - clicked('Change Password')}>Change Password - - Support - - - Logout - - -
- )} -
- { - setUsername(data.username); - }, - }, - ]} - inputs={[ - { - type: 'text', - name: 'username', - value: username, - placeholder: 'username', - }, - ]} - onDidDismiss={() => setShowAlert(false)} - /> -
- ); -}; - -export default connect({ - mapStateToProps: (state) => ({ - username: state.user.username, - }), - mapDispatchToProps: { - setUsername, - }, - component: Account, -}); diff --git a/03_source/mobile.trunk.1/src/pages/ChangeLanguage/index.tsx b/03_source/mobile.trunk.1/src/pages/ChangeLanguage/index.tsx deleted file mode 100644 index 6fd288a..0000000 --- a/03_source/mobile.trunk.1/src/pages/ChangeLanguage/index.tsx +++ /dev/null @@ -1,246 +0,0 @@ -// REQ0041/home_discover_event_tab - -import React, { useEffect, useRef, useState } from 'react'; -import { - IonHeader, - IonToolbar, - IonTitle, - IonContent, - IonPage, - IonButtons, - IonMenuButton, - IonGrid, - IonRow, - IonCol, - useIonRouter, - IonButton, - IonIcon, - IonPopover, - IonAvatar, - IonImg, - IonItem, - IonLabel, - IonList, - IonModal, - IonSearchbar, - useIonModal, - IonInput, - IonRefresher, - IonRefresherContent, - RefresherEventDetail, - IonToast, - useIonToast, -} from '@ionic/react'; -import SpeakerItem from '../../components/SpeakerItem'; -import { Speaker } from '../../models/Speaker'; -import { Session } from '../../models/Schedule'; -import { connect } from '../../data/connect'; -import * as selectors from '../../data/selectors'; -import '../SpeakerList.scss'; -import { getEvents } from '../../api/getEvents'; -import { format } from 'date-fns'; - -// import { Event } from './types'; -interface Event { - eventDate: Date; - joinMembers: undefined; - title: string; - price: number; - currency: string; - duration_m: number; - ageBottom: number; - ageTop: number; - location: string; - avatar: string; - // - id: string; -} - -import { - checkmarkOutline, - chevronBackOutline, - chevronDownCircleOutline, - closeOutline, - heart, - languageOutline, - menuOutline, -} from 'ionicons/icons'; -import AboutPopover from '../../components/AboutPopover'; -import Loading from '../../components/Loading'; - -interface OwnProps {} - -interface StateProps { - events: Event[]; -} - -interface DispatchProps {} - -interface SpeakerListProps extends OwnProps, StateProps, DispatchProps {} - -const EventList: React.FC = ({ events }) => { - const modal = useRef(null); - - const router = useIonRouter(); - - function handleShowPartyEventDetail(event_id: string) { - router.push(`/event_detail/${event_id}`); - } - - function handleRefresh(event: CustomEvent) { - setTimeout(() => { - // Any calls to load data go here - event.detail.complete(); - }, 2000); - } - - const [confirmChangeLanguage, setConfirmChangeLanguage] = useState(false); - - function handleChangeToChinese() { - setConfirmChangeLanguage(true); - } - - function handleChangeToEnglish() { - setConfirmChangeLanguage(true); - } - - function handleChangeToJapanese() { - setConfirmChangeLanguage(true); - } - - function handleApplyChangeLanguage() { - setConfirmChangeLanguage(false); - } - - function handleBackClick() { - router.goBack(); - } - - function handleCancelChangeLanguage() { - setConfirmChangeLanguage(false); - } - - const [present] = useIonToast(); - - const presentToast = () => { - present({ - message: 'sorry but the function not yet implemented!', - duration: 1500, - position: 'bottom', - }); - - setConfirmChangeLanguage(false); - }; - - if (!events || events.length == 0) return ; - - return ( - - - - - {/* */} - - - - -
- - Change Language -
-
-
- - - - - Change Language - - - - - - Chinese - - - English - - - Japanese - - - - - {/* REQ0079/event-filter */} - setConfirmChangeLanguage(false)} - > - -
-
- Confirm change language -
-
- Change language to Chinese -
-
- - - No - - - - Yes - -
-
-
-
-
- ); -}; - -export default connect({ - mapStateToProps: (state) => ({ - events: selectors.getEvents(state), - }), - component: React.memo(EventList), -}); diff --git a/03_source/mobile.trunk.1/src/pages/ChangeLanguage/style.scss b/03_source/mobile.trunk.1/src/pages/ChangeLanguage/style.scss deleted file mode 100644 index 5fae6e3..0000000 --- a/03_source/mobile.trunk.1/src/pages/ChangeLanguage/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/NOTES.md b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/NOTES.md deleted file mode 100644 index a1700c9..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/NOTES.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -tags: mobile ---- - -# REQ0119/demo-2fa-example - -## description - -This is the Ionic implementation example of two-factor authentication (2FA) demonstrating various authentication flows and UI components. - -## relation - -- diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.module.scss b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.module.scss deleted file mode 100644 index 38c85a2..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.module.scss +++ /dev/null @@ -1,5 +0,0 @@ -.keypad { - bottom: 0; - position: absolute; - width: 100%; -} diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.tsx deleted file mode 100644 index f7927f0..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/Keypad.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import { IonRow } from '@ionic/react'; -import styles from './Keypad.module.scss'; -import KeypadButton from './KeypadButton'; - -const Keypad = (props: any): JSX.Element => { - const { activeIndex, handleClick, handleRemove, amount, correct } = props; - - const keypadButtons = [ - [ - { - value: '1', - handleClick: () => handleClick(activeIndex, 1), - small: false, - remove: false, - }, - { - value: '2', - handleClick: () => handleClick(activeIndex, 2), - small: false, - remove: false, - }, - { - value: '3', - handleClick: () => handleClick(activeIndex, 3), - small: false, - remove: false, - }, - ], - [ - { - value: '4', - handleClick: () => handleClick(activeIndex, 4), - small: false, - remove: false, - }, - { - value: '5', - handleClick: () => handleClick(activeIndex, 5), - small: false, - remove: false, - }, - { - value: '6', - handleClick: () => handleClick(activeIndex, 6), - small: false, - remove: false, - }, - ], - [ - { - value: '7', - handleClick: () => handleClick(activeIndex, 7), - small: false, - remove: false, - }, - { - value: '8', - handleClick: () => handleClick(activeIndex, 8), - small: false, - remove: false, - }, - { - value: '9', - handleClick: () => handleClick(activeIndex, 9), - small: false, - remove: false, - }, - ], - [ - { - value: 'Resend', - handleClick: () => handleClick(activeIndex, 1), - small: true, - remove: false, - }, - { - value: '0', - handleClick: () => handleClick(activeIndex, 2), - small: false, - remove: false, - }, - { - value: '', - handleClick: () => handleRemove(), - small: true, - remove: true, - }, - ], - ]; - - return ( -
- {keypadButtons.map((keypadRow, index) => { - const isDisabled = parseInt(activeIndex) === parseInt(amount); - - return ( - - {keypadRow.map((button, index2) => { - return ( - - ); - })} - - ); - })} -
- ); -}; - -export default Keypad; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.module.scss b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.module.scss deleted file mode 100644 index 400a722..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.module.scss +++ /dev/null @@ -1,30 +0,0 @@ -.logo { - height: 4rem; - width: auto; -} - -.keypadButton { - --background: none; - --color: black; - font-size: 2rem; - font-weight: 700; - --outline: none; - --border: none; - --box-shadow: none; - padding: none; - margin: none; - --background-hover: rgb(245, 245, 245) !important; - --background-focused: rgb(245, 245, 245) !important; - --background-activated: rgb(245, 245, 245) !important; -} - -.smallKeypadButton { - font-size: 1.4rem; - margin-top: 1rem; -} - -.keypad { - bottom: 0; - position: absolute; - width: 100%; -} diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.tsx deleted file mode 100644 index 1188e6f..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadButton.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { IonButton, IonCol, IonIcon } from '@ionic/react'; -import { backspaceOutline } from 'ionicons/icons'; -import styles from './KeypadButton.module.scss'; - -const KeypadButton = (props: any): JSX.Element => { - const { small, value, remove, handleClick, isDisabled = false, correct } = props; - - return ( - - - {!remove && value} - {remove && } - - - ); -}; - -export default KeypadButton; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.module.scss b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.module.scss deleted file mode 100644 index c54a1b8..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.module.scss +++ /dev/null @@ -1,38 +0,0 @@ -.keypadInput { - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - font-size: 2.5rem; - width: 100%; - min-height: 2.5rem; - background-color: rgb(245, 245, 245); - border-radius: 4px; - color: rgb(207, 207, 207); - transition: 0.2s linear; -} - -.active { - background-color: rgba(26, 150, 251, 0.2); - border: 0 !important; - color: white !important; - transition: 0.2s linear; -} - -.filled { - color: rgb(151, 151, 151); - transition: 0.2s linear; -} - -.incorrect { - background-color: rgba(251, 26, 26, 0.2); - color: rgb(218, 67, 67); - transition: 0.2s linear; -} - -.correct { - background-color: rgba(26, 251, 120, 0.2); - color: rgb(67, 218, 112); - transition: 0.2s linear; -} diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.tsx deleted file mode 100644 index 7d6f476..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInput.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { IonCol } from '@ionic/react'; -import styles from './KeypadInput.module.scss'; - -const KeypadInput = (props: any): JSX.Element => { - const { value, isActive = false, isFilled = false, incorrect, correct } = props; - - return ( - -
- {value} - {!isFilled && '0'} -
-
- ); -}; - -export default KeypadInput; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInputs.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInputs.tsx deleted file mode 100644 index d0c1788..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/components/KeypadInputs.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { IonRow } from '@ionic/react'; -import { useEffect, useRef } from 'react'; -import KeypadInput from './KeypadInput'; - -const KeypadInputs = (props: any): JSX.Element => { - const { values, activeIndex, incorrect, correct } = props; - const keypadRef = useRef(null); - - useEffect(() => { - if (incorrect && keypadRef.current) { - keypadRef.current.classList.add('incorrect'); - - setTimeout(() => { - if (keypadRef.current) { - keypadRef.current.classList.remove('incorrect'); - } - }, 1000); - } - }, [incorrect]); - - useEffect(() => { - if (correct) { - if (keypadRef.current) { - keypadRef.current.classList.add('correct'); - } - } - }, [correct]); - - return ( - - {values.map((value: string, index: number) => { - const isActive = parseInt(index.toString()) === parseInt(activeIndex); - const isFilled = value !== '' ? true : false; - - return ( - - ); - })} - - ); -}; - -export default KeypadInputs; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/index.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/index.tsx deleted file mode 100644 index d91e0db..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/index.tsx +++ /dev/null @@ -1,26 +0,0 @@ -// REQ0119/demo-2fa-example -// -// RULES: -// T.B.A. -// -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -import Home from './pages/Home'; - -function Demo2FaExample() { - return ( - - - - - - - - - - ); -} - -export default Demo2FaExample; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.module.scss deleted file mode 100644 index 3d0a7fe..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.module.scss +++ /dev/null @@ -1,30 +0,0 @@ -.logo { - height: 4rem; - width: auto; -} - -.incorrect { - color: rgb(218, 67, 67); -} - -.successContainer { -} - -.successText { - background-color: rgba(26, 251, 120, 0.2); - color: rgb(67, 218, 112); - padding: 1rem; -} - -.successContinue { - font-weight: 700; - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; -} - -.successContinue ion-icon { - margin-top: 0.2rem; -} diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.tsx deleted file mode 100644 index 1cd7885..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/pages/Home.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonImg, - IonPage, - IonRow, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { arrowForwardOutline, chevronBackOutline } from 'ionicons/icons'; -import styles from './Home.module.scss'; -import KeypadInputs from '../components/KeypadInputs'; -import Keypad from '../components/Keypad'; -import { JSX, useEffect, useRef, useState } from 'react'; - -const Home = (): JSX.Element => { - const correctCode = [5, 9, 2, 5]; - const [keypadValues, setKeypadValues] = useState(['', '', '', '']); - const [activeIndex, setActiveIndex] = useState(0); - const successRef = useRef(null); - - const [incorrect, setIncorrect] = useState(false); - const [correct, setCorrect] = useState(false); - - const tempValues: { [key: string]: any } = {}; - - const handleClick = (index: number, value: any) => { - const stringKey = index.toString(); - tempValues[stringKey] = value; - - setKeypadValues(value); - setActiveIndex((activeIndex) => activeIndex + 1); - }; - - const handleRemove = () => { - const tempValues = [...keypadValues]; - tempValues[activeIndex - 1] = ''; - - setKeypadValues(tempValues); - activeIndex > 0 && setActiveIndex((activeIndex) => activeIndex - 1); - setIncorrect(false); - setCorrect(false); - }; - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - useEffect(() => { - if (parseInt(activeIndex.toString()) === parseInt(keypadValues.length.toString())) { - var error = false; - - keypadValues.forEach((value, index) => { - if (parseInt(value) !== parseInt(correctCode[index].toString())) { - error = true; - return false; - } - }); - - if (error) { - setIncorrect(true); - } else { - setCorrect(true); - - setTimeout(() => { - if (successRef.current) { - successRef.current.classList.remove('hidden'); - successRef.current.classList.add('success'); - } - }, 900); - } - } - }, [activeIndex]); - - return ( - - - - - - handleBackClick()}> - - - - - - - - - -

Verification required

-

Enter your 4 digit verification code

-
-
- - - -

- Awesome! You may continue. -
- - Continue   - - -

-
-
- - - {incorrect &&

Wrong code entered

} - -
-
-
- ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/Demo2FaExample/theme/variables.scss deleted file mode 100644 index dc5200e..0000000 --- a/03_source/mobile.trunk.1/src/pages/Demo2FaExample/theme/variables.scss +++ /dev/null @@ -1,249 +0,0 @@ -.demo-2fa-example { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - * { - font-family: 'Lato', sans-serif; - } - - .hidden { - display: none; - transition: 0.2s linear; - } - - /** Ionic CSS Variables **/ - :root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - .incorrect { - -webkit-animation: incorrect-animation 0.9s both; - animation: incorrect-animation 0.9s both; - } - - @-webkit-keyframes incorrect-animation { - 0% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 30% { - -webkit-transform: scale3d(1.25, 0.75, 1); - transform: scale3d(1.25, 0.75, 1); - } - - 40% { - -webkit-transform: scale3d(0.75, 1.25, 1); - transform: scale3d(0.75, 1.25, 1); - } - - 50% { - -webkit-transform: scale3d(1.15, 0.85, 1); - transform: scale3d(1.15, 0.85, 1); - } - - 65% { - -webkit-transform: scale3d(0.95, 1.05, 1); - transform: scale3d(0.95, 1.05, 1); - } - - 75% { - -webkit-transform: scale3d(1.05, 0.95, 1); - transform: scale3d(1.05, 0.95, 1); - } - - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - } - - @keyframes incorrect-animation { - 0% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 30% { - -webkit-transform: scale3d(1.25, 0.75, 1); - transform: scale3d(1.25, 0.75, 1); - } - - 40% { - -webkit-transform: scale3d(0.75, 1.25, 1); - transform: scale3d(0.75, 1.25, 1); - } - - 50% { - -webkit-transform: scale3d(1.15, 0.85, 1); - transform: scale3d(1.15, 0.85, 1); - } - - 65% { - -webkit-transform: scale3d(0.95, 1.05, 1); - transform: scale3d(0.95, 1.05, 1); - } - - 75% { - -webkit-transform: scale3d(1.05, 0.95, 1); - transform: scale3d(1.05, 0.95, 1); - } - - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - } - - .correct { - -webkit-animation: correct-animation 1s ease-in both; - animation: correct-animation 1s ease-in both; - } - - @-webkit-keyframes correct-animation { - 0% { - -webkit-transform: translateY(0) rotateX(0) scale(1); - transform: translateY(0) rotateX(0) scale(1); - -webkit-transform-origin: 50% 1400px; - transform-origin: 50% 1400px; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(-600px) rotateX(-30deg) scale(0); - transform: translateY(-600px) rotateX(-30deg) scale(0); - -webkit-transform-origin: 50% 100%; - transform-origin: 50% 100%; - opacity: 1; - } - } - - @keyframes correct-animation { - 0% { - -webkit-transform: translateY(0) rotateX(0) scale(1); - transform: translateY(0) rotateX(0) scale(1); - -webkit-transform-origin: 50% 1400px; - transform-origin: 50% 1400px; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(-600px) rotateX(-30deg) scale(0); - transform: translateY(-600px) rotateX(-30deg) scale(0); - -webkit-transform-origin: 50% 100%; - transform-origin: 50% 100%; - opacity: 1; - } - } - - .success { - -webkit-animation: success-animation 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; - animation: success-animation 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; - } - - @-webkit-keyframes success-animation { - 0% { - -webkit-transform: translateY(-600px) rotateX(-30deg) scale(0); - transform: translateY(-600px) rotateX(-30deg) scale(0); - -webkit-transform-origin: 50% 100%; - transform-origin: 50% 100%; - opacity: 0; - } - - 100% { - -webkit-transform: translateY(0) rotateX(0) scale(1); - transform: translateY(0) rotateX(0) scale(1); - -webkit-transform-origin: 50% 1400px; - transform-origin: 50% 1400px; - opacity: 1; - } - } - - @keyframes success-animation { - 0% { - -webkit-transform: translateY(-600px) rotateX(-30deg) scale(0); - transform: translateY(-600px) rotateX(-30deg) scale(0); - -webkit-transform-origin: 50% 100%; - transform-origin: 50% 100%; - opacity: 0; - } - - 100% { - -webkit-transform: translateY(0) rotateX(0) scale(1); - transform: translateY(0) rotateX(0) scale(1); - -webkit-transform-origin: 50% 1400px; - transform-origin: 50% 1400px; - opacity: 1; - } - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab1.jsx deleted file mode 100644 index 54ab2b9..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../components/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab2.jsx deleted file mode 100644 index 216544f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/NOTES.md deleted file mode 100644 index a746fff..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0120 diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.jsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.jsx deleted file mode 100644 index c679c72..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import { IonAccordion, IonAccordionGroup, IonIcon, IonItem, IonLabel, IonList } from '@ionic/react'; -import { topics } from '../data'; - -export const Accordion = () => { - return ( - - {topics.map((topic, index) => { - return ( - - - - {topic.header} - - - - {topic.options.map((option, index2) => { - return ( - - {option.label} - - ); - })} - - - ); - })} - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.tsx deleted file mode 100644 index 7e495fa..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/Accordion.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { IonAccordion, IonAccordionGroup, IonIcon, IonItem, IonLabel, IonList } from '@ionic/react'; -import { topics } from '../data'; -import React from 'react'; - -export const Accordion: React.FC = () => { - return ( - - {topics.map((topic: any, index: number) => { - return ( - - - - {topic.header} - - - - {topic.options.map((option: any, index2: number) => { - return ( - - {option.label} - - ); - })} - - - ); - })} - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/components/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.js b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.js deleted file mode 100644 index 30389eb..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.js +++ /dev/null @@ -1,126 +0,0 @@ -import { - bicycleOutline, - fastFoodOutline, - filmOutline, - gameControllerOutline, - libraryOutline, -} from 'ionicons/icons'; - -export const topics = [ - { - header: 'Attractions', - color: 'primary', - icon: filmOutline, - options: [ - { - label: 'Cinema', - }, - { - label: 'Bowling Alley', - }, - { - label: 'Crazy Golf', - }, - { - label: 'Theme Park', - }, - ], - }, - { - header: 'Dining', - color: 'success', - icon: fastFoodOutline, - options: [ - { - label: 'Breakfast & Brunch', - }, - { - label: 'New American', - }, - { - label: 'Sushi Bars', - }, - { - label: 'Filipino Food', - }, - { - label: 'Asian Fusion', - }, - { - label: 'Ramen Houses', - }, - { - label: 'Dinner Venues', - }, - ], - }, - { - header: 'Gaming', - color: 'warning', - icon: gameControllerOutline, - options: [ - { - label: 'Xbox', - }, - { - label: 'Playstation', - }, - { - label: 'Nintendo Switch', - }, - { - label: 'PC', - }, - { - label: 'Mobile', - }, - { - label: 'Dreamcast', - }, - ], - }, - { - header: 'Exercise', - color: 'secondary', - icon: bicycleOutline, - options: [ - { - label: 'Yoga', - }, - { - label: 'Pilates', - }, - { - label: 'Weight Training', - }, - { - label: 'Cardio', - }, - { - label: 'Zumba', - }, - ], - }, - { - header: 'Education', - color: 'danger', - icon: libraryOutline, - options: [ - { - label: 'School', - }, - { - label: 'High School', - }, - { - label: 'University Bachelors', - }, - { - label: 'University Masters', - }, - { - label: 'University pHD', - }, - ], - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.ts b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.ts deleted file mode 100644 index 10fb915..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/data.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { - bicycleOutline, - fastFoodOutline, - filmOutline, - gameControllerOutline, - libraryOutline, -} from 'ionicons/icons'; - -export const topics: any = [ - { - header: 'Attractions', - color: 'primary', - icon: filmOutline, - options: [ - { - label: 'Cinema', - }, - { - label: 'Bowling Alley', - }, - { - label: 'Crazy Golf', - }, - { - label: 'Theme Park', - }, - ], - }, - { - header: 'Dining', - color: 'success', - icon: fastFoodOutline, - options: [ - { - label: 'Breakfast & Brunch', - }, - { - label: 'New American', - }, - { - label: 'Sushi Bars', - }, - { - label: 'Filipino Food', - }, - { - label: 'Asian Fusion', - }, - { - label: 'Ramen Houses', - }, - { - label: 'Dinner Venues', - }, - ], - }, - { - header: 'Gaming', - color: 'warning', - icon: gameControllerOutline, - options: [ - { - label: 'Xbox', - }, - { - label: 'Playstation', - }, - { - label: 'Nintendo Switch', - }, - { - label: 'PC', - }, - { - label: 'Mobile', - }, - { - label: 'Dreamcast', - }, - ], - }, - { - header: 'Exercise', - color: 'secondary', - icon: bicycleOutline, - options: [ - { - label: 'Yoga', - }, - { - label: 'Pilates', - }, - { - label: 'Weight Training', - }, - { - label: 'Cardio', - }, - { - label: 'Zumba', - }, - ], - }, - { - header: 'Education', - color: 'danger', - icon: libraryOutline, - options: [ - { - label: 'School', - }, - { - label: 'High School', - }, - { - label: 'University Bachelors', - }, - { - label: 'University Masters', - }, - { - label: 'University pHD', - }, - ], - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/index.tsx deleted file mode 100644 index 1cbb174..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/index.tsx +++ /dev/null @@ -1,62 +0,0 @@ -// REQ0119/demo-accordion-tutorial -// -// RULES: -// T.B.A. -// - -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import Topic from './pages/Topic'; -import Home from './pages/Home'; - -import './style.scss'; - -function DemoAccordionTutorial() { - return ( - - - {/* - - - - - - - */} - - - - - - - - - - - - {/* */} - - - {/* - - - - Dashboard - - - - Search - - - */} - - ); -} - -export default DemoAccordionTutorial; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.css b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.jsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.jsx deleted file mode 100644 index a0add98..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.jsx +++ /dev/null @@ -1,97 +0,0 @@ -import { - IonAccordion, - IonAccordionGroup, - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonItem, - IonLabel, - IonList, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { Accordion } from '../components/Accordion'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Home = () => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Accordion - - - handleBackClick()}> - - - - - - - - - Accordion - - - handleBackClick()}> - - - - - - - - - {/* - - - Languages - - - - - English - - - Spanish - - - Italian - - - - - - - Languages 2 - - - - - English - - - Spanish - - - Italian - - - - */} - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.tsx deleted file mode 100644 index 65a2e4a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Home.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { - IonAccordion, - IonAccordionGroup, - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonItem, - IonLabel, - IonList, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { Accordion } from '../components/Accordion'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Home: React.FC = () => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Accordion - - - handleBackClick()}> - - - - - - - - - Accordion - - - handleBackClick()}> - - - - - - - - - {/* - - - Languages - - - - - English - - - Spanish - - - Italian - - - - - - - Languages 2 - - - - - English - - - Spanish - - - Italian - - - - */} - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.jsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.jsx deleted file mode 100644 index 0e82926..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.jsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - IonBackButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonLabel, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useParams } from 'react-router'; - -const Topic = () => { - const { topic } = useParams(); - - return ( - - - - - - - - {topic} - - - - - - {topic} - - - - - - - This is the page for the topic: {topic}. - - - - - - ); -}; - -export default Topic; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.tsx b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.tsx deleted file mode 100644 index 54c48e7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/pages/Topic.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - IonBackButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonLabel, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useParams } from 'react-router'; - -const Topic = () => { - const { topic } = useParams<{ topic: string }>(); - - return ( - - - - - - - - {topic} - - - - - - {topic} - - - - - - - This is the page for the topic: {topic}. - - - - - - ); -}; - -export default Topic; diff --git a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/style.scss b/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/style.scss deleted file mode 100644 index d12d506..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoAccordionTutorial/style.scss +++ /dev/null @@ -1,237 +0,0 @@ -.demo-accordion-tutorial { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - @media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66, 140, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80, 200, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106, 100, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47, 223, 117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0, 0, 0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255, 213, 52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255, 73, 97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244, 245, 248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0, 0, 0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152, 154, 162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0, 0, 0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34, 36, 40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255, 255, 255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0, 0, 0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - .ios ion-modal { - --ion-background-color: var(--ion-color-step-100); - --ion-toolbar-background: var(--ion-color-step-150); - --ion-toolbar-border-color: var(--ion-color-step-250); - } - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18, 18, 18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab1.jsx deleted file mode 100644 index 54ab2b9..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../components/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab2.jsx deleted file mode 100644 index 216544f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/NOTES.md deleted file mode 100644 index 54c3e76..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0121 diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.jsx deleted file mode 100644 index 40f29e0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.jsx +++ /dev/null @@ -1,97 +0,0 @@ -import { IonButton, IonCardSubtitle, IonCol, IonIcon, IonList, IonRow } from '@ionic/react'; -import DebitCard from './DebitCard'; - -import styles from './CardSlide.module.css'; -import TransactionItem from './TransactionItem'; -import { addOutline, arrowRedoOutline } from 'ionicons/icons'; -import { formatBalance } from '../data/Utils'; - -const CardSlide = (props) => { - const { index, card, profile } = props; - - return ( - <> - - - balance - - £ -  {formatBalance(card.balance)} - - - - - - - - - - - - - - -
Transactions
-
-
- - {card.transactions.length > 0 && ( - - - - {card.transactions.length > 0 && - card.transactions - .slice(0) - .reverse() - .map((transaction, index) => ( - - ))} - - - - )} - - {card.transactions.length === 0 && ( - - -
No transactions found
- - -  Transfer funds - -
-
- )} - - ); -}; - -export default CardSlide; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.module.css b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.module.css deleted file mode 100644 index 7ef5587..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CardSlide.module.css +++ /dev/null @@ -1,51 +0,0 @@ -.customSlide { - display: flex; - flex-direction: column; -} - -.transactionList { - overflow: scroll; - width: 100vw; -} - -.balance { - font-weight: 300; - font-size: 1.5rem; - color: black; - - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; -} - -.poundSign { - font-weight: 800; - font-size: 1.2rem; -} - -.heading h6 { - padding: 0; - margin: 0; - text-align: left !important; - float: left !important; - text-align: left !important; - color: rgb(124, 124, 124); - font-weight: 400; -} - -.heading { - width: 83%; - padding: 0; - margin: 0; - margin-top: 0.75rem; -} - -.addButton { - --border-radius: 500px !important; - width: fit-content !important; - margin-top: 0.45rem; - margin-left: 1rem; - opacity: 0.6; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.jsx deleted file mode 100644 index e552f68..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import { useEffect, useState } from 'react'; -import styles from './DebitCard.module.css'; - -const DebitCard = (props) => { - const { type, number, profile, expiry, secret, color } = props; - const [lastFourCardNumbers, setLastFourCardNumbers] = useState('****'); - - const cardClass = `card_${color}`; - const cardTypeLogo = type === 'visa' ? '/visa.png' : '/mastercard.png'; - - useEffect(() => { - var lastFourNumbers = number ? number.substr(number.length - 4) : '1234'; - setLastFourCardNumbers(lastFourNumbers); - }, [number]); - - return ( -
-
- 1 - 1 - 2 -

**** **** **** {lastFourCardNumbers}

-
- Card holder -

{`${profile.firstname} ${profile.surname}`}

-
-
- Expires -

{expiry}

-
-
- -
-
-
-
-

{secret}

-
- - 3 - 5 -
-
-
- ); -}; - -export default DebitCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.module.css b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.module.css deleted file mode 100644 index b2064a5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/DebitCard.module.css +++ /dev/null @@ -1,188 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Space+Mono:400,400i,700,700i'); - -.card { - box-sizing: border-box; - font-family: 'Space Mono', monospace; - margin: 0 auto; -} - -.title { - margin-bottom: 30px; - color: #162969; -} - -.card { - width: 320px; - height: 190px; - -webkit-perspective: 600px; - -moz-perspective: 600px; - perspective: 600px; -} - -.card__part { - box-shadow: 1px 1px #aaa3a3; - top: 0; - position: absolute; - z-index: 1000; - left: 0; - display: inline-block; - width: 320px; - height: 190px; - background-repeat: no-repeat; - background-position: center; - background-size: cover; - border-radius: 8px; - - -webkit-transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); - -moz-transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); - -ms-transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); - -o-transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); - transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); - -webkit-transform-style: preserve-3d; - -moz-transform-style: preserve-3d; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; -} - -.card_orange { - background: linear-gradient(to right bottom, #fd696b, #fa616e, #f65871, #c74261, #d62158); -} - -.card_blue { - background: linear-gradient(to right bottom, #699dfd, #61b5fa, #58aff6, #4b86c9, #2151d6); -} - -.card_black { - background: linear-gradient(to right bottom, #292929, #363636, #555555, #444444, #0f0f0f); -} - -.card_purple { - background: linear-gradient(to right bottom, #7a43df, #644897, #8964cf, #633cac, #512c96); -} - -.card__front { - padding: 18px; - -webkit-transform: rotateY(0); - -moz-transform: rotateY(0); -} - -.card__back { - padding: 18px 0; - -webkit-transform: rotateY(-180deg); - -moz-transform: rotateY(-180deg); -} - -.card__black_line { - margin-top: 5px; - height: 38px; - background-color: #303030; -} - -.card__logo { - height: 16px !important; -} - -.card__front_chip { - left: 1.2rem; - height: 1.5rem !important; - position: absolute; -} - -.card__front_logo { - position: absolute; - top: 18px; - right: 18px; -} - -.card__square { - border-radius: 5px; - height: 30px !important; -} - -.card_number { - display: block; - width: 100%; - word-spacing: 4px; - font-size: 20px; - letter-spacing: 2px; - color: #fff; - text-align: center; - margin-bottom: 20px; - margin-top: 20px; -} - -.card__space_75 { - width: 75%; - float: left; -} - -.card__space_25 { - width: 25%; - float: left; -} - -.card__label { - font-size: 10px; - text-transform: uppercase; - color: rgba(255, 255, 255, 0.8); - letter-spacing: 1px; -} - -.card__info { - margin-bottom: 0; - margin-top: 5px; - font-size: 16px; - line-height: 18px; - color: #fff; - letter-spacing: 1px; - text-transform: uppercase; -} - -.card__back_content { - padding: 15px 15px 0; -} -.card__secret__last { - color: #303030; - text-align: right; - margin: 0; - font-size: 14px; -} - -.card__secret { - padding: 5px 12px; - background-color: #fff; - position: relative; -} - -.card__secret:before { - content: ''; - position: absolute; - top: -3px; - left: -3px; - height: calc(100% + 6px); - width: calc(100% - 42px); - border-radius: 4px; - background: repeating-linear-gradient(45deg, #ededed, #ededed 5px, #f9f9f9 5px, #f9f9f9 10px); -} - -.card__back_logo { - position: absolute; - bottom: 15px; - right: 15px; -} - -.card__back_square { - position: absolute; - bottom: 15px; - left: 15px; -} - -.card:hover .card__front { - -webkit-transform: rotateY(180deg); - -moz-transform: rotateY(180deg); -} - -.card:hover .card__back { - -webkit-transform: rotateY(0deg); - -moz-transform: rotateY(0deg); -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/SkeletonDashboard/index.tsx deleted file mode 100644 index ae39e44..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import React from 'react'; - -export const SkeletonDashboard = (): React.JSX.Element => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.jsx deleted file mode 100644 index b36f7c0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import { IonAvatar, IonItem, IonLabel } from '@ionic/react'; -import { formatBalance } from '../data/Utils'; -import styles from './TransactionItem.module.css'; - -const TransactionItem = (props) => { - const { name, amount, deposit, color } = props; - - const getContactNameInitials = (contactName) => { - var nameInitials = ''; - - if (contactName && contactName !== '' && contactName !== undefined) { - const nameParts = contactName && contactName.split(' '); - - if (nameParts) { - if (nameParts[0].charAt(0).match(/^[a-z]+$/i)) { - nameInitials += nameParts[0].charAt(0).toUpperCase(); - } - - if (nameParts[1]) { - if (nameParts[1].charAt(0).match(/^[a-z]+$/i)) { - nameInitials += nameParts[1].charAt(0).toUpperCase(); - } - } else { - nameInitials += nameParts[0].charAt(1).toUpperCase(); - } - } - } - - return nameInitials; - }; - - return ( - -
- -
- {getContactNameInitials(name)} -
-
- - -

{name}

-
- - -

- {deposit ? '+' : '-'} - £{formatBalance(amount)} -

-
-
-
- ); -}; - -export default TransactionItem; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.module.css b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.module.css deleted file mode 100644 index 68649fd..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/components/TransactionItem.module.css +++ /dev/null @@ -1,48 +0,0 @@ -.avatarImage { - /* background-color: var(--ion-color); */ - width: 2.5rem; - height: 2.5rem; - border-radius: 500px; - color: black; - font-size: 1.3rem; - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - padding: 0.5rem !important; - border: 2px solid rgb(44, 44, 44); - margin-top: 0.2rem; -} - -.transactionItem { - flex-direction: row; - padding: 0; - margin: 0; -} - -.transactionItemContent { - padding-left: 3rem; - padding-right: 2rem; - display: flex !important; - flex-direction: row !important; - justify-content: space-between; - width: 100%; - align-content: center; - align-items: center; - margin-top: -0.2rem; - margin-bottom: -0.2rem; -} - -.transactionContent { - padding: 1rem; - text-align: left !important; -} - -.green { - color: rgb(0, 165, 0); -} - -.red { - color: red; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/AccountStore.js b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/AccountStore.js deleted file mode 100644 index d8f7c7d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/AccountStore.js +++ /dev/null @@ -1,127 +0,0 @@ -import { Store } from 'pullstate'; - -export const AccountStore = new Store({ - profile: { - firstname: 'Alan', - surname: 'Montgomery', - avatar: '/assets/DemoBankingUi/alan.jpg', - }, - cards: [ - { - id: 1, - type: 'visa', - description: 'Current Account', - number: '4859 2390 5635 7347', - expiry: '11/22', - secret: '483', - color: 'orange', - balance: '38.21', - transactions: [ - { - name: 'Joe Bloggs', - amount: '2.50', - deposit: true, - }, - { - name: 'Ocean Pratt', - amount: '12.99', - deposit: true, - }, - { - name: 'Eugene Piper', - amount: '74.99', - deposit: false, - }, - { - name: 'Emeli Potts', - amount: '4.20', - deposit: false, - }, - { - name: 'Asia Wells', - amount: '12.73', - deposit: true, - }, - { - name: 'Awais Brook', - amount: '17.10', - deposit: false, - }, - { - name: 'Coen Haas', - amount: '9.99', - deposit: true, - }, - ], - }, - { - id: 2, - type: 'visa', - description: 'Savings', - number: '7349 1284 6790 4587', - expiry: '05/23', - secret: '590', - color: 'blue', - balance: '120.90', - transactions: [ - { - name: 'Joe Bloggs', - amount: '120.90', - deposit: true, - }, - ], - }, - { - id: 3, - type: 'visa', - description: 'House Fund', - number: '6783 5692 4475 6682', - expiry: '01/24', - secret: '321', - color: 'purple', - balance: '0', - transactions: [], - }, - ], -}); - -export const addCardToAccount = (newCard) => { - AccountStore.update((s) => { - s.cards = [...s.cards, newCard]; - }); -}; - -export const addTransactionToCard = (newTransaction, cardID) => { - AccountStore.update((s) => { - s.cards.find((c, index) => - parseInt(c.id) === parseInt(cardID) - ? (s.cards[index].transactions = [...s.cards[index].transactions, newTransaction]) - : false - ); - }); - - if (newTransaction.deposit) { - AccountStore.update((s) => { - s.cards.find((c, index) => - parseInt(c.id) === parseInt(cardID) - ? (s.cards[index].balance = - parseFloat(s.cards[index].balance) + parseFloat(newTransaction.amount)) - : false - ); - }); - } else { - AccountStore.update((s) => { - s.cards.find((c, index) => - parseInt(c.id) === parseInt(cardID) - ? (s.cards[index].balance = - parseFloat(s.cards[index].balance) - parseFloat(newTransaction.amount)) - : false - ); - }); - } -}; - -// export const removeFromCart = productIndex => { - -// AccountStore.update(s => { s.product_ids.splice(productIndex, 1) }); -// } diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/CardStore.js b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/CardStore.js deleted file mode 100644 index a50176d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/CardStore.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Store } from 'pullstate'; - -export const CardStore = new Store({ - card_colors: ['orange', 'black', 'blue', 'purple'], - card_types: ['visa', 'mastercard'], -}); diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/Utils.js b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/Utils.js deleted file mode 100644 index c943a9e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/data/Utils.js +++ /dev/null @@ -1,9 +0,0 @@ -export const formatBalance = (balance) => { - var formatter = new Intl.NumberFormat('en-GB', { - // style: 'currency', - currency: 'GBP', - minimumFractionDigits: 2, - }); - - return formatter.format(balance); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/index.tsx deleted file mode 100644 index ca65ad4..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -// REQ0119/demo-banking-ui -// -// RULES: -// T.B.A. -// - -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import Home from './pages/Home'; -import Account from './pages/Account'; -import AddCard from './pages/AddCard'; -import AddTransaction from './pages/AddTransaction'; - -import './style.scss'; -import React from 'react'; - -function DemoBankingUi(): React.JSX.Element { - return ( - - - - - - - - - - - - - - - - - - - - - - ); -} - -export default DemoBankingUi; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.jsx deleted file mode 100644 index 5145b51..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.jsx +++ /dev/null @@ -1,103 +0,0 @@ -import { - IonBackButton, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonItem, - IonLabel, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import styles from './Account.module.css'; -import { AccountStore } from '../data/AccountStore'; -import { addOutline, logOutOutline } from 'ionicons/icons'; -import { formatBalance } from '../data/Utils'; - -const Account = () => { - const cards = AccountStore.useState((s) => s.cards); - const profile = AccountStore.useState((s) => s.profile); - - return ( - - - - - - - - Account - - - - - - - - - - - - - - account avatar - - - - - -
{`${profile.firstname} ${profile.surname}`}
-
{cards.length} current cards
-
-
- - - - - - Add Card - - - - -
- {cards.map((card, index) => { - return ( - - - -
- - -

{card.description}

-
- - -

£{formatBalance(card.balance)}

-
-
-
-
- ); - })} -
-
-
-
- ); -}; - -export default Account; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.module.css b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.module.css deleted file mode 100644 index 8e59143..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Account.module.css +++ /dev/null @@ -1,54 +0,0 @@ -.accountPage ion-toolbar { - --border-style: none; - --padding-top: 1rem; - --padding-bottom: 1rem; - padding-left: 1rem; - padding-right: 1rem; -} - -.avatar { - border-radius: 500px; - border: 3px solid var(--ion-color-primary); - padding: 0.2rem; -} - -.profileDetails { -} - -.profileDetails h6, -.profileDetails h5 { - margin: 0; - padding: 0; -} - -.profileDetails h6 { - color: var(--ion-color-medium); -} - -.cards { - /* margin-top: */ -} - -.smallCard { - width: 15%; - height: 80%; - border-radius: 5px; - opacity: 0.7; -} - -.cardDescription { - padding-left: 1.5rem; -} - -.cardDescription h4 { - font-weight: 400; -} - -.cardItem { - --background: rgb(246, 246, 246); - --border-radius: 5px; - --padding-start: 1rem; - --padding-end: 1rem; - --padding-top: 0.5rem; - --padding-bottom: 0.5rem; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddCard.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddCard.jsx deleted file mode 100644 index 41dd2f2..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddCard.jsx +++ /dev/null @@ -1,247 +0,0 @@ -import { useState } from 'react'; -import { - IonBackButton, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInput, - IonItem, - IonLabel, - IonPage, - IonRow, - IonSelect, - IonSelectOption, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import styles from './Account.module.css'; -import DebitCard from '../components/DebitCard'; -import { AccountStore, addCardToAccount } from '../data/AccountStore'; -import { CardStore } from '../data/CardStore'; -import { addOutline, timerOutline } from 'ionicons/icons'; -import { useHistory } from 'react-router'; - -const AddCard = () => { - const cards = AccountStore.useState((s) => s.cards); - const cardTypes = CardStore.useState((s) => s.card_types); - const cardColors = CardStore.useState((s) => s.card_colors); - const profile = AccountStore.useState((s) => s.profile); - - const [cardType, setCardType] = useState(cardTypes[0]); - const [cardColor, setCardColor] = useState(cardColors[0]); - const [cardDescription, setCardDescription] = useState(''); - const [cardNumber, setCardNumber] = useState('1234 1234 1234 1234'); - const [cardSecret, setCardSecret] = useState('123'); - const [cardExpiry, setCardExpiry] = useState('01/22'); - const [cardBalance, setCardBalance] = useState(0); - - const history = useHistory(); - const [adding, setAdding] = useState(false); - - const addCard = async () => { - setAdding(true); - - const newCard = { - id: cards.length + 1, - type: cardType, - color: cardColor, - description: cardDescription, - number: cardNumber, - secret: cardSecret, - expiry: cardExpiry, - balance: cardBalance, - transactions: [ - { - name: 'Starting Balance', - amount: cardBalance, - deposit: true, - }, - ], - }; - - await addCardToAccount(newCard); - - setTimeout(() => { - setAdding(false); - history.goBack(); - }, 500); - }; - - return ( - - - - - - - - Add Card - - - - - - - - - - - - - - - Card Type - setCardType(e.currentTarget.value)} - > - {cardTypes.map((option, index) => { - return ( - - {option.toUpperCase()} - - ); - })} - - - - - - - Card Color - setCardColor(e.currentTarget.value)} - > - {cardColors.map((option, index) => { - return ( - - {option.toUpperCase()} - - ); - })} - - - - - - - - - Card Name - setCardDescription(e.currentTarget.value)} - /> - - - - - - Starting Balance - setCardBalance(e.currentTarget.value)} - /> - - - - - - - - Card Number - setCardNumber(e.currentTarget.value)} - /> - - - - - - - - Card Expiry - setCardExpiry(e.currentTarget.value)} - /> - - - - - - Card Secret - setCardSecret(e.currentTarget.value)} - /> - - - - - - - - {!adding && ( - <> - -   Add Card - - )} - - {adding && ( - <> - -   Adding... - - )} - - - - - - - ); -}; - -export default AddCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddTransaction.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddTransaction.jsx deleted file mode 100644 index 8461455..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/AddTransaction.jsx +++ /dev/null @@ -1,165 +0,0 @@ -import { useState } from 'react'; -import { - IonBackButton, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInput, - IonItem, - IonLabel, - IonPage, - IonRow, - IonSelect, - IonSelectOption, - IonTitle, - IonToggle, - IonToolbar, - useIonViewWillEnter, -} from '@ionic/react'; -import styles from './Account.module.css'; -import DebitCard from '../components/DebitCard'; -import { AccountStore, addCardToAccount, addTransactionToCard } from '../data/AccountStore'; -import { CardStore } from '../data/CardStore'; -import { addOutline, timerOutline } from 'ionicons/icons'; -import { useHistory, useParams } from 'react-router'; - -const AddTransaction = () => { - const cards = AccountStore.useState((s) => s.cards); - const profile = AccountStore.useState((s) => s.profile); - - const [cardID, setCardID] = useState(false); - const [card, setCard] = useState({}); - const [transactionName, setTransactionName] = useState('Test Transaction'); - const [transactionAmount, setTransactionAmount] = useState(0); - const [transactionDeposit, setTransactionDeposit] = useState(false); - - const history = useHistory(); - const params = useParams(); - const [adding, setAdding] = useState(false); - - useIonViewWillEnter(() => { - const tempCardID = params.card_id; - const tempCard = cards.filter((c) => parseInt(c.id) === parseInt(tempCardID))[0]; - setCardID(tempCardID); - setCard(tempCard); - }); - - const addTransaction = async () => { - setAdding(true); - - const newTransaction = { - name: transactionName, - amount: transactionAmount, - deposit: transactionDeposit, - }; - - await addTransactionToCard(newTransaction, cardID); - - setTimeout(() => { - setAdding(false); - history.goBack(); - }, 500); - }; - - return ( - - - - - - - - Add Transaction - - - - - - - - - - - - - - - Name - setTransactionName(e.currentTarget.value)} - /> - - - - - - Amount - setTransactionAmount(e.currentTarget.value)} - /> - - - - - - - - Deposit? - setTransactionDeposit(e.currentTarget.checked)} - /> - - - - - - - - {!adding && ( - <> - -   Add Transaction - - )} - - {adding && ( - <> - -   Adding... - - )} - - - - - - - ); -}; - -export default AddTransaction; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.jsx b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.jsx deleted file mode 100644 index 01ea13c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.jsx +++ /dev/null @@ -1,146 +0,0 @@ -import { useRef, useState } from 'react'; -import { - IonButton, - IonButtons, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, - useIonViewDidEnter, -} from '@ionic/react'; -import styles from './Home.module.css'; -import { AccountStore } from '../data/AccountStore'; -import CardSlide from '../components/CardSlide'; -import { chevronBackOutline, searchOutline } from 'ionicons/icons'; - -// Import Swiper React components -import { Swiper, SwiperSlide } from 'swiper/react'; - -// Import Swiper styles -// import 'swiper/swiper.scss'; -import 'swiper/css'; - -import stylesS from './Home.module.scss'; - -const Home = () => { - const cards = AccountStore.useState((s) => s.cards); - const profile = AccountStore.useState((s) => s.profile); - - const [pageTitle, setPageTitle] = useState(cards[0].description); - const [mainColor, setMainColor] = useState(cards[0].color); - const [slideSpace, setSlideSpace] = useState(10); - - const slidesRef = useRef(null); - - useIonViewDidEnter(() => { - setSlideSpace(0); - }); - - const changeSlide = async (e) => { - const swiper = e; - const swiperIndex = swiper.activeIndex; - - setPageTitle(cards[swiperIndex].description); - setMainColor(cards[swiperIndex].color); - - document.getElementById(`slide_${swiperIndex}_balance`).classList.add('animate__headShake'); - - setTimeout(() => { - document - .getElementById(`slide_${swiperIndex}_balance`) - .classList.remove('animate__headShake'); - }, 1000); - }; - - const manageTouch = async (touched, e) => { - const swiper = e; - const swiperIndex = swiper.activeIndex; - - if (touched) { - document - .getElementById(`slide_${swiperIndex}_transactions`) - .classList.add('animate__fadeOut'); - } else { - document - .getElementById(`slide_${swiperIndex}_transactions`) - .classList.remove('animate__fadeOut'); - document.getElementById(`slide_${swiperIndex}_transactions`).classList.add('animate__fadeIn'); - } - }; - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - - {/* */} - - toolbar avatar - - - - {pageTitle} - - - handleBackClick()}> - - - {/* */} - - - - - - - - - - manageTouch(true, e)} - onTouchEnd={(e) => manageTouch(false, e)} - onSlideChange={(e) => changeSlide(e)} - > - {cards.map((card, index) => { - return ( - - - - ); - })} - - - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.css b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.css deleted file mode 100644 index 5d5719c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.css +++ /dev/null @@ -1,38 +0,0 @@ -.homePage ion-toolbar { - --border-style: none; - --padding-top: 1rem; - --padding-bottom: 1rem; - padding-left: 1rem; - padding-right: 1rem; -} - -.customSlide { - display: flex; - flex-direction: column; -} - -.transactionList { - overflow: scroll; - width: 100vw; -} - -.balance { - font-weight: 300; - font-size: 1.5rem; - color: black; -} - -.poundSign { - font-weight: 800; - font-size: 1.2rem; -} - -.toolbarAvatarImage { - border-radius: 500px; - height: 100%; - width: auto; -} - -.helloworld { - background-color: gold; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.scss deleted file mode 100644 index 0065249..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/pages/Home.module.scss +++ /dev/null @@ -1,38 +0,0 @@ -.homePage ion-toolbar { - --border-style: none; - --padding-top: 1rem; - --padding-bottom: 1rem; - padding-left: 1rem; - padding-right: 1rem; -} - -.customSlide { - display: flex; - flex-direction: column; -} - -.transactionList { - overflow: scroll; - width: 100vw; -} - -.balance { - font-weight: 300; - font-size: 1.5rem; - color: black; -} - -.poundSign { - font-weight: 800; - font-size: 1.2rem; -} - -.toolbarAvatarImage { - border-radius: 500px; - height: 32px; - width: auto; -} - -.helloworld { - background-color: cyan; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/style.scss b/03_source/mobile.trunk.1/src/pages/DemoBankingUi/style.scss deleted file mode 100644 index 378cae3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBankingUi/style.scss +++ /dev/null @@ -1,139 +0,0 @@ -.demo-banking-ui { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - ion-item { - --padding-start: 0; - --inner-padding-end: 0; - } - - ion-label { - margin-top: 12px; - margin-bottom: 12px; - } - - ion-item h2 { - font-weight: 600; - margin: 0; - } - - ion-item p { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - width: 95%; - } - - ion-item .date { - float: right; - align-items: center; - display: flex; - } - - ion-item ion-icon { - color: #c9c9ca; - } - - ion-item ion-note { - font-size: 15px; - margin-right: 8px; - font-weight: normal; - } - - ion-item ion-note.md { - margin-right: 14px; - } - - .dot { - display: block; - height: 12px; - width: 12px; - border-radius: 50%; - align-self: start; - margin: 16px 10px 16px 16px; - } - - .dot-unread { - background: var(--ion-color-primary); - } - - ion-footer ion-title { - font-size: 11px; - font-weight: normal; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.css b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.css deleted file mode 100644 index e754dfd..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.css +++ /dev/null @@ -1,7 +0,0 @@ -.view-post-footer { - - background-color: white; - padding-left: 1rem; - padding-right: 1rem; - padding-bottom: 1rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.jsx b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.jsx deleted file mode 100644 index 3c295ba..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/BlogPost.jsx +++ /dev/null @@ -1,90 +0,0 @@ -import { - IonBackButton, - IonBadge, - IonButton, - IonButtons, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonFooter, - IonGrid, - IonHeader, - IonIcon, - IonNote, - IonPage, - IonRow, - IonText, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { bookmarkOutline, shareOutline } from 'ionicons/icons'; -import { useParams } from 'react-router'; -import { blogPosts } from '../localData'; -import './BlogPost.css'; - -const BlogPost = () => { - const { id } = useParams(); - const post = blogPosts.filter((post) => parseInt(post.id) === parseInt(id))[0]; - - return ( - - - - Blog - - - - - - - post header - - - - - post author - - {post.author} - - - {post.date} - - - - - {post.title} - - - - - - {post.content} - - - - - - - -
- - - - - - -
- -
- - {post.category} - -
-
-
-
- ); -}; - -export default BlogPost; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/Home.jsx b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/Home.jsx deleted file mode 100644 index 7fff026..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/AppPages/Home.jsx +++ /dev/null @@ -1,51 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { Post } from '../components/Post'; -import { blogPosts } from '../localData'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Home = () => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Ionic Blog - - - handleBackClick()}> - - - - - - - - - Ionic Blog - - - - {blogPosts.map((post, index) => ( - - ))} - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/NOTES.md deleted file mode 100644 index 583ec8b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0122 diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.css b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.css deleted file mode 100644 index 4b6c13d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.css +++ /dev/null @@ -1,37 +0,0 @@ -.post-author-avatar { - height: 2rem; - width: 2rem; - border-radius: 500px; -} - -.post-title { - font-size: 1.4rem; - margin-top: 0.75rem; -} - -.post-content { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.post-footer { - display: flex; - flex-direction: row; - justify-content: space-between; - align-content: center; - width: 100%; - border-top: 2px solid rgb(245, 245, 245); - margin-top: 2rem; - padding-top: 1rem; -} - -.post-category { - margin-top: 1.1rem; -} - -.post-image { - width: 100%; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.jsx b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.jsx deleted file mode 100644 index 96437dd..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/components/Post.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import { - IonBadge, - IonButton, - IonCard, - IonCardContent, - IonCardHeader, - IonCardSubtitle, - IonCardTitle, - IonIcon, - IonNote, - IonRow, -} from '@ionic/react'; -import { bookmarkOutline, shareOutline } from 'ionicons/icons'; - -import './Post.css'; - -export const Post = ({ post }) => { - return ( - - main post - - - - - post author - - {post.author} - - - {post.date} - - {post.title} - - - -

{post.content}

- - -
- - - - - - -
- -
- - {post.category} - -
-
-
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/index.tsx deleted file mode 100644 index 0b67601..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -// REQ0119/demo-blog-post-ui -// -// RULES: -// T.B.A. -// - -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Home from './AppPages/Home'; -import BlogPost from './AppPages/BlogPost'; - -import './style.scss'; - -function DemoBlogPostUi() { - return ( - - - - - - - - - - - - ); -} - -export default DemoBlogPostUi; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/localData/index.js b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/localData/index.js deleted file mode 100644 index a9b37fc..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/localData/index.js +++ /dev/null @@ -1,117 +0,0 @@ -export const blogPosts = [ - { - id: 1, - title: 'How to Convince Your Boss to Choose Ionic', - title_link: 'https://ionicframework.com/blog/convince-boss-choose-ionic-app-development/', - date: 'August 3, 2021', - author: 'By Kim Maida', - authorImage: 'https://ionicframework.com/blog/wp-content/uploads/2021/07/kim-maida-150x150.jpg', - category: 'ANNOUNCEMENTS', - category_link: 'https://ionicframework.com/blog//blog/category/announcements', - image: - 'https://ionicframework.com/blog/wp-content/uploads/2021/07/how-to-convince-your-boss_image_1aug2021.png', - content: - 'Greetings, friend! You’re a web developer, team lead, or engineering manager who has discovered that Ionic products are awesome. They have helped you build cross-platform applications quickly, made the app development process enjoyable, and solved important mobile development problems. You can see that Ionic would be extremely beneficial in your daily job, but are wondering how to convince your boss to endorse the adoption of new software. In a nutshell:', - }, - { - id: 2, - title: 'Ioniconf 2021 Conference Recap', - title_link: 'https://ionicframework.com/blog/ioniconf-2021-conference-recap/', - date: 'July 29, 2021', - author: 'By Mike Hartington', - authorImage: - 'https://ionicframework.com/blog/wp-content/uploads/2018/08/mike-headshot-2-smaller-150x150.png', - category: 'ANNOUNCEMENTS', - category_link: 'https://ionicframework.com/blog//blog/category/announcements', - image: 'https://ionicframework.com/blog/wp-content/uploads/2021/06/og-imgx2.png', - content: - 'And with that, Ioniconf 2021 has concluded! Ioniconf, our online conference for Ionic developers and the wider web development community, featured twelve expert Ionic speakers and was attended by many thousands of Ionic community members. We’re thrilled by the community’s reception to the event and are already looking forward to our next event taking place in September. Read on for a recap and links to all recorded talks.', - }, - { - id: 3, - title: 'Announcing Identity Vault 5.0', - title_link: 'https://ionicframework.com/blog/announcing-identity-vault-5-0/', - date: 'July 28, 2021', - author: 'By Dallas James', - authorImage: - 'https://ionicframework.com/blog/wp-content/uploads/2021/07/dallas-james-150x150.jpg', - category: 'PRODUCT', - category_link: 'https://ionicframework.com/blog//blog/category/announcements', - image: 'https://ionicframework.com/blog/wp-content/uploads/2021/07/iv-5-feature-image.png', - content: - 'Today I’m excited to announce Identity Vault 5.0, the newest version of Ionic’s mobile biometrics solution. Featuring the latest in native security best practices, Identity Vault improves frontend security in any Ionic app by making it easy to add secure biometric authentication in minutes.', - }, - { - id: 4, - title: 'Building with Stencil: Clock Component', - title_link: 'https://ionicframework.com/blog/building-with-stencil-clock-component/', - date: 'July 22, 2021', - author: 'By Kevin Hoyt', - authorImage: 'https://ionicframework.com/blog/wp-content/uploads/2021/07/2520666-150x150.jpg', - category: 'ANNOUNCEMENTS', - category_link: 'https://ionicframework.com/blog//blog/category/announcements', - image: 'https://ionicframework.com/blog/wp-content/uploads/2021/07/Image-from-iOS.png', - content: - 'I have not seen a clock in a web-based user interface in a long time. This makes sense — they are pretty redundant these days. You have a clock on your watch, on your mobile device, and on your desktop, and those are just the digital versions available at a glance. Nonetheless, the process of building a clock can reveal a lot about how a platform works.', - }, - { - id: 5, - title: 'Building with Stencil: Calendar Component', - title_link: 'https://ionicframework.com/blog/building-with-stencil-calendar-component/', - date: 'July 19, 2021', - author: 'By Kevin Hoyt', - authorImage: 'https://ionicframework.com/blog/wp-content/uploads/2021/07/2520666-150x150.jpg', - category: 'TUTORIALS', - category_link: null, - image: - 'https://ionicframework.com/blog/wp-content/uploads/2021/07/ionic-blog-post-image_first-look-01.png', - content: - 'Take a look at the month view of a calendar and you will see several rows of numbers. The numbers themselves, increasing in value one after the other, are arranged in columns. HTML and CSS provide us with a number of tools to display content in rows and columns. Making a calendar component should be easy, right? Right?', - }, - { - id: 6, - title: 'Introducing the New Overlay Hooks for Ionic React', - title_link: - 'https://ionicframework.com/blog/introducing-the-new-overlay-hooks-for-ionic-react/', - date: 'July 14, 2021', - author: 'By Ely Lucas', - authorImage: 'https://secure.gravatar.com/avatar/45ad19965b4bde97e9f4396ea01ed184?s=32&r=g', - category: 'ENGINEERING', - category_link: null, - image: - 'https://ionicframework.com/blog/wp-content/uploads/2021/07/react-overlay-hooks-feature-image.png', - content: - 'Hello Friends! We know everyone is excited about the new features in Ionic Framework 6.0 beta, but that doesn’t mean we’re done with V5! In Ionic React 5.6, we packaged up a new set of hooks for controlling our overlay components that we think you might like. What is an overlay you ask? It’s the term we give components that display over your current content, such as alerts, modals, toasts, etc.', - }, - { - id: 7, - title: 'The Future of Stencil: Expanded Team, New Software Platform, and More', - title_link: - 'https://ionicframework.com/blog/the-future-of-stencil-expanded-team-new-software-platform-and-more/', - date: 'July 7, 2021', - author: 'By Nick Hyatt', - authorImage: - 'https://ionicframework.com/blog/wp-content/uploads/2018/11/Nick-Hyatt-Headshot-150x150.jpeg', - category: 'ANNOUNCEMENTS', - category_link: null, - image: - 'https://ionicframework.com/blog/wp-content/uploads/2021/07/stencil-future-feature-image.png', - content: - 'Today I’m excited to share some news about Stencil, Ionic’s open source toolchain that generates small, fast, and 100% standards-based Web Components that run in every browser. As you might have noticed, we’ve been actively increasing our investments across the entire Ionic App Platform, including the recent launch of Capacitor 3.0, Ionic Portals, tons of Appflow improvements, and the upcoming Ionic Framework v6.', - }, - { - id: 8, - title: 'Announcing the Ionic Framework v6 Beta', - title_link: 'https://ionicframework.com/blog/announcing-the-ionic-framework-v6-beta/', - date: 'June 29, 2021', - author: 'By Liam DeBeasi', - authorImage: - 'https://ionicframework.com/blog/wp-content/uploads/2020/01/ZNK4lRAJ_400x400-150x150.jpg', - category: 'ANNOUNCEMENTS', - category_link: null, - image: - 'https://ionicframework.com/blog/wp-content/uploads/2021/06/framework6-feature-image.png', - content: - 'Earlier this week I had the privilege of giving the Ionic Framework Update at Ioniconf 2021 where we announced the Ionic Framework v6 beta. Ionic Framework has come far from its roots as an AngularJS-only UI library to a truly cross-platform framework for building Web Native applications. As we look to the future of Ionic Framework, let’s talk about some of the improvements coming in Framework v6 and how you can get access to these improvements today.', - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/style.scss b/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/style.scss deleted file mode 100644 index 83c6630..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoBlogPostUi/style.scss +++ /dev/null @@ -1,79 +0,0 @@ -.demo-blog-post-ui { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab1.jsx deleted file mode 100644 index 54ab2b9..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../components/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab2.jsx deleted file mode 100644 index 216544f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/NOTES.md deleted file mode 100644 index 83a41c1..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0123 diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.css b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.css deleted file mode 100644 index e99f514..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.css +++ /dev/null @@ -1,24 +0,0 @@ -.container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); -} - -.container strong { - font-size: 20px; - line-height: 26px; -} - -.container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; -} - -.container a { - text-decoration: none; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.tsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.tsx deleted file mode 100644 index 67b9c98..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/ExploreContainer.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import './ExploreContainer.css'; - -interface ContainerProps {} - -const ExploreContainer: React.FC = () => { - return ( -
- Ready to create an app? -

- Start with Ionic{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/MarkerInfoWindow.jsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/MarkerInfoWindow.jsx deleted file mode 100644 index cc2ea78..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/MarkerInfoWindow.jsx +++ /dev/null @@ -1,69 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonGrid, - IonIcon, - IonLabel, - IonNote, - IonRow, -} from '@ionic/react'; -import { - globeOutline, - heartOutline, - locationOutline, - navigateOutline, - phonePortraitOutline, -} from 'ionicons/icons'; - -export const MarkerInfoWindow = ({ marker, dismiss }) => { - return ( - - - - - -

{marker.title}

- {marker.description} -
-
-
- - - - - - - {marker.address} - - - - - - - - {marker.website} - - - - - - - - {marker.phone} - - - - - -   Favourite - - - -   Navigate - - -
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/components/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/data/index.js b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/data/index.js deleted file mode 100644 index c2ce3b5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/data/index.js +++ /dev/null @@ -1,47 +0,0 @@ -export const markers = [ - { - lat: 54.5258924, - lng: -6.0812478, - title: 'Man Lee', - description: 'Chinese Takeaway', - address: '122 Ballymacash Rd, Lisburn BT28 3EZ', - website: 'https://m.facebook.com/pages/Man-Lee/228415820694835', - phone: '028 92 662853', - }, - { - lat: 54.5097827, - lng: -6.0572343, - title: 'Cam Hing', - description: 'Chinese Takeaway', - address: '70 Longstone St, Lisburn BT28 1TR', - website: 'https://camhinglisbunr.com', - phone: '028 92 677928', - }, - { - lat: 54.5095162, - lng: -6.0595896, - title: 'Golden Garden', - description: 'Chinese Takeaway', - address: '140 Longstone St, Lisburn BT28 1TR', - website: 'https://golden-garden.business.site', - phone: '028 92 671311', - }, - { - lat: 54.5091808, - lng: -6.0363902, - title: 'Pagoda', - description: 'Chinese Takeaway', - address: '79 Sloan St, Lisburn BT27 5AG', - website: 'https://pagodalisburn.com', - phone: '028 92 665289', - }, - { - lat: 54.5989611, - lng: -5.9972126, - title: 'Little Wing', - description: 'Pizzeria', - address: '10 Ann St, Belfast BT1 4EF', - website: 'https://littlewingpizzeria.com', - phone: '028 90 247000', - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/index.tsx deleted file mode 100644 index 1d471d0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -// REQ0119/demo-capacitor-google-maps-tutorial -// -// RULES: -// T.B.A. -// - -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; - -import Home from './pages/Home'; - -import './style.scss'; - -function DemoCapacitorGoogleMapsTutorial() { - return ( - - - - - - - - - - - - - - - - - ); -} - -export default DemoCapacitorGoogleMapsTutorial; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.css b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.css deleted file mode 100644 index 912345b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.css +++ /dev/null @@ -1,5 +0,0 @@ -capacitor-google-map { - display: inline-block; - width: 100%; - height: 86vh; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.jsx b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.jsx deleted file mode 100644 index b800259..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/pages/Home.jsx +++ /dev/null @@ -1,130 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonModal, - useIonRouter, - useIonViewWillEnter, -} from '@ionic/react'; -import { useRef, useState } from 'react'; -import './Home.css'; - -import { GoogleMap } from '@capacitor/google-maps'; -import { markers } from '../data'; -import { MarkerInfoWindow } from '../components/MarkerInfoWindow.jsx'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Home = () => { - // This key is now dead! - // Replace with your own :) - // Remember to secure keys using env files or requesting from server! - // This was for demo purposes :) - const key = 'AIzaSyBJwKYcub1yNcDd2V8iu4ZfGvDi4eW_fpU'; - let newMap; - const mapRef = useRef(null); - - const [selectedMarker, setSelectedMarker] = useState(null); - - const [present, dismiss] = useIonModal(MarkerInfoWindow, { - marker: selectedMarker, - }); - - const modalOptions = { - initialBreakpoint: 0.4, - breakpoints: [0, 0.4], - backdropBreakpoint: 0, - onDidDismiss: () => dismiss(), - }; - - const [mapConfig, setMapConfig] = useState({ - zoom: 10, - center: { - lat: markers[0].lat, - lng: markers[0].lng, - }, - }); - - const markerClick = (marker) => { - setSelectedMarker( - markers.filter((m) => m.lat === marker.latitude && m.lng === marker.longitude)[0] - ); - present(modalOptions); - }; - - const addMapMarker = async (marker) => { - await newMap.addMarker({ - coordinate: { - lat: marker.lat, - lng: marker.lng, - }, - title: marker.title, - }); - }; - - const addMapMarkers = () => markers.forEach((marker) => addMapMarker(marker)); - - const createMap = async () => { - if (!mapRef.current) return; - - newMap = await GoogleMap.create({ - id: 'google-map', - element: mapRef.current, - apiKey: key, - config: mapConfig, - }); - - newMap.setOnMarkerClickListener((marker) => markerClick(marker)); - addMapMarkers(); - }; - - useIonViewWillEnter(() => createMap()); - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Capacitor Google Map - - - handleBackClick()}> - - - - - - - - - Capacitor Google Map - - - handleBackClick()}> - - - - - - - - - - - - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/style.scss b/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/style.scss deleted file mode 100644 index 697843e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoCapacitorGoogleMapsTutorial/style.scss +++ /dev/null @@ -1,2 +0,0 @@ -.demo-capacitor-google-maps-tutorial { -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.css deleted file mode 100644 index 67366ad..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.css +++ /dev/null @@ -1,12 +0,0 @@ -.extra-padding { - - padding-right: 1.3rem !important; - padding-left: 1.3rem !important; -} - -.title { - - font-weight: 600; - font-size: 1.2rem; - margin-bottom: 0.5rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.jsx deleted file mode 100644 index df15105..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab1.jsx +++ /dev/null @@ -1,90 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonText, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { chevronBack, personOutline } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { TalkStore } from '../store'; -import { getTalks } from '../store/Selectors'; -import './Tab1.css'; - -import { TalkCard } from '../components/TalkCard'; -import { useRef } from 'react'; - -const Tab1 = () => { - const pageRef = useRef(null); - const talks = useStoreState(TalkStore, getTalks); - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - All Rooms - - - - - - - - - - - - - - - - - - - -

Upcoming

-
-
-
- - - - - - - - - - -

Happening Now

-
-
-
- - - - {talks.map((talk, talkIndex) => { - return talkIndex > 0 && ; - })} - - -
-
-
- ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab2.jsx deleted file mode 100644 index a668cd0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab2.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import './Tab2.css'; - -const Tab2 = () => { - return ( - - - - TO DO :) - - - - - - TO DO :) - - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab3.jsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab3.jsx deleted file mode 100644 index 5717606..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/AppPages/Tab3.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import './Tab3.css'; - -const Tab3 = () => { - return ( - - - - TO DO :) - - - - - - TO DO :) - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/NOTES.md deleted file mode 100644 index 74774f7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0124 diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.jsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.jsx deleted file mode 100644 index bc48121..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.jsx +++ /dev/null @@ -1,108 +0,0 @@ -import { IonCardSubtitle, IonIcon, IonModal, IonNote, IonRow, useIonModal } from '@ionic/react'; -import { bulb, micOutline, personOutline } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { useEffect, useState } from 'react'; - -import { CategoryStore } from '../store'; -import { getPeople } from '../store/PeopleStore'; -import { getCategory } from '../store/Selectors'; - -import styles from './TalkCard.module.css'; -import { TalkModal } from './TalkModal'; - -export const TalkCard = ({ upcoming = false, talk, pageRef }) => { - const talkCategory = useStoreState(CategoryStore, getCategory(talk.category_id)); - const [speakers, setSpeakers] = useState([]); - const [showModal, setShowModal] = useState(false); - - useEffect(() => { - setSpeakers(getPeople(talk.speakers)); - }, [talk]); - - // const [ present, dismiss ] = useIonModal(TalkModal, { - - // dismiss: () => dismiss(), - // talk, - // speakers, - // category: talkCategory - // }); - - // const handleShowTalk = () => { - - // console.log("in here"); - - // present({ - - // // presentingElement: pageRef.current - // }); - // } - - return ( - <> -
setShowModal(true)} - > -
- - - {talkCategory.name} talks - -
- -
-

{talk.title}

-
- - {!upcoming && ( - - {speakers.map((speaker, index) => { - return ( -
- avatar -
- ); - })} -
- )} - - {upcoming && ( -
- {talk.time} -
- - {talk.speakers} Speakers -
-
- )} - - {!upcoming && ( -
-
- - {talk.speakers} Speakers -
- -
- - {talk.audience} Audience -
-
- )} -
- - setShowModal(false)} - presentingElement={pageRef.current} - > - setShowModal(false)} - speakers={speakers} - talk={talk} - category={talkCategory} - /> - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.module.css b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.module.css deleted file mode 100644 index 881aa99..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkCard.module.css +++ /dev/null @@ -1,105 +0,0 @@ -.talkCard { - - display: flex; - flex-direction: column; - border-radius: 10px; - padding: 2rem; - box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); - background-color: white; -} - -.talkCard:not(:first-child) { - - margin-top: 2rem; -} - -.upcomingCard { - - background-color: var(--ion-color-primary); - color: white; -} - -.cardTitle { - - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - color: white; -} - -.cardTitle ion-icon { - - border-radius: 500px; - padding: 0.2rem; - margin-right: 0.75rem; - background-color: var(--ion-color-primary); - margin-top: -0.2rem; -} - -.upcomingCard .cardTitle ion-icon { - - background-color: white; -} - -.talkTitle h3 { - - font-size: 1.3rem !important; - font-weight: 600; -} - -.talkDate { - - display: flex; - justify-content: space-between; - align-items: center; - align-content: center; - margin-top: 0.5rem; -} - -.talkSpeakers { - - display: flex; - flex-direction: row; - margin-top: 0.5rem; -} - -.talkSpeaker { - - display: flex; - align-items: center; - justify-content: center; - height: 3.5rem; - width: 3.5rem; - border-radius: 12px; - margin-right: 0.2rem; - background-color: var(--ion-color-primary); -} - -.talkSpeaker img { - - height: 3rem; - width: 3rem; -} - -.talkDetails { - - display: flex; - justify-content: space-between; - margin-top: 1.5rem; -} - -.detailCount { - - display: flex; - align-content: center; - align-items: center; - font-weight: 500; - font-size: 0.9rem; -} - -.detailCount ion-icon { - - font-size: 1.2rem; - margin-right: 0.3rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.jsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.jsx deleted file mode 100644 index ec9b741..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.jsx +++ /dev/null @@ -1,110 +0,0 @@ -import { - IonButton, - IonButtons, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { bulb, exitOutline, micOutline, personOutline } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { PeopleStore } from '../store'; -import { getAllPeople } from '../store/Selectors'; - -import styles from './TalkModal.module.css'; - -export const TalkModal = ({ dismiss, talk, category, speakers }) => { - const people = useStoreState(PeopleStore, getAllPeople); - - return ( - - - - Talk Room - - - - - {/* Leave Room */} - - - - - - - - - -
- - {category.name} talks -
-
-
- - - -

{talk.title}

-
-
- - - -
- - {talk.speakers} Speakers -
-
-
- - - {speakers.map((speaker, index) => { - return ( - -
- avatar -
-

{speaker.name.split(' ')[0]}

-
- ); - })} -
- - - -
- - {talk.audience} Audience -
-
-
- - - {[...Array(talk.audience)].map((audience, index) => { - return ( - -
- avatar -
-

{people[Math.floor(Math.random() * 30)].name.split(' ')[0]}

-
- ); - })} -
-
-
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.module.css b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.module.css deleted file mode 100644 index 3661f23..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components/TalkModal.module.css +++ /dev/null @@ -1,150 +0,0 @@ -.talkCard { - - display: flex; - flex-direction: column; - border-radius: 10px; - padding: 2rem; - box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); - background-color: white; -} - -.talkCard:not(:first-child) { - - margin-top: 2rem; -} - -.upcomingCard { - - background-color: var(--ion-color-primary); - color: white; -} - -.cardTitle { - - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - color: white; -} - -.cardTitle ion-icon { - - border-radius: 500px; - padding: 0.2rem; - margin-right: 0.75rem; - background-color: var(--ion-color-primary); - margin-top: -0.2rem; -} - -.upcomingCard .cardTitle ion-icon { - - background-color: white; -} - -.talkTitle { - - margin-top: -1rem; -} - -.talkTitle h3 { - - font-size: 1.3rem !important; - font-weight: 600; -} - -.talkDate { - - display: flex; - justify-content: space-between; - align-items: center; - align-content: center; - margin-top: 0.5rem; -} - -.talkSpeakers { - - display: flex; - flex-direction: row; - justify-content: space-between; - margin-top: 0.5rem; - margin-bottom: 1.5rem; -} - -.speakerContainer { - - display: flex; - flex-direction: column; - align-content: center; - align-items: center; - justify-content: space-between; -} - -.audienceContainer { - - margin-bottom: 1rem; - /* margin: 0.5rem; */ -} - -.talkSpeaker { - - display: flex; - align-items: center; - justify-content: center; - height: 3.5rem; - width: 3.5rem; - border-radius: 12px; - margin-right: 0.2rem; - background-color: var(--ion-color-primary); -} - -.audienceContainer .talkSpeaker { - - background-color: #f2efe5; - border: 2px solid #dfd9c7; -} - -.talkSpeaker img { - - height: 3rem; - width: 3rem; -} - -.speakerContainer p { - - margin: 0; - padding: 0; - margin-top: 0.2rem; - font-weight: 500; - font-size: 0.9rem; -} - -.talkDetails { - - display: flex; - justify-content: space-between; - margin-top: 1.5rem; -} - -.detailCount { - - display: flex; - align-content: center; - align-items: center; - font-weight: 600; - font-size: 0.9rem; - margin-top: 1rem; - margin-bottom: 0.3rem; -} - -.detailCount ion-icon { - - font-size: 1.2rem; - margin-right: 0.3rem; - margin-left: -0.4rem; -} - -.activeSpeaker { - - border: 3px solid rgb(255, 187, 0); -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/components1/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/index.tsx deleted file mode 100644 index f7e8228..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/index.tsx +++ /dev/null @@ -1,122 +0,0 @@ -// REQ0119/demo-club-house -// -// RULES: -// T.B.A. -// - -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonLabel, - IonPage, - IonRouterOutlet, - IonRow, - IonTabBar, - IonTabButton, - IonTabs, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from './components1/SkeletonDashboard'; -import { - addCircle, - addCircleOutline, - chevronBack, - cloudOutline, - home, - homeOutline, - notifications, - notificationsOutline, - person, - personOutline, - refreshOutline, - search, - searchOutline, -} from 'ionicons/icons'; -import { CurrentWeather } from './components1/CurrentWeather'; -import { IonReactRouter } from '@ionic/react-router'; -import { Route, Redirect } from 'react-router'; -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; -import Tab3 from './AppPages/Tab3'; - -const DemoClubHouse = () => { - const tabs = [ - { - name: 'Home', - url: '/demo-club-house/home', - activeIcon: home, - icon: homeOutline, - component: Tab1, - }, - { - name: 'Search', - url: '/search', - activeIcon: search, - icon: searchOutline, - component: Tab2, - }, - { - name: 'Add', - url: '/add', - activeIcon: addCircle, - icon: addCircleOutline, - component: Tab3, - }, - { - name: 'Account', - url: '/account', - activeIcon: person, - icon: personOutline, - component: Tab3, - }, - { - name: 'Notifications', - url: '/notifications', - activeIcon: notifications, - icon: notificationsOutline, - component: Tab3, - }, - ]; - - const [activeTab, setActiveTab] = useState(tabs[0].name); - - return ( - setActiveTab(e.detail.tab)}> - - {tabs.map((tab, index) => { - return ( - - - - ); - })} - - - - - - - {tabs.map((tab, barIndex) => { - const active = tab.name === activeTab; - - return ( - - - - ); - })} - - - ); -}; - -export default DemoClubHouse; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/CategoryStore.js b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/CategoryStore.js deleted file mode 100644 index 81fe162..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/CategoryStore.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Store } from 'pullstate'; - -const CategoryStore = new Store({ - categories: [ - { - id: 1, - name: 'Design', - }, - { - id: 2, - name: 'Javascript', - }, - { - id: 3, - name: 'Mobile', - }, - { - id: 4, - name: 'Business', - }, - ], -}); - -export default CategoryStore; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/PeopleStore.js b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/PeopleStore.js deleted file mode 100644 index 592aea0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/PeopleStore.js +++ /dev/null @@ -1,206 +0,0 @@ -import { Store } from 'pullstate'; - -const PeopleStore = new Store({ - people: [ - { - name: 'Andrew Bennet', - image: '/avatars/Avatar-1.png', - }, - { - name: 'Elizabeth Moore', - image: '/avatars/Avatar-2.png', - }, - { - name: 'Oscar Clarke', - image: '/avatars/Avatar-3.png', - }, - { - name: 'Sandra Simpson', - image: '/avatars/Avatar-4.png', - }, - { - name: 'Sophia Price', - image: '/avatars/Avatar-5.png', - }, - { - name: 'Jasmine Ruiz', - image: '/avatars/Avatar-6.png', - }, - { - name: 'Adriana Bonny', - image: '/avatars/Avatar-7.png', - }, - { - name: 'Maya Watson', - image: '/avatars/Avatar-8.png', - }, - { - name: 'Tatum Porter', - image: '/avatars/Avatar-9.png', - }, - { - name: 'Jackson Watts', - image: '/avatars/Avatar-10.png', - }, - { - name: 'Lana Cooper', - image: '/avatars/Avatar-11.png', - }, - { - name: 'Mateo Hoffman', - image: '/avatars/Avatar-12.png', - }, - { - name: 'Harper James', - image: '/avatars/Avatar-13.png', - }, - { - name: 'Edgar Douglas', - image: '/avatars/Avatar-14.png', - }, - { - name: 'Lilly Hale', - image: '/avatars/Avatar-15.png', - }, - { - name: 'Jade Williams', - image: '/avatars/Avatar-16.png', - }, - { - name: 'Cayden Long', - image: '/avatars/Avatar-17.png', - }, - { - name: 'Millie Klein', - image: '/avatars/Avatar-18.png', - }, - { - name: 'Heidi Toffer', - image: '/avatars/Avatar-19.png', - }, - { - name: 'Alaya Bailey', - image: '/avatars/Avatar-20.png', - }, - { - name: 'Laura Diaz', - image: '/avatars/Avatar-21.png', - }, - { - name: 'Alina Gomez', - image: '/avatars/Avatar-22.png', - }, - { - name: 'Rachel Tiffin', - image: '/avatars/Avatar-23.png', - }, - { - name: 'Liz Faxty', - image: '/avatars/Avatar-24.png', - }, - { - name: 'Sarah Goodman', - image: '/avatars/Avatar-25.png', - }, - { - name: 'Melissa Bengin', - image: '/avatars/Avatar-26.png', - }, - { - name: 'Stephanie Morter', - image: '/avatars/Avatar-27.png', - }, - { - name: 'Rebecca Slims', - image: '/avatars/Avatar-28.png', - }, - { - name: 'Arielle May', - image: '/avatars/Avatar-29.png', - }, - { - name: 'Jack Boppes', - image: '/avatars/Avatar-30.png', - }, - { - name: 'Christina Rankin', - image: '/avatars/Avatar-31.png', - }, - { - name: 'Ronan Murf', - image: '/avatars/Avatar-32.png', - }, - { - name: 'Daniel Jackson', - image: '/avatars/Avatar-33.png', - }, - { - name: 'Richard Bales', - image: '/avatars/Avatar-34.png', - }, - { - name: 'Harmony Martin', - image: '/avatars/Avatar-35.png', - }, - { - name: 'Chris Huges', - image: '/avatars/Avatar-36.png', - }, - ], -}); - -export default PeopleStore; - -export const getPeople = (amount) => { - let tempPeople = [...PeopleStore.getRawState().people]; - return tempPeople.sort(() => Math.random() - Math.random()).slice(0, amount); -}; - -// export const markActiveAsDone = () => { - -// PeopleStore.update(state => { - -// const scoreboardIndex = state.scoreboards.findIndex(scoreboard => scoreboard.active === true); -// state.scoreboards[scoreboardIndex].done = true; -// }); -// } - -// export const addScoreboard = (players, details) => { - -// PeopleStore.update(s => { s.scoreboards = s.scoreboards.map(scoreboard => scoreboard.active = false) }); - -// PeopleStore.update(state => { - -// state.scoreboards.forEach((scoreboard, index) => { - -// state.scoreboards[index].active = false; -// }); -// }); - -// const newScoreboard = { - -// id: Date.now(), -// title: details.title, -// players: [ ...players ], -// active: true -// }; - -// const playersToSave = players.filter(p => p.saved === true); - -// PeopleStore.update(s => { s.scoreboards = [ ...s.scoreboards, newScoreboard ] }); -// PeopleStore.update(s => { s.players = [ ...s.players, ...playersToSave ] }); -// } - -// export const addScoreToPlayer = (scoreboardId, playerIndex) => { - -// PeopleStore.update(state => { - -// const scoreboardIndex = state.scoreboards.findIndex(scoreboard => scoreboard.id === parseInt(scoreboardId)); -// state.scoreboards[scoreboardIndex].players[playerIndex].score += 1; - -// state.scoreboards[scoreboardIndex].players.sort((a, b) => { -// if (a.score > b.score) return -1 -// return a.score < b.score ? 1 : 0 -// }); -// }); -// } diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/Selectors.js b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/Selectors.js deleted file mode 100644 index 7af5b18..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/Selectors.js +++ /dev/null @@ -1,25 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = (state) => state; - -// General getters -export const getAllPeople = createSelector(getState, (state) => state.people); -export const getCategories = createSelector(getState, (state) => state.categories); -export const getTalks = createSelector(getState, (state) => state.talks); - -// Specific getters -export const getCategoryTalks = (categoryId) => - createSelector( - getState, - (state) => state.talks.filter((talk) => parseInt(talk.category_id) === parseInt(categoryId))[0] - ); -export const getTalk = (id) => - createSelector( - getState, - (state) => state.talks.filter((talk) => parseInt(talk.id) === parseInt(id))[0] - ); -export const getCategory = (id) => - createSelector( - getState, - (state) => state.categories.filter((category) => parseInt(category.id) === parseInt(id))[0] - ); diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/TalkStore.js b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/TalkStore.js deleted file mode 100644 index 3c64c30..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/TalkStore.js +++ /dev/null @@ -1,110 +0,0 @@ -import { Store } from 'pullstate'; - -const TalkStore = new Store({ - talks: [ - { - id: 1, - title: 'The future of design systems', - date: '29th Oct 2021', - time: '5:00PM', - speakers: 3, - audience: 14, - category_id: 1, - }, - { - id: 2, - title: 'Lets talk about ReactJS', - date: '13th Nov 2021', - time: '2:00PM', - speakers: 4, - audience: 239, - category_id: 2, - }, - { - id: 3, - title: 'How Ionic can transform mobile development', - date: '21st Nov 2021', - time: '7:30PM', - speakers: 2, - audience: 371, - category_id: 3, - }, - { - id: 4, - title: 'Using capacitor to access native features', - date: '25th Nov 2021', - time: '4:15PM', - speakers: 2, - audience: 587, - category_id: 3, - }, - { - id: 5, - title: 'Does SASS give you an advantage?', - date: '29th Nov 2021', - time: '6:00PM', - speakers: 4, - audience: 97, - category_id: 1, - }, - { - id: 6, - title: 'Building a startup from the ground up', - date: '1st Dec 2021', - time: '9:00PM', - speakers: 4, - audience: 316, - category_id: 4, - }, - { - id: 7, - title: 'How we went from 9-5 to my own boss', - date: '12th Dec 2021', - time: '1:00PM', - speakers: 2, - audience: 33, - category_id: 4, - }, - { - id: 8, - title: 'Features of the beast, Angular', - date: '19th Dec 2021', - time: '3:30PM', - speakers: 3, - audience: 114, - category_id: 2, - }, - ], -}); - -export default TalkStore; - -export const addTalk = (details) => { - const newTalk = { - id: Date.now(), - title: details.title, - date: details.date, - time: details.time, - speakers: details.speakers, - audience: Math.random(900), - category_id: details.category_id, - }; - - TalkStore.update((s) => { - s.talks = [...s.talks, newTalk]; - }); -}; - -// export const addScoreToPlayer = (scoreboardId, playerIndex) => { - -// PeopleStore.update(state => { - -// const scoreboardIndex = state.scoreboards.findIndex(scoreboard => scoreboard.id === parseInt(scoreboardId)); -// state.scoreboards[scoreboardIndex].players[playerIndex].score += 1; - -// state.scoreboards[scoreboardIndex].players.sort((a, b) => { -// if (a.score > b.score) return -1 -// return a.score < b.score ? 1 : 0 -// }); -// }); -// } diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/index.js b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/index.js deleted file mode 100644 index 11d5963..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/store/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default as PeopleStore } from './PeopleStore'; -export { default as TalkStore } from './TalkStore'; -export { default as CategoryStore } from './CategoryStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/style.scss b/03_source/mobile.trunk.1/src/pages/DemoClubHouse/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoClubHouse/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/NOTES.md deleted file mode 100644 index c42d003..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0125 diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.css b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.css deleted file mode 100644 index e99f514..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.css +++ /dev/null @@ -1,24 +0,0 @@ -.container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); -} - -.container strong { - font-size: 20px; - line-height: 26px; -} - -.container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; -} - -.container a { - text-decoration: none; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.tsx deleted file mode 100644 index f003f7f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/components/ExploreContainer.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import './ExploreContainer.css'; - -interface ContainerProps { - name: string; -} - -const ExploreContainer: React.FC = ({ name }) => { - return ( -
- {name} -

- Explore{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/index.tsx deleted file mode 100644 index 714ef07..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/index.tsx +++ /dev/null @@ -1,82 +0,0 @@ -// REQ0119/demo-color-tutorial -// -// RULES: -// T.B.A. -// - -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, ellipse, searchOutline, square, triangle } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import Tab1 from './pages/Tab1'; -import Tab2 from './pages/Tab2'; -import Tab3 from './pages/Tab3'; - -import './style.scss'; - -function DemoColorTutorial() { - return ( - - {/* - - - - - - - - - - - - */} - - - - - - - - - - - - - - - - - {/* - - - Dashboard - - - - Search - - */} - - {/* update path base from `/` to `/demo-color-tutorial` */} - - - Tab 1 - - - - Tab 2 - - - - Tab 3 - - - - ); -} - -export default DemoColorTutorial; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab1.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab1.tsx deleted file mode 100644 index af8f8ee..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab1.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCheckbox, - IonContent, - IonHeader, - IonIcon, - IonItem, - IonLabel, - IonNote, - IonPage, - IonRadio, - IonTitle, - IonToggle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab1.css'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Tab1: React.FC = () => { - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Tab 1 - - - handleBackClick()}> - - - - - - - - - Tab 1 - - - - Button - - - Toggle - - - - - Checkbox - - - - - Badge - 14 notifications - - - - Note - 3 unread - - - - ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab2.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab2.tsx deleted file mode 100644 index 05458aa..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab2.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab2.css'; - -const Tab2: React.FC = () => { - return ( - - - - Tab 2 - - - - - - Tab 2 - - - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab3.tsx b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab3.tsx deleted file mode 100644 index 3a29b8a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/pages/Tab3.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab3: React.FC = () => { - return ( - - - - Tab 3 - - - - - - Tab 3 - - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/style.scss b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/style.scss deleted file mode 100644 index 5430344..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/style.scss +++ /dev/null @@ -1,256 +0,0 @@ -.demo-color-tutorial { - /* -Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ -*/ - - /** Ionic CSS Variables **/ - * { - /** alans color **/ - --ion-color-alans-color: #6c9400; - --ion-color-alans-color-rgb: 108, 148, 0; - --ion-color-alans-color-contrast: #ffffff; - --ion-color-alans-color-contrast-rgb: 255, 255, 255; - --ion-color-alans-color-shade: #5f8200; - --ion-color-alans-color-tint: #7b9f1a; - - /** primary **/ - --ion-color-primary: #be402f; - --ion-color-primary-rgb: 190, 64, 47; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #a73829; - --ion-color-primary-tint: #c55344; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - .ion-color-alans-color { - --ion-color-base: var(--ion-color-alans-color); - --ion-color-base-rgb: var(--ion-color-alans-color-rgb); - --ion-color-contrast: var(--ion-color-alans-color-contrast); - --ion-color-contrast-rgb: var(--ion-color-alans-color-contrast-rgb); - --ion-color-shade: var(--ion-color-alans-color-shade); - --ion-color-tint: var(--ion-color-alans-color-tint); - } - - @media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66, 140, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80, 200, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106, 100, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47, 223, 117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0, 0, 0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255, 213, 52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255, 73, 97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244, 245, 248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0, 0, 0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152, 154, 162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0, 0, 0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34, 36, 40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255, 255, 255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0, 0, 0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - .ios ion-modal { - --ion-background-color: var(--ion-color-step-100); - --ion-toolbar-background: var(--ion-color-step-150); - --ion-toolbar-border-color: var(--ion-color-step-250); - } - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18, 18, 18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/theme/variables.css b/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/theme/variables.css deleted file mode 100644 index 5f9d075..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoColorTutorial/theme/variables.css +++ /dev/null @@ -1,254 +0,0 @@ -/* -Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ -*/ - -/** Ionic CSS Variables **/ -:root { - /** alans color **/ - --ion-color-alans-color: #6c9400; - --ion-color-alans-color-rgb: 108, 148, 0; - --ion-color-alans-color-contrast: #ffffff; - --ion-color-alans-color-contrast-rgb: 255, 255, 255; - --ion-color-alans-color-shade: #5f8200; - --ion-color-alans-color-tint: #7b9f1a; - - /** primary **/ - --ion-color-primary: #be402f; - --ion-color-primary-rgb: 190, 64, 47; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #a73829; - --ion-color-primary-tint: #c55344; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; -} - -.ion-color-alans-color { - --ion-color-base: var(--ion-color-alans-color); - --ion-color-base-rgb: var(--ion-color-alans-color-rgb); - --ion-color-contrast: var(--ion-color-alans-color-contrast); - --ion-color-contrast-rgb: var(--ion-color-alans-color-contrast-rgb); - --ion-color-shade: var(--ion-color-alans-color-shade); - --ion-color-tint: var(--ion-color-alans-color-tint); -} - -@media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66, 140, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80, 200, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106, 100, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47, 223, 117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0, 0, 0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255, 213, 52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255, 73, 97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244, 245, 248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0, 0, 0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152, 154, 162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0, 0, 0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34, 36, 40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255, 255, 255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0, 0, 0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - .ios ion-modal { - --ion-background-color: var(--ion-color-step-100); - --ion-toolbar-background: var(--ion-color-step-150); - --ion-toolbar-border-color: var(--ion-color-step-250); - } - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18, 18, 18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab1.jsx deleted file mode 100644 index d1d807c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab1.jsx +++ /dev/null @@ -1,114 +0,0 @@ -import { - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { bookOutline, chevronBackOutline, heart, search } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { useRef } from 'react'; -import { WordStore } from '../store'; -import { getFavourites, getSearchCount } from '../store/Selectors'; - -const Tab1 = () => { - const router = useIonRouter(); - const pageRef = useRef(null); - const favourites = useStoreState(WordStore, getFavourites); - const searchCount = useStoreState(WordStore, getSearchCount); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Dashboard - - - handleBackClick()}> - - - - - - - - - Dashboard - - - handleBackClick()}> - - - - - - - - - - - - - Ionic Dictionary App -

Based on the English language

-
-
-
-
- - - - - - Did you know? -

There are 171, 146 words in the English language!

- - Search now → - -
-
-
-
- - - - - - - {favourites.length} - Favourites - - - - - - - - {searchCount} - Searches - - - - -
-
-
- ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab2.jsx deleted file mode 100644 index bb59c51..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab2.jsx +++ /dev/null @@ -1,83 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState, useRef } from 'react'; -import { NoSearch } from '../components/NoSearch'; -import { NoResultsWordCard, WordCard } from '../components/WordCard'; -import { WordStore } from '../store'; -import { searchWord } from '../utils'; - -const Tab2 = () => { - const pageRef = useRef(null); - const [searchTerm, setSearchTerm] = useState(''); - const [searchResult, setSearchResult] = useState(false); - const [animatedClass, setAnimatedClass] = useState(''); - - const performSearch = async () => { - setAnimatedClass('animate__slideOutRight'); - const result = searchTerm !== '' ? await searchWord(searchTerm) : undefined; - - setTimeout(() => setSearchResult(result === undefined ? 'none' : result), 250); - setTimeout(() => setAnimatedClass('animate__slideInLeft'), 250); - - WordStore.update((s) => { - s.searchCount++; - }); - }; - - return ( - - - - Search - - - - - - Search - - - - - - - setSearchTerm(e.target.value)} - /> - - - - - Search - - - - - {searchResult && searchResult !== 'none' && ( - - )} - - {searchResult && searchResult === 'none' && ( - - )} - - {!searchResult && } - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab3.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab3.jsx deleted file mode 100644 index 7d8298f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/AppPages/Tab3.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import { useStoreState } from 'pullstate'; -import { useRef, useState } from 'react'; -import { NoFavourites } from '../components/NoFavourites'; -import { WordCard } from '../components/WordCard'; -import { WordStore } from '../store'; -import { getFavourites } from '../store/Selectors'; - -const Tab3 = () => { - const pageRef = useRef(null); - const favourites = useStoreState(WordStore, getFavourites); - const [animatedClass, setAnimatedClass] = useState('animate__slideInLeft'); - - return ( - - - - Favourites - - - - - - Favourites - - - - {favourites.map((favourite, index) => { - return ( - - ); - })} - - {favourites.length < 1 && } - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoFavourites.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoFavourites.jsx deleted file mode 100644 index 0f446f7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoFavourites.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import { IonCol, IonLabel, IonRow } from '@ionic/react'; - -export const NoFavourites = () => ( - - - -

You don't have any favourites yet!

-

- Any time you see the heart icon, press it to add the related word to your favourites and - quickly access it from here. -

- -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoSearch.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoSearch.jsx deleted file mode 100644 index 27f6fa3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/NoSearch.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import { IonCol, IonLabel, IonRow } from '@ionic/react'; - -export const NoSearch = () => ( - - - -

Search for a word in the English language

-

- This app will give you word meaninigs, phonetics, origin and also an audio clip so you can - hear what it sounds like. -

- -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCard.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCard.jsx deleted file mode 100644 index 9ec2346..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCard.jsx +++ /dev/null @@ -1,129 +0,0 @@ -import { - IonBadge, - IonButton, - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonIcon, - IonNote, - IonRow, - useIonModal, -} from '@ionic/react'; -import { checkmarkCircleOutline, chevronForward, closeCircleOutline } from 'ionicons/icons'; -import WordModal from './WordModal'; - -export const WordCard = ({ word, animatedClass, pageRef }) => { - const closeModal = () => { - hideModal(); - }; - - const openModal = () => { - showModal({ - presentingElement: pageRef.current, - onDidDismiss: hideModal, - }); - }; - - const [showModal, hideModal] = useIonModal(WordModal, { - dismiss: closeModal, - word, - }); - - return ( - - - - - {word.word} -
- {word.meanings && - word.meanings.map((meaning, index) => { - return ( - - {meaning.partOfSpeech} -   - - ); - })} -
- {word.origin} - - - - {word.meanings.length} - meanings - - - - {word.phonetics.length} - phonetics - - - - - - audio - - - - - - - View  - - - - -
-
-
-
- ); -}; - -export const NoResultsWordCard = ({ word, animatedClass }) => { - return ( - - - - - Whoops... -
- no results  - found -
- - No results have been found for your search criteria! Please try another word. - - - - - 0 - meanings - - - - 0 - phonetics - - - - - - audio - - -
-
-
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCardHeading.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCardHeading.jsx deleted file mode 100644 index ff23fc0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordCardHeading.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import { IonText } from "@ionic/react"; - -export const WordCardHeading = ({ text }) => ( - -
- -

{ text }

-
-
-); \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordMeaning.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordMeaning.jsx deleted file mode 100644 index 1f5d3b7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordMeaning.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import { IonBadge } from '@ionic/react'; - -export const WordMeaning = ({ meaning, index }) => ( -
0 ? 'ion-padding-top' : ''}> - - {meaning.partOfSpeech} - -
- {meaning.definitions.map((definition, index2) => { - return ( -

0 ? 'ion-padding-top' : ''}> - {index2 + 1}.  - {definition.definition} -

- ); - })} -
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordModal.jsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordModal.jsx deleted file mode 100644 index 0896a4b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/components/WordModal.jsx +++ /dev/null @@ -1,122 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardHeader, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonNote, - IonPage, - IonRow, - IonText, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { heart, heartOutline, play } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { WordStore } from '../store'; -import { getFavourites } from '../store/Selectors'; -import { addToFavourites } from '../store/WordStore'; -import { WordCardHeading } from './WordCardHeading'; -import { WordMeaning } from './WordMeaning'; - -const WordModal = ({ dismiss, word }) => { - const favourites = useStoreState(WordStore, getFavourites); - const isFavourite = favourites.includes(word); - const audio = word.phonetics[0] ? word.phonetics[0].audio : false; - - const playAudio = () => { - const audioElement = new Audio(`https:${audio}`); - audioElement.play(); - }; - - return ( - - - - - addToFavourites(word)}> - - - - View Word - - - Close - - - - - - - - - - {word.word} -
- {word.meanings && - word.meanings.map((meaning, index) => { - return ( - - - {meaning.partOfSpeech} - -   - - ); - })} -
- {word.origin} -
-
-
-
- - {audio && ( - - - - - - - - - - - - - - - - - - )} - - - - - - - - {word.meanings && - word.meanings.map((meaning, index) => { - return ; - })} - - - - -
-
-
- ); -}; - -export default WordModal; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/index.tsx deleted file mode 100644 index 8e1f78b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, heart, search, searchOutline, statsChart } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; -import Tab3 from './AppPages/Tab3'; - -import './style.scss'; - -function DemoDictionaryApp() { - return ( - - - - - - - - - - - - - - - {/* */} - - - - - - - - - - - - - ); -} - -export default DemoDictionaryApp; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/notes.md b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/notes.md deleted file mode 100644 index dbb9c22..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/notes.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0126 diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/Selectors.js b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/Selectors.js deleted file mode 100644 index eeb9eb0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/Selectors.js +++ /dev/null @@ -1,8 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = state => state; - -// General getters -export const getFavourites = createSelector(getState, state => state.favourites); -export const getPopularWords = createSelector(getState, state => state.popularWords); -export const getSearchCount = createSelector(getState, state => state.searchCount); \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/WordStore.js b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/WordStore.js deleted file mode 100644 index 374c814..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/WordStore.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Store } from "pullstate"; - -const WordStore = new Store({ - - favourites: [], - popularWords: [], - searchCount: 0 -}); - -export default WordStore; - -export const addToFavourites = (passedWord) => { - - const currentFavourites = WordStore.getRawState().favourites; - const added = !currentFavourites.includes(passedWord); - - WordStore.update(s => { - - if (currentFavourites.includes(passedWord)) { - - s.favourites = currentFavourites.filter(word => word !== passedWord); - } else { - - s.favourites = [ ...s.favourites, passedWord ]; - } - }); - - return added; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/index.js b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/index.js deleted file mode 100644 index b232728..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/store/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as WordStore } from "./WordStore"; diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/style.scss b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/style.scss deleted file mode 100644 index bb952e0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/style.scss +++ /dev/null @@ -1,240 +0,0 @@ -/* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - -/** Ionic CSS Variables **/ -.demo-dictionary-app { - * { - /** primary **/ - --ion-color-primary: #953cd0; - --ion-color-primary-rgb: 149, 60, 208; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #8335b7; - --ion-color-primary-tint: #a050d5; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #ffffff; - --ion-color-light-rgb: 255, 255, 255; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #e0e0e0; - --ion-color-light-tint: #ffffff; - - --ion-background-color: #1e1b27 !important; - --ion-tab-bar-color-selected: #953cd0; - --ion-tab-bar-color: #412f6e; - --ion-text-color: white; - --ion-tab-bar-background: #191620; - --ion-toolbar-background: #191620 !important; - --ion-item-background: #000000 !important; - - --ion-card-background: #272333 !important; - --ion-modal-background: #272333 !important; - } - - ion-tab-bar { - --border-style: none; - border: none; - } - - /* - * Dark Colors - * ------------------------------------------- - */ - - ion-modal { - -ms-overflow-style: none; /* for Internet Explorer, Edge */ - scrollbar-width: none; /* for Firefox */ - overflow-y: scroll; - } - - body { - overflow: hidden !important; - --ion-color-primary: #953cd0; - --ion-color-primary-rgb: 149, 60, 208; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #8335b7; - --ion-color-primary-tint: #a050d5; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80, 200, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106, 100, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47, 223, 117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0, 0, 0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255, 213, 52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255, 73, 97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244, 245, 248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0, 0, 0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152, 154, 162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0, 0, 0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #ffffff; - --ion-color-light-rgb: 255, 255, 255; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #e0e0e0; - --ion-color-light-tint: #ffffff; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - /* --ion-background-color: #000000; */ - /* --ion-background-color-rgb: 0,0,0; */ - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - } - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - /* --ion-background-color: #121212; */ - /* --ion-background-color-rgb: 18,18,18; */ - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/utils.js b/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/utils.js deleted file mode 100644 index fa5327f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoDictionaryApp/utils.js +++ /dev/null @@ -1,21 +0,0 @@ -import { WordStore } from './store'; - -const API_URL = 'https://api.dictionaryapi.dev/api/v2/entries/en/'; - -export const searchWord = async (word, returnOne = true) => { - const response = await fetch(`${API_URL}${word.toLowerCase()}`); - const data = await response.json(); - - return returnOne ? data[0] : data; -}; - -export const fetchPopularWords = async () => { - const words = ['mobile', 'applications', 'ionic', 'framework']; - - words.forEach(async (word) => { - const wordData = await searchWord(word, false); - WordStore.update((s) => { - s.popularWords = [...s.popularWords, wordData[0]]; - }); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/NOTES.md deleted file mode 100644 index 056b5dc..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0127 diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.module.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.module.css deleted file mode 100644 index 7cb75fd..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.module.css +++ /dev/null @@ -1,72 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.categoryCard { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; - /* min-height: 20rem !important; */ -} - -.productCardActions { - - display: flex; - flex-direction: row; - justify-content: space-between; - width: 100%; - margin-bottom: 1rem; -} - -.productCardAction { - - font-size: 1.1rem; -} - -.productCardHeader { - - min-height: 17rem; -} - -.productCardHeader p { - - font-size: 0.8rem; - padding: 0; - margin: 0; - margin-top: 0.75rem; -} - -.categoryCardContent { - - display: flex; - flex-direction: column; -} - -.categoryCardContent ion-button { - - height: 1.5rem; - font-size: 0.8rem; -} - -.categoryCardContent p { - - font-size: 0.8rem; - padding: 0; - margin: 0; -} - -.categoryCard img { - - /* border-radius: 5px; */ - /* padding: 1rem; */ -} - -.productPrice { - - display: flex; - flex-direction: row; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.tsx deleted file mode 100644 index e3a0266..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/components/ProductCard.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCol, IonIcon } from '@ionic/react'; -import { arrowRedoOutline, cart, cartOutline, heart, heartOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { addToCart } from '../data/CartStore'; -import { addToFavourites, FavouritesStore } from '../data/FavouritesStore'; -import styles from './ProductCard.module.css'; - -const ProductCard = (props): React.FC => { - const { product, category, index, cartRef } = props; - const favourites = FavouritesStore.useState((s) => s.product_ids); - - const productCartRef = useRef(); - const productFavouriteRef = useRef(); - const [isFavourite, setIsFavourite] = useState(false); - - useEffect(() => { - const tempIsFavourite = favourites.find((f) => f === `${category.slug}/${product.id}`); - setIsFavourite(tempIsFavourite ? true : false); - }, [props.product, favourites]); - - const addProductToFavourites = (e, categorySlug, productID) => { - e.preventDefault(); - e.stopPropagation(); - addToFavourites(categorySlug, productID); - - productFavouriteRef.current.style.display = ''; - productFavouriteRef.current.classList.add('animate__fadeOutTopRight'); - - setTimeout(() => { - if (productCartRef.current) { - productFavouriteRef.current.classList.remove('animate__fadeOutTopRight'); - productFavouriteRef.current.style.display = 'none'; - } - }, 500); - }; - - const addProductToCart = (e, categorySlug, productID) => { - e.preventDefault(); - e.stopPropagation(); - - productCartRef.current.style.display = ''; - productCartRef.current.classList.add('animate__fadeOutUp'); - - setTimeout(() => { - cartRef.current.classList.add('animate__tada'); - addToCart(categorySlug, productID); - - setTimeout(() => { - cartRef.current.classList.remove('animate__tada'); - productCartRef.current.style.display = 'none'; - }, 500); - }, 500); - }; - - return ( - - - -
- addProductToFavourites(e, category.slug, product.id)} - /> - - -
- product pic -

{product.name}

-
- - -
- - {product.price} - - addProductToCart(e, category.slug, product.id)}> - - - - -
-
-
-
- ); -}; - -export default ProductCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/CartStore.ts b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/CartStore.ts deleted file mode 100644 index c9af57b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/CartStore.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Store } from 'pullstate'; - -export const CartStore = new Store({ - total: 0, - product_ids: [], -}); - -export const addToCart = (categorySlug, productID) => { - CartStore.update((s) => { - s.product_ids = [...s.product_ids, `${categorySlug}/${parseInt(productID)}`]; - }); -}; - -export const removeFromCart = (productIndex) => { - CartStore.update((s) => { - s.product_ids.splice(productIndex, 1); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/FavouritesStore.ts b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/FavouritesStore.ts deleted file mode 100644 index 958bd5f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/FavouritesStore.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Store } from 'pullstate'; - -export const FavouritesStore = new Store({ - total: 0, - product_ids: [], -}); - -export const addToFavourites = (categorySlug, productID) => { - FavouritesStore.update((s) => { - if (s.product_ids.find((id) => id === `${categorySlug}/${parseInt(productID)}`)) { - s.product_ids = s.product_ids.filter((id) => id !== `${categorySlug}/${parseInt(productID)}`); - } else { - s.product_ids = [...s.product_ids, `${categorySlug}/${parseInt(productID)}`]; - } - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/ProductStore.ts b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/ProductStore.ts deleted file mode 100644 index 88def31..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/ProductStore.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Store } from 'pullstate'; - -export const ProductStore = new Store({ - products: [], -}); diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/fetcher.ts b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/fetcher.ts deleted file mode 100644 index 4d026ff..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/data/fetcher.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ProductStore } from './ProductStore'; - -export const fetchData = async () => { - const json = [ - 'beds.json', - 'armchairs.json', - 'coffee_tables.json', - 'cushions.json', - 'floor_lamps.json', - 'office_chairs.json', - ]; - - var products = []; - - json.forEach(async (category) => { - const products = await fetchProducts(category); - - let categoryName = category.replace('.json', ''); - categoryName = categoryName.replace('_', ' '); - categoryName = uppercaseWords(categoryName); - - const productCategory = { - name: categoryName, - slug: category.replace('.json', ''), - cover: products[6].image, - products, - }; - - ProductStore.update((s) => { - s.products = [...s.products, productCategory]; - }); - }); - - return products; -}; - -const fetchProducts = async (category) => { - const response = await fetch(`products/${category}`); - const data = await response.json(); - - // Set a product id - await data.forEach((d, i) => { - d.id = i + 1; - }); - - return data; -}; - -const uppercaseWords = (words) => { - words = words - .toLowerCase() - .split(' ') - .map((s) => s.charAt(0).toUpperCase() + s.substring(1)) - .join(' '); - - return words; -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/index.tsx deleted file mode 100644 index 402186a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/index.tsx +++ /dev/null @@ -1,71 +0,0 @@ -// REQ0119/demo-ecommerce-example -// -// RULES: -// T.B.A. -// - -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import Home from './pages/Home'; -import { fetchData } from './data/fetcher'; -import CategoryProducts from './pages/CategoryProducts'; -import Product from './pages/Product'; -import FavouriteProducts from './pages/FavouriteProducts'; -import CartProducts from './pages/CartProducts'; - -import './style.scss'; -import React, { useEffect } from 'react'; - -function DemoEcommerceExample(): React.JSX.Element { - useEffect(() => { - fetchData(); - }, []); - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - {/* */} - - - - Dashboard - - - - Search - - - - ); -} - -export default DemoEcommerceExample; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/module.d.ts b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/module.d.ts deleted file mode 100644 index d774364..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/module.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.module.css' { - const classes: { readonly [key: string]: string }; - export default classes; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.module.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.module.css deleted file mode 100644 index 6be2867..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.module.css +++ /dev/null @@ -1,31 +0,0 @@ -.cartCheckout { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin: 1rem; -} - -.cartFooter { - border-top: 2px solid rgb(200, 200, 200); - background-color: white; -} - -.cartCheckout ion-card-subtitle { - font-size: 1.3rem; -} - -.cartItem ion-avatar { - height: 4rem; - width: 4rem; -} - -.cartSlider:not(:nth-child(1)) { - border-top: 2px solid rgb(236, 236, 236); -} - -.cartActions { - display: flex; - flex-direction: column; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.tsx deleted file mode 100644 index 208eb31..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CartProducts.tsx +++ /dev/null @@ -1,161 +0,0 @@ -import { - IonAvatar, - IonBadge, - IonButton, - IonButtons, - IonCardSubtitle, - IonCol, - IonContent, - IonFooter, - IonHeader, - IonIcon, - IonImg, - IonItem, - IonItemOption, - IonItemOptions, - IonItemSliding, - IonLabel, - IonList, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, checkmarkSharp, chevronBackOutline, trashOutline } from 'ionicons/icons'; -import React, { useEffect, useRef, useState } from 'react'; -import { CartStore, removeFromCart } from '../data/CartStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CartProducts.module.css'; - -const CartProducts = (): React.JSX.Element => { - const cartRef = useRef(null); - const products = ProductStore.useState((s) => s.products); - const shopCart = CartStore.useState((s) => s.product_ids); - const [cartProducts, setCartProducts] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - const [total, setTotal] = useState(0); - - useEffect(() => { - const getCartProducts = () => { - setCartProducts([]); - setTotal(0); - - shopCart.forEach((product) => { - var favouriteParts = product.split('/'); - var categorySlug = favouriteParts[0]; - var productID = favouriteParts[1]; - - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempCartProduct = { - category: tempCategory, - product: tempProduct, - }; - - setTotal((prevTotal) => prevTotal + parseInt(tempProduct.price.replace('£', ''))); - setCartProducts((prevSearchResults) => [...prevSearchResults, tempCartProduct]); - }); - }; - - getCartProducts(); - }, [shopCart]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - const removeProductFromCart = async (index) => { - removeFromCart(index); - }; - - return ( - - - - - - -  Categories - - - Cart - - - {shopCart.length} - - - - - - - - - - - - {cartProducts && cartProducts.length}{' '} - {cartProducts.length > 1 || cartProducts.length === 0 ? ' products' : ' product'}{' '} - found - - - - - - {cartProducts && - cartProducts.map((product, index) => { - if (index <= amountLoaded) { - return ( - - - - - - -

{product.category.name}

-

{product.product.name}

-
- -
- {product.product.price} -
-
- - - removeProductFromCart(index)} - > - - - -
- ); - } - })} -
-
- - -
- £{total.toFixed(2)} - - - -  Checkout - -
-
-
- ); -}; - -export default CartProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.module.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.module.css deleted file mode 100644 index e42a0b1..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.module.css +++ /dev/null @@ -1,10 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.search { - - --background: rgb(240, 240, 240); - --color: black; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.tsx deleted file mode 100644 index ccbd65a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/CategoryProducts.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonNote, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, chevronBackOutline, searchOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { useParams } from 'react-router'; -import ProductCard from '../components/ProductCard'; - -import { CartStore } from '../data/CartStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CategoryProducts.module.css'; - -const CategoryProducts = () => { - const params = useParams(); - const cartRef = useRef(); - const products = ProductStore.useState((s) => s.products); - const shopCart = CartStore.useState((s) => s.product_ids); - const [category, setCategory] = useState({}); - const [searchResults, setsearchResults] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - useEffect(() => { - const categorySlug = params.slug; - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - setCategory(tempCategory); - setsearchResults(tempCategory.products); - }, [params.slug]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - const search = async (e) => { - const searchVal = e.target.value; - - if (searchVal !== '') { - const tempResults = category.products.filter((p) => - p.name.toLowerCase().includes(searchVal.toLowerCase()) - ); - setsearchResults(tempResults); - } else { - setsearchResults(category.products); - } - }; - - return ( - - - - - - -  Categories - - - {category && category.name} - - - {shopCart.length} - - - - - - - - - - - - - - - {searchResults && searchResults.length}{' '} - {searchResults.length > 1 || searchResults.length === 0 ? ' products' : ' product'}{' '} - found - - - - - - {searchResults && - searchResults.map((product, index) => { - if (index <= amountLoaded && product.image) { - return ( - - ); - } - })} - - - - - - - - - ); -}; - -export default CategoryProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/FavouriteProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/FavouriteProducts.tsx deleted file mode 100644 index 7543053..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/FavouriteProducts.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, chevronBackOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import ProductCard from '../components/ProductCard'; -import { CartStore } from '../data/CartStore'; -import { FavouritesStore } from '../data/FavouritesStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CategoryProducts.module.css'; - -const FavouriteProducts = () => { - const cartRef = useRef(null); - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const shopCart = CartStore.useState((s) => s.product_ids); - const [searchResults, setSearchResults] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - useEffect(() => { - const getFavourites = () => { - setSearchResults([]); - - favourites.forEach((favourite) => { - var favouriteParts = favourite.split('/'); - var categorySlug = favouriteParts[0]; - var productID = favouriteParts[1]; - - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempFavourite = { - category: tempCategory, - product: tempProduct, - }; - - setSearchResults((prevSearchResults) => [...prevSearchResults, tempFavourite]); - }); - }; - - getFavourites(); - }, [favourites]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - return ( - - - - - - -  Categories - - - Favourites - - - {shopCart.length} - - - - - - - - - - - - - {searchResults && searchResults.length}{' '} - {searchResults.length > 1 || searchResults.length === 0 - ? ' favourites' - : ' favourite'}{' '} - found - - - - - - {searchResults && - searchResults.map((product, index) => { - if (index <= amountLoaded) { - return ( - - ); - } - })} - - - - - - - - - ); -}; - -export default FavouriteProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.module.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.module.css deleted file mode 100644 index e543907..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.module.css +++ /dev/null @@ -1,42 +0,0 @@ -.homePage ion-toolbar { - - --border-style: none; -} - -.logo { - - margin-top: 0.25rem; - color: var(--ion-color-primary); -} - -.categoryCard, -.categoryCardContent { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; -} - -.categoryCardContent ion-button { - - height: 1.5rem; - font-size: 0.8rem; -} - -.categoryCardContent { - - background-color: rgb(238, 238, 238); -} - -.categoryCardContent ion-card-subtitle { - - /* color: rgb(78, 78, 78); */ -} - -.categoryCard img { - - /* border-radius: 5px; */ - padding: 1rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.tsx deleted file mode 100644 index 25cb577..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Home.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { useState } from 'react'; -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; - -import styles from './Home.module.css'; -import { cart, heart } from 'ionicons/icons'; - -import { ProductStore } from '../data/ProductStore'; -import { FavouritesStore } from '../data/FavouritesStore'; -import { CartStore } from '../data/CartStore'; - -const Home = () => { - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const shopCart = CartStore.useState((s) => s.product_ids); - - return ( - - - - Categories - - - Ionic Furniture - - - - {favourites.length} - - - - - {shopCart.length} - - - - - - - - - - - Categories - - - - - - {products.map((category, index) => { - return ( - - - category cover - - - {category.name} - - - - ); - })} - - - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.module.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.module.css deleted file mode 100644 index 253b7ed..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.module.css +++ /dev/null @@ -1,66 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.categoryCard { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; - text-align: center; -} - -.productCardActions { - - display: flex; - flex-direction: row; - justify-content: space-between; - width: 100%; - margin-bottom: 1rem; -} - -.productCardAction { - - font-size: 1.1rem; -} - -.productCardHeader { - - min-height: 17rem; -} - -.productCardHeader p { - - font-size: 1.2rem; - padding: 0; - margin: 0; - margin-top: 0.75rem; -} - -.categoryCardContent { - - display: flex; - flex-direction: column; - text-align: center; -} - -.categoryCardContent ion-button { - - font-size: 0.8rem; -} - -.categoryCardContent p { - - font-size: 1.5rem; - padding: 0; - margin: 0; -} - -.productPrice { - - display: flex; - flex-direction: row; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.tsx b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.tsx deleted file mode 100644 index c7c7f18..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/pages/Product.tsx +++ /dev/null @@ -1,210 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardHeader, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { - arrowRedoOutline, - cart, - cartOutline, - chevronBackOutline, - heart, - heartOutline, -} from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { useParams } from 'react-router'; -import ProductCard from '../components/ProductCard'; -import { addToCart, CartStore } from '../data/CartStore'; -import { addToFavourites, FavouritesStore } from '../data/FavouritesStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './Product.module.css'; - -const Product = () => { - const params = useParams(); - const cartRef = useRef(null); - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const [isFavourite, setIsFavourite] = useState(false); - const shopCart = CartStore.useState((s) => s.product_ids); - const [product, setProduct] = useState({}); - const [category, setCategory] = useState({}); - - useEffect(() => { - const categorySlug = params.slug; - const productID = params.id; - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempIsFavourite = favourites.find((f) => f === `${categorySlug}/${productID}`); - - setIsFavourite(tempIsFavourite); - setCategory(tempCategory); - setProduct(tempProduct); - }, [params.slug, params.id]); - - useEffect(() => { - const tempIsFavourite = favourites.find((f) => f === `${category.slug}/${product.id}`); - setIsFavourite(tempIsFavourite ? true : false); - }, [favourites, product]); - - const addProductToFavourites = (e, categorySlug, productID) => { - e.preventDefault(); - addToFavourites(categorySlug, productID); - - document.getElementById( - `placeholder_favourite_product_${categorySlug}_${productID}` - ).style.display = ''; - document - .getElementById(`placeholder_favourite_product_${categorySlug}_${productID}`) - .classList.add('animate__fadeOutTopRight'); - }; - - const addProductToCart = (e, categorySlug, productID) => { - e.preventDefault(); - - document.getElementById(`placeholder_cart_${categorySlug}_${productID}`).style.display = ''; - document - .getElementById(`placeholder_cart_${categorySlug}_${productID}`) - .classList.add('animate__fadeOutUp'); - - setTimeout(() => { - cartRef.current.classList.add('animate__tada'); - addToCart(categorySlug, productID); - - setTimeout(() => { - cartRef.current.classList.remove('animate__tada'); - }, 500); - }, 500); - }; - - return ( - - - - - - -  {category.name} - - - - View Product - - - {shopCart.length} - - - - - - - - - - - - - -
- addProductToFavourites(e, category.slug, product.id)} - /> - - -
- product pic -

{product.name}

-
- - -
- - {product.price} - - addProductToCart(e, category.slug, product.id)} - > - -   Add to Cart - - - -
-
-
-
-
- - - - Similar products... - - - - - {category && - category.products && - category.products.map((similar, index) => { - if (similar.id !== product.id && product.image && index < 4) { - return ( - - ); - } - })} - -
-
-
- ); -}; - -export default Product; diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/style.scss b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/theme/variables.css b/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/theme/variables.css deleted file mode 100644 index 985de6f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoEcommerceExample/theme/variables.css +++ /dev/null @@ -1,81 +0,0 @@ -/* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - -/** Ionic CSS Variables **/ -:root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - - --ion-toolbar-color: black; - --ion-grid-column-padding: 0rem; - /* --ion-toolbar-background: var(--ion-color-warning); */ -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/NOTES.md deleted file mode 100644 index bb7672c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0128 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.css b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.css deleted file mode 100644 index e99f514..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.css +++ /dev/null @@ -1,24 +0,0 @@ -.container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); -} - -.container strong { - font-size: 20px; - line-height: 26px; -} - -.container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; -} - -.container a { - text-decoration: none; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.tsx deleted file mode 100644 index f003f7f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/ExploreContainer.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import './ExploreContainer.css'; - -interface ContainerProps { - name: string; -} - -const ExploreContainer: React.FC = ({ name }) => { - return ( -
- {name} -

- Explore{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Post.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Post.tsx deleted file mode 100644 index 275e4ad..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Post.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonAvatar, - IonButton, - IonCol, - IonIcon, - IonImg, - IonItem, - IonLabel, - IonRow, - IonText, -} from '@ionic/react'; -import { - arrowRedoOutline, - chatboxOutline, - ellipsisHorizontal, - globe, - heart, - thumbsUp, - thumbsUpOutline, -} from 'ionicons/icons'; -import '../pages/Tab2.css'; -import React from 'react'; - -const Post = (props): React.JSX.Element => { - const { post } = props; - - return ( - - -
- - - - - - -

{post.name}

-

- {post.sponsored ? 'Sponsored' : post.time} -    - -

-
- - -
- - -

{post.message}

-
- - {post.image && } - - {post.sponsored && ( -
- -

ionicframework.com

-

Start building apps today!

-
- - Learn more -
- )} - -
-
- - -
- - {post.sponsored &&

{post.views} Views

} -
- -
- - - Like - - - - - Comment - - - - - Share - -
-
-
-
- ); -}; - -export default Post; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Tabs.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Tabs.tsx deleted file mode 100644 index 8a1c7d2..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/components/Tabs.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { IonIcon, IonLabel, IonTabBar, IonTabButton, IonTabs, IonRouterOutlet } from '@ionic/react'; -import { Redirect, Route } from 'react-router-dom'; -import Tab1 from '../pages/Tab1'; -import Tab2 from '../pages/Tab2'; -import Tab3 from '../pages/Tab3'; -import { chatboxOutline, cogOutline, personOutline } from 'ionicons/icons'; - -const Tabs = (props): React.JSX.Element => { - return ( - - - } /> - } /> - } /> - - - - - - - - - - - - - - - ); -}; - -export default Tabs; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/index.tsx deleted file mode 100644 index 545fc4e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import Tab1 from './pages/Tab1'; -import Tab2 from './pages/Tab2'; -import Tab3 from './pages/Tab3'; -import Tabs from './components/Tabs'; - -import './style.scss'; - -function DemoFacebookClone() { - return ( - - } /> - } /> - - - - ); -} - -export default DemoFacebookClone; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/main/messages.js b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/main/messages.js deleted file mode 100644 index 0d37b93..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/main/messages.js +++ /dev/null @@ -1,105 +0,0 @@ -export const messages = [ - { - name: 'Ionic Framework', - avatar: 'https://pbs.twimg.com/profile_images/1148952014036054016/xxv7lLvp_400x400.jpg', - message: '', - online: false, - last_message_sent: 3, - new_message_count: 2, - }, - { - name: 'Capacitor JS', - avatar: 'https://pbs.twimg.com/profile_images/1268235262641004544/OLW1xl7t_400x400.png', - message: '', - online: true, - last_message_sent: 9, - new_message_count: 0, - }, - { - name: 'Max Lynch', - avatar: 'https://pbs.twimg.com/profile_images/1318970727173885953/bln98FNj_400x400.jpg', - message: '', - online: true, - last_message_sent: 15, - new_message_count: 0, - }, - { - name: 'Ben Sperry', - avatar: 'https://pbs.twimg.com/profile_images/1328390491126308864/jHHgl5Dm_400x400.jpg', - message: '', - online: false, - last_message_sent: 27, - new_message_count: 0, - }, - { - name: 'Matt Netkow', - avatar: 'https://pbs.twimg.com/profile_images/1323383930150621187/GKc0nVzi_400x400.jpg', - message: '', - online: false, - last_message_sent: 31, - new_message_count: 1, - }, - { - name: 'Liam DeBeasi', - avatar: 'https://pbs.twimg.com/profile_images/1105953692669366273/ZNK4lRAJ_400x400.jpg', - message: '', - online: true, - last_message_sent: 41, - new_message_count: 0, - }, - { - name: 'Mike Hartington', - avatar: 'https://pbs.twimg.com/profile_images/1084993841898446849/DJ8XtR6L_400x400.jpg', - message: '', - online: false, - last_message_sent: 47, - new_message_count: 0, - }, - { - name: 'Adam Bradley', - avatar: 'https://pbs.twimg.com/profile_images/909075942320025600/hfYqicUk_400x400.jpg', - message: '', - online: true, - last_message_sent: 51, - new_message_count: 0, - }, - { - name: 'Brody Kidd', - avatar: 'https://pbs.twimg.com/profile_images/477539679567228928/JObyaUW__400x400.jpeg', - message: '', - online: true, - last_message_sent: 53, - new_message_count: 0, - }, -]; - -export const posts = [ - { - name: 'Max Lynch', - sponsored: false, - time: '12 m', - avatar: 'https://pbs.twimg.com/profile_images/1318970727173885953/bln98FNj_400x400.jpg', - message: 'Join a global community of web native developers!', - views: '', - online: true, - }, - { - name: 'Ben Sperry', - sponsored: false, - image: 'https://ionicons.com/assets/img/meta/ionicons-og.png', - time: '1 h', - avatar: 'https://pbs.twimg.com/profile_images/1328390491126308864/jHHgl5Dm_400x400.jpg', - message: 'Check out all the cool IonIcons used on this IonicBook app!', - views: '', - online: false, - }, - { - name: 'Matt Netkow', - sponsored: false, - time: '2 h', - avatar: 'https://pbs.twimg.com/profile_images/1323383930150621187/GKc0nVzi_400x400.jpg', - message: 'I help web developers build cross-platform Web Native apps.', - views: '', - online: false, - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/MessageItem.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/MessageItem.tsx deleted file mode 100644 index 4c4d3b3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/MessageItem.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { IonAvatar, IonBadge, IonImg, IonItem, IonLabel } from '@ionic/react'; -import React from 'react'; - -const MessageItem = (props): React.JSX.Element => { - return ( - - - - - {props.message.online &&
} - - -

{props.message.name}

-

This is a test message for a messenger item

-
- -
-

{props.message.last_message_sent} min

- {props.message.new_message_count > 0 && ( - {props.message.new_message_count} - )} -
-
- ); -}; - -export default MessageItem; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab1.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab1.tsx deleted file mode 100644 index 2ccdb20..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab1.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { - IonAvatar, - IonBackButton, - IonBadge, - IonButton, - IonButtons, - IonContent, - IonFab, - IonFabButton, - IonHeader, - IonIcon, - IonImg, - IonItem, - IonLabel, - IonList, - IonPage, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { addOutline, searchOutline } from 'ionicons/icons'; -import ExploreContainer from '../components/ExploreContainer'; -import { messages } from '../main/messages'; -import MessageItem from './MessageItem'; -import './Tab1.css'; - -const Tab1 = () => { - return ( - - - - Messages - - - - - - @93alan - - - - - - - - - - - - - Messages - - - - - {messages.map((message, index) => { - return ; - })} - - - - - - - - - - ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.css deleted file mode 100644 index 6cb99f6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.css +++ /dev/null @@ -1,373 +0,0 @@ -.timeline-toolbar { - - display: flex; - flex-direction: row !important; -} - -.toolbar-title { - - font-size: 1.8rem; - font-weight: 700; - margin-left: 0.5rem; -} - -.toolbar-icons { - - margin-right: 0.5rem; - background-color: white; -} - -.toolbar-icons ion-icon { - - color: black; - background-color:rgb(235, 235, 235); - border-radius: 500px; - font-size: 1.5rem; - margin-left: 0.5rem; - padding: 0.3rem; -} - -.second-toolbar { - - border-bottom: 0.1px solid rgb(144, 144, 144); - padding-top: 0.75rem; - background-color: white; - position: fixed; - width: 100%; - z-index: 9999999; -} - -.second-toolbar ion-col ion-icon { - - font-size: 1.75rem; - color: rgb(138, 138, 138); -} - -.second-toolbar ion-col ion-icon.selected { - - /* border-bottom: 5px solid var(--ion-color-primary); */ -} - -.selected-icon { - - border-bottom: 1.5px solid var(--ion-color-primary); -} - -.top-input-container { - - border-bottom: 0.1px solid rgb(200, 200, 200); - padding-top: 0.5rem; - padding-bottom: 0.5rem; - background-color: white; - margin-top: 3.5rem; -} - -.top-input { - - border: 1px solid rgb(149, 149, 149); - border-radius: 25px; - padding-left: 1rem !important; - height: 2.2rem; -} - -.below-input-label-container { - - border-bottom: 1px solid rgb(185, 185, 185); - background-color: white; -} - -.below-input-label { - - margin-top: 0.8rem; - margin-bottom: 0.8rem; -} - -.below-input-label:not(:last-child) { - - border-right: 1px solid rgb(167, 167, 167); -} - -.below-input-label ion-text { - - color: rgb(114, 114, 114); - font-size: 0.8rem; - font-weight: 700 !important; - margin-left: 1.7rem; -} - -.below-input-label ion-icon { - - font-size: 1.2rem; - margin-right: 0.5rem; - position: absolute; -} - -.timeline-bg { - - --background:rgb(218, 218, 218) !important; -} - -.rooms-container { - - background-color: white; - margin-top: 0.5rem; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - border-bottom: 0.1px solid rgb(144, 144, 144); - border-top: 0.1px solid rgb(144, 144, 144); -} - -.rooms-people-container { - - white-space: nowrap; - position: relative; - overflow-x: scroll; - overflow-y: hidden; - -webkit-overflow-scrolling: touch; - display: flex; - flex-direction: row; - width: 70%; -} - -.rooms-people-container ion-avatar { - - height: 2.5rem; - width: 2.5rem; -} - -.rooms-people-container div { - - margin-top: 0.4rem !important; - margin-right: 1rem !important; -} - -.rooms-create { - - border: 1px solid rgb(149, 225, 255); - border-radius: 70px; - justify-content: center; - flex-direction: row; - padding: 0.2rem !important; - -} - -.rooms-create ion-icon { - - font-size: 1.5rem !important; - margin-left: 0.5rem !important; - margin-top: 0.3rem !important; - float: left !important; -} - -.rooms-create ion-text { - - font-size: 0.7rem !important; - color:rgb(136, 136, 136) !important; - font-weight: 700 !important; - margin: 0 !important; - padding: 0 !important; - line-height: -1rem !important; -} - -.rooms-online { - - height: 13px !important; - width: 13px !important; - border-radius: 500px !important; - border: 2px solid white !important; - background-color: green !important; - z-index: 9999 !important; - position: absolute !important; - margin-left: 0.5rem !important; - margin-top: -0.8rem !important; -} - -.post { - - margin-top: 0.5rem !important; -} - -.post-container { - - background-color: white !important; -} - -.post-header { - - /* padding: none !important; */ - /* margin: none !important; */ -} - -.post-header { - - padding-top: 0.5rem !important; - padding-left: 0.5rem !important; - z-index: 9999; -} - -.post-header ion-avatar { - - /* border: 2px solid rgb(164, 222, 255); */ -} - -.post-header ion-label { - - margin-left: 0.5rem !important; - z-index: 99999 !important; -} - -.post-header ion-label h3 { - - font-weight: 600 !important; -} - -.post-header ion-label p ion-icon { - - position: absolute !important; - margin-top: 0.15rem !important; -} - -.post-header ion-icon { - - color: rgb(133, 133, 133) !important; -} - -.post-content { - - padding-left: 0.5rem !important; - margin-top: -0.7rem !important; -} - -.post-link { - - padding-left: 0.5rem !important; - background-color: rgb(245, 245, 245) !important; - display: flex !important; - flex-direction: row !important; - justify-content: space-between !important; - padding-top: 0.75rem !important; - padding-bottom: 0.75rem !important; -} - -.post-link ion-button { - - margin-right: 0.5rem !important; - --background: rgb(245, 245, 245) !important; - border: 1px solid rgb(98, 98, 98) !important; - border-radius: 8px !important; - color: rgb(98, 98, 98) !important; - text-transform: uppercase !important; - font-size: 0.8rem !important; -} - -.post-likes { - - padding-left: 0.5rem !important; - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - display: flex !important; - flex-direction: row !important; - justify-content: space-between !important; -} - -.post-like-icons { - - margin-top: 0.2rem !important; -} - -.post-likes ion-icon:not(:last-child) { - - background-color: rgb(70, 128, 255) !important; -} - -.post-likes ion-icon:last-child { - - background-color: rgb(255, 76, 76) !important; - margin-left: -0.5rem !important; -} - -.post-likes ion-icon { - - color: white !important; - border-radius: 100px !important; - padding: 0.2rem !important; - border: 2px solid white !important; -} - -.post-likes p { - - padding: none !important; - margin: none !important; - margin-top: 0.4rem !important; - font-size: 0.8rem !important; - margin-right: 0.5rem !important; - color: rgb(156, 156, 156) !important; - -} - -.post-image { - - padding: none !important; - margin: none !important; -} - -.post-image ion-img { - - width: 100% !important; -} - -.post-content p { - - font-size: 1rem !important; -} - -.post-actions { - - background-color: white !important; - display: flex !important; - flex-direction: row !important; - justify-content: space-between !important; - border-top: 0.1px solid rgb(228, 228, 228) !important; - padding-top: 0.5rem !important; - padding-bottom: 0.2rem !important; -} - -.post-actions ion-col { - - margin-left: -1rem !important; -} - -.post-actions ion-col:first-child { - - margin-right: -2rem !important; -} - -.post-actions ion-col:last-child { - - margin-right: 2rem !important; -} - -.post-actions ion-col ion-icon { - - font-size: 1.4rem !important; - color:rgb(105, 105, 105) !important; -} - -.post-actions ion-col ion-text { - - font-size: 0.8rem !important; - color: rgb(107, 107, 107) !important; - margin-top: 0.2rem !important; - margin-left: 0.5rem !important; - position: absolute !important; -} - -/* -
-

ionicbook

- -
- - -
-
*/ \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.tsx deleted file mode 100644 index 9b7f202..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab2.tsx +++ /dev/null @@ -1,242 +0,0 @@ -import { - IonAvatar, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonImg, - IonInput, - IonItem, - IonLabel, - IonPage, - IonRouterLink, - IonRow, - IonSearchbar, - IonText, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { - searchOutline, - chatboxOutline, - playCircleOutline, - bagOutline, - homeOutline, - menuOutline, - flagOutline, - notificationsOutline, - homeSharp, - home, - videocam, - images, - globe, - ellipse, - ellipsisHorizontal, - thumbsUp, - heart, - thumbsUpOutline, - shareOutline, - arrowRedoOutline, - chevronBackOutline, -} from 'ionicons/icons'; -import ExploreContainer from '../components/ExploreContainer'; -import Post from '../components/Post'; -import { messages, posts } from '../main/messages'; -import './Tab2.css'; -import React from 'react'; - -const Tab2 = (): React.JSX.Element => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - - handleBackClick()}> - - - - - ionicbook - - - - - - - - - - - - - {/* */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Live - - - - - Photo - - - - - Room - - - - - -
- - - Create -
- Room -
-
-
- -
- {messages.map((message, index) => { - if (index > 1) { - return ( -
- - - - {message.online && } -
- ); - } - })} -
-
- - - -
- - - - - - -

Ionic Framework

-

- Sponsored    - -

-
- - -
- - -

Build cross-platform web native mobile apps with one codebase! 🎉

-
- - {/* */} - - {/* */} - -
- -

ionicframework.com

-

Start building apps today!

-
- - Learn more -
- -
-
- - -
- -

16K Views

-
- -
- - - Like - - - - - Comment - - - - - Share - -
-
-
-
- - {posts.map((post, index) => { - return ; - })} -
-
- ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab3.tsx b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab3.tsx deleted file mode 100644 index 3a29b8a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/pages/Tab3.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab3: React.FC = () => { - return ( - - - - Tab 3 - - - - - - Tab 3 - - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/style.scss b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/theme/variables.css b/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/theme/variables.css deleted file mode 100644 index 12e7354..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFacebookClone/theme/variables.css +++ /dev/null @@ -1,352 +0,0 @@ -/* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - -/** Ionic CSS Variables **/ -:root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** purple **/ - --ion-color-tertiary: #894eb1; - --ion-color-tertiary-rgb: 235, 68, 90; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #6f00b9; - --ion-color-tertiary-tint: #8633bd; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; -} - -@media (prefers-color-scheme: dark1) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66,140,255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255,255,255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80,200,255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255,255,255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106,100,255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255,255,255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47,223,117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0,0,0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255,213,52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0,0,0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255,73,97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255,255,255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244,245,248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0,0,0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152,154,162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0,0,0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34,36,40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255,255,255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0,0,0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - .ios ion-modal { - --ion-background-color: var(--ion-color-step-100); - --ion-toolbar-background: var(--ion-color-step-150); - --ion-toolbar-border-color: var(--ion-color-step-250); - } - - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18,18,18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } -} - -ion-header, -ion-toolbar { - - border-bottom: none !important; - --border-color: white; -} - -ion-title { - - --color: rgb(48, 48, 58); -} - -ion-tab-bar { - - border-top: none; -} - -ion-tab-button { - - --color: rgb(211, 211, 211); - height: 2rem; -} - -.tab-selected, -ion-icon.search { - - color: rgb(88, 88, 88) !important; -} - -.avatar { - - height: 3.5rem; - width: 3.5rem; -} - -.online { - - height: 20px; - width: 20px; - border-radius: 500px; - border: 3px solid white; - background-color: green; - z-index: 9999; - position: absolute; - margin-left: 2.5rem; - margin-top: 1.2rem; -} - -.contact-details { - - margin-top: 0rem; - margin-left: 1rem; - margin-right: 1rem; -} - -.stats { - - margin-top: -1rem; - margin-right: 0.5rem; -} - -.last-online { - - color: rgb(190, 190, 190); - font-size: 0.9rem; - margin-bottom: 0.5rem; -} - -.stats ion-badge { - - margin: 0 !important; - margin-top: -3rem !important; - border-radius: 2px !important; -} - - - -.contact-details h1 { - - font-size: 1.2rem; -} - -.contact-details p { - - font-size: 0.8rem; -} - -.message-item { - - padding-top: 1.5rem; -} - -.profile-avatar { - - margin: 0 !important; - padding: 0 !important; - height: 2rem; - width: 2rem; - border-radius: 500px !important; -} - -.profile-name { - - color:#c8c8c8; - font-weight: 600 !important; - font-size: 0.9rem !important; - margin-left: 0.5rem; -} - -.add-fab { - - opacity: 0.7; -} - -/* */ \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/NOTES.md deleted file mode 100644 index 32dfb37..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0129 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/CategorySlide.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/CategorySlide.tsx deleted file mode 100644 index 0b189df..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/CategorySlide.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Link } from 'react-router-dom'; - -export const CategorySlide = ({ name, path, image }) => ( - <>TODO: sorry but the ionic cannot provide ion-slide -); - -// import { IonSlide } from '@ionic/react'; -// export const CategorySlide = ({ name, path, image }) => ( -// -// -// category -//

{name}

-// -//
-// ); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.module.css b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.module.css deleted file mode 100644 index 1373e81..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.module.css +++ /dev/null @@ -1,83 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.categoryCard { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; - /* min-height: 20rem !important; */ -} - -.productCardActions { - - display: flex; - flex-direction: row; - justify-content: space-between; - width: 100%; - margin-bottom: 1rem; -} - -.productCardAction { - - font-size: 1.1rem; -} - -.productCardHeader { - - min-height: 13rem; - margin: 0 !important; - padding: 0 !important; - padding: 1rem !important; -} - -.productCardHeader p { - - font-size: 0.8rem; - padding: 0; - margin: 0; - margin-top: 0.75rem; -} - -.categoryCardContent { - - display: flex; - flex-direction: column; -} - -.categoryCardContent ion-button { - - height: 1.5rem; - font-size: 0.8rem; -} - -.categoryCardContent p { - - font-size: 0.8rem; - padding: 0; - margin: 0; -} - -.categoryCard img { - - /* border-radius: 5px; */ - /* padding: 1rem; */ -} - -.productPrice { - - display: flex; - flex-direction: row; -} - -.food { - - text-align: center; - background-color: white; - border: 5px solid var(--ion-background-color); - border-radius: 30px; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.tsx deleted file mode 100644 index 422ee26..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/components/ProductCard.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCol, IonIcon } from '@ionic/react'; -import { arrowRedoOutline, cart, cartOutline, heart, heartOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { Link } from 'react-router-dom'; -import { addToCart } from '../data/CartStore'; -import { addToFavourites, FavouritesStore } from '../data/FavouritesStore'; -import styles from './ProductCard.module.css'; - -const ProductCard = (props) => { - const { product, category, index, cartRef } = props; - const favourites = FavouritesStore.useState((s) => s.product_ids); - - const productCartRef = useRef(); - const productFavouriteRef = useRef(); - const [isFavourite, setIsFavourite] = useState(false); - - useEffect(() => { - const tempIsFavourite = favourites.find((f) => f === `${category.slug}/${product.id}`); - setIsFavourite(tempIsFavourite ? true : false); - }, [props.product, favourites]); - - const addProductToFavourites = (e, categorySlug, productID) => { - e.preventDefault(); - e.stopPropagation(); - addToFavourites(categorySlug, productID); - - productFavouriteRef.current.style.display = ''; - productFavouriteRef.current.classList.add('animate__fadeOutTopRight'); - - setTimeout(() => { - if (productCartRef.current) { - productFavouriteRef.current.classList.remove('animate__fadeOutTopRight'); - productFavouriteRef.current.style.display = 'none'; - } - }, 500); - }; - - const addProductToCart = (e, categorySlug, productID) => { - e.preventDefault(); - e.stopPropagation(); - - productCartRef.current.style.display = ''; - productCartRef.current.classList.add('animate__fadeOutUp'); - - setTimeout(() => { - cartRef.current.classList.add('animate__tada'); - addToCart(categorySlug, productID); - - setTimeout(() => { - cartRef.current.classList.remove('animate__tada'); - productCartRef.current.style.display = 'none'; - }, 500); - }, 500); - }; - - return ( - - - {/* */} - -
- addProductToFavourites(e, category.slug, product.id)} - /> - - -
- product pic -

{product.name}

-
- - -
- - {product.price} - - addProductToCart(e, category.slug, product.id)}> - - - - -
-
- - {/*
*/} -
- ); -}; - -export default ProductCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/CartStore.js b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/CartStore.js deleted file mode 100644 index c9af57b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/CartStore.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Store } from 'pullstate'; - -export const CartStore = new Store({ - total: 0, - product_ids: [], -}); - -export const addToCart = (categorySlug, productID) => { - CartStore.update((s) => { - s.product_ids = [...s.product_ids, `${categorySlug}/${parseInt(productID)}`]; - }); -}; - -export const removeFromCart = (productIndex) => { - CartStore.update((s) => { - s.product_ids.splice(productIndex, 1); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/FavouritesStore.js b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/FavouritesStore.js deleted file mode 100644 index 958bd5f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/FavouritesStore.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Store } from 'pullstate'; - -export const FavouritesStore = new Store({ - total: 0, - product_ids: [], -}); - -export const addToFavourites = (categorySlug, productID) => { - FavouritesStore.update((s) => { - if (s.product_ids.find((id) => id === `${categorySlug}/${parseInt(productID)}`)) { - s.product_ids = s.product_ids.filter((id) => id !== `${categorySlug}/${parseInt(productID)}`); - } else { - s.product_ids = [...s.product_ids, `${categorySlug}/${parseInt(productID)}`]; - } - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/ProductStore.js b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/ProductStore.js deleted file mode 100644 index 88def31..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/ProductStore.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Store } from 'pullstate'; - -export const ProductStore = new Store({ - products: [], -}); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/fetcher.js b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/fetcher.js deleted file mode 100644 index 1d6d396..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/data/fetcher.js +++ /dev/null @@ -1,62 +0,0 @@ -import { ProductStore } from './ProductStore'; - -export const fetchData = async () => { - const json = [ - 'new.json', - 'chicken.json', - 'veggie.json', - 'burgers.json', - 'sides.json', - 'drinks.json', - 'kids.json', - ]; - - var products = []; - - json.forEach(async (category) => { - products = await fetchProducts(category); - - products.forEach((product) => { - product.price = `£${Math.floor(Math.random() * (10 - 4 + 1)).toFixed(2)}`; - }); - - let categoryName = category.replace('.json', ''); - categoryName = categoryName.replaceAll('_', ' '); - categoryName = uppercaseWords(categoryName); - - const foodCategory = { - name: categoryName, - slug: category.replace('.json', ''), - cover: products[1].image, - products, - }; - - ProductStore.update((s) => { - s.products = [...s.products, foodCategory]; - }); - }); - - return products; -}; - -const fetchProducts = async (category) => { - const response = await fetch(`categories/${category}`); - const data = await response.json(); - - // Set a category id - await data.forEach((d, i) => { - d.id = i + 1; - }); - - return data; -}; - -const uppercaseWords = (words) => { - words = words - .toLowerCase() - .split(' ') - .map((s) => s.charAt(0).toUpperCase() + s.substring(1)) - .join(' '); - - return words; -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/index.tsx deleted file mode 100644 index 31b2b8b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/index.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; - -import './style.scss'; -import Home from './pages/Home'; -import FavouriteProducts from './pages/FavouriteProducts'; -import CartProducts from './pages/CartProducts'; -import CategoryProducts from './pages/CategoryProducts'; -import Product from './pages/Product'; - -function DemoFastFoodApp() { - return ( - - - {/* - - - - - - - */} - - - - - - - - - - - - - - - - - - - - - - - - - ); -} - -export default DemoFastFoodApp; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/module.d.ts b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/module.d.ts deleted file mode 100644 index 4af7be7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/module.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module '*.module.css' { - const classes: { readonly [key: string]: string }; - export default classes; -} - -declare module '*.module.scss' { - const classes: { readonly [key: string]: string }; - export default classes; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.module.css b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.module.css deleted file mode 100644 index 851dbe1..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.module.css +++ /dev/null @@ -1,37 +0,0 @@ -.cartCheckout { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin: 1rem; -} - -.cartFooter { - - border-top: 2px solid rgb(200, 200, 200); - background-color: white; -} - -.cartCheckout ion-card-subtitle { - - font-size: 1.3rem; -} - -.cartItem ion-avatar { - - height: 4rem; - width: 4rem; -} - -.cartSlider:not(:nth-child(1)) { - - border-top: 2px solid rgb(236, 236, 236); -} - -.cartActions { - - display: flex; - flex-direction: column; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.tsx deleted file mode 100644 index a25f340..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CartProducts.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import { - IonAvatar, - IonBadge, - IonButton, - IonButtons, - IonCardSubtitle, - IonCol, - IonContent, - IonFooter, - IonHeader, - IonIcon, - IonImg, - IonItem, - IonItemOption, - IonItemOptions, - IonItemSliding, - IonLabel, - IonList, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, checkmarkSharp, chevronBackOutline, trashOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { CartStore, removeFromCart } from '../data/CartStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CartProducts.module.css'; - -const CartProducts = () => { - const cartRef = useRef(); - const products = ProductStore.useState((s) => s.products); - const shopCart = CartStore.useState((s) => s.product_ids); - const [cartProducts, setCartProducts] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - const [total, setTotal] = useState(0); - - useEffect(() => { - const getCartProducts = () => { - setCartProducts([]); - setTotal(0); - - shopCart.forEach((product) => { - var favouriteParts = product.split('/'); - var categorySlug = favouriteParts[0]; - var productID = favouriteParts[1]; - - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempCartProduct = { - category: tempCategory, - product: tempProduct, - }; - - setTotal((prevTotal) => prevTotal + parseInt(tempProduct.price.replace('£', ''))); - setCartProducts((prevSearchResults) => [...prevSearchResults, tempCartProduct]); - }); - }; - - getCartProducts(); - }, [shopCart]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - const removeProductFromCart = async (index) => { - removeFromCart(index); - }; - - return ( - - - - - - -  Categories - - - Cart - - - {shopCart.length} - - - - - - - - - - - cart - - - - - - - {cartProducts && cartProducts.length}{' '} - {cartProducts.length > 1 || cartProducts.length === 0 ? ' foods' : ' food'} found - - - - - - {cartProducts && - cartProducts.map((product, index) => { - if (index <= amountLoaded) { - return ( - - - - - - -

{product.category.name}

-

{product.product.name}

-
- -
- {product.product.price} -
-
- - - removeProductFromCart(index)} - > - - - -
- ); - } - })} -
-
- - -
- £{total.toFixed(2)} - - - -  Checkout - -
-
-
- ); -}; - -export default CartProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.module.css b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.module.css deleted file mode 100644 index c0d5021..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.module.css +++ /dev/null @@ -1,69 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.foodResults { - - color: black; -} - -.chickenResults { - - color: white; -} - -.burgers { - - --ion-background-color: #7dd5ff; - --ion-toolbar-background: #7dd5ff; - --ion-text-color: black; - --ion-item-background: white !important; -} - -.sides { - - --ion-background-color: #ffd87d; - --ion-toolbar-background: #ffd87d; - --ion-text-color: black !important; - --ion-item-background: white !important; -} - -.chicken { - - --ion-background-color: #6477fe; - --ion-toolbar-background: #6477fe; - /* --ion-text-color: white; */ - --ion-item-background: white !important; - --ion-toolbar-color: white; -} - -.drinks { - - --ion-background-color: #fda9f3; - --ion-toolbar-background: #fda9f3; - /* --ion-text-color: white; */ - --ion-item-background: white !important; -} - -.veggie { - - --ion-background-color: #9fef79; - --ion-toolbar-background: #9fef79; - /* --ion-text-color: white !important; */ - --ion-item-background: white !important; -} - -.kids { - - --ion-background-color: #dc9afe; - --ion-toolbar-background: #dc9afe; - /* --ion-text-color: white; */ - --ion-item-background: white !important; -} - -.search { - - --background: rgb(240, 240, 240); - --color: black; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.tsx deleted file mode 100644 index 1c8dac6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/CategoryProducts.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonNote, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, chevronBackOutline, searchOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { useParams } from 'react-router'; -import ProductCard from '../components/ProductCard'; - -import { CartStore } from '../data/CartStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CategoryProducts.module.css'; - -const CategoryProducts = () => { - const params = useParams(); - const cartRef = useRef(); - const products = ProductStore.useState((s) => s.products); - const shopCart = CartStore.useState((s) => s.product_ids); - const [category, setCategory] = useState({}); - const [searchResults, setsearchResults] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - useEffect(() => { - const categorySlug = params.slug; - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - setCategory(tempCategory); - setsearchResults(tempCategory.products); - }, [params.slug]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - const search = async (e) => { - const searchVal = e.target.value; - - if (searchVal !== '') { - const tempResults = category.products.filter((p) => - p.name.toLowerCase().includes(searchVal.toLowerCase()) - ); - setsearchResults(tempResults); - } else { - setsearchResults(category.products); - } - }; - - return ( - - - - - - -  Categories - - - {category && category.name} - - - - {shopCart.length} - - - - - - - - - - - - - - - - {searchResults && searchResults.length}{' '} - {searchResults.length > 1 || searchResults.length === 0 ? ' foods' : ' food'} found - - - - - - {searchResults && - searchResults.map((product, index) => { - if (index <= amountLoaded && product.image) { - return ( - - ); - } - })} - - - - - - - - - ); -}; - -export default CategoryProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/FavouriteProducts.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/FavouriteProducts.tsx deleted file mode 100644 index f88f065..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/FavouriteProducts.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { cart, chevronBackOutline } from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import ProductCard from '../components/ProductCard'; -import { CartStore } from '../data/CartStore'; -import { FavouritesStore } from '../data/FavouritesStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './CategoryProducts.module.css'; - -const FavouriteProducts = () => { - const cartRef = useRef(); - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const shopCart = CartStore.useState((s) => s.product_ids); - const [searchResults, setSearchResults] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - useEffect(() => { - const getFavourites = () => { - setSearchResults([]); - - favourites.forEach((favourite) => { - var favouriteParts = favourite.split('/'); - var categorySlug = favouriteParts[0]; - var productID = favouriteParts[1]; - - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempFavourite = { - category: tempCategory, - product: tempProduct, - }; - - setSearchResults((prevSearchResults) => [...prevSearchResults, tempFavourite]); - }); - }; - - getFavourites(); - }, [favourites]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - return ( - - - - - - -  Categories - - - Favourites - - - {shopCart.length} - - - - - - - - - - - - - {searchResults && searchResults.length}{' '} - {searchResults.length > 1 || searchResults.length === 0 - ? ' favourites' - : ' favourite'}{' '} - found - - - - - - {searchResults && - searchResults.map((product, index) => { - if (index <= amountLoaded) { - return ( - - ); - } - })} - - - - - - - - - ); -}; - -export default FavouriteProducts; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.module.scss deleted file mode 100644 index 24a4522..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.module.scss +++ /dev/null @@ -1,137 +0,0 @@ -.homePage ion-toolbar { - - --border-style: none; -} - -.logo { - - margin-top: 0.25rem; - color: var(--ion-color-primary); -} - -.categoryCard, -.categoryCardContent { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; -} - -.categoryCardContent ion-button { - - height: 1.5rem; - font-size: 0.8rem; -} - -.categoryCardContent { - - background-color: rgb(238, 238, 238); -} - -.categoryCardContent ion-card-subtitle { - - /* color: rgb(78, 78, 78); */ -} - -.categoryCard img { - - /* border-radius: 5px; */ - padding: 1rem; -} - -.categorySlider { - - margin-top: 1rem; - - ion-slide { - - width: 60%; - margin-right: 10px; - margin-left: 10px; - - display: flex; - flex-direction: column; - justify-content: center; - - img { - - border-radius: 22px; - } - } -} - -.categorySquares { - - ion-row { - - .categorySquare { - - height: 4.5rem; - text-align: center; - display: flex; - justify-content: center; - align-content: center; - align-items: center; - border-radius: 22px; - - h4 { - - text-align: center; - } - } - - .categorySquare:nth-child(1) { - - background-color: rgb(105, 62, 5); - color: white; - } - - .categorySquare:nth-child(2) { - - background-color: rgb(83, 185, 0); - color: white; - } - - .categorySquare:nth-child(3) { - - background-color: rgb(255, 240, 24); - } - } -} - -.orderSection { - - padding: 2rem; - background-color: rgb(206, 41, 0); - color: white; - border-radius: 22px; - margin: 5px; - - h4 { - - margin-left: 1.5rem; - } -} - -.offerSection { - - padding: 2rem; - background-color: #ffd146; - color: black; - border-radius: 22px; - margin: 5px; - - h4, - ion-card-subtitle { - - margin-left: 1.5rem; - } - - ion-card-subtitle { - - color: rgb(255, 255, 255); - font-weight: 800; - } -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.tsx deleted file mode 100644 index e4d306a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Home.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import { useState } from 'react'; -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - // IonSlide, - // IonSlides, - IonTitle, - IonToolbar, - useIonRouter, - useIonViewDidEnter, - useIonViewWillLeave, -} from '@ionic/react'; - -import styles from './Home.module.scss'; -import { cart, chevronBackOutline, heart } from 'ionicons/icons'; - -import { ProductStore } from '../data/ProductStore'; -import { FavouritesStore } from '../data/FavouritesStore'; -import { CartStore } from '../data/CartStore'; -import { Link } from 'react-router-dom'; -import { CategorySlide } from '../components/CategorySlide'; - -const Home = () => { - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const shopCart = CartStore.useState((s) => s.product_ids); - - useIonViewWillLeave(() => { - document.querySelector('#slider').stopAutoplay(); - }); - - useIonViewDidEnter(() => { - document.querySelector('#slider') && document.querySelector('#slider').startAutoplay(); - document.querySelector('#slider') && document.querySelector('#slider').update(); - }); - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Popular - - {/* - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - */} - - handleBackClick()}> - - - - - - Ionic Food - - - - {favourites.length} - - - - - {shopCart.length} - - - - - - - - - - - - order method - - - -

Kids eat free on any orders over £20.00

- Valid until July → -
-
-
- - - - Let's eat - - - - {/* - - - - - - - - - */} - - - - - order method - - - -

Order for a collection or get a local delivery

-
-
-
-
-
- ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.module.css b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.module.css deleted file mode 100644 index 253b7ed..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.module.css +++ /dev/null @@ -1,66 +0,0 @@ -.categoryPage ion-toolbar { - - --border-style: none; -} - -.categoryCard { - - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; - text-align: center; -} - -.productCardActions { - - display: flex; - flex-direction: row; - justify-content: space-between; - width: 100%; - margin-bottom: 1rem; -} - -.productCardAction { - - font-size: 1.1rem; -} - -.productCardHeader { - - min-height: 17rem; -} - -.productCardHeader p { - - font-size: 1.2rem; - padding: 0; - margin: 0; - margin-top: 0.75rem; -} - -.categoryCardContent { - - display: flex; - flex-direction: column; - text-align: center; -} - -.categoryCardContent ion-button { - - font-size: 0.8rem; -} - -.categoryCardContent p { - - font-size: 1.5rem; - padding: 0; - margin: 0; -} - -.productPrice { - - display: flex; - flex-direction: row; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.tsx b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.tsx deleted file mode 100644 index cdfc70e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/pages/Product.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardHeader, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { - arrowRedoOutline, - cart, - cartOutline, - chevronBackOutline, - heart, - heartOutline, -} from 'ionicons/icons'; -import { useEffect, useRef, useState } from 'react'; -import { useParams } from 'react-router'; -import ProductCard from '../components/ProductCard'; -import { addToCart, CartStore } from '../data/CartStore'; -import { addToFavourites, FavouritesStore } from '../data/FavouritesStore'; -import { ProductStore } from '../data/ProductStore'; - -import styles from './Product.module.css'; - -const Product = () => { - const params = useParams(); - const cartRef = useRef(); - const products = ProductStore.useState((s) => s.products); - const favourites = FavouritesStore.useState((s) => s.product_ids); - const [isFavourite, setIsFavourite] = useState(false); - const shopCart = CartStore.useState((s) => s.product_ids); - const [product, setProduct] = useState({}); - const [category, setCategory] = useState({}); - - useEffect(() => { - const categorySlug = params.slug; - const productID = params.id; - const tempCategory = products.filter((p) => p.slug === categorySlug)[0]; - const tempProduct = tempCategory.products.filter( - (p) => parseInt(p.id) === parseInt(productID) - )[0]; - - const tempIsFavourite = favourites.find((f) => f === `${categorySlug}/${productID}`); - - setIsFavourite(tempIsFavourite); - setCategory(tempCategory); - setProduct(tempProduct); - }, [params.slug, params.id]); - - useEffect(() => { - const tempIsFavourite = favourites.find((f) => f === `${category.slug}/${product.id}`); - setIsFavourite(tempIsFavourite ? true : false); - }, [favourites, product]); - - const addProductToFavourites = (e, categorySlug, productID) => { - e.preventDefault(); - addToFavourites(categorySlug, productID); - - document.getElementById( - `placeholder_favourite_product_${categorySlug}_${productID}` - ).style.display = ''; - document - .getElementById(`placeholder_favourite_product_${categorySlug}_${productID}`) - .classList.add('animate__fadeOutTopRight'); - }; - - const addProductToCart = (e, categorySlug, productID) => { - e.preventDefault(); - - document.getElementById(`placeholder_cart_${categorySlug}_${productID}`).style.display = ''; - document - .getElementById(`placeholder_cart_${categorySlug}_${productID}`) - .classList.add('animate__fadeOutUp'); - - setTimeout(() => { - cartRef.current.classList.add('animate__tada'); - addToCart(categorySlug, productID); - - setTimeout(() => { - cartRef.current.classList.remove('animate__tada'); - }, 500); - }, 500); - }; - - return ( - - - - - - -  {category.name} - - - - View Food - - - {shopCart.length} - - - - - - - - - - - - - -
- addProductToFavourites(e, category.slug, product.id)} - /> - - -
- product pic -

{product.name}

- {product.nutrition} -
- - -
- - {product.price} - - addProductToCart(e, category.slug, product.id)} - > - -   Add to Cart - - - -
-
-
-
-
- - - - Similar foods... - - - - - {category && - category.products && - category.products.map((similar, index) => { - if (similar.id !== product.id && product.image && index < 4) { - return ( - - ); - } - })} - -
-
-
- ); -}; - -export default Product; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/style.scss b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/theme/variables.css b/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/theme/variables.css deleted file mode 100644 index 86f1b29..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFastFoodApp/theme/variables.css +++ /dev/null @@ -1,87 +0,0 @@ -/* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - -/** Ionic CSS Variables **/ -:root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - - --ion-toolbar-color: black; - --ion-grid-column-padding: 0rem; - /* --ion-toolbar-background: var(--ion-color-warning); */ -} - -.non-link { - - text-decoration: none; - color: unset; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/NOTES.md deleted file mode 100644 index 9b48ea3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0130 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.scss b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.scss deleted file mode 100644 index 11ea3ba..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.scss +++ /dev/null @@ -1,26 +0,0 @@ -.floating-tab-bar { - .container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); - } - - .container strong { - font-size: 20px; - line-height: 26px; - } - - .container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; - } - - .container a { - text-decoration: none; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.tsx deleted file mode 100644 index 759cc76..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/components/ExploreContainer.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import './ExploreContainer.scss'; - -const ExploreContainer = ({ name }) => { - return ( -
- {name} -

- Explore{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/index.tsx deleted file mode 100644 index 71a067d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/index.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { IonIcon, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cogOutline, homeOutline, listOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './pages/Tab1'; -import Tab2 from './pages/Tab2'; -import Tab3 from './pages/Tab3'; - -import './theme/style.scss'; -import './theme/floating-tab-bar.scss'; - -function DemoFloatingTabs() { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} - -export default DemoFloatingTabs; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab1.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab1.tsx deleted file mode 100644 index c328244..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab1.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab1.css'; -import React from 'react'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Tab1 = (): React.JSX.Element => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Floating Tab Bar - - - handleBackClick()}> - - - - - - - - - Floating Tab Bar - - - - - - ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab2.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab2.tsx deleted file mode 100644 index 048ff80..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab2.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab2.css'; - -const Tab2 = (): React.JSX.Element => { - return ( - - - - Floating Tab Bar - - - - - - Floating Tab Bar - - - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab3.tsx b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab3.tsx deleted file mode 100644 index 54cfd9e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/pages/Tab3.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab3 = (): React.JSX.Element => { - return ( - - - - Floating Tab Bar - - - - - - Floating Tab Bar - - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/floating-tab-bar.scss b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/floating-tab-bar.scss deleted file mode 100644 index 9533ab9..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/floating-tab-bar.scss +++ /dev/null @@ -1,27 +0,0 @@ -.demo-floating-tabs { - * { - --ion-background-color: white; - --ion-tab-bar-color: rgb(92, 123, 207); - --ion-tab-bar-color-selected: rgb(255, 255, 255); - } - - ion-tab-bar { - --background: rgb(44, 83, 192); - box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.4); - border-radius: 16px !important; - - height: 50px; - width: 90%; - padding-top: 5px; - padding-bottom: 5px; - - bottom: 20px; - position: relative; - margin: 0 auto !important; - border-top: none; - } - - ion-tab-button { - border-radius: 16px !important; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/style.scss b/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/style.scss deleted file mode 100644 index d202499..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoFloatingTabs/theme/style.scss +++ /dev/null @@ -1,82 +0,0 @@ -/* -Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ -*/ - -/** Ionic CSS Variables **/ - -.floating-tab-bar { - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/NOTES.md deleted file mode 100644 index 8afd210..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0131 diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.css b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.css deleted file mode 100644 index e99f514..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.css +++ /dev/null @@ -1,24 +0,0 @@ -.container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); -} - -.container strong { - font-size: 20px; - line-height: 26px; -} - -.container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; -} - -.container a { - text-decoration: none; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.tsx deleted file mode 100644 index 396477f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/ExploreContainer.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import './ExploreContainer.css'; - -const ExploreContainer = ({ name }): React.JSX.Element => { - return ( -
- {name} -

- Explore{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.module.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.module.scss deleted file mode 100644 index 4854d16..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.module.scss +++ /dev/null @@ -1,221 +0,0 @@ -.postsContainer { - - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} - -.postContainer { - - display: flex; - flex-direction: column; - margin-top: 1rem; -} - -.postProfile { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-right: 0.75rem; - padding-left: 0.75rem; -} - -.postProfile ion-router-link { - - display: flex !important; - flex-direction: row !important; -} - -.postProfileInfo ion-avatar { - - height: 2.2rem; - width: 2.2rem; -} - -.postProfileInfo p { - - margin: 0; - padding: 0; - margin-left: 0.5rem; - font-weight: 500; - font-size: 0.9rem; - color: black; -} - -.postProfileInfo { - - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - align-content: center; -} - -.postImage { - - border-top: 1px solid rgb(216, 216, 216); - margin-top: 0.5rem; - height: 20rem; - width: 100%; -} - -.postImageLike { - - font-size: 10rem; - color: rgb(231, 231, 231); - position: absolute; - left: 32vmin; - margin-top: 20vmin; - display: none; -} - -.postActionsContainer { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-right: 0.75rem; - padding-left: 0.75rem; - margin-top: 0.5rem; -} - -.postActions { - - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.postActions ion-icon, -.postBookmark ion-icon { - - font-size: 1.5rem; -} - -.postActions ion-icon:not(:first-child) { - - padding-left: 0.7rem; -} - -.postLikesContainer { - - padding-left: 0.75rem; - margin-top: 0.5rem; -} - -.postLikesContainer p { - - margin: 0; - padding: 0; - font-weight: 200 !important; - font-size: 0.8rem; -} - -.postLikedName { - - font-weight: 600; -} - -.postCaption { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0.3rem; -} - -.postCaption p { - - margin: 0; - padding: 0; - font-weight: 200 !important; - font-size: 0.8rem; -} - -.postName { - - color: black !important; - font-weight: 600 !important; -} - -.postName ion-router-link { - - color: black; -} - -.postComments { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0.5rem; -} - -.postComments p { - - margin: 0; - padding: 0; - color:rgb(175, 175, 175); - font-size: 0.8rem; -} - -.postAddComment { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.postAddCommentProfile { - - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - margin-top: 0.5rem; -} - -.postAddCommentProfile ion-avatar { - - height: 1.9rem; - width: 1.9rem; -} - -.postAddCommentProfile p { - - padding-left: 0.75rem; - font-size: 0.8rem; - color: rgb(175, 175, 175); -} - -.postAddCommentActions { - - -} - -.postAddCommentActions ion-icon { - - padding-left: 0.5rem; -} - -.postTime { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0rem; -} - -.postTime p { - - margin: 0; - padding: 0; - color: rgb(175, 175, 175); - font-size: 0.6rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.tsx deleted file mode 100644 index dbcfeff..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Feed.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import { IonAvatar, IonIcon, IonRouterLink } from '@ionic/react'; -import { - addCircleOutline, - bookmarkOutline, - chatbubbleOutline, - ellipsisVertical, - heart, - heartOutline, - paperPlaneOutline, -} from 'ionicons/icons'; -import { likePost } from '../pages/PostStore'; -import { ProfilesStore } from '../pages/ProfilesStore'; -import { ProfileStore } from '../pages/ProfileStore'; -import styles from './Feed.module.scss'; - -const Feed = (props): React.JSX.Element => { - const { posts } = props; - const profile = ProfileStore.useState((s) => s.profile); - const profiles = ProfilesStore.useState((s) => s.profiles); - - const addLike = (event, postID, liked) => { - likePost(event, postID, liked); - }; - - return ( -
- {posts.map((post, index) => { - const postProfile = profiles.filter((p) => p.id === post.profile_id)[0]; - - return ( -
-
-
- - - post avatar - - - - -

{postProfile.username}

-
-
- -
- -
-
- -
- -
- -
-
- addLike(e, post.id, post.liked)} - /> - - -
- -
- -
-
- -
-

- Liked by alanmontgomery and{' '} - 2 others -

-
- -
-

- - - {postProfile.username} - - {' '} - {post.caption} -

-
- -
-

View all {post.comments.length} comments

-
- -
-
- - add comment avatar - -

Add a comment...

-
- -
- - -
-
- -
-

{post.time}

-
-
- ); - })} -
- ); -}; - -export default Feed; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.module.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.module.scss deleted file mode 100644 index aeb99cb..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.module.scss +++ /dev/null @@ -1,98 +0,0 @@ -$border: linear-gradient(to bottom, #d82b7e, #f57939); - -.stories { - - height: fit-content; - margin-top: -0.7rem; -} - -.storiesContainer { - - overflow-x: scroll; - overflow-y: hidden; - -webkit-overflow-scrolling: touch; - display: flex; - flex-direction: row; - width: 100%; -} - -.storiesContainer::-webkit-scrollbar { - - display: none; -} - -.story, -.yourStory { - - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - align-content: center; - margin: 0 auto; - width: 4rem !important; - margin-left: 1rem; -} - -.story:first-child, -.yourStory:first-child { - - margin-left: 0.75rem; -} - -.story p, -.yourStory p { - - text-align: center; - margin: 0; - padding: 0; - margin-top: 0.2rem; - color: rgb(95, 95, 95); - font-size: 0.7rem; - font-weight: 400; - width: 120%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - position: relative; - margin-top: 5rem; -} - -.story img, -.yourStory img { - - height: 3.5rem !important; - width: 3.5rem !important; - position: absolute; - border-radius: 500px; - background: $border; - padding: 0.1rem; -} - -.yourStory img { - - background:rgb(214, 214, 214); -} - -.storyAdd { - - position: absolute; - color: white; - background-color: var(--ion-color-primary); - width: 1rem; - height: 1rem; - text-align: center; - margin: 0 auto; - display: flex; - flex-direction: row; - align-items: center; - align-content: center; - justify-content: center; - border-radius: 500px; - border: 2px solid white; - - bottom: 20px; - right: 0; - padding: 0.5rem; - font-size: 0.9rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.tsx deleted file mode 100644 index c902b30..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/components/Stories.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { IonCol, IonRouterLink, IonRow } from '@ionic/react'; -import styles from './Stories.module.scss'; - -const Stories = (props): React.JSX.Element => { - const { profiles } = props; - - return ( - -
- {profiles.map((story, index) => { - return ( - - story avatar - {index === 0 &&
+
} - - -

{index === 0 ? 'Your story' : story.username}

-
-
- ); - })} -
-
- ); -}; - -export default Stories; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/index.tsx deleted file mode 100644 index ab4b29b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/index.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { bagOutline, cloudOutline, home, playCircleOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import './style.scss'; -import Home from './pages/Home'; -import Tab2 from './pages/Tab2'; -import Tab3 from './pages/Tab3'; - -import './theme/variables.scss'; -import { ProfileStore } from './pages/ProfileStore'; -import Profile from './pages/Profile'; -import MyProfile from './pages/MyProfile'; - -function DemoInstagramClone() { - const profile = ProfileStore.useState((s) => s.profile); - - return ( - - - {/* - - - - - - - - - - */} - - - - - - - - - - - - - - - - - - - - - - - {/* - - - Dashboard - - - - Search - - */} - - - - - - - - - - - - - - - - - tab avatar - - - - ); -} - -export default DemoInstagramClone; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.module.scss deleted file mode 100644 index 48a1bdb..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.module.scss +++ /dev/null @@ -1,198 +0,0 @@ -.postsContainer { - - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} - -.postContainer { - - display: flex; - flex-direction: column; - margin-top: 1rem; -} - -.postProfile { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-right: 0.75rem; - padding-left: 0.75rem; -} - -.postProfileInfo ion-avatar { - - height: 2.2rem; - width: 2.2rem; -} - -.postProfileInfo p { - - margin: 0; - padding: 0; - margin-left: 0.5rem; - font-weight: 500; - font-size: 0.9rem; -} - -.postProfileInfo { - - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - align-content: center; -} - -.postImage { - - border-top: 1px solid rgb(216, 216, 216); - margin-top: 0.5rem; - height: 20rem; - width: 100%; -} - -.postActionsContainer { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-right: 0.75rem; - padding-left: 0.75rem; - margin-top: 0.5rem; -} - -.postActions { - - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.postActions ion-icon, -.postBookmark ion-icon { - - font-size: 1.5rem; -} - -.postActions ion-icon:not(:first-child) { - - padding-left: 0.7rem; -} - -.postLikesContainer { - - padding-left: 0.75rem; - margin-top: 0.5rem; -} - -.postLikesContainer p { - - margin: 0; - padding: 0; - font-weight: 200 !important; - font-size: 0.8rem; -} - -.postLikedName { - - font-weight: 600; -} - -.postCaption { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0.3rem; -} - -.postCaption p { - - margin: 0; - padding: 0; - font-weight: 200 !important; - font-size: 0.8rem; -} - -.postName { - - font-weight: 600 !important; -} - -.postComments { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0.5rem; -} - -.postComments p { - - margin: 0; - padding: 0; - color:rgb(175, 175, 175); - font-size: 0.8rem; -} - -.postAddComment { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.postAddCommentProfile { - - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - margin-top: 0.5rem; -} - -.postAddCommentProfile ion-avatar { - - height: 1.9rem; - width: 1.9rem; -} - -.postAddCommentProfile p { - - padding-left: 0.75rem; - font-size: 0.8rem; - color: rgb(175, 175, 175); -} - -.postAddCommentActions { - - -} - -.postAddCommentActions ion-icon { - - padding-left: 0.5rem; -} - -.postTime { - - padding-left: 0.75rem; - padding-right: 0.75rem; - margin-top: 0rem; -} - -.postTime p { - - margin: 0; - padding: 0; - color: rgb(175, 175, 175); - font-size: 0.6rem; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.tsx deleted file mode 100644 index 64f15f8..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Home.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { - addCircleOutline, - chevronBackOutline, - heartOutline, - paperPlaneOutline, -} from 'ionicons/icons'; -import Feed from '../components/Feed'; -import Stories from '../components/Stories'; -import { PostStore } from './PostStore'; -import { ProfilesStore } from './ProfilesStore'; - -const Home = (): React.JSX.Element => { - const profiles = ProfilesStore.useState((s) => s.profiles); - const posts = PostStore.useState((s) => s.posts); - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - - handleBackClick()}> - - - - main logo - - - - - - - - - - - - - - - - - - - - - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/MyProfile.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/MyProfile.tsx deleted file mode 100644 index f643088..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/MyProfile.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import { - IonButton, - IonButtons, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonToolbar, - useIonViewWillEnter, -} from '@ionic/react'; -import { - addCircleOutline, - bookmarksOutline, - chevronDown, - gridOutline, - menuOutline, -} from 'ionicons/icons'; -import { useState } from 'react'; -import styles from './Profile.module.scss'; - -import { ProfilesStore } from './ProfilesStore'; -import { ProfileStore } from './ProfileStore'; - -const MyProfile = (): React.JSX.Element => { - const currentProfile = ProfileStore.useState((s) => s.profile); - const profiles = ProfilesStore.useState((s) => s.profiles); - const [profile, setProfile] = useState(false); - - useIonViewWillEnter(() => { - const profileID = currentProfile.id; - const tempProfile = profiles.filter((p) => parseInt(p.id) === parseInt(profileID))[0]; - setProfile(tempProfile); - }); - - return ( - - - - -

- {profile.username} - -

-
- - - - - - - - - -
-
- - - - - - profile avatar - - - - - - - {profile.posts && profile.posts.length} - - Posts - - - - {profile.followers} - Followers - - - - {profile.following} - Following - - - - - - - -

- {profile.firstname} {profile.surname} -

-

{profile.title}

-

{profile.bio}

- - {profile.link} - -
-
- - - - - Edit Profile - - - - - - Promotions - - - - - - Insights - - - -
- - - - - - - - - - - - - {profile.posts && - profile.posts.map((post, index) => { - return ( - - post - - ); - })} - -
-
- ); -}; - -export default MyProfile; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/PostStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/PostStore.tsx deleted file mode 100644 index 441b84b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/PostStore.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import { Store } from 'pullstate'; - -export const PostStore = new Store({ - posts: [ - { - id: 1, - image: 'https://ionic.io/img/ioniconf/ioniconf-open-graph.png', - caption: 'Ioniconf 2021! Register Now!', - likes: 73, - liked: false, - profile_id: 6, - time: '1 hour ago', - comments: [ - { - profile_id: 3, - comment: 'Test', - }, - ], - }, - - { - id: 2, - image: - 'https://creativetacos.com/wp-content/uploads/2019/08/Free-Chipper-Personal-Finance-App-Kit.jpg', - caption: 'Ionic React Hub! UI Components, Templates, Clones and more!', - likes: 73, - liked: true, - profile_id: 1, - time: '1 hour ago', - comments: [ - { - profile_id: 3, - comment: 'Test', - }, - { - profile_id: 3, - comment: 'Test', - }, - { - profile_id: 3, - comment: 'Test', - }, - ], - }, - - { - id: 3, - image: 'https://cdn.buttercms.com/AIcP6e8FRx6fgsKa7bvy', - caption: 'Join the first ever Ionic Event!', - likes: 73, - liked: false, - profile_id: 4, - time: '2 hours ago', - comments: [ - { - profile_id: 1, - comment: 'Test', - }, - { - profile_id: 2, - comment: 'Test', - }, - ], - }, - - { - id: 4, - image: 'https://ionicframework.com/img/meta/ionic-framework-og.png', - caption: 'Build cross platform mobile apps with the Ionic Framework!', - likes: 73, - liked: false, - profile_id: 2, - time: '3 hours ago', - comments: [ - { - profile_id: 1, - comment: 'Test', - }, - { - profile_id: 2, - comment: 'Test', - }, - ], - }, - ], -}); - -export const likePost = (event, postID, liked) => { - event.target.classList.add('animate__heartBeat'); - - if (!liked) { - document.getElementById(`postLike_${postID}`).style.display = 'inline'; - } - - setTimeout(() => { - event.target.classList.remove('animate__heartBeat'); - document.getElementById(`postLike_${postID}`).style.display = 'none'; - }, 850); - - PostStore.update((s) => { - s.posts.find((p, index) => - parseInt(p.id) === parseInt(postID) ? (s.posts[index].liked = liked ? false : true) : false - ); - }); - - if (liked) { - PostStore.update((s) => { - s.posts.find((p, index) => - parseInt(p.id) === parseInt(postID) - ? (s.posts[index].likes = s.posts[index].likes++) - : false - ); - }); - } else { - PostStore.update((s) => { - s.posts.find((p, index) => - parseInt(p.id) === parseInt(postID) - ? (s.posts[index].likes = s.posts[index].likes--) - : false - ); - }); - } -}; - -export const addPost = (newPost) => { - PostStore.update((s) => { - s.posts = [...s.posts, newPost]; - }); -}; - -export const addCommentToPost = (newComment, postID) => { - PostStore.update((s) => { - s.posts.find((p, index) => - parseInt(p.id) === parseInt(postID) - ? (s.posts[index].comments = [...s.posts[index].comments, newComment]) - : false - ); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.module.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.module.scss deleted file mode 100644 index c749657..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.module.scss +++ /dev/null @@ -1,100 +0,0 @@ -.username { - - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - font-weight: 600; -} - -.username ion-icon { - - font-size: 0.8rem; - margin-left: 0.3rem; -} - -.label { - - color: black; - font-size: 0.7rem; - font-weight: 500; - font-family: Arial, Helvetica, sans-serif !important; - text-transform: lowercase; -} - -.label::first-letter { - - text-transform: uppercase; -} - -.value { - - font-size: 1rem; -} - -.profileAvatar { - - border-radius: 500px; - width: 5.5rem; - height: auto; -} - -.profileInfo { - - display: flex; - flex-direction: column; - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.profileInfo p, -.profileInfo a { - - // padding: 0.1rem 0 0.1rem 0; - margin: 0; - font-size: 0.9rem; -} - -.profileUsername { - - font-weight: 600; -} - -.profileTitle { - - color: rgb(136, 136, 136); -} - -.profileLink { - - color: rgb(22, 60, 131); - text-decoration: none; -} - -.profileActions ion-button { - - height: 2.3rem; - --border-radius: 5px; - font-weight: 600; -} - -.lightButton { - - --color: rgb(65, 65, 65); - --color-activated: rgb(65, 65, 65); - --background-hover: white; - --background-focused: white; - --background-activated: white; - --border-color: rgb(231, 231, 231); - --border-width: 2px; - font-size: 0.8rem; -} - -.postCol { - - --ion-grid-column-padding: 0rem; - padding: 0.1rem; - padding-bottom: 0.01rem !important; - padding-top: 0.01rem !important; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.tsx deleted file mode 100644 index aa07b55..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Profile.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { - IonBackButton, - IonButton, - IonButtons, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonToolbar, - useIonViewWillEnter, -} from '@ionic/react'; -import { - addCircleOutline, - arrowBackOutline, - bookmarksOutline, - chevronDown, - ellipsisVertical, - gridOutline, - menuOutline, - personOutline, -} from 'ionicons/icons'; -import { useState } from 'react'; -import { useParams } from 'react-router'; -import styles from './Profile.module.scss'; - -import { ProfilesStore } from './ProfilesStore'; -import { ProfileStore } from './ProfileStore'; - -const Profile = (): React.JSX.Element => { - const params = useParams(); - const profiles = ProfilesStore.useState((s) => s.profiles); - const currentProfile = ProfileStore.useState((s) => s.profile); - const [profile, setProfile] = useState(false); - - useIonViewWillEnter(() => { - const profileID = params.id; - const tempProfile = profiles.filter((p) => parseInt(p.id) === parseInt(profileID))[0]; - setProfile(tempProfile); - }); - - return ( - - - - - {profile.id === currentProfile.id ? ( -

- {profile.username} - -

- ) : ( - <> - -

- {profile.username} -

- - )} -
- - - {profile.id === currentProfile.id ? ( - <> - - - - - - - - ) : ( - - - - )} - -
-
- - - - - - profile avatar - - - - - - - {profile.posts && profile.posts.length} - - Posts - - - - {profile.followers} - Followers - - - - {profile.following} - Following - - - - - - - -

- {profile.firstname} {profile.surname} -

-

{profile.title}

-

{profile.bio}

- - {profile.link} - -
-
- - - - - Follow - - - - - - Message - - - - - - - - - -
- - - - - - - - - - - - - {profile.posts && - profile.posts.map((post, index) => { - return ( - - post - - ); - })} - -
-
- ); -}; - -export default Profile; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfileStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfileStore.tsx deleted file mode 100644 index 42f4d58..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfileStore.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Store } from 'pullstate'; - -export const ProfileStore = new Store({ - profile: { - id: 1, - firstname: 'Alan', - surname: 'Montgomery', - avatar: '/assets/alan.jpg', - followers: 0, - following: 0, - }, - posts: [], - feed: [], -}); - -export const addProfilePost = (newPost) => { - ProfileStore.update((s) => { - s.posts = [...s.posts, newPost]; - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfilesStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfilesStore.tsx deleted file mode 100644 index 63813c5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/ProfilesStore.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import { Store } from 'pullstate'; - -export const ProfilesStore = new Store({ - profiles: [ - { - id: 1, - firstname: 'Alan', - surname: 'Montgomery', - username: 'alanmontgomery', - title: 'Mobile Team Lead', - bio: 'Full Stack 🤓 Mobile Team Lead/Senior React Dev', - link: 'alanmontgomery.co.uk', - avatar: '/assets/alan.jpg', - followers: '1,470', - following: '230', - posts: [ - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - ], - }, - { - id: 2, - firstname: 'Max', - surname: 'Lynch', - username: 'maxlynch', - title: 'CEO Ionic', - bio: 'Co-founder/CEO @ionicframework. Created @capacitorjs. Gamer. @ManUtd fan.', - link: 'maxlynch.com', - avatar: 'https://pbs.twimg.com/profile_images/1318970727173885953/bln98FNj_400x400.jpg', - followers: '21.1K', - following: '1,200', - posts: [{}, {}, {}, {}, {}, {}, {}, {}, {}], - }, - { - id: 3, - firstname: 'Ben', - surname: 'Sperry', - username: 'bensperry', - title: 'CDO Ionic', - bio: 'Co-founder / CDO @ionicframework. Creator of @ionicons. Product designer. Pixel junkie. Forest explorer.', - link: 'bensperry.com', - avatar: 'https://pbs.twimg.com/profile_images/1328390491126308864/jHHgl5Dm_400x400.jpg', - followers: '800', - following: '700', - posts: [{}, {}, {}, {}, {}, {}, {}, {}, {}], - }, - { - id: 4, - firstname: 'Matt', - surname: 'Netkow', - username: 'mattnetkow', - title: 'Head of Product Marketing', - bio: 'I help web developers build cross-platform Web Native apps. @IonicFramework: Head of Product Marketing', - link: 'webnative.tech', - avatar: 'https://pbs.twimg.com/profile_images/1323383930150621187/GKc0nVzi_400x400.jpg', - followers: '1,200', - following: '900', - posts: [{}, {}, {}, {}, {}, {}, {}, {}, {}], - }, - { - id: 5, - firstname: 'Liam', - surname: 'DeBeasi', - username: 'liamdebeasi', - title: 'Software Engineer', - bio: 'Software Engineer at @ionicframework', - link: 'liamdebeasi.com', - avatar: 'https://pbs.twimg.com/profile_images/1105953692669366273/ZNK4lRAJ_400x400.jpg', - followers: '871', - following: '510', - posts: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], - }, - { - id: 6, - firstname: 'Mike', - surname: 'Hartington', - username: 'mikehartington', - title: 'Senior Dev Rel', - bio: 'Google Developer Expert. Mediocre at best. he/him. npx mhartington', - link: 'mhartington.io', - avatar: 'https://pbs.twimg.com/profile_images/1084993841898446849/DJ8XtR6L_400x400.jpg', - followers: '12.3K', - following: '2,200', - posts: [ - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - ], - }, - { - id: 7, - firstname: 'Adam', - surname: 'Bradley', - username: 'adambradley', - title: 'Director of Technology', - bio: 'Proud dad, husband, veteran & dogs best friend. Typos are my own', - link: 'ionicframework.com', - avatar: 'https://pbs.twimg.com/profile_images/909075942320025600/hfYqicUk_400x400.jpg', - followers: '613', - following: '571', - posts: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], - }, - { - id: 8, - firstname: 'Brody', - surname: 'Kidd', - username: 'brodykidd', - title: 'Enterprise Account Manager', - bio: 'Enterprise Account Manager | @ionicframework | @getcapacitor | @stenciljs', - link: 'ionicframework.com', - avatar: 'https://pbs.twimg.com/profile_images/477539679567228928/JObyaUW__400x400.jpeg', - followers: '677', - following: '219', - posts: [{}, {}, {}, {}, {}, {}, {}], - }, - ], -}); - -export const addProfilePost = (newPost) => { - ProfilesStore.update((s) => { - s.posts = [...s.posts, newPost]; - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab2.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab2.tsx deleted file mode 100644 index a46ce0c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab2.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab2.css'; - -const Tab2 = (): React.JSX.Element => { - return ( - - - - Tab 2 - - - - - - Tab 2 - - - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab3.tsx b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab3.tsx deleted file mode 100644 index 094a323..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/pages/Tab3.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab3 = (): React.JSX.Element => { - return ( - - - - Tab 3 - - - - - - Tab 3 - - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/style.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/theme/variables.scss deleted file mode 100644 index 64b2b41..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoInstagramClone/theme/variables.scss +++ /dev/null @@ -1,126 +0,0 @@ -.demo-instagram-clone { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - * { - font-family: Arial, Helvetica, sans-serif !important; - scroll-behavior: smooth; - } - - ::-webkit-scrollbar, - ::-webkit-scrollbar-thumb { - width: 0px; - } - - /** Ionic CSS Variables **/ - :root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - :root { - --ion-toolbar-background: white; - --ion-tab-bar-color: black; - --ion-tab-bar-color-selected: black; - --ion-tab-bar-border-color: rgb(235, 235, 235); - } - - ion-tab-button ion-icon { - font-size: 1.6rem; - } - - ion-tab-button img { - border-radius: 500px; - height: 1.8rem; - border: 1px solid black; - } - - ion-tab-bar { - height: 3rem; - } - - ion-toolbar { - --border-style: none; - --padding-start: 1rem; - --padding-end: 1rem; - --padding-top: 0.5rem; - } - - ion-toolbar ion-icon { - font-weight: 900 !important; - font-size: 1.6rem; - } - - ion-toolbar ion-button:not(:last-child) { - padding-right: 0.3rem; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/NOTES.md deleted file mode 100644 index f7a8f29..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0132 diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/BoardItem.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/BoardItem.tsx deleted file mode 100644 index 1882c7b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/BoardItem.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { IonBadge, IonIcon, IonItem, IonLabel, IonReorder } from '@ionic/react'; -import { arrowBackOutline, arrowForwardOutline } from 'ionicons/icons'; - -import styles from '../../pages/Kanban.module.scss'; - -export const BoardItem = ({ - id, - item, - index, - type, - moveToggled, - handleMove, -}): React.JSX.Element => ( - -
-
- -
-

{item.name}

- - -  {type.name} - -
-

{item.summary}

-
-
-
- {item.labels.map((label, index2) => { - return ( - - {label} -    - - ); - })} -
- -
- {id !== 1 && moveToggled && ( -
handleMove(e, 'Left', id, id - 1, item.id)} - > - -
- )} - - {id !== 3 && moveToggled && ( -
handleMove(e, 'Right', id, id + 1, item.id)} - > - -
- )} -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/ListItem.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/ListItem.tsx deleted file mode 100644 index 26d895d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Board/ListItem.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { IonIcon, IonItem, IonLabel, IonReorder } from '@ionic/react'; - -import styles from '../../pages/Kanban.module.scss'; - -export const ListItem = ({ id, item, index, type, moveToggled, handleMove }): React.JSX.Element => ( - - -
- -

{item.name}

-

{item.summary}

-
- -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.css b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.css deleted file mode 100644 index 0ca47a2..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.css +++ /dev/null @@ -1,113 +0,0 @@ -ion-menu ion-content { - --background: var(--ion-item-background, var(--ion-background-color, #fff)); -} - -ion-menu.md ion-content { - --padding-start: 8px; - --padding-end: 8px; - --padding-top: 20px; - --padding-bottom: 20px; -} - -ion-menu.md ion-list { - padding: 20px 0; -} - -ion-menu.md ion-note { - margin-bottom: 30px; -} - -ion-menu.md ion-list-header, ion-menu.md ion-note { - padding-left: 10px; -} - -ion-menu.md ion-list#inbox-list { - border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); -} - -ion-menu.md ion-list#inbox-list ion-list-header { - font-size: 22px; - font-weight: 600; - min-height: 20px; -} - -ion-menu.md ion-list#labels-list ion-list-header { - font-size: 16px; - margin-bottom: 18px; - color: #757575; - min-height: 26px; -} - -ion-menu.md ion-item { - --padding-start: 10px; - --padding-end: 10px; - border-radius: 4px; -} - -ion-menu.md ion-item.selected { - --background: rgba(var(--ion-color-primary-rgb), 0.14); -} - -ion-menu.md ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.md ion-item ion-icon { - color: #616e7e; -} - -ion-menu.md ion-item ion-label { - font-weight: 500; -} - -ion-menu.ios ion-content { - --padding-bottom: 20px; -} - -ion-menu.ios ion-list { - padding: 20px 0 0 0; -} - -ion-menu.ios ion-note { - line-height: 24px; - margin-bottom: 20px; -} - -ion-menu.ios ion-item { - --padding-start: 16px; - --padding-end: 16px; - --min-height: 50px; -} - -ion-menu.ios ion-item ion-icon { - font-size: 24px; - color: #73849a; -} - -ion-menu.ios ion-item .selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.ios ion-list#labels-list ion-list-header { - margin-bottom: 8px; -} - -ion-menu.ios ion-list-header, -ion-menu.ios ion-note { - padding-left: 16px; - padding-right: 16px; -} - -ion-menu.ios ion-note { - margin-bottom: 8px; -} - -ion-note { - display: inline-block; - font-size: 16px; - color: var(--ion-color-medium-shade); -} - -ion-item.selected { - --color: var(--ion-color-primary); -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.tsx deleted file mode 100644 index 7400d03..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/components/Menu.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { - IonContent, - IonIcon, - IonItem, - IonLabel, - IonList, - IonListHeader, - IonMenu, - IonMenuToggle, - IonNote, -} from '@ionic/react'; - -import { useLocation } from 'react-router-dom'; -import { - addOutline, - addSharp, - barChartOutline, - barChartSharp, - bookmarkOutline, - listOutline, - listSharp, -} from 'ionicons/icons'; -import './Menu.css'; - -import { SettingsStore } from '../store'; -import { handleViewChange } from '../store/SettingsStore'; - -const appPages = [ - { - title: 'Add Item', - url: '/page/add/0', - iosIcon: addOutline, - mdIcon: addSharp, - }, -]; - -const actions = [ - { - title: 'Board View', - slug: 'Board', - url: false, - onClick: () => handleViewChange('Board'), - iosIcon: barChartOutline, - mdIcon: barChartSharp, - }, - { - title: 'List View', - slug: 'List', - url: false, - onClick: () => handleViewChange('List'), - iosIcon: listOutline, - mdIcon: listSharp, - }, -]; - -const Menu = (): React.JSX.Element => { - const location = useLocation(); - const view = SettingsStore.useState((s) => s.view); - - return ( - - - - Welcome back - Ionic Kanban Board - {appPages.map((appPage, index) => { - return ( - - - - {appPage.title} - - - ); - })} - - - - Toggle View - View items in list or board view - - {actions.map((action, index) => { - return ( - - - - {action.title} - - - ); - })} - - - - ); -}; - -export default Menu; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/index.tsx deleted file mode 100644 index b69b165..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/index.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { - IonIcon, - IonLabel, - IonRouterOutlet, - IonSplitPane, - IonTabBar, - IonTabButton, - IonTabs, -} from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -// import './style.scss'; -import './theme/variables.scss'; -import Menu from './components/Menu'; -import Add from './pages/Add'; -import Kanban from './pages/Kanban'; - -function DemoKanbanBoard() { - return ( - - - - - - - - - - - - - - - - - - - ); -} - -export default DemoKanbanBoard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Add.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Add.tsx deleted file mode 100644 index fd2b994..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Add.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonInput, - IonItem, - IonLabel, - IonPage, - IonSelect, - IonSelectOption, - IonTextarea, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { checkmarkSharp, chevronBackSharp } from 'ionicons/icons'; -import { useState } from 'react'; -import { useParams } from 'react-router'; -import { SettingsStore } from '../store'; -import { addItem } from '../store/SettingsStore'; - -const Add = (): React.JSX.Element => { - const categories = SettingsStore.useState((s) => s.categories); - const types = SettingsStore.useState((s) => s.types); - const router = useIonRouter(); - const { category_id = false } = useParams(); - - const useFormInput = (initialValue = '') => { - const [value, setValue] = useState(initialValue); - - const onChange = (e) => { - setValue(e.target.value); - }; - - return { - value, - onIonChange: onChange, - }; - }; - - const formFields = [ - { - fields: { - type: 'text', - id: 'name', - placeholder: 'Enter a name...', - }, - state: useFormInput(), - label: 'Name', - options: false, - }, - { - fields: { - type: 'select', - id: 'category_id', - placeholder: 'Select a category', - }, - state: useFormInput(parseInt(category_id)), - label: 'Category', - options: categories, - }, - { - fields: { - type: 'select', - id: 'type_id', - placeholder: 'Select a type...', - }, - state: useFormInput(), - label: 'Type', - options: types, - }, - { - fields: { - type: 'textarea', - id: 'summary', - placeholder: 'Enter a summary...', - }, - state: useFormInput(), - label: 'Summary', - options: false, - }, - ]; - - const add = () => { - const data = []; - - formFields.forEach((field) => { - data[field.fields.id] = field.state.value; - }); - - addItem(data); - router.goBack(); - }; - - return ( - - - - - router.goBack()}> - - - - Add Item - - - - - - - Add Item - - - - {formFields.map((formField, index) => { - const { state, fields, label, options } = formField; - - return ( - - {label} - - {fields.type === 'text' && } - {fields.type === 'textarea' && } - {fields.type === 'select' && ( - - {options.map((option) => { - const optionName = option.name.charAt(0).toUpperCase() + option.name.slice(1); - - return ( - - {optionName} - - ); - })} - - )} - - ); - })} - - - -   Save - - - - ); -}; - -export default Add; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.module.scss b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.module.scss deleted file mode 100644 index b444de1..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.module.scss +++ /dev/null @@ -1,180 +0,0 @@ -.categorySlide { - display: flex; - flex-direction: column; -} - -@media only screen and (min-width: 768px) { - .categorySlide { - width: 33%; - } - - .categoryName { - margin-top: 1rem; - width: 92.6% !important; - } -} - -.categoryName { - background-color: #3273ec; - color: white; - width: 100%; - padding: 1rem; - font-size: 1.3rem; - margin-bottom: -0.75rem; -} - -.categoryNameList { - background-color: #3273ec; - color: white; - width: 100%; - padding: 1rem; - font-size: 1.3rem; -} - -.kanbanItemList { - margin: 0rem !important; - border-radius: 0 !important; - border: none !important; - border-bottom: 1px solid rgb(221, 221, 221) !important; -} - -.kanbanItem, -.kanbanItemList { - padding: 1.5rem; - border: 1px solid rgb(221, 221, 221); - border-radius: 5px; - background-color: white; - --background: white; - - .itemTitle { - display: flex; - flex-direction: row; - justify-content: space-between; - align-content: center; - align-items: center; - margin-bottom: 1rem; - - .itemType { - font-size: 0.75rem; - - ion-icon { - font-size: 0.75rem; - padding: 0 !important; - } - } - - h3 { - color: black; - font-weight: 450; - } - } - - .itemTitleList { - display: flex; - flex-direction: row; - justify-content: space-between; - align-content: center; - align-items: center; - margin-bottom: 0rem; - - ion-card-subtitle { - color: black; - margin-top: 0.25rem; - font-size: 0.6rem; - } - } - - .itemList { - display: flex !important; - flex-direction: row !important; - align-content: center; - justify-content: space-between; - align-items: center; - - ion-icon { - font-size: 2rem; - padding-left: 0.5rem; - } - } - - .itemType, - .itemTypeList { - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - justify-content: space-between; - width: fit-content; - } - - .itemTypeList { - margin-right: 0.3rem; - } - - .itemLabels { - margin-top: 1rem; - } - - .itemLabelsList { - margin-top: 0.2rem; - - ion-badge { - font-size: 0.5rem; - } - } - - .itemActions { - display: flex; - flex-direction: row; - justify-content: center; - align-content: center; - align-items: center; - margin-top: 1rem; - - div { - width: 5rem; - background-color: rgb(238, 238, 238); - color: rgb(204, 204, 204); - margin-left: 0.2rem; - margin-right: 0.2rem; - - padding: 0.5rem; - border-radius: 5px; - } - - .moveRight { - text-align: right; - } - - .moveLeft { - text-align: left; - } - } -} - -.itemAdd { - display: flex; - flex-direction: row; - align-content: center; - justify-content: center; - align-items: center; - padding: 1rem; - width: 91.6% !important; - background-color: rgb(241, 241, 241); - color: rgb(179, 179, 179); - border: 2px dashed rgb(216, 216, 216); - border-radius: 5px; - font-size: 1.5rem; - margin-bottom: 2rem; - margin-top: 1rem; -} - -.kanbanItem { - margin: 0 !important; - margin-top: 1rem !important; - --padding: 0 !important; -} - -.listReorder { - padding: 0 !important; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.tsx b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.tsx deleted file mode 100644 index 0d56362..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/pages/Kanban.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import { - IonButton, - IonButtons, - IonCardSubtitle, - IonContent, - IonHeader, - IonIcon, - IonMenuButton, - IonPage, - IonReorder, - IonReorderGroup, - // TODO: fix missing ionslide in new ionic - // IonSlide, - // IonSlides, - IonTitle, - IonToolbar, - useIonViewDidEnter, -} from '@ionic/react'; -import { addOutline, copyOutline, createOutline } from 'ionicons/icons'; -import React, { useEffect, useState } from 'react'; -import { Link } from 'react-router-dom'; -import { BoardItem } from '../components/Board/BoardItem'; -import { ListItem } from '../components/Board/ListItem'; -import { SettingsStore } from '../store'; - -import styles from './Kanban.module.scss'; - -const Kanban = (): React.JSX.Element => { - return <>// TODO: fix missing ionslide in new ionic; - const view = SettingsStore.useState((s) => s.view); - const categories = SettingsStore.useState((s) => s.categories); - const types = SettingsStore.useState((s) => s.types); - const items = SettingsStore.useState((s) => s.items); - - const [moveToggled, setMoveToggled] = useState(view === 'Board' ? true : false); - const [categoryItems, setCategoryItems] = useState([]); - - useEffect(() => { - setCategoryItems(items); - }, [items]); - - const handleReorder = (e) => { - // In a real world, production app - // In here we could re-arrange and sort array of items - // To be in sync with our state or simply save the new main array - - e.detail.complete(); - }; - - const handleMove = (e, direction, fromCategoryID, toCategoryID, itemID) => { - const fromIndex = categoryItems.findIndex((c) => c.id === fromCategoryID); - const toIndex = categoryItems.findIndex((c) => c.id === toCategoryID); - - const tempCategoryItems = [...categoryItems]; - const itemIndex = categoryItems[fromIndex].items.findIndex((i) => i.id === itemID); - const itemElement = document.querySelector(`#item_${fromCategoryID}_${itemIndex}`); - - const tempItem = { ...categoryItems[fromIndex].items[itemIndex] }; - tempCategoryItems[toIndex].items.push(tempItem); - - itemElement.classList.add(`animate__slideOut${direction}`); - - setTimeout(() => { - itemElement.classList.remove(`animate__slideOut${direction}`); - tempCategoryItems[fromIndex].items.splice(itemIndex, 1); - setCategoryItems(tempCategoryItems); - }, 700); - }; - - useIonViewDidEnter(() => { - document.querySelector('#slider') && document.querySelector('#slider').update(); - }); - - return ( - - - - - - - {view} View - {view === 'Board' && ( - - setMoveToggled(!moveToggled)}> - - - - )} - - - - - - - {view} View - - - - - {categoryItems.map(({ items, id }, index) => { - const name = categories.filter((c) => c.id === id)[0].name; - - return ( - - - {name} ({items.length}) - - - - {items.map((item, index) => { - const type = types.filter((t) => t.id === item.typeID)[0]; - - return ( - - {view === 'Board' && ( - - )} - {view === 'List' && ( - - )} - - ); - })} - - - - - - - ); - })} - - - - ); -}; - -export default Kanban; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/SettingsStore.ts b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/SettingsStore.ts deleted file mode 100644 index 93cd3a6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/SettingsStore.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { arrowUpOutline, bugOutline, flashOutline, keyOutline } from 'ionicons/icons'; -import { Store } from 'pullstate'; - -const SettingsStore = new Store({ - view: 'Board', - filter: '', - types: [ - { - id: 1, - name: 'bug', - color: '#ec1111', - icon: bugOutline, - }, - { - id: 2, - name: 'improvement', - color: '#0bbe28', - icon: arrowUpOutline, - }, - { - id: 3, - name: 'enhancement', - color: '#680bbe', - icon: flashOutline, - }, - { - id: 4, - name: 'task', - color: '#0b7ebe', - icon: keyOutline, - }, - ], - categories: [ - { id: 1, name: 'To Do' }, - { id: 2, name: 'In Progress' }, - { id: 3, name: 'Done' }, - ], - items: [ - { - id: 1, - items: [ - { - id: 1, - name: 'Adding projects', - summary: 'Give users the option to add projects and add items to projects', - labels: ['CSS', 'Design', 'Framework'], - typeID: 3, - }, - { - id: 2, - name: 'Add filter by labels', - summary: - 'Add the option to filter items by labels on the board to give the user more control', - labels: ['Filtering', 'Labels'], - typeID: 2, - }, - { - id: 3, - name: "Can't move items after add", - summary: - 'When the user adds a new item, for some reason, it breaks the ability to move items across categories', - labels: ['Move', 'Array', 'Object', 'Broke'], - typeID: 1, - }, - { - id: 4, - name: 'Hook a database up', - summary: 'Link app to a database like MongoDB or Firebase for sync and save', - labels: ['Database', 'MongoDB', 'Firebase'], - typeID: 4, - }, - { - id: 5, - name: 'Add a remove option', - summary: 'Allow the user to remove items from list and board views', - labels: ['Remove', 'Delete', 'Item'], - typeID: 1, - }, - ], - }, - { - id: 2, - items: [ - { - id: 1, - name: 'Add a list view', - summary: 'Allow users to view items on boards in a list view', - labels: ['Kanban', 'List', 'View'], - typeID: 3, - }, - { - id: 2, - name: 'Write some fake tickets', - summary: 'Fill out this app with some fake, real looking tickets', - labels: ['Tickets', 'Todo', 'Items'], - typeID: 4, - }, - ], - }, - { - id: 3, - items: [ - { - id: 1, - name: 'Fix bug with IonSlide', - summary: 'When navigating to the add screen, and coming back, the slides are stuck', - labels: ['Ionic', 'Slides', 'Stuck'], - typeID: 1, - }, - { - id: 2, - name: 'Add slick features', - summary: - 'Add the ability to move cards or items from one category to another, still using IonSlides and IonReorder', - labels: ['Ionic', 'IonSlides', 'IonReorder'], - typeID: 2, - }, - { - id: 3, - name: 'Drag and drop items', - summary: - 'Give the user the ability to drag and drop items while still maintaining click functionality and propagation within the item itself', - labels: ['DND', 'Drag', 'Drop', 'Main feature'], - typeID: 4, - }, - ], - }, - ], -}); - -export default SettingsStore; - -export const addItem = (item) => { - console.log(item); - - SettingsStore.update((s) => { - const tempItems = [...s.items]; - const itemCategoryIndex = tempItems.findIndex( - (t) => parseInt(t.id) === parseInt(item.category_id) - ); - - console.log({ itemCategoryIndex }); - - tempItems[itemCategoryIndex].items.push({ - name: item.name, - summary: item.summary, - typeID: item.type_id, - labels: ['test', 'test1', 'test2', 'test3'], - }); - - s.items = tempItems; - }); -}; - -// export const removeFromCart = coffeeIndex => { - -// SettingsStore.update(s => { s.coffee_ids.splice(coffeeIndex, 1) }); -// } - -export const handleViewChange = (view) => { - SettingsStore.update((s) => { - s.view = view; - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/index.ts b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/index.ts deleted file mode 100644 index d8347ce..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/store/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as SettingsStore } from './SettingsStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/style.scss b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/theme/variables.scss deleted file mode 100644 index 11fac0c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoKanbanBoard/theme/variables.scss +++ /dev/null @@ -1,100 +0,0 @@ -/* -Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ -*/ - -.demo-kanban-board { - /** Ionic CSS Variables **/ - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - :root { - --ion-background-color: rgb(241, 241, 241); - } - - ion-badge { - border-radius: 5px; - } - - ion-item.input { - --background: #ffffff !important; - --color: rgb(53, 53, 53) !important; - margin: 1rem; - border-radius: 5px; - } - - ion-reorder-group { - padding: 1rem; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoList/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoList/NOTES.md deleted file mode 100644 index 9b91446..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoList/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0133 diff --git a/03_source/mobile.trunk.1/src/pages/DemoList/TestContent.tsx b/03_source/mobile.trunk.1/src/pages/DemoList/TestContent.tsx deleted file mode 100644 index 39fd43b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoList/TestContent.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { format } from 'date-fns'; - -export const TestContent = { - eventDate: format(new Date(), 'yyyy-MM-dd'), - title: 'helloworld', - price: 123, - currency: 'HKD', - duration_m: 480, - ageBottom: 12, - ageTop: 48, - location: 'Hong Kong Island', - avatar: 'https://www.ionics.io/img/ionic-logo.png', -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoList/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoList/index.tsx deleted file mode 100644 index a0444f6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoList/index.tsx +++ /dev/null @@ -1,861 +0,0 @@ -// REQ0054/user-setting -// -// PURPOSE: -// - Provides functionality view user profile -// -// RULES: -// - T.B.A. -// -import React, { useEffect, useRef, useState } from 'react'; -import { - IonHeader, - IonToolbar, - IonTitle, - IonContent, - IonPage, - IonButtons, - IonMenuButton, - IonGrid, - IonRow, - IonCol, - useIonRouter, - IonButton, - IonIcon, - IonPopover, - IonAvatar, - IonImg, - IonItem, - IonLabel, - IonList, - IonModal, - IonSearchbar, - useIonModal, - IonInput, - IonNote, - IonText, -} from '@ionic/react'; -import SpeakerItem from '../../components/SpeakerItem'; -import { Speaker } from '../../models/Speaker'; -import { Session } from '../../models/Schedule'; -import { connect } from '../../data/connect'; -import * as selectors from '../../data/selectors'; -import '../SpeakerList.scss'; -import { getEvents } from '../../api/getEvents'; -import { format } from 'date-fns'; -import { Event } from './types'; -import { - alertCircleOutline, - alertOutline, - apps, - appsOutline, - book, - bookOutline, - brushOutline, - calculatorOutline, - car, - cart, - cartOutline, - cashOutline, - chatbubbleEllipses, - chatbubbleEllipsesOutline, - chatbubbleOutline, - chevronBackOutline, - chevronForward, - chevronForwardOutline, - cloudOutline, - codeSlashOutline, - codeWorkingOutline, - colorPaletteOutline, - createOutline, - document, - documentTextOutline, - filmOutline, - flashOutline, - gift, - giftOutline, - globeSharp, - gridOutline, - heart, - imageOutline, - imagesOutline, - keyOutline, - languageOutline, - layers, - layersOutline, - list, - listCircle, - listOutline, - logInOutline, - logoFacebook, - mapOutline, - menuOutline, - paperPlaneOutline, - people, - person, - personCircleOutline, - personOutline, - pizzaOutline, - qrCodeOutline, - refreshOutline, - restaurant, - restaurantOutline, - settingsOutline, - shareSocialOutline, - statsChart, - sunny, - swapHorizontal, - trashOutline, - walkOutline, -} from 'ionicons/icons'; -import AboutPopover from '../../components/AboutPopover'; -import { OverlayEventDetail } from '@ionic/react/dist/types/components/react-component-lib/interfaces'; -import PATHS from '../../PATHS'; -import { logoutUser, setAccessToken, setIsLoggedIn } from '../../data/user/user.actions'; - -interface OwnProps {} - -interface StateProps { - speakers: Speaker[]; - speakerSessions: { [key: string]: Session[] }; -} - -interface DispatchProps { - logoutUser: typeof logoutUser; - setAccessToken: typeof setAccessToken; - setIsLoggedIn: typeof setIsLoggedIn; -} - -interface SettingsProps extends OwnProps, StateProps, DispatchProps {} - -const DemoList: React.FC = ({ - speakers, - speakerSessions, - logoutUser, - setAccessToken, - setIsLoggedIn, -}) => { - const [events, setEvents] = useState([]); - const [showPopover, setShowPopover] = useState(false); - const [popoverEvent, setPopoverEvent] = useState(); - const modal = useRef(null); - - const router = useIonRouter(); - - useEffect(() => { - getEvents().then(({ data }) => { - console.log({ data }); - setEvents(data); - }); - }, []); - - function handleBackButtonClick() { - router.goBack(); - } - - function handleLanguageClick() { - router.push(PATHS.CHANGE_LANGUAGE); - } - - function handleNotImplementedClick() { - router.push(PATHS.NOT_IMPLEMENTED); - } - - function handleDemoPageClick() { - router.push(PATHS.DEMO_PAGE); - } - - function handleServiceAgreementClick() { - router.push(PATHS.SERVICE_AGREEMENT); - } - - function handlePrivacyAgreementClick() { - router.push(PATHS.PRIVACY_AGREEMENT); - } - - const [showLogoutConfirmModal, setShowLogoutConfirmModal] = useState(false); - function handleConfirmLogoutClick() { - setShowLogoutConfirmModal(true); - } - - function handleLogoutClick() { - setAccessToken(); - setIsLoggedIn(false); - - router.push('/tabs', 'forward', 'replace'); - - setShowLogoutConfirmModal(false); - } - function handleLogoutCancel() { - setShowLogoutConfirmModal(false); - } - - function handleDemoReactShopClick() { - router.push(PATHS.DEMO_REACT_SHOP); - } - - return ( - - - - - {/* */} - handleBackButtonClick()}> - - - - -
- - Setting -
-
-
- - - - - Setting - - - - - router.push(PATHS.DEMO_WEATHER_APP_UI)}> - - Weather App - - - - - - router.push(PATHS.DEMO_2FA_EXAMPLE, 'forward')}> - - - Demo 2FA Example{' '} - layout only, not functioning - - - - - - - router.push(PATHS.DEMO_REACT_THEME_SWITCHER, 'forward')} - > - - Demo React Theme Switcher - - - - - - router.push(PATHS.DEMO_SKELETON_TEXT, 'forward')}> - - Demo Skeleton Text - - - - - - router.push(PATHS.DEMO_STICKY_BOTTOM_SHEET_EXAMPLE, 'forward')} - > - - Demo Sticky Bottom Sheet Example - - - - - - router.push(PATHS.DEMO_STORAGE_EXAMPLE, 'forward')}> - - - Demo Storage Example{' '} - (need fix, message cannot display) - - - - - - - router.push(PATHS.DEMO_SWIPERJS_TUTORIAL, 'forward')} - > - - Demo SwiperJS Tutorial - - - - - - router.push(PATHS.DEMO_REACT_DRAWING_CANVAS, 'forward')} - > - - Demo React Drawing Canvas - - - - - - router.push(PATHS.DEMO_REACT_HOOK_FORM_EXAMPLE, 'forward')} - > - - Demo React Hook Form Example - - - - - - router.push(PATHS.DEMO_REACT_ITEM_LIST, 'forward')}> - - Demo React Item List - - - - - - router.push(PATHS.DEMO_REACT_LIFECYCLES, 'forward')} - > - - Demo React Lifecycles - - - - - - router.push(PATHS.DEMO_REACT_LOGIN, 'forward')}> - - - Demo React Login (missing back button) - - - - - - - router.push(PATHS.DEMO_REACT_MARVEL_APP, 'forward')} - > - - Demo React Marvel App - - - - - - router.push(PATHS.DEMO_REACT_MOVIE_APP_WITH_ALGOLIA, 'forward')} - > - - Demo React Movie App with Algolia - - - - - - router.push(PATHS.DEMO_REACT_NOTES, 'forward')}> - - - Demo React Notes{' '} - TODO: need update IonSlide - - - - - - - router.push(PATHS.DEMO_FACEBOOK_CLONE, 'forward')}> - - Demo Facebook Clone - - - - - - router.push(PATHS.DEMO_FAST_FOOD_APP, 'forward')}> - - - Demo Fast Food App ion-slide outstanding - - - - - - - router.push(PATHS.DEMO_FLOATING_TABS, 'forward')}> - - Demo Floating Tabs - - - - - - router.push(PATHS.DEMO_INSTAGRAM_CLONE, 'forward')}> - - Demo Instagram Clone - - - - - - router.push(PATHS.DEMO_KANBAN_BOARD, 'forward')}> - - - Demo Kanban Board{' '} - // TODO: fix missing ionslide in new ionic - - - - - - - router.push(PATHS.DEMO_ORDERING_APP, 'forward')}> - - - Demo Ordering App outstanding css - - - - - - - router.push(PATHS.DEMO_PROFILE_EXAMPLE, 'forward')}> - - Demo Profile Example - - - - - - router.push(PATHS.DEMO_PULLSTATE_TUTORIAL, 'forward')} - > - - Demo Pullstate Tutorial - - - - - - router.push(PATHS.DEMO_REACT_ADD_TO_CART, 'forward')} - > - - Demo React Add to Cart - - - - - - router.push(PATHS.DEMO_REACT_CALCULATOR, 'forward')} - > - - - Demo React Calculator css need fix - - - - - - - router.push(PATHS.DEMO_ACCORDION_TUTORIAL, 'forward')} - > - - Demo Accordion Tutorial - - - - - - router.push(PATHS.DEMO_BANKING_UI, 'forward')}> - - - Demo Banking UI{' '} - (in the middle, style outstanding) - - - - - - - router.push(PATHS.DEMO_CAPACITOR_GOOGLE_MAPS_TUTORIAL, 'forward')} - > - - - Demo Capacitor Google Maps Tutorial{' '} - need a google map api key - - - - - - - router.push(PATHS.DEMO_COLOR_TUTORIAL, 'forward')}> - - Demo Color Tutorial - - - - - - router.push(PATHS.DEMO_ECOMMERCE_EXAMPLE, 'forward')} - > - - - Demo Ecommerce Example{' '} - (fetch data not available at remote site) - - - - - - {/* - - router.push(paths.DEMO_REACT_WHATSAPP_CLONE, 'forward')}> - - - Demo React WhatsApp Clone (need to resolve path problem) - - - - - */} - - - router.push(PATHS.DEMO_REACT_POLL_APP, 'forward')}> - - - Demo React Poll App{' '} - (css temporary broken, ignored) - - - - - - - router.push(PATHS.DEMO_REACT_SWITCH_TABS, 'forward')} - > - - - Demo React Switch Tabs{' '} - (hardcoded back button) - - - - - - - router.push(PATHS.DEMO_REACT_OVERLAY_HOOKS, 'forward')} - > - - Demo React Overlay Hooks - - - - - - router.push(PATHS.DEMO_PINTEREST_FLOATING_TAB_BAR, 'forward')} - > - - - Demo Pinterest Floating Tab Bar{' '} - (css not work well) - - - - - - - router.push(PATHS.DEMO_RESTAURANT_FINDER, 'forward')} - > - - - Demo Restaurant Finder{' '} - need server for map showing - - - - - - - handleDemoReactShopClick()}> - - Demo React Shop - - - - - - { - router.push(PATHS.DEMO_CLUB_HOUSE, 'forward'); - }} - > - - Demo Club house - - - - - - { - router.push(PATHS.DEMO_SCORE_BOARD, 'forward'); - }} - > - - - Demo Score Board
- (IonCard problem) -
- -
-
- - - router.push(PATHS.DEMO_QUOTE_APP, 'forward')}> - - Demo Quote App - - - - - - router.push(PATHS.DEMO_QR_SCANNER, 'forward')}> - - Demo Qr scanner - - - - - - router.push(PATHS.DEMO_SHOP_APP_UI, 'forward')}> - - Demo Shop App UI - - - - - - router.push(PATHS.DEMO_DICTIONARY_APP, 'forward')}> - - Demo Dictionary App - - - - - - router.push(PATHS.DEMO_RECIPE_APP, 'forward')}> - - Demo Recipe App - - - - - - router.push(PATHS.DEMO_SLIDING_PROFILE, 'forward')}> - - Demo Sliding Profile - - - - - - router.push(PATHS.DEMO_QUIZ_APP, 'forward')}> - - Demo Quiz App - - - - - - router.push(PATHS.DEMO_BLOG_POST_UI, 'forward')}> - - Demo Blog Post UI - - - - - - router.push(PATHS.DEMO_REACT_TRAVEL_APP, 'forward')} - > - - - Demo React Travel App (on hold) - - - - - - - router.push(PATHS.DEMO_REACT_PROFILE_DASHBOARD_UI, 'forward')} - > - - Demo React Profile Dashboard UI - - - - - {/* TODO: */} - - - router.push(PATHS.DEMO_REACT_QR_CODE, 'forward')}> - - - Demo React QR Code need update - - - - - - - router.push(PATHS.DEMO_REACT_QUOTES, 'forward')}> - - Demo React Quotes - - - - - - router.push(PATHS.DEMO_REACT_SHOP_UI, 'forward')}> - - - Demo React Shop UI lower priority - - - - - - - router.push(PATHS.DEMO_REACT_TABS_MENUS_CUSTOM, 'forward')} - > - - Demo React Tabs Menus Custom - - - - - - router.push(PATHS.DEMO_REACT_ONBOARDING_UI, 'forward')} - > - - - Demo React Onboarding UI{' '} - TODO: update IonSlide - - - - -
- - {/* REQ0058/logout */} - - -
-
- -
-
- Logout -
-
- Unable to receive notifications after logging out -
- -
- - Cancel - - - Logout - -
-
-
-
-
- ); -}; - -export default connect({ - mapStateToProps: (state) => ({ - speakers: selectors.getSpeakers(state), - speakerSessions: selectors.getSpeakerSessions(state), - }), - mapDispatchToProps: { - logoutUser, - setAccessToken, - setIsLoggedIn, - }, - component: React.memo(DemoList), -}); diff --git a/03_source/mobile.trunk.1/src/pages/DemoList/style.scss b/03_source/mobile.trunk.1/src/pages/DemoList/style.scss deleted file mode 100644 index 5fae6e3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoList/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoList/types.ts b/03_source/mobile.trunk.1/src/pages/DemoList/types.ts deleted file mode 100644 index 2f4577f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoList/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface Event { - eventDate: Date; - joinMembers: undefined; - title: string; - price: number; - currency: string; - duration_m: number; - ageBottom: number; - ageTop: number; - location: string; - avatar: string; - // - id: string; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/NOTES.md deleted file mode 100644 index c026b37..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0134 diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.module.css b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.module.css deleted file mode 100644 index 41919a3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.module.css +++ /dev/null @@ -1,54 +0,0 @@ -.coffeeCard { - - padding: 0.8rem; - border-radius: 20px; -} - -.coffeeCard img { - - border-radius: 20px; - height: 10rem; - width: 100%; -} - -.coffeeCard ion-card-title { - - margin-top: 1rem; - font-size: 1rem; -} - -.coffeePrice { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin-top: -0.2rem; -} - -.coffeeAddButton { - - color: var(--ion-color-main) !important; - margin-top: 0.5rem; -} - -.coffeeCardLong img { - - border-radius: 20px; - height: 5rem !important; - width: 100%; -} - -.coffeeCardLongDetails { - - margin-left: 1rem; - margin-top: -0.7rem; -} - -.coffeeCardLongDetails p { - - font-size: 0.8rem; - margin: 0; - margin-top: 0.2rem; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.tsx deleted file mode 100644 index 358b630..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCard.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { IonCard, IonCardSubtitle, IonCardTitle, IonCol } from '@ionic/react'; -import { ArrowRightSquare } from 'react-iconly'; - -import styles from './CoffeeCard.module.css'; - -const CoffeeCard = (props) => { - const { coffee } = props; - - return ( - - - coffee - {coffee.name} - {coffee.summary} -
-

${coffee.price}

-
- -
-
-
-
- ); -}; - -export default CoffeeCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCardOffer.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCardOffer.tsx deleted file mode 100644 index 2d4db06..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/CoffeeCardOffer.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { IonCard, IonCardSubtitle, IonCardTitle, IonCol, IonRow } from '@ionic/react'; -import { Plus } from 'react-iconly'; - -import styles from './CoffeeCard.module.css'; - -const CoffeeCardOffer = (props) => { - const { offer } = props; - - return ( - - - - - - coffee - - - -
- {offer.title} -

{offer.description}

-
-
-
-
-
-
- ); -}; - -export default CoffeeCardOffer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/Tabs.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/Tabs.tsx deleted file mode 100644 index 2f8443e..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/Tabs.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import { IonIcon, IonLabel, IonTabBar, IonTabButton, IonTabs, IonRouterOutlet } from '@ionic/react'; -import { Redirect, Route } from 'react-router-dom'; - -import { Home, Bag, Heart2, Notification } from 'react-iconly'; -import Homepage from '../pages/Home'; -import Favourites from '../pages/Favourites'; -import Cart from '../pages/Cart'; - -const Tabs = (props) => { - return ( - - - } - /> - } /> - } - /> - - - - - - - - - - - - - - - - - ); -}; - -export default Tabs; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/ViewCoffeeCard.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/ViewCoffeeCard.tsx deleted file mode 100644 index 5c035ce..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/components/ViewCoffeeCard.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { IonButton, IonCard, IonCardSubtitle, IonCardTitle, IonCol, IonRow } from '@ionic/react'; - -import { useRef } from 'react'; -import { Bag } from 'react-iconly'; -import { addToCart } from '../store/CartStore'; -import '../pages/Home.scss'; - -const ViewCoffeeCard = (props) => { - const { coffee, cartRef } = props; - const coffeeCartRef = useRef(); - - const addCoffeeToCart = (e, coffeeID) => { - e.preventDefault(); - e.stopPropagation(); - - coffeeCartRef.current.style.display = ''; - coffeeCartRef.current.classList.add('animate__fadeOutUp'); - - setTimeout(() => { - cartRef.current.classList.add('animate__tada'); - addToCart(coffeeID); - - setTimeout(() => { - cartRef.current.classList.remove('animate__tada'); - coffeeCartRef.current.style.display = 'none'; - }, 500); - }, 500); - }; - - return ( - - - - coffee type - {coffee.name} - {coffee.summary} - - - - - Description -

{coffee.description}

- - - - - View → - - - - - addCoffeeToCart(e, coffee.id)}> - - - -
- -
-
-
-
-
- ); -}; - -export default ViewCoffeeCard; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/index.tsx deleted file mode 100644 index d5213c5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/index.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -import './theme/variables.scss'; - -import Tabs from './components/Tabs'; -import Homepage from './pages/Home'; -import ViewCoffee from './pages/ViewCoffee'; -import ViewCoffees from './pages/ViewCoffees'; -import React from 'react'; - -function DemoOrderingApp(): React.JSX.Element { - return ( - - - } /> - } - /> - } - /> - } - /> - - - - - - ); -} - -export default DemoOrderingApp; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/module.d.ts b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/module.d.ts deleted file mode 100644 index d774364..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/module.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.module.css' { - const classes: { readonly [key: string]: string }; - export default classes; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.module.css b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.module.css deleted file mode 100644 index 427e2f6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.module.css +++ /dev/null @@ -1,39 +0,0 @@ -.cartCheckout { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin: 1rem; -} - -.cartFooter { - border-top: 2px solid #141a22; - background-color: var(--ion-background-color); - padding-left: 1rem; - padding-right: 1rem; -} - -.cartCheckout ion-card-subtitle { - font-size: 1.3rem; - color: white !important; -} - -.cartItem { - padding: 1rem; -} - -.cartItem img { - height: 3rem; - width: 3rem; - border-radius: 10px; -} - -.cartSlider:not(:nth-child(1)) { - border-top: 2px solid var(--ion-background-color); -} - -.cartActions { - display: flex; - flex-direction: column; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.tsx deleted file mode 100644 index a9342fc..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Cart.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import { - IonBadge, - IonButton, - IonCardSubtitle, - IonCol, - IonContent, - IonFooter, - IonHeader, - IonItem, - IonItemOption, - IonItemOptions, - IonItemSliding, - IonLabel, - IonList, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { Delete, TickSquare } from 'react-iconly'; -import { useEffect, useState } from 'react'; -import { CartStore, CoffeeStore } from '../store'; -import { removeFromCart } from '../store/CartStore'; -import { getCartCoffees, getCoffees } from '../store/Selectors'; - -import styles from './Cart.module.css'; - -const Cart = (): React.JSX.Element => { - const coffees = CoffeeStore.useState(getCoffees); - const cart = CartStore.useState(getCartCoffees); - - const [cartProducts, setCartProducts] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - const [total, setTotal] = useState(0); - - useEffect(() => { - const getCartProducts = () => { - setCartProducts([]); - setTotal(0); - - cart.forEach((coffee) => { - var coffeeID = coffee; - const tempCoffee = coffees.filter((p) => parseInt(p.id) === parseInt(coffeeID))[0]; - - setTotal((prevTotal) => prevTotal + parseFloat(tempCoffee.price)); - setCartProducts((prevSearchResults) => [...prevSearchResults, tempCoffee]); - }); - }; - - getCartProducts(); - }, [cart]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - const removeProductFromCart = async (index) => { - removeFromCart(index); - }; - - return ( - - - - Checkout - - - - - - - - {cartProducts && cartProducts.length}{' '} - {cartProducts.length > 1 || cartProducts.length === 0 ? ' coffees' : ' coffee'} found - - - - - - {cartProducts && - cartProducts.map((coffee, index) => { - if (index <= amountLoaded) { - return ( - - - cart coffee - -

{coffee.name}

-
- -
- ${coffee.price} -
-
- - - removeProductFromCart(index)} - > - - - -
- ); - } - })} -
-
- - -
- ${total.toFixed(2)} - - - -  Checkout - -
-
-
- ); -}; - -export default Cart; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Favourites.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Favourites.tsx deleted file mode 100644 index cc74788..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Favourites.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { Bag } from 'react-iconly'; -import { useEffect, useRef, useState } from 'react'; -import ViewCoffeeCard from '../components/ViewCoffeeCard'; -import { CartStore, CoffeeStore, FavouriteStore } from '../store'; -import { getCartCoffees, getCoffees, getFavouriteCoffees } from '../store/Selectors'; -import './Home.scss'; - -const Favourites = (): React.JSX.Element => { - const cartRef = useRef(null); - const router = useIonRouter(); - - const coffees = CoffeeStore.useState(getCoffees); - const favourites = FavouriteStore.useState(getFavouriteCoffees); - const cart = CartStore.useState(getCartCoffees); - - const [searchResults, setSearchResults] = useState([]); - const [amountLoaded, setAmountLoaded] = useState(6); - - useEffect(() => { - const getFavourites = () => { - setSearchResults([]); - - favourites.forEach((favourite) => { - var coffeeID = favourite; - const tempCoffee = coffees.filter((c) => parseInt(c.id) === parseInt(coffeeID))[0]; - setSearchResults((prevSearchResults) => [...prevSearchResults, tempCoffee]); - }); - }; - - getFavourites(); - }, [favourites]); - - const fetchMore = async (e) => { - // Increment the amount loaded by 6 for the next iteration - setAmountLoaded((prevAmount) => prevAmount + 6); - e.target.complete(); - }; - - return ( - - - - Favourites - - -
router.goBack()} - > - 0 ? 'yellow-icon' : 'gray-icon'} /> -
-
-
-
- - - - - - - {searchResults && searchResults.length}{' '} - {searchResults.length > 1 || searchResults.length === 0 - ? ' favourites' - : ' favourite'}{' '} - found - - - - - - {searchResults && - searchResults.map((coffee, index) => { - if (index <= amountLoaded) { - return ( - - ); - } - })} - - - - - - - -
- ); -}; - -export default Favourites; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.scss b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.scss deleted file mode 100644 index a9fa354..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.scss +++ /dev/null @@ -1,11 +0,0 @@ -.demo-ordering-app { - .main-heading { - font-size: 2.3rem; - font-weight: 700; - } - - .heading { - letter-spacing: -0.05rem; - margin-left: 1rem; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.tsx deleted file mode 100644 index c5c018b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/Home.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRouterLink, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { chevronBackOutline, searchSharp } from 'ionicons/icons'; -import { Category, Filter } from 'react-iconly'; -import CoffeeCard from '../components/CoffeeCard'; -import CoffeeCardOffer from '../components/CoffeeCardOffer'; - -import { CoffeeStore, CoffeeOfferStore } from '../store'; -import { getCoffees, getOffers } from '../store/Selectors'; -import './Home.scss'; - -const Homepage = (): React.JSX.Element => { - const router = useIonRouter(); - const coffees = CoffeeStore.useState(getCoffees); - const offers = CoffeeOfferStore.useState(getOffers); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - - handleBackClick()}> - - - -
- -
-
- - Ionic Coffee - - -
- avatar -
-
-
-
- - - - - - -

Find the best coffee near you

-
-
-
-
- - - - - router.push('/coffees/true')} - searchIcon={searchSharp} - placeholder="Try 'Caramel Latte'" - /> - - - - -

Popular

- - - - -
- - - {coffees.map((coffee) => { - if (coffee.id <= 2) { - return ; - } - })} - - - - -

Special Offers

-
-
- - {offers.map((offer) => { - return ; - })} -
-
-
- ); -}; - -export default Homepage; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.module.css b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.module.css deleted file mode 100644 index f472b46..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.module.css +++ /dev/null @@ -1,50 +0,0 @@ -.checkout { - - border-top: 2px solid #141a22; - background-color: var(--ion-background-color); - padding-bottom: 1rem; -} - -.checkoutDetails { - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin-left: 2rem; - margin-right: 1rem; - margin-top: 0.5rem; - margin-bottom: 0.5rem; -} - -.checkoutDetails ion-button { - - width: 60%; - --border-radius: 10px; - height: 3.5rem; -} - -.priceDetails { - - /* margin-left: 2rem; */ - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; -} - -.priceDetails h4 { - - margin: 0; - padding: 0; - color: white !important; -} - -.extra { - - margin-top: 0.3rem; - padding: 0.75rem; - color: #475464; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.tsx deleted file mode 100644 index 93c9dd5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffee.tsx +++ /dev/null @@ -1,208 +0,0 @@ -import { - IonBadge, - IonButton, - IonButtons, - IonCard, - IonCardSubtitle, - IonCol, - IonContent, - IonFooter, - IonGrid, - IonHeader, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { useEffect, useRef, useState } from 'react'; -import { Bag, Heart, CaretLeft, InfoSquare } from 'react-iconly'; -import { useParams } from 'react-router'; -import { CoffeeSizeStore, CoffeeStore, FavouriteStore } from '../store'; -import { addToCart } from '../store/CartStore'; -import { addToFavourites } from '../store/FavouriteStore'; -import { getCoffee, getCoffeeSizes, getFavouriteCoffees } from '../store/Selectors'; -import './Home.scss'; - -import styles from './ViewCoffee.module.css'; - -const ViewCoffee = (props): React.JSX.Element => { - const router = useIonRouter(); - const params = useParams(); - const coffee = CoffeeStore.useState(getCoffee(params.id)); - const favourites = FavouriteStore.useState(getFavouriteCoffees); - const coffeeSizes = CoffeeSizeStore.useState(getCoffeeSizes); - const [selectedSize, setSelectedSize] = useState(false); - - const favouriteRef = useRef(); - const coffeeCartRef = useRef(); - const [isFavourite, setIsFavourite] = useState(false); - - const getPrice = () => - coffee.prices.filter((p) => parseInt(p.size_id) === parseInt(selectedSize))[0].price; - - useEffect(() => { - const coffeeID = params.id; - const tempIsFavourite = favourites.find((f) => parseInt(f) === parseInt(coffeeID)); - - setIsFavourite(tempIsFavourite); - }, [params.id, favourites]); - - const addCoffeeToFavourites = (e, coffeeID) => { - e.preventDefault(); - addToFavourites(coffeeID); - - favouriteRef.current.classList.add('animate__tada'); - - setTimeout(() => { - favouriteRef.current.classList.remove('animate__tada'); - }, 700); - }; - - const addCoffeeToCart = (e, coffeeID) => { - e.preventDefault(); - e.stopPropagation(); - - coffeeCartRef.current.style.display = ''; - coffeeCartRef.current.classList.add('animate__fadeOutUp'); - - setTimeout(() => { - addToCart(coffeeID); - - setTimeout(() => { - coffeeCartRef.current.style.display = 'none'; - }, 500); - }, 500); - }; - - return ( - - - - -
router.goBack()}> - -
-
- - {coffee.name} - - -
addCoffeeToFavourites(e, coffee.id)} - > - -
-
-
-
- - - - - - -

{coffee.name}

- {coffee.summary} -
-
-
-
- - - - - - coffee type - - - - - Description -

{coffee.description}

- -
-
- - - - Extras included - - - - {coffee.extras.map((extra, index) => { - return ( - - {extra} - - ); - })} - - - - - - - - Pick your size - - - {coffeeSizes.map((size) => { - return ( - - setSelectedSize(size.id)} - expand="block" - color={size.id === selectedSize ? 'main' : 'custom-light'} - fill={size.id === selectedSize ? 'outline' : 'solid'} - > - {size.name} - - - ); - })} - - - -
-
- - -
-
- Price -

${selectedSize ? getPrice() : '0.00'}

-
- addCoffeeToCart(e, coffee.id)} - disabled={!selectedSize} - expand="block" - color="main" - > - Add to cart - - -
- -
-
-
-
- ); -}; - -export default ViewCoffee; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffees.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffees.tsx deleted file mode 100644 index 2bc79e0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/pages/ViewCoffees.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonButtons, - IonCardSubtitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, - useIonRouter, - useIonViewDidEnter, -} from '@ionic/react'; -import { searchSharp } from 'ionicons/icons'; -import { useRef, useState } from 'react'; -import { Bag, CaretLeft } from 'react-iconly'; -import { useParams } from 'react-router'; -import ViewCoffeeCard from '../components/ViewCoffeeCard'; -import { CartStore, CoffeeStore } from '../store'; -import { getCoffees, getCartCoffees } from '../store/Selectors'; -import './Home.scss'; - -const ViewCoffees = (props): React.JSX.Element => { - const router = useIonRouter(); - const params = useParams(); - const coffees = CoffeeStore.useState(getCoffees); - const cart = CartStore.useState(getCartCoffees); - const [results, setResults] = useState(coffees); - - const cartRef = useRef(); - const searchRef = useRef(); - - useIonViewDidEnter(() => { - if (params.from_search) { - setTimeout(() => { - searchRef.current.setFocus(); - }, 500); - } - }); - - const search = (e) => { - const searchTerm = e.currentTarget.value; - - if (searchTerm !== '') { - const searchTermLower = searchTerm.toLowerCase(); - - const newResults = coffees.filter((e) => e.name.toLowerCase().includes(searchTermLower)); - setResults(newResults); - } else { - setResults(coffees); - } - }; - - return ( - - - - -
router.goBack()}> - -
-
- - Full Range - - -
router.push('/tabs/cart')} - > - 0 ? 'yellow-icon' : 'gray-icon'} /> -
-
-
-
- - - - - - -

View Full Range

- Our range of succulent coffee -
-
-
-
- - - - - search(e)} - id="searchbar" - ref={searchRef} - searchIcon={searchSharp} - placeholder="Try 'Cappuccino'" - /> - - - - {results.map((coffee) => { - return ; - })} - -
-
- ); -}; - -export default ViewCoffees; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CartStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CartStore.tsx deleted file mode 100644 index 5562434..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CartStore.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Store } from 'pullstate'; - -const CartStore = new Store({ - total: 0, - coffee_ids: [], -}); - -export default CartStore; - -export const addToCart = (coffeeID) => { - CartStore.update((s) => { - s.coffee_ids = [...s.coffee_ids, `${parseInt(coffeeID)}`]; - }); -}; - -export const removeFromCart = (coffeeIndex) => { - CartStore.update((s) => { - s.coffee_ids.splice(coffeeIndex, 1); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeOfferStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeOfferStore.tsx deleted file mode 100644 index 600da3a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeOfferStore.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Store } from 'pullstate'; - -const CoffeeOfferStore = new Store({ - offers: [ - { - id: 1, - title: 'Buy one get one free!', - description: 'Any time you buy a coffee using your loyalty card scheme, you can get one free', - image: - 'https://images.pexels.com/photos/861090/pexels-photo-861090.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', - }, - ], -}); - -export default CoffeeOfferStore; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeSizeStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeSizeStore.tsx deleted file mode 100644 index e066f0b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeSizeStore.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Store } from 'pullstate'; - -const CoffeeSizeStore = new Store({ - sizes: [ - { - id: 1, - name: 'Small', - }, - { - id: 2, - name: 'Medium', - }, - { - id: 3, - name: 'Large', - }, - ], -}); - -export default CoffeeSizeStore; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeStore.tsx deleted file mode 100644 index 24f142f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/CoffeeStore.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { Store } from 'pullstate'; - -const CoffeeStore = new Store({ - coffees: [ - { - id: 1, - name: 'Cappuccino', - summary: 'With Milk', - extras: ['milk'], - description: - 'This is a beautiful cup of cappuccino, complimented with semi-skimmed milk. Comes in three different sizes.', - price: '3.20', - prices: [ - { - size_id: 1, - price: '3.20', - }, - { - size_id: 2, - price: '3.90', - }, - { - size_id: 3, - price: '4.20', - }, - ], - image: - 'https://images.pexels.com/photos/1170659/pexels-photo-1170659.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', - }, - { - id: 2, - name: 'Lattè', - summary: 'With Caramel', - extras: ['caramel'], - description: - 'This is a beautiful cup of lattè, complimented with sweet caramel. Comes in three different sizes.', - price: '5.10', - prices: [ - { - size_id: 1, - price: '4.35', - }, - { - size_id: 2, - price: '4.85', - }, - { - size_id: 3, - price: '5.10', - }, - ], - image: - 'https://images.pexels.com/photos/2067399/pexels-photo-2067399.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', - }, - { - id: 3, - name: 'Espresso', - summary: 'With 2 shots', - extras: ['2 shots'], - description: - 'This is a beautiful cup of espresso, complimented with 2 shots. Comes in three different sizes.', - price: '6.20', - prices: [ - { - size_id: 1, - price: '6.20', - }, - { - size_id: 2, - price: '6.80', - }, - { - size_id: 3, - price: '7.10', - }, - ], - image: - 'https://images.pexels.com/photos/302894/pexels-photo-302894.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', - }, - { - id: 4, - name: 'Americano', - summary: 'With Milk', - extras: ['Milk'], - description: - 'This is a beautiful cup of Americano, complimented with full fat milk. Comes in three different sizes.', - price: '5.35', - prices: [ - { - size_id: 1, - price: '5.35', - }, - { - size_id: 2, - price: '5.70', - }, - { - size_id: 3, - price: '6.50', - }, - ], - image: - 'https://images.pexels.com/photos/6207297/pexels-photo-6207297.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', - }, - ], -}); - -export default CoffeeStore; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/FavouriteStore.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/FavouriteStore.tsx deleted file mode 100644 index 07e3166..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/FavouriteStore.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { Store } from 'pullstate'; - -const FavouriteStore = new Store({ - total: 0, - coffee_ids: [], -}); - -export default FavouriteStore; - -export const addToFavourites = (coffeeID) => { - FavouriteStore.update((s) => { - if (s.coffee_ids.find((id) => id === parseInt(coffeeID))) { - s.coffee_ids = s.coffee_ids.filter((id) => id !== parseInt(coffeeID)); - } else { - s.coffee_ids = [...s.coffee_ids, parseInt(coffeeID)]; - } - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/Selectors.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/Selectors.tsx deleted file mode 100644 index ef89efe..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/Selectors.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = (state) => state; - -// General getters -export const getCoffees = createSelector(getState, (state) => state.coffees); -export const getOffers = createSelector(getState, (state) => state.offers); -export const getCoffeeSizes = createSelector(getState, (state) => state.sizes); -export const getCartCoffees = createSelector(getState, (state) => state.coffee_ids); -export const getFavouriteCoffees = createSelector(getState, (state) => state.coffee_ids); - -// More specific getters -export const getCoffee = (id) => - createSelector( - getState, - (state) => state.coffees.filter((c) => parseInt(c.id) === parseInt(id))[0] - ); diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/index.tsx deleted file mode 100644 index e6b0c0b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/store/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export { default as CoffeeStore } from './CoffeeStore'; -export { default as CoffeeSizeStore } from './CoffeeSizeStore'; -export { default as CoffeeOfferStore } from './CoffeeOfferStore'; -export { default as CartStore } from './CartStore'; -export { default as FavouriteStore } from './FavouriteStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/theme/variables.scss deleted file mode 100644 index 1325221..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoOrderingApp/theme/variables.scss +++ /dev/null @@ -1,278 +0,0 @@ -.demo-ordering-app { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - :root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - - /** custom **/ - --ion-color-main: rgb(221, 174, 21); - --ion-color-main-rgb: 221, 174, 21; - --ion-color-main-contrast: rgb(0, 0, 0); - --ion-color-main-contrast-rgb: 0, 0, 0; - --ion-color-main-shade: rgb(179, 142, 22); - --ion-color-main-tint: rgb(233, 195, 71); - - /** custom light **/ - --ion-color-custom-light: #141a22; - --ion-color-custom-light-contrast: #ffffff; - --ion-color-custom-light-shade: #12171d; - --ion-color-custom-light-tint: #232c38; - } - - .ion-color-main { - --ion-color-base: var(--ion-color-main); - --ion-color-base-rgb: var(--ion-color-main-rgb); - --ion-color-contrast: var(--ion-color-main-contrast); - --ion-color-contrast-rgb: var(--ion-color-main-contrast-rgb); - --ion-color-shade: var(--ion-color-main-shade); - --ion-color-tint: var(--ion-color-main-tint); - } - - .ion-color-custom-light { - --ion-color-base: var(--ion-color-custom-light); - --ion-color-contrast: var(--ion-color-custom-light-contrast); - --ion-color-shade: var(--ion-color-custom-light-shade); - --ion-color-tint: var(--ion-color-custom-light-tint); - } - - :root { - --main-orange-color: #d17842; - - --ion-background-color: #0e1016; - --ion-background-color-rgb: 0, 0, 0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - --ion-item-background: #141a22; - - --ion-card-background: #141a22; - --ion-tab-bar-color: #4d5053; - --ion-tab-bar-background: #0e1016; - --ion-tab-bar-color-selected: rgb(221, 174, 21); - - /* --ion-toolbar-color: white; */ - --ion-toolbar-background: #0e1016; - --ion-toolbar-border-color: #0e1016; - --ion-tab-bar-border-color: #0e1016; - --ion-grid-column-padding: 0; - } - - .app-icon { - color: rgb(221, 174, 21); - } - - ion-toolbar { - --padding-start: 1rem; - --padding-end: 1rem; - --padding-top: 1rem; - --padding-bottom: 1rem; - } - - .inner-toolbar { - --padding-top: 0rem !important; - --padding-bottom: 0rem !important; - } - - .button-container-img img { - height: 2.3rem; - border-radius: 10px; - } - - .gray-icon { - color: var(--ion-tab-bar-color); - background-color: #1b2025; - } - - .yellow-icon { - color: var(--ion-color-main); - background-color: #1b2025; - } - - .button-container { - background-color: #1b2025; - border: 2px solid #1d232a; - padding: 0.5rem; - border-radius: 13px; - - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - justify-content: center; - } - - .button-container-img { - background-color: #1b2025; - border: 2px solid #1d232a; - padding: 0.2rem; - border-radius: 13px; - - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - justify-content: center; - } - - ion-card { - padding: 0.8rem; - border-radius: 20px; - } - - .coffee-card img { - border-radius: 20px; - height: 10rem; - width: 100%; - } - - .coffee-card-long img { - border-radius: 20px; - height: 5rem !important; - width: 100%; - } - - .coffee-card-long-details { - margin-left: 1rem; - margin-top: -0.7rem; - } - - .coffee-card-long-details p { - font-size: 0.8rem; - margin: 0; - margin-top: 0.2rem; - } - - .coffee-card ion-card-title { - margin-top: 1rem; - font-size: 1rem; - } - - .coffee-card .coffee-price { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; - margin-top: -0.2rem; - } - - .coffee-card .coffee-price .add-button { - color: var(--main-orange-color) !important; - margin-top: 0.5rem; - } - - .coffee-card .coffee-price .add-button svg { - color: white !important; - } - - .outer-heading { - margin-bottom: -1.3rem; - margin-left: 0.5rem; - margin-right: 1.3rem; - } - /* -.searchbar-input { - - padding: 1.5rem !important; -} - -.searchbar-search-icon { - - margin-top: 0.3rem; - margin-right: 3rem; - padding-right: 3rem; -} */ - /* -ion-tab-bar { - - bottom: 20px; - position: relative; - box-shadow: 0px 0px 1.5px rgba(255, 255, 255, 0.2); - border-radius: 16px; -width: 92%; -border-top: none; -margin: 0 auto; -height: 55px; -} - -ion-tab-button { - --padding-bottom: 8px; - --padding-top: 8px; -} */ - - .custom-margin-left { - margin-left: 0.2rem; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab1.jsx deleted file mode 100644 index 62e718a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab1.jsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; - -import './Tab1.css'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Tab1 = () => { - const router = useIonRouter(); - - function handleBackClick() { - router.goBack(); - } - - return ( - - - - Tab 1 - {/* */} - - handleBackClick()}> - - - - - - - - - Tab 1 - - - - - - ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab2.jsx deleted file mode 100644 index f09edf4..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab2.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab2.css'; - -const Tab2 = () => { - return ( - - - - Tab 2 - - - - - - Tab 2 - - - - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab3.css b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab3.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab3.jsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab3.jsx deleted file mode 100644 index 903b1a0..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab3.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab3 = () => { - return ( - - - - Tab 3 - - - - - - Tab 3 - - - - - - ); -}; - -export default Tab3; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab4.jsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab4.jsx deleted file mode 100644 index 9cb5fa3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/AppPages/Tab4.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import ExploreContainer from '../components/ExploreContainer'; -import './Tab3.css'; - -const Tab4 = () => { - return ( - - - - Tab 3 - - - - - - Tab 4 - - - - - - ); -}; - -export default Tab4; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/NOTES.md deleted file mode 100644 index 41d58b8..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0135 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.css b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.css deleted file mode 100644 index e99f514..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.css +++ /dev/null @@ -1,24 +0,0 @@ -.container { - text-align: center; - position: absolute; - left: 0; - right: 0; - top: 50%; - transform: translateY(-50%); -} - -.container strong { - font-size: 20px; - line-height: 26px; -} - -.container p { - font-size: 16px; - line-height: 22px; - color: #8c8c8c; - margin: 0; -} - -.container a { - text-decoration: none; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.jsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.jsx deleted file mode 100644 index 799b82a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/components/ExploreContainer.jsx +++ /dev/null @@ -1,21 +0,0 @@ -import './ExploreContainer.css'; - -const ExploreContainer = ({ name }) => { - return ( -
- {name} -

- Explore{' '} - - UI Components - -

-
- ); -}; - -export default ExploreContainer; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/custom-tab-bar.scss b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/custom-tab-bar.scss deleted file mode 100644 index 1aa74fb..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/custom-tab-bar.scss +++ /dev/null @@ -1,29 +0,0 @@ -.custom-tab-bar { - * { - /* --ion-background-color: white; */ - --ion-tab-bar-color: var(--tab-color); - --ion-tab-bar-color-selected: var(--tab-color-selected); - } - - ion-tab-bar { - --background: var(--tab-background); - box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.4); - border-radius: 50px !important; - - height: 50px; - width: 50%; - padding-top: 5px; - padding-bottom: 5px; - padding-left: 10px; - padding-right: 10px; - - bottom: 20px; - position: relative; - margin: 0 auto !important; - border-top: none; - } - - ion-tab-button { - border-radius: 16px !important; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/index.tsx deleted file mode 100644 index 6ccb3e7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { chatbubble, cloudOutline, home, person, search, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; -import Tab3 from './AppPages/Tab3'; -import Tab4 from './AppPages/Tab4'; - -import './style.scss'; -import './custom-tab-bar.scss'; - -function DemoPinterestFloatingTabBar() { - return ( - - - - - - - - - - - - - - - - - - - {/* */} - - - - - - - - - - - - - - - - - ); -} - -export default DemoPinterestFloatingTabBar; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/style.scss b/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/style.scss deleted file mode 100644 index fae1253..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPinterestFloatingTabBar/style.scss +++ /dev/null @@ -1,253 +0,0 @@ -/* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - -/** Ionic CSS Variables **/ -.demo-pinterest-floating-tab-bar { - * { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } - - @media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66, 140, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80, 200, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106, 100, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47, 223, 117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0, 0, 0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255, 213, 52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255, 73, 97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244, 245, 248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0, 0, 0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152, 154, 162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0, 0, 0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34, 36, 40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255, 255, 255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0, 0, 0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - .ios ion-modal { - --ion-background-color: var(--ion-color-step-100); - --ion-toolbar-background: var(--ion-color-step-150); - --ion-toolbar-border-color: var(--ion-color-step-250); - } - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18, 18, 18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255, 255, 255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } - } - - :root { - /* Custom tab bar */ - --tab-background: rgb(251, 251, 251); - --tab-color: rgb(153, 153, 153); - --tab-color-selected: black; - } - - @media (prefers-color-scheme: dark) { - :root { - /* Custom tab bar */ - --tab-background: rgb(53, 53, 53); - --tab-color: rgb(83, 83, 83); - --tab-color-selected: white; - } - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/NOTES.md deleted file mode 100644 index ab323e8..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0136 diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.module.scss b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.module.scss deleted file mode 100644 index 48ef851..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.module.scss +++ /dev/null @@ -1,26 +0,0 @@ -.figure { - padding: 1rem; -} - -.figure h6 { - font-size: 1.5rem; - font-weight: 200; -} - -.figure p { - color: rgb(255, 255, 255); - font-size: 0.9rem; - font-weight: 200; -} - -.figure:nth-child(1) { - background-color: rgb(157, 163, 141); -} - -.figure:nth-child(2) { - background-color: rgb(150, 155, 138); -} - -.figure:nth-child(3) { - background-color: rgb(135, 143, 120); -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.tsx deleted file mode 100644 index 57c6f2b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Figure.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IonCol } from '@ionic/react'; -import styles from './Figure.module.scss'; - -export const Figure = (props): React.JSX.Element => ( - -
{props.count}
-

{props.title}

-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.module.scss b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.module.scss deleted file mode 100644 index 3b81ae7..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.module.scss +++ /dev/null @@ -1,55 +0,0 @@ -.post { - border-bottom: 1px solid rgb(219, 219, 219); - padding-top: 1rem; - padding-bottom: 0.2rem; - - p { - font-size: 0.9rem; - padding: 0 !important; - margin: 0 !important; - } - - .postText { - color: rgb(107, 112, 97); - } -} - -.postAvatar { - height: 3.5rem; - width: 3.5rem; - margin-right: 1rem; - border: 3px solid rgba(218, 223, 208, 1); -} - -.postInfo { - display: flex; - flex-direction: row; - justify-content: space-between; - padding-right: 1rem; - color: rgb(190, 190, 190); -} - -.postReactions { - display: flex; - justify-content: space-between; - padding-right: 1rem; - margin-top: 0.5rem; - color: rgb(107, 112, 97); - - .postReaction { - display: flex; - align-items: center; - justify-content: space-between; - font-size: 0.9rem; - - ion-icon { - margin-right: 0.5rem; - } - - p { - padding: 0; - margin: 0; - font-size: 0.8rem; - } - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.tsx deleted file mode 100644 index 406e1dd..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/components/Post.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { IonAvatar, IonIcon, IonItem, IonLabel } from '@ionic/react'; -import { chatbubbleOutline, heart, heartOutline, shareSocialOutline } from 'ionicons/icons'; -import styles from './Post.module.scss'; - -export const Post = (props): React.JSX.Element => ( -
- - - - - -
-

{props.post.date}

-

@93alan

-
-

{props.post.text}

- -
-
- -

{props.post.comments}

-
-
- -

{props.post.likes}

-
- -
- -
-
-
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/index.tsx deleted file mode 100644 index 392e5a6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import './style.scss'; -import Home from './pages/Home'; - -function DemoProfileExample(): React.JSX.Element { - return ( - - - - - - - - - - {/* - - - - Dashboard - - - - Search - - - */} - - ); -} - -export default DemoProfileExample; diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.module.scss deleted file mode 100644 index 5db20c8..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.module.scss +++ /dev/null @@ -1,90 +0,0 @@ -$main-color: rgb(143, 149, 130); - -.page { - ion-toolbar { - --background: rgb(143, 149, 130) !important; - --color: white; - --border-style: none; - margin: 0 !important; - } -} - -.top { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - align-content: center; - background-color: rgb(143, 149, 130); - color: white; - padding-bottom: 1rem; -} - -.figures { - text-align: center; - background-color: rgb(143, 149, 130); - color: white; - - p, - h6 { - padding: 0; - margin: 0; - } -} - -.profileHeader { - ion-card-subtitle, - ion-card-title { - --color: white; - } - - ion-card-title { - font-size: 1.3rem; - } - - ion-card-subtitle { - --color: rgb(202, 211, 189); - } -} - -.avatar { - width: 7rem; - height: 7rem; - border: 5px solid rgba(218, 223, 208, 0.4); -} - -.avatarUpload { - display: flex; - flex-direction: row; - justify-content: center; - - background-color: rgb(255, 255, 255); - border: 3px solid rgba(218, 223, 208, 0.4); - color: rgb(80, 80, 80); - position: absolute; - padding: 0.3rem; - font-size: 1.1rem; - border-radius: 500px; - margin-top: -2.2rem; - margin-left: 5rem; -} - -.postActions { - display: flex; - flex-direction: row; - align-content: center; - align-items: center; - justify-content: space-between; - padding: 0.2rem; - padding-left: 1.3rem; - padding-right: 1.3rem; - color: rgb(149, 149, 149); - font-size: 0.9rem; - border-bottom: 1px solid rgba(218, 223, 208, 1); - - background-color: rgba(218, 223, 208, 0.4); - - ion-icon { - font-size: 1.2rem; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.tsx deleted file mode 100644 index d565f0a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/pages/Home.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { - IonAvatar, - IonButton, - IonButtons, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonList, - IonPage, - IonRow, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import styles from './Home.module.scss'; -import { - arrowBackOutline, - cameraOutline, - chevronBackOutline, - filterOutline, - menuOutline, -} from 'ionicons/icons'; -import { Figure } from '../components/Figure'; -import { Post } from '../components/Post'; - -const Home = (): React.JSX.Element => { - const posts = [ - { - date: 'Mar 30', - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', - comments: 13, - likes: 49, - liked: true, - }, - { - date: 'Mar 28', - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', - comments: 1, - likes: 9, - }, - { - date: 'Mar 25', - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', - comments: 119, - likes: 483, - }, - { - date: 'Mar 23', - text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', - comments: 27, - likes: 78, - }, - ]; - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - - handleBackClick()}> - - - - - - - - - - - - - - - - - - -
- -
-
-
- - - - Alan Montgomery - Mobile Team Lead - - -
- - - -
-
-
- - - - - - -
-

Posts by @93alan

- -
-
-
- - - {posts.map((post, index) => { - return ; - })} - -
- - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/style.scss b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoProfileExample/theme/variables.scss deleted file mode 100644 index 1a2dbc3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoProfileExample/theme/variables.scss +++ /dev/null @@ -1,79 +0,0 @@ -.demo-profile-example { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - :root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/NOTES.md deleted file mode 100644 index d94875f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0137 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/components/Person.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/components/Person.tsx deleted file mode 100644 index 2edc34d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/components/Person.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { IonAvatar, IonButton, IonItem, IonLabel } from '@ionic/react'; -import { toggleFollowing } from '../store/PeopleStore'; - -export const Person = ({ person }): React.JSX.Element => { - return ( - - - avatar - - -

{person.name}

-

{person.title}

-
- - toggleFollowing(person.id)} - > - {person.following ? 'Following' : 'Follow'} - -
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/data/index.js b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/data/index.js deleted file mode 100644 index 7e84c0f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/data/index.js +++ /dev/null @@ -1,44 +0,0 @@ -export const people = [ - { - id: 1, - name: 'Alan Montgomery', - title: 'Mobile Team Lead', - avatar: 'https://pbs.twimg.com/profile_images/1420489989163524096/GwHdYSky_400x400.jpg', - following: false, - }, - { - id: 2, - name: 'Max Lynch', - title: 'CEO | Co Founder', - avatar: 'https://pbs.twimg.com/profile_images/1318970727173885953/bln98FNj_400x400.jpg', - following: false, - }, - { - id: 3, - name: 'Mike Hartington', - title: 'Senior Dev Rel', - avatar: 'https://pbs.twimg.com/profile_images/1084993841898446849/DJ8XtR6L_400x400.jpg', - following: false, - }, - { - id: 4, - name: 'Matt Netkow', - title: 'Head of Product Marketing', - avatar: 'https://pbs.twimg.com/profile_images/1323383930150621187/GKc0nVzi_400x400.jpg', - following: false, - }, - { - id: 5, - name: 'Ben Sperry', - title: 'CDO | Co Founder', - avatar: 'https://pbs.twimg.com/profile_images/1407747959345795072/McJb-RvC_400x400.jpg', - following: false, - }, - { - id: 6, - name: 'Liam DeBeasi', - title: 'Software Engineer', - avatar: 'https://pbs.twimg.com/profile_images/1105953692669366273/ZNK4lRAJ_400x400.jpg', - following: false, - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/index.tsx deleted file mode 100644 index f5313e3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/index.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { list, people } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -// import Tab1 from './AppPages/Tab1'; -// import Tab2 from './AppPages/Tab2'; - -import './style.scss'; -import Tab1 from './pages/Tab1'; -import Tab2 from './pages/Tab2'; - -function DemoPullstateTutorial() { - return ( - - - - - - - - - - - - - {/* */} - - - - List - - - - Following - - - - ); -} - -export default DemoPullstateTutorial; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab1.css b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab1.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab1.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab1.tsx deleted file mode 100644 index 98513db..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab1.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import { PeopleStore } from '../store'; -import { Person } from '../components/Person'; -import './Tab1.css'; -import { useStoreState } from 'pullstate'; -import { getPeople } from '../store/Selectors'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Tab1 = (): React.JSX.Element => { - const people = useStoreState(PeopleStore, getPeople); - - console.log(people); - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - List of People - - - handleBackClick()}> - - - - - - - - - List of People - - - handleBackClick()}> - - - - - - - {people.map((person, index) => { - return ; - })} - - - ); -}; - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab2.css b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab2.css deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab2.tsx b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab2.tsx deleted file mode 100644 index 7a95a49..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/pages/Tab2.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; -import { useStoreState } from 'pullstate'; -import { Person } from '../components/Person'; -import { PeopleStore } from '../store'; -import { getFollowing } from '../store/Selectors'; -import './Tab2.css'; -import React from 'react'; - -const Tab2 = (): React.JSX.Element => { - const people = useStoreState(PeopleStore, getFollowing); - - return ( - - - - Following - - - - - - Following - - - - {people.map((person, index) => { - return ; - })} - - - ); -}; - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/PeopleStore.js b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/PeopleStore.js deleted file mode 100644 index f430293..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/PeopleStore.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Store } from 'pullstate'; - -import { people } from '../data'; - -const PeopleStore = new Store({ - people: people, -}); - -export const toggleFollowing = (personId) => { - PeopleStore.update((s) => { - const personIndex = s.people.findIndex((person) => person.id === personId); - s.people[personIndex].following = !s.people[personIndex].following; - }); -}; - -export default PeopleStore; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/Selectors.js b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/Selectors.js deleted file mode 100644 index 04e3218..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/Selectors.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = (state) => state; - -// Gets -export const getPeople = createSelector(getState, (state) => state.people); -export const getFollowing = createSelector(getState, (state) => - state.people.filter((person) => person.following) -); diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/index.js b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/index.js deleted file mode 100644 index 1e43c95..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/store/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as PeopleStore } from './PeopleStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/style.scss b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/theme/variables.scss deleted file mode 100644 index 8606e9f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoPullstateTutorial/theme/variables.scss +++ /dev/null @@ -1,79 +0,0 @@ -.demo-pullstate-tutorial { - /* Ionic Variables and Theming. For more info, please see: -http://ionicframework.com/docs/theming/ */ - - /** Ionic CSS Variables **/ - :root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab1.jsx deleted file mode 100644 index aaad468..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab1.jsx +++ /dev/null @@ -1,144 +0,0 @@ -import { - getPlatforms, - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonModal, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useRef, useState } from 'react'; -import { SkeletonDashboard } from '../components/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../components/CurrentWeather'; -import { useStoreState } from 'pullstate'; -import { QRStore } from '../store'; -import { getCodes } from '../store/Selectors'; -import useSound from 'use-sound'; -import openSound from '../sounds/open.wav'; -import { QRCodeScannedModal } from '../components/QRCodeScannedModal'; -import { QRWebModal } from '../components/QRWebModal'; -import { NoQRCodes } from '../components/NoQRCodes'; -import { CustomFab } from '../components/CustomFab.jsx'; - -function Tab1() { - const pageRef = useRef(null); - const codes = useStoreState(QRStore, getCodes); - const [play] = useSound(openSound); - - const [QRData, setQRData] = useState(false); - - const handleScan = (data) => { - if (data) { - setQRData(data); - play(); - handleSuccess(data); - } - }; - - const handleError = (err) => { - console.error(err); - }; - - const start = async () => { - const platforms = getPlatforms(); - const isWeb = - platforms.includes('desktop') || platforms.includes('mobileweb') || platforms.includes('pwa'); - - if (!isWeb) { - // const data = await BarcodeScanner.scan(); - - // if (data) { - // handleSuccess(data); - // } - const result = await CapacitorBarcodeScanner.scanBarcode({ - hint: CapacitorBarcodeScannerTypeHint.ALL, - scanInstructions: 'Please scan a barcode', - scanButton: true, - scanText: 'Scan', - cameraDirection: CapacitorBarcodeScannerCameraDirection.BACK, - scanOrientation: CapacitorBarcodeScannerScanOrientation.ADAPTIVE, - android: { - scanningLibrary: CapacitorBarcodeScannerAndroidScanningLibrary.ZXING, - }, - }); - handleSuccess(result.ScanResult); - } else { - presentWebModal({ - presentingElement: pageRef.current, - }); - } - }; - - const handleSuccess = (data) => { - setQRData(data); - console.log(data); - dismissWebModal(); - - play(); - present({ - presentingElement: pageRef.current, - }); - }; - - const [present, dismiss] = useIonModal(QRCodeScannedModal, { - dismiss: () => dismiss(), - code: QRData, - set: () => setQRData(), - scan: () => start(), - }); - - const [presentWebModal, dismissWebModal] = useIonModal(QRWebModal, { - dismiss: () => dismissWebModal(), - set: () => setQRData(), - scan: handleScan, - error: handleError, - }); - - const router = useIonRouter(); - function handleBackButtonClick() { - router.goBack(); - } - - return ( - - - - QR Codes - - handleBackButtonClick()} - > - - - - - - - - QR Codes - - - - {codes.length < 1 && } - {codes.length > 0 && } - - - - - ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab2.jsx deleted file mode 100644 index 216544f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../components/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/NOTES.md deleted file mode 100644 index e77ff3c..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0138 diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CustomFab.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CustomFab.jsx deleted file mode 100644 index 2e19fe8..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/CustomFab.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import { IonFab, IonFabButton, IonFabList, IonIcon } from '@ionic/react'; -import { addOutline, cameraOutline, qrCodeOutline } from 'ionicons/icons'; - -export const CustomFab = ({ start }) => { - return ( - - - - - - - - - - - - - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/NoQRCodes.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/NoQRCodes.jsx deleted file mode 100644 index 08e6bd3..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/NoQRCodes.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import { IonCol, IonRow, IonText } from '@ionic/react'; - -export const NoQRCodes = () => ( - - -

It looks like you don't have any QR codes stored.

- icon - -

- Click the button in the bottom right to scan a code or - generate a code. -

-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRCodeScannedModal.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRCodeScannedModal.jsx deleted file mode 100644 index 21f2c58..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRCodeScannedModal.jsx +++ /dev/null @@ -1,106 +0,0 @@ -import { - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCardHeader, - IonCardTitle, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonIcon, - IonNote, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonToast, -} from '@ionic/react'; -import QRCode from 'react-qr-code'; -import { addQRCode } from '../store/QRStore'; - -import useSound from 'use-sound'; -import closeSound from '../sounds/close.wav'; -import { reloadOutline } from 'ionicons/icons'; - -export const QRCodeScannedModal = ({ dismiss, code, set, scan }) => { - const [play] = useSound(closeSound); - const [showToast] = useIonToast(); - - const handleDismiss = () => { - dismiss(); - play(); - }; - - const handleScanAgain = () => { - handleDismiss(); - - setTimeout(() => { - scan(); - }, 10); - }; - - const handleAdd = async () => { - addQRCode(code.text ? code.text : code, true); - showToast({ - header: 'Success!', - message: 'QR Code stored successfully.', - duration: 3000, - color: 'primary', - }); - - handleDismiss(); - }; - - return ( - - - - View QR Code - - Close - - - - - - - - - - - - - - - - - QR Code data - This is what the code represents - - -

{code.text ? code.text : code}

-
-
-
-
- - - - - -   Scan again - - - - - Store → - - - -
-
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRWebModal.jsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRWebModal.jsx deleted file mode 100644 index 8d1775d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/QRWebModal.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -// import QrReader from "react-qr-reader"; - -export const QRWebModal = ({ dismiss, set, scan, error }) => { - return ( - - - - Scan QR Code - - Close - - - - - - - - - {/* - - */} - - - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/components/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/index.tsx deleted file mode 100644 index 9afe772..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; - -import { cloudOutline, searchOutline } from 'ionicons/icons'; -import { Route, Redirect } from 'react-router'; - -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; - -function DemoQrScanner() { - return ( - - - - - - - - - - - - - {/* */} - - - - Dashboard - - - - Search - - - - ); -} - -export default DemoQrScanner; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/close.wav b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/close.wav deleted file mode 100644 index 7ca4e4e..0000000 Binary files a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/close.wav and /dev/null differ diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/open.wav b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/open.wav deleted file mode 100644 index 78c8254..0000000 Binary files a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/sounds/open.wav and /dev/null differ diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/QRStore.js b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/QRStore.js deleted file mode 100644 index 2878652..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/QRStore.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Store } from 'pullstate'; - -const QRStore = new Store({ - codes: [], -}); - -export default QRStore; - -export const addQRCode = (data, scanned = false) => { - QRStore.update((s) => { - s.codes = [...s.codes, { id: new Date(), data, scanned }]; - }); -}; - -export const removeQRCode = (id) => { - QRStore.update((s) => { - s.codes = s.codes.filter((code) => code.id !== id); - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/Selectors.js b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/Selectors.js deleted file mode 100644 index d74c840..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/Selectors.js +++ /dev/null @@ -1,6 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = (state) => state; - -// General getters -export const getCodes = createSelector(getState, (state) => state.codes); diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/index.js b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/index.js deleted file mode 100644 index 18573c9..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/store/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as QRStore } from './QRStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/style.scss b/03_source/mobile.trunk.1/src/pages/DemoQrScanner/style.scss deleted file mode 100644 index 37c1e1a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQrScanner/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Home.jsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Home.jsx deleted file mode 100644 index 3769f25..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Home.jsx +++ /dev/null @@ -1,74 +0,0 @@ -import { - IonButtons, - IonContent, - IonGrid, - IonHeader, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonList, - IonMenuButton, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useStoreState } from 'pullstate'; -import { useState } from 'react'; -import { QuoteItem } from '../components/QuoteItem'; -import { QuoteStore } from '../store'; -import { getQuotes } from '../store/Selectors'; - -const Home = () => { - const quotes = useStoreState(QuoteStore, getQuotes); - const [amountLoaded, setAmountLoaded] = useState(20); - - const fetchMore = async (e) => { - setAmountLoaded((amountLoaded) => amountLoaded + 20); - e.target.complete(); - }; - - return ( - - - - - - - Home - - - - - - - Home - - - - - {/* TODO: the source of the quote is already broken */} - the source broken - - - - {quotes.map((quote, index) => { - if (index <= amountLoaded && quote.author) { - return ; - } else return ''; - })} - - - - - - - - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Quote.jsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Quote.jsx deleted file mode 100644 index fdc54b4..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Quote.jsx +++ /dev/null @@ -1,102 +0,0 @@ -import { - IonBackButton, - IonButton, - IonButtons, - IonCard, - IonCardContent, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonImg, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonToast, -} from '@ionic/react'; -import { bookmarkOutline, checkmarkOutline, copyOutline } from 'ionicons/icons'; -import { useStoreState } from 'pullstate'; -import { useEffect, useState } from 'react'; -import { useParams } from 'react-router'; -import { QuoteStore } from '../store'; -import { addSavedQuote, removeSavedQuote } from '../store/QuoteStore'; -import { getQuote, getSavedQuotes } from '../store/Selectors'; - -import { Clipboard } from '@capacitor/clipboard'; - -const Quote = () => { - const { id } = useParams(); - const quote = useStoreState(QuoteStore, getQuote(id)); - const saved = useStoreState(QuoteStore, getSavedQuotes); - const [bookmarked, setBookmarked] = useState(false); - - const [present] = useIonToast(); - - useEffect(() => { - setBookmarked(saved.includes(parseInt(id))); - }, [saved, id]); - - const copyQuote = async () => { - await Clipboard.write({ - string: quote.text, - }); - - present({ - header: 'Success', - message: 'Quote copied to clipboard!', - duration: 2500, - color: 'primary', - }); - }; - - return ( - - - - - - - Quote - - - - - - - Quote - - - - - - -

{quote.text}

-

- {quote.author}

-
- - - - (bookmarked ? removeSavedQuote(quote.id) : addSavedQuote(quote.id))} - > - -  {bookmarked ? 'Bookmarked' : 'Save as Bookmark'} - - - - - - -  Copy Quote - - - -
-
-
- ); -}; - -export default Quote; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Saved.jsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Saved.jsx deleted file mode 100644 index 9b6e340..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/AppPages/Saved.jsx +++ /dev/null @@ -1,83 +0,0 @@ -import { - IonButtons, - IonCol, - IonContent, - IonGrid, - IonHeader, - IonInfiniteScroll, - IonInfiniteScrollContent, - IonList, - IonMenuButton, - IonPage, - IonRow, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useStoreState } from 'pullstate'; -import { useState } from 'react'; -import { QuoteItem } from '../components/QuoteItem'; -import { QuoteStore } from '../store'; -import { getQuotes, getSavedQuotes } from '../store/Selectors'; - -const Saved = () => { - const quotes = useStoreState(QuoteStore, getQuotes); - const saved = useStoreState(QuoteStore, getSavedQuotes); - const [amountLoaded, setAmountLoaded] = useState(20); - - const fetchMore = async (e) => { - setAmountLoaded((amountLoaded) => amountLoaded + 20); - e.target.complete(); - }; - - return ( - - - - - - - Bookmarks - - - - - - - Bookmarks - - - - - {quotes.length > 0 && ( - - - {quotes.map((quote, index) => { - if (index <= amountLoaded && saved.includes(parseInt(quote.id))) { - return ; - } else return ''; - })} - - - - - - - )} - - {quotes.length < 1 && ( - - -

You haven't saved any bookmarks yet.

-
-
- )} -
-
-
- ); -}; - -export default Saved; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/NOTES.md deleted file mode 100644 index bc5c8ee..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0140 diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.css b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.css deleted file mode 100644 index 0ca47a2..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.css +++ /dev/null @@ -1,113 +0,0 @@ -ion-menu ion-content { - --background: var(--ion-item-background, var(--ion-background-color, #fff)); -} - -ion-menu.md ion-content { - --padding-start: 8px; - --padding-end: 8px; - --padding-top: 20px; - --padding-bottom: 20px; -} - -ion-menu.md ion-list { - padding: 20px 0; -} - -ion-menu.md ion-note { - margin-bottom: 30px; -} - -ion-menu.md ion-list-header, ion-menu.md ion-note { - padding-left: 10px; -} - -ion-menu.md ion-list#inbox-list { - border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); -} - -ion-menu.md ion-list#inbox-list ion-list-header { - font-size: 22px; - font-weight: 600; - min-height: 20px; -} - -ion-menu.md ion-list#labels-list ion-list-header { - font-size: 16px; - margin-bottom: 18px; - color: #757575; - min-height: 26px; -} - -ion-menu.md ion-item { - --padding-start: 10px; - --padding-end: 10px; - border-radius: 4px; -} - -ion-menu.md ion-item.selected { - --background: rgba(var(--ion-color-primary-rgb), 0.14); -} - -ion-menu.md ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.md ion-item ion-icon { - color: #616e7e; -} - -ion-menu.md ion-item ion-label { - font-weight: 500; -} - -ion-menu.ios ion-content { - --padding-bottom: 20px; -} - -ion-menu.ios ion-list { - padding: 20px 0 0 0; -} - -ion-menu.ios ion-note { - line-height: 24px; - margin-bottom: 20px; -} - -ion-menu.ios ion-item { - --padding-start: 16px; - --padding-end: 16px; - --min-height: 50px; -} - -ion-menu.ios ion-item ion-icon { - font-size: 24px; - color: #73849a; -} - -ion-menu.ios ion-item .selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.ios ion-list#labels-list ion-list-header { - margin-bottom: 8px; -} - -ion-menu.ios ion-list-header, -ion-menu.ios ion-note { - padding-left: 16px; - padding-right: 16px; -} - -ion-menu.ios ion-note { - margin-bottom: 8px; -} - -ion-note { - display: inline-block; - font-size: 16px; - color: var(--ion-color-medium-shade); -} - -ion-item.selected { - --color: var(--ion-color-primary); -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.jsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.jsx deleted file mode 100644 index a8bba47..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/Menu.jsx +++ /dev/null @@ -1,67 +0,0 @@ -import { - IonContent, - IonIcon, - IonItem, - IonLabel, - IonList, - IonListHeader, - IonMenu, - IonMenuToggle, - IonNote, -} from '@ionic/react'; - -import { useLocation } from 'react-router-dom'; -import { bookmarkOutline, bookmarkSharp, homeOutline, homeSharp } from 'ionicons/icons'; -import './Menu.css'; -import { useStoreState } from 'pullstate'; -import { QuoteStore } from '../store'; -import { getSavedQuotes } from '../store/Selectors'; - -const Menu = () => { - const location = useLocation(); - const saved = useStoreState(QuoteStore, getSavedQuotes); - - const appPages = [ - { - title: 'Home', - url: '/home', - iosIcon: homeOutline, - mdIcon: homeSharp, - }, - { - title: `Bookmarks (${saved.length})`, - url: '/saved', - iosIcon: bookmarkOutline, - mdIcon: bookmarkSharp, - }, - ]; - - return ( - - - - Ionic Quotes - hey there! - {appPages.map((appPage, index) => { - return ( - - - - {appPage.title} - - - ); - })} - - - - ); -}; - -export default Menu; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.jsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.jsx deleted file mode 100644 index 2154d3d..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import { IonCol, IonItem, IonLabel } from '@ionic/react'; -import styles from './QuoteItem.module.css'; - -export const QuoteItem = ({ quote }) => { - return ( - - - -

{quote.text}

-

{quote.author}

-
-
-
- ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.module.css b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.module.css deleted file mode 100644 index 8baadf6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/components/QuoteItem.module.css +++ /dev/null @@ -1,21 +0,0 @@ -.quoteItem { - - --quote-item-background: rgb(49, 117, 226); - - border: 2px solid rgb(154, 204, 245); - border-radius: 10px; - --background: var(--quote-item-background); - background: var(--quote-item-background); - color: white; - padding: 1rem; -} - -.quoteText p { - - color: rgb(25, 51, 93); -} - -.quoteText h1:hover { - - color: white; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/index.tsx deleted file mode 100644 index 765c40a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Route, Redirect } from 'react-router'; -// -import Quote from './AppPages/Quote'; -import Saved from './AppPages/Saved'; -import Home from './AppPages/Home'; -// -const DemoQuoteApp = () => { - return ( - <> - - - - - - - - - - - - - - - ); -}; - -export default DemoQuoteApp; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/QuoteStore.js b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/QuoteStore.js deleted file mode 100644 index 87d0d15..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/QuoteStore.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Store } from 'pullstate'; - -const QuoteStore = new Store({ - quotes: [], - saved: [], -}); - -export default QuoteStore; - -export const addSavedQuote = (id) => { - QuoteStore.update((s) => { - s.saved = [...s.saved, id]; - }); -}; - -export const removeSavedQuote = (id) => { - QuoteStore.update((s) => { - s.saved = s.saved.filter((savedId) => parseInt(savedId) !== parseInt(id)); - }); -}; - -export const fetchQuotes = async () => { - const response = await fetch('https://type.fit/api/quotes'); - const data = await response.json(); - - await data.filter((quote, index) => { - quote.id = Date.now() + index; - quote.image = `https://source.unsplash.com/random/1200x400?sig=${quote.id}`; - }); - - QuoteStore.update((s) => { - s.quotes = data; - }); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/Selectors.js b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/Selectors.js deleted file mode 100644 index ac9aeae..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/Selectors.js +++ /dev/null @@ -1,14 +0,0 @@ -import { createSelector } from 'reselect'; - -const getState = (state) => state; - -// General getters -export const getQuotes = createSelector(getState, (state) => state.quotes); -export const getSavedQuotes = createSelector(getState, (state) => state.saved); - -// Specific getters -export const getQuote = (id) => - createSelector( - getState, - (state) => state.quotes.filter((q) => parseInt(q.id) === parseInt(id))[0] - ); diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/index.js b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/index.js deleted file mode 100644 index 71a69f1..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/store/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as QuoteStore } from './QuoteStore'; diff --git a/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/style.scss b/03_source/mobile.trunk.1/src/pages/DemoQuoteApp/style.scss deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/NOTES.md deleted file mode 100644 index 18c63ae..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0141 diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 950c702..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/DemoReactAddToCart/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 455cec6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,122 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.module.css b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.module.css deleted file mode 100644 index 3af5d30..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.module.css +++ /dev/null @@ -1,14 +0,0 @@ -.buttonContainer { - display: flex; - flex-direction: column; - justify-content: center; - align-content: center; - align-items: center; -} - -.button { - --padding-top: 1.75rem; - --padding-bottom: 1.75rem; - --padding-start: 1.75rem; - --padding-end: 1.75rem; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.tsx deleted file mode 100644 index 82a1789..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/AddToCartButton.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { CreateAnimation, IonButton, IonIcon } from '@ionic/react'; -import React, { useRef, useState } from 'react'; - -import styles from './AddToCartButton.module.css'; -import { cartOutline } from 'ionicons/icons'; - -const AddToCartButton = ({ - icon = true, - color = 'primary', - customOnClick = null, -}): React.JSX.Element => { - const iconRef = useRef(null); - const [hidden, setHidden] = useState(true); - - const floatStyle = { - display: hidden ? 'none' : '', - position: 'absolute', - }; - - const floatGrowAnimation = { - property: 'transform', - fromValue: 'translateY(0) scale(1)', - toValue: 'translateY(-55px) scale(1.2)', - }; - - const colorAnimation = { - property: 'color', - fromValue: 'white', - toValue: `var(--ion-color-${color}`, - }; - - const mainAnimation = { - duration: 700, - iterations: '1', - fromTo: [floatGrowAnimation, colorAnimation], - easing: 'cubic-bezier(0.25, 0.7, 0.25, 0.7)', - }; - - const handleClick = async () => { - setHidden(false); - await iconRef.current.animation.play(); - setHidden(true); - customOnClick && customOnClick(); - }; - - return ( -
- - {!icon && 'Add to cart'} - {icon && } - - - - - -
- ); -}; - -export default AddToCartButton; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.module.css b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.module.css deleted file mode 100644 index fa0f815..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.module.css +++ /dev/null @@ -1,19 +0,0 @@ -.priceContainer { - - display: flex; - flex-direction: row; - align-content: center; - justify-content: space-between; - align-items: center; -} - -.price { - - margin-top: 0.7rem; - border: 1px solid var(--ion-color-primary); - color: var(--ion-color-primary); - width: fit-content; - padding: 1rem; - border-radius: 10px; - font-weight: 600; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.tsx deleted file mode 100644 index 272efcb..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/components/Product.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardHeader, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonRow, - IonText, -} from '@ionic/react'; -import AddToCartButton from './AddToCartButton'; - -import styles from './Product.module.css'; - -const Product = ({ product }): React.JSX.Element => { - const handleAdd = (product) => { - console.log(`Product added: ${product.name}`); - console.log({ product }); - - // Do something - // Update Main Cart - // Global State Stuff - // API Call - // etc etc - }; - - return ( - - - {product.name} - {product.description} - - - - - - product - - - - - Product Features - {product.features.map((feature, index) => { - return

{feature}

; - })} -
-
-
- - -
{product.price}
- handleAdd(product)} /> -
-
-
-
- ); -}; - -export default Product; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/index.tsx deleted file mode 100644 index c0009af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/index.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -import './theme/variables.scss'; -import Home from './pages/Home'; - -function DemoReactAddToCart() { - return ( - - - {/* - - - - - - - */} - - - - - - - - - ); -} - -export default DemoReactAddToCart; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/module.d.ts b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/module.d.ts deleted file mode 100644 index d774364..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/module.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.module.css' { - const classes: { readonly [key: string]: string }; - export default classes; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.css b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.css deleted file mode 100644 index 2877bc5..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.css +++ /dev/null @@ -1,19 +0,0 @@ -.price-container { - - display: flex; - flex-direction: row; - align-content: center; - justify-content: space-between; - align-items: center; -} - -.price { - - margin-top: 0.7rem; - border: 1px solid var(--ion-color-primary); - color: var(--ion-color-primary); - width: fit-content; - padding: 1rem; - border-radius: 10px; - font-weight: 600; -} \ No newline at end of file diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.tsx deleted file mode 100644 index 50ee6ee..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/Home.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import './Home.css'; -import Product from '../components/Product'; -import { products } from './products'; -import React from 'react'; -import { chevronBackOutline } from 'ionicons/icons'; - -const Home = (): React.JSX.Element => { - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - return ( - - - - Add To Cart Animation - - - handleBackClick()}> - - - - - - - {products.map((product) => { - return ; - })} - - - ); -}; - -export default Home; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/products.ts b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/products.ts deleted file mode 100644 index 8dbab04..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/pages/products.ts +++ /dev/null @@ -1,44 +0,0 @@ -export const products = [ - { - id: 1, - name: 'Macbook Pro', - description: "13.3' (2020) - M1, 256 GB SSD, Space Grey", - price: '£1,199', - image: '/assets/DemoReactAddToCart/macbook.jpeg', - features: [ - 'macOS 11.0 Big Sur', - 'Apple M1 chip', - 'RAM: 8 GB / Storage: 256 GB SSD', - 'Retina display', - 'Battery life: Up to 20 hours', - ], - }, - { - id: 2, - name: 'SONY A7', - description: 'SONY a7 III Mirrorless Camera - Black', - price: '£1,699', - image: '/assets/DemoReactAddToCart/camera.jpeg', - features: [ - '24.2 megapixels', - 'Full-frame 35 mm / 35.6 x 23.8 mm CMOS sensor', - 'Built-in WiFi / Bluetooth / NFC', - "3' tiltable LCD touchscreen", - '10 fps in continuous shooting mode', - ], - }, - { - id: 3, - name: 'HISENSE 55', - description: "55' Smart 4K Ultra HD HDR LED TV", - price: '£429', - image: '/assets/DemoReactAddToCart/tv.jpeg', - features: [ - 'Picture quality: 1600 PCI', - 'HDR: HDR10 / Hybrid Log-Gamma (HLG)', - 'Catch-up TV & 4K streaming', - 'Freeview HD with Freeview Play', - 'HDMI 2.0 x 3', - ], - }, -]; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/style.scss b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/style.scss deleted file mode 100644 index e5ac297..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/style.scss +++ /dev/null @@ -1,103 +0,0 @@ -#about-page { - ion-toolbar { - position: absolute; - - top: 0; - left: 0; - right: 0; - - --background: transparent; - --color: white; - } - - ion-toolbar ion-back-button, - ion-toolbar ion-button, - ion-toolbar ion-menu-button { - --color: white; - } - - .about-header { - position: relative; - - width: 100%; - height: 30%; - } - - .about-header .about-image { - position: absolute; - - top: 0; - left: 0; - bottom: 0; - right: 0; - - background-position: center; - background-size: cover; - background-repeat: no-repeat; - - opacity: 0; - - transition: opacity 500ms ease-in-out; - } - - .about-header .madison { - background-image: url('/assets/DemoReactAddToCart/WeatherDemo/img/about/madison.jpg'); - } - - .about-header .austin { - background-image: url('/assets/DemoReactAddToCart/WeatherDemo/img/about/austin.jpg'); - } - - .about-header .chicago { - background-image: url('/assets/DemoReactAddToCart/WeatherDemo/img/about/chicago.jpg'); - } - - .about-header .seattle { - background-image: url('/assets/DemoReactAddToCart/WeatherDemo/img/about/seattle.jpg'); - } - - .about-info { - position: relative; - margin-top: -10px; - border-radius: 10px; - background: var(--ion-background-color, #fff); - z-index: 2; // display rounded border above header image - } - - .about-info h3 { - margin-top: 0; - } - - .about-info ion-list { - padding-top: 0; - } - - .about-info p { - line-height: 130%; - - color: var(--ion-color-dark); - } - - .about-info ion-icon { - margin-inline-end: 32px; - } - - /* - * iOS Only - */ - - .ios .about-info { - --ion-padding: 19px; - } - - .ios .about-info h3 { - font-weight: 700; - } -} - -#date-input-popover { - --offset-y: -var(--ion-safe-area-bottom); - - --max-width: 90%; - --width: 336px; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/theme/variables.scss b/03_source/mobile.trunk.1/src/pages/DemoReactAddToCart/theme/variables.scss deleted file mode 100644 index e69de29..0000000 diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab1.jsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab1.jsx deleted file mode 100644 index a24d76a..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab1.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - IonButton, - IonButtons, - IonCol, - IonContent, - IonHeader, - IonIcon, - IonPage, - IonRow, - IonTitle, - IonToolbar, - useIonRouter, -} from '@ionic/react'; - -import { Geolocation } from '@capacitor/geolocation'; -import { useEffect, useState } from 'react'; -import { SkeletonDashboard } from '../TestComponents/SkeletonDashboard'; -import { chevronBackOutline, refreshOutline } from 'ionicons/icons'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab1() { - const router = useIonRouter(); - - const [currentWeather, setCurrentWeather] = useState(false); - - useEffect(() => { - getCurrentPosition(); - }, []); - - const getCurrentPosition = async () => { - setCurrentWeather(false); - const coordinates = await Geolocation.getCurrentPosition(); - getAddress(coordinates.coords); - }; - - const getAddress = async (coords) => { - const query = `${coords.latitude},${coords.longitude}`; - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${query}` - ); - - const data = await response.json(); - console.log(data); - setCurrentWeather(data); - }; - - // const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - - return ( - - - - My Weather - - - getCurrentPosition()}> - - - - - - handleBackClick()}> - - - - - - - - - Dashboard - - - - - -

Here's your location based weather

-
-
- -
- {currentWeather ? ( - - ) : ( - - )} -
-
-
- ); -} - -export default Tab1; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab2.jsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab2.jsx deleted file mode 100644 index c258179..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/AppPages/Tab2.jsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - IonButton, - IonCol, - IonContent, - IonHeader, - IonPage, - IonRow, - IonSearchbar, - IonTitle, - IonToolbar, -} from '@ionic/react'; -import { useState } from 'react'; -import { CurrentWeather } from '../TestComponents/CurrentWeather'; - -function Tab2() { - const [search, setSearch] = useState(''); - const [currentWeather, setCurrentWeather] = useState(false); - - const performSearch = async () => { - getAddress(search); - }; - - const getAddress = async (city) => { - const response = await fetch( - `https://api.weatherapi.com/v1/current.json?key=f93eb660b2424258bf5155016210712&q=${city}&aqi=no` - ); - const data = await response.json(); - - if (data && data.current && data.location) { - setCurrentWeather(data); - } - }; - - return ( - - - - Search - - - - - - Search - - - - - - setSearch(e.target.value)} - /> - - - - - Search - - - - -
- {currentWeather ? ( - - ) : ( -

Your search result will appear here

- )} -
-
-
- ); -} - -export default Tab2; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/NOTES.md b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/NOTES.md deleted file mode 100644 index c8b12fa..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -# REQ0142 diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/WeatherProperty.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/WeatherProperty.tsx deleted file mode 100644 index 52949af..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/WeatherProperty.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { IonCardSubtitle, IonCol, IonIcon, IonNote, IonRow } from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; -import { useEffect, useState } from 'react'; - -export const WeatherProperty = ({ type, currentWeather }: { type: any; currentWeather: any }) => { - const [property, setProperty] = useState(false); - - const properties = { - wind: { - isIcon: false, - icon: '/assets/WeatherDemo/wind.png', - alt: 'wind', - label: 'Wind', - value: `${currentWeather.current.wind_mph}mph`, - }, - feelsLike: { - isIcon: true, - icon: thermometerOutline, - alt: 'feels like', - label: 'Feels like', - value: `${currentWeather.current.feelslike_c}°C`, - }, - indexUV: { - isIcon: true, - icon: sunnyOutline, - alt: 'index uv', - label: 'Index UV', - value: currentWeather.current.uv, - }, - pressure: { - isIcon: true, - icon: pulseOutline, - alt: 'pressure', - label: 'Pressure', - value: `${currentWeather.current.pressure_mb} mbar`, - }, - }; - - useEffect(() => { - setProperty(properties[type]); - }, [type]); - - return ( - - - - {!property.isIcon && ( - {property.alt} - )} - {property.isIcon && ( - - )} - - - - {property.label} - {property.value} - - - - ); -}; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/index.tsx deleted file mode 100644 index ceb4332..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/CurrentWeather/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { IonCard, IonCardContent, IonGrid, IonRow, IonText, IonCardTitle } from '@ionic/react'; -import { WeatherProperty } from './WeatherProperty'; - -export const CurrentWeather = ({ currentWeather }: { currentWeather: any }) => ( - - - - -

- {currentWeather.location.region},{' '} - {currentWeather.location.country} -

-
- -
- condition - - -

{currentWeather.current.condition.text}

-
- - -

{new Date(currentWeather.location.localtime).toDateString()}

-
-
- - - {currentWeather.current.temp_c}℃ - - - - - - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/SkeletonDashboard/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/SkeletonDashboard/index.tsx deleted file mode 100644 index 234fb9b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/TestComponents/SkeletonDashboard/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { - IonCard, - IonCardContent, - IonCardSubtitle, - IonCardTitle, - IonCol, - IonGrid, - IonIcon, - IonNote, - IonRow, - IonSkeletonText, - IonText, - IonThumbnail, -} from '@ionic/react'; -import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons'; - -export const SkeletonDashboard = () => ( - - - - -

- -

-
- -
- - - - - -

- -

-
- - -

- -

-
-
- - - - - - - - - - - wind - - - - Wind - - - - - - - - - - - - - - - Feels like - - - - - - - - - - - - - - - - - Index UV - - - - - - - - - - - - - - - Pressure - - - - - - - - -
-
-
-); diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.module.scss b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.module.scss deleted file mode 100644 index d4adbd4..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.module.scss +++ /dev/null @@ -1,20 +0,0 @@ -.demo-react-calculator { - .button, - .specialButton { - margin: 0.2rem; - padding: 1.5rem; - margin: 0.2rem; - border-radius: 15px; - font-size: 1.5rem; - } - - .button { - color: rgb(255, 255, 255); - background-color: rgb(58, 58, 58); - } - - .specialButton { - color: rgb(255, 255, 255); - background-color: var(--blue-color); - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.tsx deleted file mode 100644 index 398d37b..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/Button.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { IonCol } from '@ionic/react'; -import styles from './Button.module.scss'; - -const Button = (props): React.JSX.Element => { - const { value, special, clickEvent } = props; - - return ( - clickEvent(e, value)} - > - {value === '/' ? <>÷ : value === '*' ? <>× : value} - - ); -}; - -export default Button; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.module.scss b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.module.scss deleted file mode 100644 index 216fb37..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.module.scss +++ /dev/null @@ -1,4 +0,0 @@ -.demo-react-calculator { - .buttonRow { - } -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.tsx deleted file mode 100644 index 375c87f..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/components/ButtonRow.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IonRow } from '@ionic/react'; -import styles from './ButtonRow.module.scss'; -import React from 'react'; - -const ButtonRow = (props): React.JSX.Element => { - return {props.children}; -}; - -export default ButtonRow; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/index.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/index.tsx deleted file mode 100644 index ee886a6..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { IonRouterOutlet, IonTabs } from '@ionic/react'; - -import { Route, Redirect } from 'react-router'; - -import './theme/variables.scss'; -import React from 'react'; -import Home from './pages/Home'; - -function DemoReactCalculator(): React.JSX.Element { - return ( - - - - - - - - - - ); -} - -export default DemoReactCalculator; diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/module.d.ts b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/module.d.ts deleted file mode 100644 index 77bc4ab..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/module.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module '*.module.css' { - const classes: { readonly [key: string]: string }; - export default classes; -} -declare module '*.module.scss' { - const classes: { readonly [key: string]: string }; - export default classes; -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.module.scss b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.module.scss deleted file mode 100644 index a9d7f48..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.module.scss +++ /dev/null @@ -1,40 +0,0 @@ -.calculatorContainer { - padding-bottom: 2.5rem; - background-color: white; - padding-left: 1rem; - padding-right: 1rem; -} - -.sumContainer { - display: flex; - flex-direction: column; - align-content: center; - align-items: flex-end; - padding-right: 2rem; - margin-top: 2rem; - - background-color: rgba(99, 158, 226, 0.1); - padding: 2rem; - padding-top: 4rem; - padding-bottom: 4rem; -} - -.sumContainer h1, -.sumContainer h4, -.sumContainer p { - margin: 0; - padding: 0; -} - -.sumContainer h1 { - font-size: 4rem; -} - -.sumContainer p { - font-size: 2rem; - color: rgb(163, 163, 163); -} - -.sumContainer h4 { - color: rgb(197, 197, 197); -} diff --git a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.tsx b/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.tsx deleted file mode 100644 index e6e8e02..0000000 --- a/03_source/mobile.trunk.1/src/pages/DemoReactCalculator/pages/Home.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { - IonButton, - IonButtons, - IonContent, - IonFooter, - IonGrid, - IonHeader, - IonIcon, - IonPage, - IonToolbar, - useIonRouter, -} from '@ionic/react'; -import React, { useEffect, useState } from 'react'; -import Button from '../components/Button'; -import ButtonRow from '../components/ButtonRow'; -import styles from './Home.module.scss'; - -import { - checkmarkOutline, - chevronBackOutline, - chevronDownCircleOutline, - closeOutline, - heart, - languageOutline, - menuOutline, -} from 'ionicons/icons'; - -import { buttons } from '../utils/Buttons'; - -const Home = (): React.JSX.Element => { - const [showTitle, setShowTitle] = useState('_______'); - const [sum, setSum] = useState('0'); - const [sumHistory, setSumHistory] = useState('Ionic Calculator'); - - const handleClick = (e, operator) => { - const tempSumHistory = sumHistory.replace('Ionic Calculator', ''); - - if (operator === '=') { - calculate(); - } else if (operator === 'C') { - reset(); - } else if (operator === 'Del') { - backspace(); - } else { - setSumHistory(tempSumHistory + operator); - - e.target.classList.add('animate__headShake'); - - setTimeout(() => { - e.target.classList.remove('animate__headShake'); - }, 500); - } - }; - - useEffect(() => { - calculate(); - }, [sumHistory]); - - const calculate = () => { - try { - // eslint-disable-next-line no-eval - setSum(eval(sumHistory).length > 5 ? eval(sumHistory).toFixed(4) : eval(sumHistory)); - setShowTitle('Ionic Calculator'); - } catch (e) {} - }; - - const reset = () => { - setSumHistory('Ionic Calculator'); - setSum('0'); - setShowTitle('_______'); - }; - - const backspace = () => { - const tempSum = sumHistory.substr(0, sumHistory.length - 1); - setSumHistory(tempSum); - }; - - const router = useIonRouter(); - function handleBackClick() { - router.goBack(); - } - return ( - - - - - handleBackClick()}> - - - - - - -
- {showTitle &&

{showTitle}

} -

{sumHistory}

-

- {sum.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')} -

-
-
- - - - {buttons.map((buttonRow, index) => { - return ( - - {buttonRow.map((button) => { - return ( -