diff --git a/.github/workflows/build-native-libs.yml b/.github/workflows/build-native-libs.yml new file mode 100644 index 000000000..d76ebada4 --- /dev/null +++ b/.github/workflows/build-native-libs.yml @@ -0,0 +1,213 @@ +name: 'build-native-libs' + +# Builds the C++ libraries the app links (OpenCV, tesseract + leptonica + libpng [+ libjpeg-turbo]) +# for Android, iOS (device + simulator) and Mac Catalyst, selected by version number. +# See scripts/native-libs/README.md. Download the result with scripts/native-libs/fetch.sh. + +on: + workflow_dispatch: + inputs: + opencv_version: + description: 'OpenCV version (must have an OPENCV_MOBILE_TAG_ pin in scripts/native-libs/versions.env, or exist as an opencv-mobile release)' + required: true + default: '4.13.0' + type: string + tesseract_version: + description: 'Tesseract version (needs TESSERACT__* dependency pins in scripts/native-libs/versions.env)' + required: true + default: '5.5.1' + type: string + platforms: + description: 'Platforms to build' + required: true + default: all + type: choice + options: + - all + - android + - ios + - catalyst + variant: + description: 'Tesseract variant: release (optimized, stripped), debug (-O1 -g, not stripped, same file names) or both. OpenCV has no debug variant.' + required: true + default: release + type: choice + options: + - release + - debug + - both + opencv_from_source: + description: 'Rebuild OpenCV from the opencv-mobile sources instead of repackaging the prebuilt opencv-mobile binaries' + required: true + default: false + type: boolean + release: + description: 'Attach the archives to the GitHub release native-libs--' + required: true + default: false + type: boolean + +permissions: + contents: read + +concurrency: + group: build-native-libs-${{ inputs.opencv_version }}-${{ inputs.tesseract_version }} + cancel-in-progress: false + +env: + OPENCV_VERSION: ${{ inputs.opencv_version }} + TESSERACT_VERSION: ${{ inputs.tesseract_version }} + ARTIFACT_SUFFIX: opencv${{ inputs.opencv_version }}-tesseract${{ inputs.tesseract_version }} + OPENCV_FROM_SOURCE: ${{ inputs.opencv_from_source && '1' || '0' }} + +jobs: + android: + name: Android + if: inputs.platforms == 'all' || inputs.platforms == 'android' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + variant: ${{ fromJSON(inputs.variant == 'both' && '["release","debug"]' || format('["{0}"]', inputs.variant)) }} + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + + - name: Install pinned Android NDK + run: | + source scripts/native-libs/versions.env + yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install "ndk;$NATIVE_LIBS_NDK_VERSION" >/dev/null + echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/$NATIVE_LIBS_NDK_VERSION" >> "$GITHUB_ENV" + + - name: Cache build output + id: cache + uses: actions/cache@v4 + with: + path: build/native-libs/out/android${{ matrix.variant == 'debug' && '-debug' || '' }} + key: native-libs-android${{ matrix.variant == 'debug' && '-debug' || '' }}-${{ env.ARTIFACT_SUFFIX }}-src${{ inputs.opencv_from_source }}-${{ hashFiles('scripts/native-libs/**') }} + + - name: Cache downloads + uses: actions/cache@v4 + with: + path: build/native-libs/downloads + key: native-libs-downloads-${{ env.ARTIFACT_SUFFIX }}-${{ hashFiles('scripts/native-libs/versions.env') }} + + - name: Build + if: steps.cache.outputs.cache-hit != 'true' + run: scripts/native-libs/build.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" android --variant ${{ matrix.variant }} + + - name: Package (cache hit) + if: steps.cache.outputs.cache-hit == 'true' + run: scripts/native-libs/package.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" android --variant ${{ matrix.variant }} + + - uses: actions/upload-artifact@v4 + with: + name: native-libs-android-${{ env.ARTIFACT_SUFFIX }}${{ matrix.variant == 'debug' && '-debug' || '' }} + path: build/native-libs/out/native-libs-android-*.tar.gz* + if-no-files-found: error + + ios: + name: iOS (device + simulator) + OpenCV xcframework + if: inputs.platforms == 'all' || inputs.platforms == 'ios' + runs-on: macos-15 + strategy: + fail-fast: false + matrix: + variant: ${{ fromJSON(inputs.variant == 'both' && '["release","debug"]' || format('["{0}"]', inputs.variant)) }} + timeout-minutes: 180 + steps: + - uses: actions/checkout@v4 + + - name: Cache build output + id: cache + uses: actions/cache@v4 + with: + path: build/native-libs/out/ios${{ matrix.variant == 'debug' && '-debug' || '' }} + key: native-libs-ios${{ matrix.variant == 'debug' && '-debug' || '' }}-${{ env.ARTIFACT_SUFFIX }}-src${{ inputs.opencv_from_source }}-${{ hashFiles('scripts/native-libs/**') }} + + - name: Cache downloads + uses: actions/cache@v4 + with: + path: build/native-libs/downloads + key: native-libs-downloads-${{ env.ARTIFACT_SUFFIX }}-${{ hashFiles('scripts/native-libs/versions.env') }} + + - name: Build + if: steps.cache.outputs.cache-hit != 'true' + run: scripts/native-libs/build.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" ios --variant ${{ matrix.variant }} + + - name: Package (cache hit) + if: steps.cache.outputs.cache-hit == 'true' + run: scripts/native-libs/package.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" ios --variant ${{ matrix.variant }} + + - uses: actions/upload-artifact@v4 + with: + name: native-libs-ios-${{ env.ARTIFACT_SUFFIX }}${{ matrix.variant == 'debug' && '-debug' || '' }} + path: build/native-libs/out/native-libs-ios-*.tar.gz* + if-no-files-found: error + + catalyst: + name: Mac Catalyst + if: inputs.platforms == 'all' || inputs.platforms == 'catalyst' + runs-on: macos-15 + strategy: + fail-fast: false + matrix: + variant: ${{ fromJSON(inputs.variant == 'both' && '["release","debug"]' || format('["{0}"]', inputs.variant)) }} + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + + - name: Cache build output + id: cache + uses: actions/cache@v4 + with: + path: build/native-libs/out/catalyst${{ matrix.variant == 'debug' && '-debug' || '' }} + key: native-libs-catalyst${{ matrix.variant == 'debug' && '-debug' || '' }}-${{ env.ARTIFACT_SUFFIX }}-${{ hashFiles('scripts/native-libs/**') }} + + - name: Cache downloads + uses: actions/cache@v4 + with: + path: build/native-libs/downloads + key: native-libs-downloads-${{ env.ARTIFACT_SUFFIX }}-${{ hashFiles('scripts/native-libs/versions.env') }} + + - name: Build + if: steps.cache.outputs.cache-hit != 'true' + run: scripts/native-libs/build.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" catalyst --variant ${{ matrix.variant }} + + - name: Package (cache hit) + if: steps.cache.outputs.cache-hit == 'true' + run: scripts/native-libs/package.sh "$OPENCV_VERSION" "$TESSERACT_VERSION" catalyst --variant ${{ matrix.variant }} + + - uses: actions/upload-artifact@v4 + with: + name: native-libs-catalyst-${{ env.ARTIFACT_SUFFIX }}${{ matrix.variant == 'debug' && '-debug' || '' }} + path: build/native-libs/out/native-libs-catalyst-*.tar.gz* + if-no-files-found: error + + release: + name: Attach to GitHub release + if: ${{ !cancelled() && !failure() && inputs.release }} + needs: [android, ios, catalyst] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: native-libs-*-${{ env.ARTIFACT_SUFFIX }}* + path: assets + merge-multiple: true + + - name: Create or update the release + env: + GH_TOKEN: ${{ github.token }} + run: | + tag="native-libs-${OPENCV_VERSION}-${TESSERACT_VERSION}" + ls -la assets + if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then + gh release create "$tag" --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" \ + --title "Native libs: OpenCV ${OPENCV_VERSION} + Tesseract ${TESSERACT_VERSION}" \ + --notes "Prebuilt OpenCV ${OPENCV_VERSION} and Tesseract ${TESSERACT_VERSION} static libraries (Android, iOS, Mac Catalyst); *-debug archives hold tesseract with symbols (extract over the release one). Install with scripts/native-libs/fetch.sh ${OPENCV_VERSION} ${TESSERACT_VERSION} all [--variant both]. Built by the build-native-libs workflow, run ${GITHUB_RUN_ID}." \ + --prerelease + fi + gh release upload "$tag" assets/* --repo "$GITHUB_REPOSITORY" --clobber diff --git a/App_Resources/cardwallet/Android/before-plugins.gradle b/App_Resources/cardwallet/Android/before-plugins.gradle index d0f2f1fc4..fde25a135 100644 --- a/App_Resources/cardwallet/Android/before-plugins.gradle +++ b/App_Resources/cardwallet/Android/before-plugins.gradle @@ -14,7 +14,7 @@ ext { androidXRecyclerViewVersion = "1.4.0" androidxViewPager2Version = "1.1.0" androidXSwipeRefreshLayoutViewVersion = "1.2.0" - androidXMaterial = "1.13.0" + androidXMaterial = "1.14.0" androidXBrowser = "1.10.0" androidXPreferenceVersion = "1.2.1" androidXSplashscreenVersion = "1.2.0" diff --git a/App_Resources/cardwallet/iOS/Info.plist b/App_Resources/cardwallet/iOS/Info.plist index 1ba12a231..7da5307ce 100644 --- a/App_Resources/cardwallet/iOS/Info.plist +++ b/App_Resources/cardwallet/iOS/Info.plist @@ -25,7 +25,7 @@ UILaunchStoryboardName LaunchScreen UIRequiresFullScreen - + UIRequiredDeviceCapabilities location-services diff --git a/App_Resources/documentscanner/Android/before-plugins.gradle b/App_Resources/documentscanner/Android/before-plugins.gradle index d0f2f1fc4..fde25a135 100644 --- a/App_Resources/documentscanner/Android/before-plugins.gradle +++ b/App_Resources/documentscanner/Android/before-plugins.gradle @@ -14,7 +14,7 @@ ext { androidXRecyclerViewVersion = "1.4.0" androidxViewPager2Version = "1.1.0" androidXSwipeRefreshLayoutViewVersion = "1.2.0" - androidXMaterial = "1.13.0" + androidXMaterial = "1.14.0" androidXBrowser = "1.10.0" androidXPreferenceVersion = "1.2.1" androidXSplashscreenVersion = "1.2.0" diff --git a/App_Resources/documentscanner/Catalyst/app.entitlements b/App_Resources/documentscanner/Catalyst/app.entitlements new file mode 100644 index 000000000..912d75f3f --- /dev/null +++ b/App_Resources/documentscanner/Catalyst/app.entitlements @@ -0,0 +1,18 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.network.client + + com.apple.security.device.camera + + com.apple.security.personal-information.photos-library + + com.apple.security.files.user-selected.read-write + + + diff --git a/App_Resources/documentscanner/Catalyst/build.xcconfig b/App_Resources/documentscanner/Catalyst/build.xcconfig new file mode 100644 index 000000000..bcb244da3 --- /dev/null +++ b/App_Resources/documentscanner/Catalyst/build.xcconfig @@ -0,0 +1,2 @@ +// Overrides App_Resources/documentscanner/iOS/build.xcconfig for Mac Catalyst builds +IPHONEOS_DEPLOYMENT_TARGET = 16.0 diff --git a/App_Resources/documentscanner/iOS/Info.plist b/App_Resources/documentscanner/iOS/Info.plist index 7e5744a7e..e95de1a1d 100644 --- a/App_Resources/documentscanner/iOS/Info.plist +++ b/App_Resources/documentscanner/iOS/Info.plist @@ -25,7 +25,7 @@ UILaunchStoryboardName LaunchScreen UIRequiresFullScreen - + UIRequiredDeviceCapabilities location-services @@ -63,5 +63,24 @@ 12.0 UIViewControllerBasedStatusBarAppearance + UIApplicationSceneManifest + + UIApplicationPreferredDefaultSceneSessionRole + UIWindowSceneSessionRoleApplication + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + + + + \ No newline at end of file diff --git a/App_Resources/documentscanner/iOS/Podfile b/App_Resources/documentscanner/iOS/Podfile index 4bfbc26f9..50114dceb 100644 --- a/App_Resources/documentscanner/iOS/Podfile +++ b/App_Resources/documentscanner/iOS/Podfile @@ -1,13 +1,14 @@ plugin 'cocoapods-acknowledgements' # pod "MSColorPicker" -platform :ios, '14.0' +platform :ios, '17.0' pod 'SSZipArchive' post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" config.build_settings["ONLY_ACTIVE_ARCH"] = "YES" - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "x86_64" + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '17.0' + config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = '-' config.build_settings['SWIFT_VERSION'] = '5.1' config.build_settings['DEVELOPMENT_TEAM'] = '3UUB5NM43K' config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES' diff --git a/App_Resources/documentscanner/iOS/build.xcconfig b/App_Resources/documentscanner/iOS/build.xcconfig index 7dabfee49..c19ac2354 100644 --- a/App_Resources/documentscanner/iOS/build.xcconfig +++ b/App_Resources/documentscanner/iOS/build.xcconfig @@ -7,4 +7,5 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 3UUB5NM43K EMBEDDED_CONTENT_CONTAINS_SWIFT = YES SWIFT_VERSION=5.1 -IPHONEOS_DEPLOYMENT_TARGET = 14.0 \ No newline at end of file +IPHONEOS_DEPLOYMENT_TARGET = 17.0 +EXCLUDED_ARCHS[sdk=iphonesimulator*] = x86_64 diff --git a/Readme.md b/Readme.md index b32670636..5567ae98e 100644 --- a/Readme.md +++ b/Readme.md @@ -127,8 +127,9 @@ I use dotenv plugin for zsh which automatically loads the `.env` file ### 3rd parties This app also uses opencv and tesseract. I did not include the libraries in git because there are huge and would make the github repo too big. -There are 2 ways to install them: +There are 3 ways to install them: +- reproducible, selected by version (Android, iOS and Mac Catalyst): `scripts/native-libs/fetch.sh all` downloads a build of the `build-native-libs` workflow, or build locally with `scripts/native-libs/build.sh`. See [scripts/native-libs/README.md](scripts/native-libs/README.md) - download from [here](https://github.com/ossappscollective/OSS-DocumentScanner/releases/tag/dev_resources) and uncompress them at the root - build them yourself: diff --git a/app/android/camera_scan_activity.ts b/app/android/camera_scan_activity.ts index 0e9388711..d0d76201d 100644 --- a/app/android/camera_scan_activity.ts +++ b/app/android/camera_scan_activity.ts @@ -1,5 +1,5 @@ import { AppUtilsAndroid } from '@akylas/nativescript-app-utils'; -import { showBottomSheet } from '@nativescript-community/ui-material-bottomsheet/svelte'; +import { showBottomSheet } from '@nativescript-community/ui-bottomsheet/svelte'; import { AndroidActivityBackPressedEventData, AndroidActivityCallbacks, diff --git a/app/app.android.scss b/app/app.android.scss index 3504ca9c7..b10ec4584 100644 --- a/app/app.android.scss +++ b/app/app.android.scss @@ -1,4 +1,4 @@ @import './app.common'; checkbox { - margin-right: -16; + margin-right: 0; } diff --git a/app/app.common.scss b/app/app.common.scss index 2c5bd2b0a..e1081fcc8 100644 --- a/app/app.common.scss +++ b/app/app.common.scss @@ -51,8 +51,8 @@ font-family: $mdiFontFamily; } -mdtextfield, -mdtextview { +textfield, +textview { stroke-color: var(--colorOutline); placeholder-color: var(--colorOutline); color: var(--colorOnBackground); @@ -64,8 +64,8 @@ checkbox { fill-color: var(--colorPrimary); } -mdbutton[variant='flat'], -mdbutton[variant='contained'] { +button[variant='flat'], +button[variant='contained'] { background-color: var(--colorPrimary); color: var(--colorOnPrimary); } @@ -86,7 +86,7 @@ htmllabel { // white-space: normal; } -// mdtextfield { +// textfield { // color: black; // // background-color: white; // // placeholder-color: black; @@ -152,7 +152,7 @@ frame { label, canvaslabel, htmllabel, -mdtextfield, +textfield, .actionBarTitle, .actionBarSubtitle { &:black, diff --git a/app/app.ios.scss b/app/app.ios.scss index 3bc80a277..c1ca6c25e 100644 --- a/app/app.ios.scss +++ b/app/app.ios.scss @@ -1,10 +1,10 @@ @import './app.common'; -mdbutton { +button { // material3 basic design shape: round; } -mdbutton[variant='outline'] { +button[variant='outline'] { ripple-color: var(--colorPrimary); color: var(--colorPrimary); } @@ -19,10 +19,8 @@ htmllabel, label, button, textfield, -mdtextfield, -mdtextview, -checkbox, -mdbutton { +textview, +checkbox { ios-a11y-adjusts-font-size: true; } @@ -33,14 +31,14 @@ checkbox { on-tint-color: var(--colorPrimary); } -mdswitch { +switch { on-background-color: var(--colorPrimary); } -// mdbutton[variant=flat],mdbutton[variant=contained] { +// button[variant=flat],button[variant=contained] { // color: var(--colorOnPrimary); // } -mdcardview { +card { // material3 basic design shape: medium; } @@ -58,6 +56,21 @@ mdcardview { // height: calc(40 * var(--fontScale)); } -mdtextfield[variant='none'] { +textfield[variant='none'] { padding: 0; } + +.pageContent, +.pageContent > collectionview { + ios-overflow-safe-area: true; +} + +.card { + margin: 4 16; + border-radius: 12; +} + +.listAppBar { + font-size: 30; + font-weight: 700; +} diff --git a/app/app.ts b/app/app.ts index e8ecb742f..31f82c8bc 100644 --- a/app/app.ts +++ b/app/app.ts @@ -1,22 +1,23 @@ +import { startWindowHelper } from '@shared/utils/window'; import { GestureRootView, install as installGestures } from '@nativescript-community/gesturehandler'; import { installMixins as installUIMixins } from '@nativescript-community/systemui'; import { overrideSpanAndFormattedString } from '@nativescript-community/text'; import SwipeMenuElement from '@nativescript-community/ui-collectionview-swipemenu/svelte'; import CollectionViewElement from '@nativescript-community/ui-collectionview/svelte'; -import SegmentedBarElement from '@nativescript-community/ui-material-segmentedbar/svelte/SegmentedBarElement'; +import { register as registerAppBar } from '@nativescript-community/ui-appbar/svelte'; import DrawerElement from '@nativescript-community/ui-drawer/svelte'; import { ImagePipeline, ImageViewTraceCategory, getImagePipeline, initialize } from '@nativescript-community/ui-image'; import { installMixins as installColorFilters } from '@nativescript-community/ui-image-colorfilter'; import { Label } from '@nativescript-community/ui-label'; -import { install as installBottomSheets } from '@nativescript-community/ui-material-bottomsheet'; -import { installMixins, themer } from '@nativescript-community/ui-material-core'; +import { install as installBottomSheets } from '@nativescript-community/ui-bottomsheet'; +import { installMixins, themer } from '@nativescript-community/ui-core'; import { Pager } from '@nativescript-community/ui-pager'; import PagerElement from '@nativescript-community/ui-pager/svelte'; import { Application, ApplicationSettings, Frame, NavigatedData, Page, Trace } from '@nativescript/core'; import { startSentry } from '@shared/utils/sentry'; import { showError } from '@shared/utils/showError'; import { CropView } from 'plugin-nativeprocessor/CropView'; -import { FrameElement, PageElement, createElement, navigate, registerElement, registerNativeViewElement } from '@nativescript-community/svelte-native/dom'; +import { FrameElement, NativeElementPropType, PageElement, createElement, navigate, registerElement, registerNativeViewElement } from '@nativescript-community/svelte-native/dom'; import { NestedScrollView } from '@shared/components/NestedScrollView'; import { getCurrentISO3Language, lc } from '~/helpers/locale'; import { start as startThemeHelper } from '~/helpers/theme'; @@ -81,15 +82,19 @@ try { registerNativeViewElement('GridLayout', () => require('@nativescript/core').GridLayout); registerNativeViewElement('ScrollView', () => NestedScrollView as any); registerNativeViewElement('StackLayout', () => require('@nativescript/core').StackLayout); - registerNativeViewElement('Switch', () => require('@nativescript-community/ui-material-switch').Switch); + registerNativeViewElement('Switch', () => require('@nativescript-community/ui-switch').Switch); registerNativeViewElement('Span', () => require('@nativescript/core').Span); - registerNativeViewElement('slider', () => require('@nativescript-community/ui-material-slider').Slider, null, {}, { override: true }); - registerNativeViewElement('textview', () => require('@nativescript-community/ui-material-textview').TextView, null, {}, { override: true }); - registerNativeViewElement('textfield', () => require('@nativescript-community/ui-material-textfield').TextField, null, {}, { override: true }); - registerNativeViewElement('mdbutton', () => require('@nativescript-community/ui-material-button').Button); - registerNativeViewElement('activityIndicator', () => require('@nativescript-community/ui-material-activityindicator').ActivityIndicator); - registerNativeViewElement('progress', () => require('@nativescript-community/ui-material-progress').Progress); + registerNativeViewElement('slider', () => require('@nativescript-community/ui-slider').Slider, null, {}, { override: true }); + registerNativeViewElement('textview', () => require('@nativescript-community/ui-textview').TextView, null, {}, { override: true }); + registerNativeViewElement('textfield', () => require('@nativescript-community/ui-textfield').TextField, null, {}, { override: true }); + registerAppBar(); + registerNativeViewElement('uibutton', () => require('@nativescript-community/ui-button').Button); + registerNativeViewElement('uifloatingactionbutton', () => require('@nativescript-community/ui-floatingactionbutton').FloatingActionButton); + // the shared components still use the mdbutton tag + registerNativeViewElement('mdbutton', () => require('@nativescript-community/ui-button').Button); + registerNativeViewElement('activityIndicator', () => require('@nativescript-community/ui-activityindicator').ActivityIndicator); + registerNativeViewElement('progress', () => require('@nativescript-community/ui-progress').Progress); registerNativeViewElement('label', () => Label); registerNativeViewElement('image', () => require('@nativescript-community/ui-image').Img); registerNativeViewElement('zoomimage', () => require('@nativescript-community/ui-zoomimage').ZoomImg); @@ -103,13 +108,14 @@ try { registerNativeViewElement('gesturerootview', () => require('@nativescript-community/gesturehandler').GestureRootView); registerNativeViewElement('awebview', () => require('@nativescript-community/ui-webview').AWebView); registerNativeViewElement('lottie', () => require('@nativescript-community/ui-lottie').LottieView); + registerNativeViewElement('segmentedbar', () => require('@nativescript-community/ui-segmentedbar').SegmentedBar, null, { items: NativeElementPropType.Array }, { override: true }); + registerNativeViewElement('segmentedbaritem', () => require('@nativescript-community/ui-segmentedbar').SegmentedBarItem, 'items', {}, { override: true }); registerNativeViewElement('pagerindicator', () => require('@nativescript-community/ui-pager-indicator').PagerIndicator); registerNativeViewElement('svgview', () => require('@nativescript-community/ui-svg').SVGView); // registerNativeViewElement('blurview', () => require('@nativescript-community/ui-blurview').BlurView); PagerElement.register(); CollectionViewElement.register(); - SegmentedBarElement.register(); SwipeMenuElement.register(); DrawerElement.register(); const shouldEnableSentry = ApplicationSettings.getBoolean(SETTINGS_ENABLE_CRASH_REPORT, PLAY_STORE_BUILD); @@ -152,6 +158,16 @@ try { Application.on(Application.launchEvent, async () => { // DEV_LOG && console.log('launch'); startThemeHelper(); + startWindowHelper({ + startWidth: 1300, + startHeight: 940, + minWidth: 480, + minHeight: 560, + commands: [ + { id: 'search', title: lc('search'), input: 'f', menu: 'edit' }, + { id: 'preferences', title: lc('preferences'), input: ',', menu: 'preferences' } + ] + }); launched = true; start(); }); diff --git a/app/components/ModalImportImages.svelte b/app/components/ModalImportImages.svelte index 196c413b4..c14414dc9 100644 --- a/app/components/ModalImportImages.svelte +++ b/app/components/ModalImportImages.svelte @@ -107,7 +107,7 @@ - changePage(-1)} />