Skip to content

Commit

Permalink
Updated packages, installed PrettierJS, created CustomToolbar component
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-merkas committed May 9, 2022
1 parent bf1aa73 commit d9369f4
Show file tree
Hide file tree
Showing 31 changed files with 21,954 additions and 17,495 deletions.
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,93 @@ dist

# TernJS port file
.tern-port

### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### JetBrains+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

# End of https://www.toptal.com/developers/gitignore/api/jetbrains+all
63 changes: 63 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added .prettierignore
Binary file not shown.
58 changes: 27 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GPlates App

The “GPlates-in-schools” program is funded by [AuScope](https://www.auscope.org.au/), comprising a GPlates app with integrated lesson plans, to provide an Earth Science-focused education engagement initiative.
The “GPlates-in-schools” program is funded by [AuScope](https://www.auscope.org.au/), comprising a GPlates app with integrated lesson plans, to provide an Earth Science-focused education engagement initiative.

## How to contribute code

Expand All @@ -24,19 +24,19 @@ The following steps worked on my Macbook Pro.

## Serve as a web page

- `npm install -g serve`
- `serve -s build`
- `ionic serve`

Or
or

- `npm start`
- `npm install -g serve`
- `serve -s build`

## Deploy on Android device

- `npx cap open android`
- choose your device and click the "run" button in Android Studio

Or
Or

- Run `ionic capacitor run android` and select your device

Expand All @@ -45,24 +45,24 @@ Or
- `ionic capacitor copy ios`
- Open XCode with `npx cap open ios`
- Add an account with your Apple ID and choose the team under "signing&capabilities" in XCode
<img width="800" alt="add account" src="https://user-images.githubusercontent.com/2688316/167048512-49d68826-ff34-4b48-8a89-45f6ae194f04.png">
<img width="800" alt="select team" src="https://user-images.githubusercontent.com/2688316/167048695-05d4bc9c-eb0f-4c6a-a109-b0f02c43a281.png">
If you get a profile error, select the device can fix the error.
<img width="800" alt="select device" src="https://user-images.githubusercontent.com/2688316/167048749-1cda74f4-4551-4a70-b431-f515d3ec4bf8.png">
<img width="800" alt="add account" src="https://user-images.githubusercontent.com/2688316/167048512-49d68826-ff34-4b48-8a89-45f6ae194f04.png">
<img width="800" alt="select team" src="https://user-images.githubusercontent.com/2688316/167048695-05d4bc9c-eb0f-4c6a-a109-b0f02c43a281.png">
If you get a profile error, select the device can fix the error.
<img width="800" alt="select device" src="https://user-images.githubusercontent.com/2688316/167048749-1cda74f4-4551-4a70-b431-f515d3ec4bf8.png">

- Run the app in XCode or run this command `ionic capacitor run ios -l --external`
- On your ios device, go to "Settings > General > Device Management" to trust the developer

## Some random notes

* nvm use 16
* source ./set-env.sh
* ionic capacitor add android
* ionic capacitor run android
* ionic capacitor run ios
* npx cap open android
* npx cap serve
* npx cap open ios
- nvm use 16
- source ./set-env.sh
- ionic capacitor add android
- ionic capacitor run android
- ionic capacitor run ios
- npx cap open android
- npx cap serve
- npx cap open ios

#### use chrome inspect to debug android chrome://inspect/#devices

Expand All @@ -76,38 +76,36 @@ Use [cordova-res](https://www.npmjs.com/package/cordova-res) to generate icon an

https://cordova.apache.org

* WebView-based
* time-saving, easier to maintain and cost-effective
- WebView-based
- time-saving, easier to maintain and cost-effective

#### Ionic

https://ionicframework.com

* based on Cordova and support moden frameworks, such as React, Angular, Vue.
- based on Cordova and support moden frameworks, such as React, Angular, Vue.

#### React Native

https://reactnative.dev

* not web-based
* learning curve???
* work with cesiumjs??? https://github.com/CesiumGS/cesium/issues/7629#issuecomment-531862873

- not web-based
- learning curve???
- work with cesiumjs??? https://github.com/CesiumGS/cesium/issues/7629#issuecomment-531862873

## 3D globe candidates

#### Cesiumjs

https://cesium.com/platform/cesiumjs/

* We already have experience with it. Easy to find support.
- We already have experience with it. Easy to find support.

#### globe.gl

https://globe.gl

* small, unfamiliar, hard to find help

- small, unfamiliar, hard to find help

#### Use the following command to extent/resize image

Expand All @@ -117,7 +115,7 @@ resize the gplates-logo-3152x2732.png to 1000x1000 and put the resized image at

`convert gplates-logo-3152x2732.png -resize 1024x1024 -background 'rgba(0,0,0,0)' -gravity center -extent 1024x1024 icon.png`

`convert gplates-logo-3152x2732.png -resize 200 -background 'rgba(0,0,0,0)' -gravity center -extent 432x432 icon-background.png`
`convert gplates-logo-3152x2732.png -resize 200 -background 'rgba(0,0,0,0)' -gravity center -extent 432x432 icon-background.png`

`cordova-res ios --skip-config --copy`

Expand All @@ -134,5 +132,3 @@ https://github.com/michaelchin/docker-geoserver
http://localhost:8600/geoserver/web/

`docker-compose -f docker-compose-build.yml up -d --build`


48 changes: 24 additions & 24 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"appId": "earthbyte.gplates.edu",
"appName": "GPlates In Schools",
"webDir": "build",
"bundledWebRuntime": false,
"server": {
"cleartext": true
},
"plugins": {
"SplashScreen": {
"launchShowDuration": 3000,
"launchAutoHide": true,
"backgroundColor": "#ffffffff",
"androidSplashResourceName": "splash",
"androidScaleType": "CENTER_CROP",
"showSpinner": true,
"androidSpinnerStyle": "large",
"iosSpinnerStyle": "small",
"spinnerColor": "#999999",
"splashFullScreen": true,
"splashImmersive": true,
"layoutName": "launch_screen",
"useDialog": false
}
}
"appId": "earthbyte.gplates.edu",
"appName": "GPlates In Schools",
"webDir": "build",
"bundledWebRuntime": false,
"server": {
"cleartext": true
},
"plugins": {
"SplashScreen": {
"launchShowDuration": 3000,
"launchAutoHide": true,
"backgroundColor": "#ffffffff",
"androidSplashResourceName": "splash",
"androidScaleType": "CENTER_CROP",
"showSpinner": true,
"androidSpinnerStyle": "large",
"iosSpinnerStyle": "small",
"spinnerColor": "#999999",
"splashFullScreen": true,
"splashImmersive": true,
"layoutName": "launch_screen",
"useDialog": false
}
}
}
48 changes: 24 additions & 24 deletions android/app/src/main/assets/capacitor.plugins.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[
{
"pkg": "@capacitor/app",
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
},
{
"pkg": "@capacitor/browser",
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
},
{
"pkg": "@capacitor/haptics",
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
},
{
"pkg": "@capacitor/keyboard",
"classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
},
{
"pkg": "@capacitor/splash-screen",
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
},
{
"pkg": "@capacitor/status-bar",
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
}
{
"pkg": "@capacitor/app",
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
},
{
"pkg": "@capacitor/browser",
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
},
{
"pkg": "@capacitor/haptics",
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
},
{
"pkg": "@capacitor/keyboard",
"classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
},
{
"pkg": "@capacitor/splash-screen",
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
},
{
"pkg": "@capacitor/status-bar",
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
}
]
Loading

0 comments on commit d9369f4

Please sign in to comment.