diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 00000000..c671bac2 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,43 @@ +name: iOS + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Gluon's GraalVM + uses: gluonhq/setup-graalvm@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: Apple-Actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.GLUON_IOS_CERTIFICATES_FILE_BASE64 }} + p12-password: ${{ secrets.GLUON_IOS_CERTIFICATES_PASSWORD }} + + - uses: Apple-Actions/download-provisioning-profiles@v1 + with: + bundle-id: com.dlsc.jfxcentral + issuer-id: ${{ secrets.GLUON_IOS_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.GLUON_IOS_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.GLUON_IOS_APPSTORE_PRIVATE_KEY }} + + - name: Gluon License + uses: gluonhq/gluon-build-license@v1 + with: + gluon-license: ${{ secrets.GLUON_LICENSE }} + + - name: Gluon Build + run: ./mvnw -pl app -Pios gluonfx:build gluonfx:package + + - uses: Apple-Actions/upload-testflight-build@master + with: + app-path: app/target/gluonfx/arm64-ios/app.ipa + issuer-id: ${{ secrets.GLUON_IOS_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.GLUON_IOS_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.GLUON_IOS_APPSTORE_PRIVATE_KEY }} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 3a10b245..41b2ebca 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,2 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar \ No newline at end of file diff --git a/app/pom.xml b/app/pom.xml index 2fc983a9..91caf8b5 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -16,6 +16,20 @@ true + 1.0.21 + 0.0.8 + com.dlsc.jfxcentral2.app.JFXCentral2App + JFXCentral for anything JavaFX + + + + + + + + + + @@ -409,17 +423,51 @@ org.openjfx javafx-maven-plugin - 0.0.8 + ${javafx.plugin.version} - com.dlsc.jfxcentral2.app.JFXCentral2App + ${mainClassName} + + + com.gluonhq + gluonfx-maven-plugin + ${gluonfx.plugin.version} + + ${gluonfx.target} + + display + lifecycle + statusbar + storage + browser + video + + ${mainClassName} + + Gluon + ${app.description} + ${package.type} + + ${mac.app.store} + ${bundle.short.version} + ${bundle.version} + + ${version.code} + ${provided.keystore.path} + ${provided.keystore.password} + ${provided.key.alias} + ${provided.key.alias.password} + + + + one.jpro jpro-maven-plugin ${jpro.version} - com.dlsc.jfxcentral2.app.JFXCentral2App + ${mainClassName} jfxcentral -Ddevelop=false 8088 @@ -448,4 +496,60 @@ + + + + desktop + + true + + + host + + + + mac + + pkg + false + ${env.GITHUB_RUN_NUMBER} + 1.0 + + + + macstore + + pkg + true + 1.${env.GITHUB_RUN_NUMBER} + 1.6 + + + + ios + + ios + ${env.GITHUB_RUN_NUMBER} + 1.0 + + + + android + + android + com.gluonhq.samples.hellogluon + ${env.GITHUB_RUN_NUMBER} + ${env.GLUON_ANDROID_KEYSTOREPATH} + ${env.GLUON_ANDROID_KEYSTORE_PASSWORD} + ${env.GLUON_ANDROID_KEYALIAS} + ${env.GLUON_ANDROID_KEYALIAS_PASSWORD} + + + + pi + + linux-aarch64 + + + diff --git a/app/src/android/mipmap-hdpi/jfxcentral.png b/app/src/android/mipmap-hdpi/jfxcentral.png new file mode 100644 index 00000000..90acf93c Binary files /dev/null and b/app/src/android/mipmap-hdpi/jfxcentral.png differ diff --git a/app/src/android/mipmap-mdpi/jfxcentral.png b/app/src/android/mipmap-mdpi/jfxcentral.png new file mode 100644 index 00000000..c36e32d6 Binary files /dev/null and b/app/src/android/mipmap-mdpi/jfxcentral.png differ diff --git a/app/src/android/mipmap-xhdpi/jfxcentral.png b/app/src/android/mipmap-xhdpi/jfxcentral.png new file mode 100644 index 00000000..d79c07c0 Binary files /dev/null and b/app/src/android/mipmap-xhdpi/jfxcentral.png differ diff --git a/app/src/android/mipmap-xxhdpi/jfxcentral.png b/app/src/android/mipmap-xxhdpi/jfxcentral.png new file mode 100644 index 00000000..50e14486 Binary files /dev/null and b/app/src/android/mipmap-xxhdpi/jfxcentral.png differ diff --git a/app/src/android/mipmap-xxxhdpi/jfxcentral.png b/app/src/android/mipmap-xxxhdpi/jfxcentral.png new file mode 100644 index 00000000..a8eed054 Binary files /dev/null and b/app/src/android/mipmap-xxxhdpi/jfxcentral.png differ diff --git a/app/src/ios/Default-Info.plist b/app/src/ios/Default-Info.plist new file mode 100644 index 00000000..b833af94 --- /dev/null +++ b/app/src/ios/Default-Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleIdentifier + com.dlsc.jfxcentral + CFBundleVersion + 1.0 + CFBundleShortVersionString + 1.0 + CFBundleExecutable + app + CFBundleIconName + AppIcon + CFBundleName + JFXCentral + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + MainScreen + CFBundlePackageType + APPL + LSRequiresIPhoneOS + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UIRequiredDeviceCapabilities + + arm64 + + UIDeviceFamily + + 1 + 2 + + MinimumOSVersion + 11.0 + UIRequiresFullScreen + YES + UIStatusBarStyle + UIStatusBarStyleLightContent + + \ No newline at end of file diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Contents.json b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Contents.json new file mode 100644 index 00000000..98b9ab1c --- /dev/null +++ b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "filename" : "Gluon-iphone-notification-icon-20@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "filename" : "Gluon-iphone-notification-icon-20@3x.png", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "filename" : "Gluon-iphone-spotlight-settings-icon-29@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "filename" : "Gluon-iphone-spotlight-settings-icon-29@3x.png", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "filename" : "Gluon-iphone-spotlight-icon-40@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "filename" : "Gluon-iphone-spotlight-icon-40@3x.png", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "filename" : "Gluon-iphone-app-icon-60@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "filename" : "Gluon-iphone-app-icon-60@3x.png", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "filename" : "Gluon-ipad-notifications-icon-20@1x.png", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "filename" : "Gluon-ipad-notifications-icon-20@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "filename" : "Gluon-ipad-settings-icon-29@1x.png", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "filename" : "Gluon-ipad-settings-icon-29@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "filename" : "Gluon-ipad-spotlight-icon-40@1x.png", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "filename" : "Gluon-ipad-spotlight-icon-40@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "filename" : "Gluon-ipad-app-icon-76@1x.png", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "filename" : "Gluon-ipad-app-icon-76@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "filename" : "Gluon-ipad-pro-app-icon-83.5@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "filename" : "Gluon-app-store-icon-1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-app-store-icon-1024@1x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-app-store-icon-1024@1x.png new file mode 100644 index 00000000..cd6d1f7a Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-app-store-icon-1024@1x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@1x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@1x.png new file mode 100644 index 00000000..1aaca0d8 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@1x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@2x.png new file mode 100644 index 00000000..93fefa7b Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-app-icon-76@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@1x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@1x.png new file mode 100644 index 00000000..8afb3593 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@1x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@2x.png new file mode 100644 index 00000000..58d53957 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-notifications-icon-20@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-pro-app-icon-83.5@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-pro-app-icon-83.5@2x.png new file mode 100644 index 00000000..f7321741 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-pro-app-icon-83.5@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@1x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@1x.png new file mode 100644 index 00000000..3f5e6f2c Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@1x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@2x.png new file mode 100644 index 00000000..220b72e5 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-settings-icon-29@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@1x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@1x.png new file mode 100644 index 00000000..58d53957 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@1x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@2x.png new file mode 100644 index 00000000..42b4e280 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-ipad-spotlight-icon-40@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@2x.png new file mode 100644 index 00000000..45c5a6be Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@3x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@3x.png new file mode 100644 index 00000000..bdee3e3f Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-app-icon-60@3x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@2x.png new file mode 100644 index 00000000..58d53957 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@3x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@3x.png new file mode 100644 index 00000000..62553c35 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-notification-icon-20@3x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@2x.png new file mode 100644 index 00000000..42b4e280 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@3x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@3x.png new file mode 100644 index 00000000..45c5a6be Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-icon-40@3x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@2x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@2x.png new file mode 100644 index 00000000..220b72e5 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@2x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@3x.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@3x.png new file mode 100644 index 00000000..ff9816c5 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset.old/Gluon-iphone-spotlight-settings-icon-29@3x.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/100.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/100.png new file mode 100644 index 00000000..2d20167b Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/100.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/1024.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 00000000..0a3de1d0 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/114.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/114.png new file mode 100644 index 00000000..85269804 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/114.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/120.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 00000000..74ef63b7 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/144.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/144.png new file mode 100644 index 00000000..77a9fb78 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/144.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/152.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/152.png new file mode 100644 index 00000000..8ebe3e06 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/152.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/167.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/167.png new file mode 100644 index 00000000..eec16a6c Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/167.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/180.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 00000000..636b0a5c Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/20.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/20.png new file mode 100644 index 00000000..c8e55e82 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/20.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/29.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 00000000..c245c049 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/40.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 00000000..50abbc2f Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/50.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/50.png new file mode 100644 index 00000000..2b0819cc Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/50.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/57.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/57.png new file mode 100644 index 00000000..d1853cdb Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/57.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/58.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 00000000..4f446861 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/60.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 00000000..ab34404d Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/72.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/72.png new file mode 100644 index 00000000..e45125b1 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/72.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/76.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/76.png new file mode 100644 index 00000000..bf3ac8b7 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/76.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/80.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 00000000..2fed7765 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/87.png b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/87.png new file mode 100644 index 00000000..d099e527 Binary files /dev/null and b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/87.png differ diff --git a/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..caa5f883 --- /dev/null +++ b/app/src/ios/assets/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,204 @@ +{ + "images": [ + { + "size": "60x60", + "expected-size": "180", + "filename": "180.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "3x" + }, + { + "size": "40x40", + "expected-size": "80", + "filename": "80.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "2x" + }, + { + "size": "40x40", + "expected-size": "120", + "filename": "120.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "3x" + }, + { + "size": "60x60", + "expected-size": "120", + "filename": "120.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "2x" + }, + { + "size": "57x57", + "expected-size": "57", + "filename": "57.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "1x" + }, + { + "size": "29x29", + "expected-size": "58", + "filename": "58.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "2x" + }, + { + "size": "29x29", + "expected-size": "29", + "filename": "29.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "1x" + }, + { + "size": "29x29", + "expected-size": "87", + "filename": "87.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "3x" + }, + { + "size": "57x57", + "expected-size": "114", + "filename": "114.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "2x" + }, + { + "size": "20x20", + "expected-size": "40", + "filename": "40.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "2x" + }, + { + "size": "20x20", + "expected-size": "60", + "filename": "60.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "iphone", + "scale": "3x" + }, + { + "size": "1024x1024", + "filename": "1024.png", + "expected-size": "1024", + "idiom": "ios-marketing", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "scale": "1x" + }, + { + "size": "40x40", + "expected-size": "80", + "filename": "80.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "72x72", + "expected-size": "72", + "filename": "72.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "76x76", + "expected-size": "152", + "filename": "152.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "50x50", + "expected-size": "100", + "filename": "100.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "29x29", + "expected-size": "58", + "filename": "58.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "76x76", + "expected-size": "76", + "filename": "76.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "29x29", + "expected-size": "29", + "filename": "29.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "50x50", + "expected-size": "50", + "filename": "50.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "72x72", + "expected-size": "144", + "filename": "144.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "40x40", + "expected-size": "40", + "filename": "40.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "83.5x83.5", + "expected-size": "167", + "filename": "167.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + }, + { + "size": "20x20", + "expected-size": "20", + "filename": "20.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "1x" + }, + { + "size": "20x20", + "expected-size": "40", + "filename": "40.png", + "folder": "Assets.xcassets/AppIcon.appiconset/", + "idiom": "ipad", + "scale": "2x" + } + ] +} \ No newline at end of file diff --git a/app/src/ios/assets/Assets.xcassets/Contents.json b/app/src/ios/assets/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/app/src/ios/assets/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/src/ios/assets/Base.lproj/LaunchScreen.storyboard b/app/src/ios/assets/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..b655cdaa --- /dev/null +++ b/app/src/ios/assets/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/ios/assets/Base.lproj/MainScreen.storyboard b/app/src/ios/assets/Base.lproj/MainScreen.storyboard new file mode 100644 index 00000000..365c6a01 --- /dev/null +++ b/app/src/ios/assets/Base.lproj/MainScreen.storyboard @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/ios/assets/Default-375w-667h@2x~iphone.png b/app/src/ios/assets/Default-375w-667h@2x~iphone.png new file mode 100644 index 00000000..fea93741 Binary files /dev/null and b/app/src/ios/assets/Default-375w-667h@2x~iphone.png differ diff --git a/app/src/ios/assets/Default-375w-812h-landscape@3x~iphone.png b/app/src/ios/assets/Default-375w-812h-landscape@3x~iphone.png new file mode 100644 index 00000000..05967433 Binary files /dev/null and b/app/src/ios/assets/Default-375w-812h-landscape@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-375w-812h@3x~iphone.png b/app/src/ios/assets/Default-375w-812h@3x~iphone.png new file mode 100644 index 00000000..877ef767 Binary files /dev/null and b/app/src/ios/assets/Default-375w-812h@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-414w-736h-landscape@3x~iphone.png b/app/src/ios/assets/Default-414w-736h-landscape@3x~iphone.png new file mode 100644 index 00000000..193abbee Binary files /dev/null and b/app/src/ios/assets/Default-414w-736h-landscape@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-414w-736h@3x~iphone.png b/app/src/ios/assets/Default-414w-736h@3x~iphone.png new file mode 100644 index 00000000..cf9be13e Binary files /dev/null and b/app/src/ios/assets/Default-414w-736h@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-414w-896h-landscape@3x~iphone.png b/app/src/ios/assets/Default-414w-896h-landscape@3x~iphone.png new file mode 100644 index 00000000..eea6b663 Binary files /dev/null and b/app/src/ios/assets/Default-414w-896h-landscape@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-414w-896h@3x~iphone.png b/app/src/ios/assets/Default-414w-896h@3x~iphone.png new file mode 100644 index 00000000..34e2f03d Binary files /dev/null and b/app/src/ios/assets/Default-414w-896h@3x~iphone.png differ diff --git a/app/src/ios/assets/Default-568h@2x~iphone.png b/app/src/ios/assets/Default-568h@2x~iphone.png new file mode 100644 index 00000000..b4098fea Binary files /dev/null and b/app/src/ios/assets/Default-568h@2x~iphone.png differ diff --git a/app/src/ios/assets/Default-landscape@2x~ipad.png b/app/src/ios/assets/Default-landscape@2x~ipad.png new file mode 100644 index 00000000..58d5222d Binary files /dev/null and b/app/src/ios/assets/Default-landscape@2x~ipad.png differ diff --git a/app/src/ios/assets/Default-landscape~ipad.png b/app/src/ios/assets/Default-landscape~ipad.png new file mode 100644 index 00000000..d7f1d6c6 Binary files /dev/null and b/app/src/ios/assets/Default-landscape~ipad.png differ diff --git a/app/src/ios/assets/Default-portrait@2x~ipad.png b/app/src/ios/assets/Default-portrait@2x~ipad.png new file mode 100644 index 00000000..49d01130 Binary files /dev/null and b/app/src/ios/assets/Default-portrait@2x~ipad.png differ diff --git a/app/src/ios/assets/Default-portrait~ipad.png b/app/src/ios/assets/Default-portrait~ipad.png new file mode 100644 index 00000000..9feeec03 Binary files /dev/null and b/app/src/ios/assets/Default-portrait~ipad.png differ diff --git a/app/src/ios/assets/Default@2x~iphone.png b/app/src/ios/assets/Default@2x~iphone.png new file mode 100644 index 00000000..2b776ac9 Binary files /dev/null and b/app/src/ios/assets/Default@2x~iphone.png differ diff --git a/app/src/ios/assets/iTunesArtwork b/app/src/ios/assets/iTunesArtwork new file mode 100644 index 00000000..56b63a55 Binary files /dev/null and b/app/src/ios/assets/iTunesArtwork differ diff --git a/app/src/ios/assets/iTunesArtwork@2x b/app/src/ios/assets/iTunesArtwork@2x new file mode 100644 index 00000000..4000f67c Binary files /dev/null and b/app/src/ios/assets/iTunesArtwork@2x differ diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/JFXCentral2App.java b/app/src/main/java/com/dlsc/jfxcentral2/app/JFXCentral2App.java index f4e7b8d5..2e2282ed 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/JFXCentral2App.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/JFXCentral2App.java @@ -57,14 +57,23 @@ import com.dlsc.jfxcentral2.app.stage.CustomStage; import com.dlsc.jfxcentral2.app.utils.LoggerOutputStream; import com.dlsc.jfxcentral2.app.utils.PrettyScrollPane; +import com.dlsc.jfxcentral2.components.Mode; +import com.dlsc.jfxcentral2.components.TopMenuBar; import com.dlsc.jfxcentral2.model.Size; import com.dlsc.jfxcentral2.utils.NodeUtil; +import com.dlsc.jfxcentral2.utils.OSUtil; import com.dlsc.jfxcentral2.utils.SocialUtil; +import com.dlsc.jfxcentral2.utils.WebAPIUtil; +import com.gluonhq.attach.statusbar.StatusBarService; import com.jpro.webapi.WebAPI; import javafx.application.Application; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; +import javafx.scene.Parent; import javafx.scene.Scene; +import javafx.scene.layout.Priority; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.stage.StageStyle; @@ -88,6 +97,7 @@ import java.io.PrintStream; import java.util.Locale; import java.util.Objects; +import java.util.Stack; import java.util.function.Supplier; public class JFXCentral2App extends Application { @@ -105,20 +115,25 @@ public class JFXCentral2App extends Application { @Override public void start(Stage stage) { - // This is a workaround to prevent a deadlock between the TrayIcon and the JPro ImageManager - BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB); - bi.createGraphics(); + if (!OSUtil.isNative()) { + // This is a workaround to prevent a deadlock between the TrayIcon and the JPro ImageManager + BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB); + bi.createGraphics(); + } if (!WebAPI.isBrowser()) { - System.setProperty("prism.lcdtext", "false"); System.setProperty("routing.scrollpane", PrettyScrollPane.class.getName()); - if (Taskbar.isTaskbarSupported()) { - Taskbar taskbar = Taskbar.getTaskbar(); - if (taskbar.isSupported(Taskbar.Feature.ICON_IMAGE)) { - Toolkit defaultToolkit = Toolkit.getDefaultToolkit(); - Image dockIcon = defaultToolkit.getImage(JFXCentral2App.class.getResource("app-icon.png")); - taskbar.setIconImage(dockIcon); + if (!OSUtil.isNative()) { + System.setProperty("prism.lcdtext", "false"); + + if (Taskbar.isTaskbarSupported()) { + Taskbar taskbar = Taskbar.getTaskbar(); + if (taskbar.isSupported(Taskbar.Feature.ICON_IMAGE)) { + Toolkit defaultToolkit = Toolkit.getDefaultToolkit(); + Image dockIcon = defaultToolkit.getImage(JFXCentral2App.class.getResource("app-icon.png")); + taskbar.setIconImage(dockIcon); + } } } } @@ -138,7 +153,7 @@ public void start(Stage stage) { routeNode.start(sessionManager); // tray icon - if (!WebAPI.isBrowser() && SystemTray.isSupported()) { + if (!WebAPI.isBrowser() && !OSUtil.isNative() && SystemTray.isSupported()) { RepositoryManager.repositoryUpdatedProperty().addListener(it -> { if (trayIconManager == null) { trayIconManager = new TrayIconManager(stage, sessionManager); @@ -148,21 +163,33 @@ public void start(Stage stage) { }); } + Parent parent = routeNode; + + if (OSUtil.isNative()) { + StackPane notchPane = new StackPane(); + notchPane.getStyleClass().add("notch-pane"); + VBox.setVgrow(routeNode, Priority.ALWAYS); + parent = new VBox(notchPane, routeNode); + } + + // customs stage for decorations / the chrome - CustomStage customStage = new CustomStage(stage, routeNode, sessionManager); + CustomStage customStage = new CustomStage(stage, parent, sessionManager, size); customStage.setCloseHandler(() -> { - if (SystemTray.isSupported()) { - trayIconManager.hide(); + if (!OSUtil.isNative()) { + if (SystemTray.isSupported()) { + trayIconManager.hide(); + } } stage.close(); }); // scene Scene scene = new Scene(customStage, 1400, 800); - scene.setFill(Color.web("070B32")); + scene.setFill(Color.web("#070B32")); scene.widthProperty().addListener((it -> updateSizeProperty(scene))); scene.getStylesheets().add(Objects.requireNonNull(NodeUtil.class.getResource("/com/dlsc/jfxcentral2/theme.css")).toExternalForm()); - + scene.focusOwnerProperty().addListener(it -> System.out.println("focus owner: " + scene.getFocusOwner())); updateSizeProperty(scene); stage.setScene(scene); @@ -261,6 +288,7 @@ private Response createResponse(Request request, Class cl private void updateSizeProperty(Scene scene) { double sceneWidth = scene.getWidth(); + System.out.println("scene width: " + sceneWidth); if (sceneWidth < 865) { size.set(Size.SMALL); } else if (sceneWidth <= 1320) { @@ -272,8 +300,10 @@ private void updateSizeProperty(Scene scene) { public static void main(String[] args) { Logger logger = LogManager.getLogger(); - System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); - System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.ERROR), true)); + if (!OSUtil.isNative()) { + System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); + System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.ERROR), true)); + } launch(args); } } diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/RepositoryManager.java b/app/src/main/java/com/dlsc/jfxcentral2/app/RepositoryManager.java index c5882fe7..a011fb82 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/RepositoryManager.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/RepositoryManager.java @@ -1,9 +1,11 @@ package com.dlsc.jfxcentral2.app; import com.dlsc.jfxcentral.data.DataRepository2; +import com.dlsc.jfxcentral2.utils.OSUtil; import javafx.application.Platform; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; +import one.jpro.platform.internal.openlink.util.PlatformUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.eclipse.jgit.api.CloneCommand; @@ -11,6 +13,8 @@ import org.eclipse.jgit.lib.ProgressMonitor; import org.eclipse.jgit.merge.ContentMergeStrategy; import org.eclipse.jgit.storage.file.FileRepositoryBuilder; +import org.eclipse.jgit.util.FS; +import org.eclipse.jgit.util.FS_POSIX; import java.io.File; import java.io.IOException; @@ -47,8 +51,12 @@ public static void updateRepository(ProgressMonitor monitor) { } } + private static File getRepositoryDirectory() { + return DataRepository2.getRepositoryDirectory(); + } + public static boolean isFirstTimeSetup() { - return !DataRepository2.getRepositoryDirectory().exists(); + return !getRepositoryDirectory().exists(); } private static void initialLoad(ProgressMonitor monitor) throws Exception { @@ -62,7 +70,7 @@ private static void initialLoad(ProgressMonitor monitor) throws Exception { return; } - File repoDirectory = DataRepository2.getRepositoryDirectory(); + File repoDirectory = getRepositoryDirectory(); if (!repoDirectory.exists()) { String repoUrl = GITHUB_REPOSITORY_URL; @@ -81,11 +89,21 @@ private static void initialLoad(ProgressMonitor monitor) throws Exception { .setBranch("live") .setDepth(1) .setDirectory(repoDirectory); + + if (OSUtil.isNative()) { + cloneCmd = cloneCmd.setFs(new FS_POSIX() { + @Override + public boolean supportsExecute() { + return false; + } + }); + } + try (Git git = cloneCmd.call()) { // Git object is here only to ensure resources are properly closed; no other actions needed. } } else { - repoDirectory = new File(DataRepository2.getRepositoryDirectory(), "/.git"); + repoDirectory = new File(repoDirectory, "/.git"); try (Git git = new Git(FileRepositoryBuilder.create(repoDirectory))) { git.pull() .setProgressMonitor(monitor) diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/CategoryPageBase.java b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/CategoryPageBase.java index 39708d21..0141d248 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/CategoryPageBase.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/CategoryPageBase.java @@ -9,6 +9,7 @@ import com.dlsc.jfxcentral2.components.headers.CategoryHeader; import com.dlsc.jfxcentral2.components.tiles.TileViewBase; import com.dlsc.jfxcentral2.model.Size; +import com.dlsc.jfxcentral2.utils.OSUtil; import javafx.beans.property.ObjectProperty; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; @@ -49,7 +50,9 @@ public Node content() { ModelGridView gridView = createGridView(); gridView.sizeProperty().bind(sizeProperty()); gridView.setTileViewProvider(getTileViewProvider()); - gridView.setDetailNodeProvider(getDetailNodeProvider()); + if (!OSUtil.isNative()) { + gridView.setDetailNodeProvider(getDetailNodeProvider()); + } gridView.setColumns(getNumberOfGridViewColumns()); gridView.setRows(getNumberOfGridViewRows()); gridView.setItems(sortedList); diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/PageBase.java b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/PageBase.java index 753ce52a..f862fb3c 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/PageBase.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/PageBase.java @@ -9,12 +9,14 @@ import com.dlsc.jfxcentral2.components.TopPane; import com.dlsc.jfxcentral2.components.hamburger.HamburgerMenuView; import com.dlsc.jfxcentral2.model.Size; +import com.dlsc.jfxcentral2.utils.OSUtil; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.geometry.Pos; import javafx.scene.Node; +import javafx.scene.input.SwipeEvent; import javafx.scene.layout.Priority; import javafx.scene.layout.Region; import javafx.scene.layout.StackPane; @@ -54,8 +56,9 @@ public Node wrapContent(Region... content) { sizeProperty().addListener(it -> updateStyleClassBasedOnSize(vbox)); // menubar - TopMenuBar topMenuBar = new TopMenuBar(this); + TopMenuBar topMenuBar = new TopMenuBar(isMobile()); topMenuBar.sizeProperty().bind(sizeProperty()); + topMenuBar.setSessionManager(getSessionManager()); topMenuBar.setMode(menuMode); topMenuBar.showHamburgerMenuProperty().bindBidirectional(showHamburgerMenuProperty()); @@ -102,7 +105,11 @@ public Node wrapContent(Region... content) { StackPane glassPane = new StackPane(); glassPane.getStyleClass().add("page-glass-pane"); glassPane.visibleProperty().bind(topMenuBar.usedProperty().or(blockingProperty())); - glassPane.setOnMouseClicked(evt -> setShowHamburgerMenu(false)); + glassPane.setOnMouseClicked(evt -> { + if (evt.isStillSincePress()) { + setShowHamburgerMenu(false); + } + }); if (menuMode.equals(Mode.LIGHT)) { // make sure the JFX logo can be fully seen (without this call it gets clipped) @@ -126,6 +133,9 @@ public Node wrapContent(Region... content) { root.getStyleClass().add("normal-page"); } + root.addEventFilter(SwipeEvent.SWIPE_LEFT, evt -> getSessionManager().goForward()); + root.addEventFilter(SwipeEvent.SWIPE_RIGHT, evt -> getSessionManager().goBack()); + return root; } diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/RefreshPage.java b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/RefreshPage.java index 074cdbf9..af7b17c8 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/RefreshPage.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/RefreshPage.java @@ -116,7 +116,9 @@ private Node createSetupView() { Button exitButton = new Button("EXIT"); exitButton.setFocusTraversable(false); exitButton.setCancelButton(true); - exitButton.setOnAction(evt -> Platform.exit()); + + // use system exit so it works properly everywhere, including native + exitButton.setOnAction(evt -> System.exit(0)); HBox hBox = new HBox(exitButton, proceedButton); hBox.getStyleClass().add("button-box"); diff --git a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/category/VideosCategoryPage.java b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/category/VideosCategoryPage.java index 8820fda5..13a5769f 100644 --- a/app/src/main/java/com/dlsc/jfxcentral2/app/pages/category/VideosCategoryPage.java +++ b/app/src/main/java/com/dlsc/jfxcentral2/app/pages/category/VideosCategoryPage.java @@ -9,6 +9,7 @@ import com.dlsc.jfxcentral2.components.tiles.VideoTileView; import com.dlsc.jfxcentral2.model.Size; import com.dlsc.jfxcentral2.utils.IkonUtil; +import com.dlsc.jfxcentral2.utils.OSUtil; import com.dlsc.jfxcentral2.utils.VideoViewFactory; import javafx.beans.property.ObjectProperty; import javafx.collections.FXCollections; @@ -50,6 +51,9 @@ protected SearchFilterView