From 5b34c127deca1dab0939e77733fcbdb2372a0a31 Mon Sep 17 00:00:00 2001 From: murali Date: Fri, 28 Aug 2026 19:24:04 +0530 Subject: [PATCH] source code added --- .gitignore | 221 + Automiz_App_Plan.docx | 0 development/CLAUDE.md | 425 ++ .../prepress_multi_artboard.html | 1328 +++++ development/asset_manager_app_web_socket | 1 + development/cms_asset_manager | 1 + development/cms_backend | 1 + development/cms_frontend_new | 1 + development/cms_workflow | 1 + development/dbase_manager | 1 + development/planxo/.gitignore | 45 + development/planxo/.metadata | 45 + development/planxo/PLANXO_SYSTEM_DOC.md | 236 + development/planxo/README.md | 16 + development/planxo/analysis_options.yaml | 28 + development/planxo/android/.gitignore | 14 + .../planxo/android/app/build.gradle.kts | 44 + .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 45 + .../kotlin/com/example/planxo/MainActivity.kt | 5 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + development/planxo/android/build.gradle.kts | 24 + development/planxo/android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../planxo/android/settings.gradle.kts | 26 + development/planxo/cocoapods.readme | 55 + development/planxo/errors.txt | 789 +++ development/planxo/ios/.gitignore | 34 + .../planxo/ios/Flutter/AppFrameworkInfo.plist | 26 + development/planxo/ios/Flutter/Debug.xcconfig | 2 + .../planxo/ios/Flutter/Release.xcconfig | 2 + development/planxo/ios/Podfile | 43 + .../ios/Runner.xcodeproj/project.pbxproj | 616 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 101 + .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../planxo/ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 + .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 1418 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + development/planxo/ios/Runner/Info.plist | 49 + .../ios/Runner/Runner-Bridging-Header.h | 1 + .../planxo/ios/RunnerTests/RunnerTests.swift | 12 + .../planxo/lib/helpers/database_helper.dart | 122 + development/planxo/lib/main.dart | 4267 +++++++++++++++++ development/planxo/lib/models/sync_data.dart | 35 + development/planxo/linux/.gitignore | 1 + development/planxo/linux/CMakeLists.txt | 128 + .../planxo/linux/flutter/CMakeLists.txt | 88 + .../linux/flutter/generated_plugins.cmake | 27 + .../planxo/linux/runner/CMakeLists.txt | 26 + development/planxo/linux/runner/main.cc | 6 + .../planxo/linux/runner/my_application.cc | 144 + .../planxo/linux/runner/my_application.h | 18 + development/planxo/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 2 + .../macos/Flutter/Flutter-Release.xcconfig | 2 + development/planxo/macos/Podfile | 42 + .../macos/Runner.xcodeproj/project.pbxproj | 801 ++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 99 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../planxo/macos/Runner/AppDelegate.swift | 19 + .../AppIcon.appiconset/Contents.json | 68 + .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 33410 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 3922 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 527 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 7976 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1000 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 15670 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2044 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 ++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 28 + development/planxo/macos/Runner/Info.plist | 34 + .../macos/Runner/MainFlutterWindow.swift | 16 + .../planxo/macos/Runner/Release.entitlements | 26 + .../planxo/macos/Runner/entitlements.plist | 12 + .../macos/RunnerTests/RunnerTests.swift | 12 + development/planxo/pubspec.lock | 618 +++ development/planxo/pubspec.yaml | 99 + development/planxo/test/widget_test.dart | 30 + development/planxo/web/favicon.png | Bin 0 -> 917 bytes development/planxo/web/index.html | 38 + development/planxo/web/manifest.json | 35 + development/planxo/windows/.gitignore | 17 + development/planxo/windows/CMakeLists.txt | 108 + .../planxo/windows/flutter/CMakeLists.txt | 109 + .../windows/flutter/generated_plugins.cmake | 27 + .../planxo/windows/runner/CMakeLists.txt | 40 + development/planxo/windows/runner/Runner.rc | 121 + .../planxo/windows/runner/flutter_window.cpp | 71 + .../planxo/windows/runner/flutter_window.h | 33 + development/planxo/windows/runner/main.cpp | 43 + development/planxo/windows/runner/resource.h | 16 + .../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes .../planxo/windows/runner/runner.exe.manifest | 14 + development/planxo/windows/runner/utils.cpp | 65 + development/planxo/windows/runner/utils.h | 19 + .../planxo/windows/runner/win32_window.cpp | 288 ++ .../planxo/windows/runner/win32_window.h | 102 + 138 files changed, 12915 insertions(+) create mode 100644 .gitignore create mode 100644 Automiz_App_Plan.docx create mode 100644 development/CLAUDE.md create mode 100644 development/artwork_template_creater_and_editor/prepress_multi_artboard.html create mode 160000 development/asset_manager_app_web_socket create mode 160000 development/cms_asset_manager create mode 160000 development/cms_backend create mode 160000 development/cms_frontend_new create mode 160000 development/cms_workflow create mode 160000 development/dbase_manager create mode 100644 development/planxo/.gitignore create mode 100644 development/planxo/.metadata create mode 100644 development/planxo/PLANXO_SYSTEM_DOC.md create mode 100644 development/planxo/README.md create mode 100644 development/planxo/analysis_options.yaml create mode 100644 development/planxo/android/.gitignore create mode 100644 development/planxo/android/app/build.gradle.kts create mode 100644 development/planxo/android/app/src/debug/AndroidManifest.xml create mode 100644 development/planxo/android/app/src/main/AndroidManifest.xml create mode 100644 development/planxo/android/app/src/main/kotlin/com/example/planxo/MainActivity.kt create mode 100644 development/planxo/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 development/planxo/android/app/src/main/res/drawable/launch_background.xml create mode 100644 development/planxo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 development/planxo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 development/planxo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 development/planxo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 development/planxo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 development/planxo/android/app/src/main/res/values-night/styles.xml create mode 100644 development/planxo/android/app/src/main/res/values/styles.xml create mode 100644 development/planxo/android/app/src/profile/AndroidManifest.xml create mode 100644 development/planxo/android/build.gradle.kts create mode 100644 development/planxo/android/gradle.properties create mode 100644 development/planxo/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 development/planxo/android/settings.gradle.kts create mode 100644 development/planxo/cocoapods.readme create mode 100644 development/planxo/errors.txt create mode 100644 development/planxo/ios/.gitignore create mode 100644 development/planxo/ios/Flutter/AppFrameworkInfo.plist create mode 100644 development/planxo/ios/Flutter/Debug.xcconfig create mode 100644 development/planxo/ios/Flutter/Release.xcconfig create mode 100644 development/planxo/ios/Podfile create mode 100644 development/planxo/ios/Runner.xcodeproj/project.pbxproj create mode 100644 development/planxo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 development/planxo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 development/planxo/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 development/planxo/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 development/planxo/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 development/planxo/ios/Runner/AppDelegate.swift create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 development/planxo/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 development/planxo/ios/Runner/Base.lproj/Main.storyboard create mode 100644 development/planxo/ios/Runner/Info.plist create mode 100644 development/planxo/ios/Runner/Runner-Bridging-Header.h create mode 100644 development/planxo/ios/RunnerTests/RunnerTests.swift create mode 100644 development/planxo/lib/helpers/database_helper.dart create mode 100644 development/planxo/lib/main.dart create mode 100644 development/planxo/lib/models/sync_data.dart create mode 100644 development/planxo/linux/.gitignore create mode 100644 development/planxo/linux/CMakeLists.txt create mode 100644 development/planxo/linux/flutter/CMakeLists.txt create mode 100644 development/planxo/linux/flutter/generated_plugins.cmake create mode 100644 development/planxo/linux/runner/CMakeLists.txt create mode 100644 development/planxo/linux/runner/main.cc create mode 100644 development/planxo/linux/runner/my_application.cc create mode 100644 development/planxo/linux/runner/my_application.h create mode 100644 development/planxo/macos/.gitignore create mode 100644 development/planxo/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 development/planxo/macos/Flutter/Flutter-Release.xcconfig create mode 100644 development/planxo/macos/Podfile create mode 100644 development/planxo/macos/Runner.xcodeproj/project.pbxproj create mode 100644 development/planxo/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 development/planxo/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 development/planxo/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 development/planxo/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 development/planxo/macos/Runner/AppDelegate.swift create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 development/planxo/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 development/planxo/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 development/planxo/macos/Runner/Configs/Debug.xcconfig create mode 100644 development/planxo/macos/Runner/Configs/Release.xcconfig create mode 100644 development/planxo/macos/Runner/Configs/Warnings.xcconfig create mode 100644 development/planxo/macos/Runner/DebugProfile.entitlements create mode 100644 development/planxo/macos/Runner/Info.plist create mode 100644 development/planxo/macos/Runner/MainFlutterWindow.swift create mode 100644 development/planxo/macos/Runner/Release.entitlements create mode 100644 development/planxo/macos/Runner/entitlements.plist create mode 100644 development/planxo/macos/RunnerTests/RunnerTests.swift create mode 100644 development/planxo/pubspec.lock create mode 100644 development/planxo/pubspec.yaml create mode 100644 development/planxo/test/widget_test.dart create mode 100644 development/planxo/web/favicon.png create mode 100644 development/planxo/web/index.html create mode 100644 development/planxo/web/manifest.json create mode 100644 development/planxo/windows/.gitignore create mode 100644 development/planxo/windows/CMakeLists.txt create mode 100644 development/planxo/windows/flutter/CMakeLists.txt create mode 100644 development/planxo/windows/flutter/generated_plugins.cmake create mode 100644 development/planxo/windows/runner/CMakeLists.txt create mode 100644 development/planxo/windows/runner/Runner.rc create mode 100644 development/planxo/windows/runner/flutter_window.cpp create mode 100644 development/planxo/windows/runner/flutter_window.h create mode 100644 development/planxo/windows/runner/main.cpp create mode 100644 development/planxo/windows/runner/resource.h create mode 100644 development/planxo/windows/runner/resources/app_icon.ico create mode 100644 development/planxo/windows/runner/runner.exe.manifest create mode 100644 development/planxo/windows/runner/utils.cpp create mode 100644 development/planxo/windows/runner/utils.h create mode 100644 development/planxo/windows/runner/win32_window.cpp create mode 100644 development/planxo/windows/runner/win32_window.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..951137f --- /dev/null +++ b/.gitignore @@ -0,0 +1,221 @@ +# ============================================================ +# Automiz_app — repository .gitignore +# Apps covered: +# Python (Flask) : cms_backend, cms_asset_manager, cms_workflow +# Node : asset_manager_app_web_socket, dbase_manager +# React (CRA) : cms_frontend_new +# Flutter / Dart : planxo +# Static HTML : tpm_artwork_template_creater_and_editor +# Note: keep pubspec.lock, package-lock.json and requirements.txt TRACKED. +# ============================================================ + +# ------------------------------------------------------------ +# Secrets & environment — NEVER commit +# ------------------------------------------------------------ +.env +.env.* +!.env.example +!.env.sample +!.env.template +*.pem +*.key +*.p12 +*.pfx +*.keystore +*.jks +credentials +aws.json +service-account*.json + +# ------------------------------------------------------------ +# OS / editor / IDE +# ------------------------------------------------------------ +.DS_Store +.DS_Store? +._* +.AppleDouble +.LSOverride +.Spotlight-V100 +.Trashes +Icon? +Thumbs.db +ehthumbs.db +Desktop.ini +.idea/ +.vscode/ +*.iml +*.ipr +*.iws +*.swp +*.swo +*~ +*.sublime-workspace + +# ------------------------------------------------------------ +# Logs & temp +# ------------------------------------------------------------ +*.log +logs/ +*.tmp +*.temp +*.pid +*.seed +*.bak +*.orig + +# ============================================================ +# Python (cms_backend, cms_asset_manager, cms_workflow) +# ============================================================ +__pycache__/ +*.py[cod] +*$py.class +.Python +*.egg +*.egg-info/ +.eggs/ +build/ +dist/ +develop-eggs/ +downloads/ +.installed.cfg +pip-log.txt +pip-wheel-metadata/ + +# Virtual environments +.venv/ +venv/ +env/ +ENV/ +.python-version + +# Flask instance folder (may hold local config/secrets) +instance/ +.webassets-cache + +# Testing / typing / linting caches +.pytest_cache/ +.cache/ +.coverage +.coverage.* +htmlcov/ +coverage.xml +nosetests.xml +.mypy_cache/ +.dmypy.json +.ruff_cache/ +.tox/ + +# Local upload/scratch dirs used by the backend +uploads/ +tmp/ + +# ============================================================ +# Node / React (cms_frontend_new, asset_manager_app_web_socket, dbase_manager) +# ============================================================ +node_modules/ +/build +build/ +/dist +dist/ +.pnp +.pnp.* +coverage/ +.eslintcache +.stylelintcache +.npm +.yarn-integrity +.yarn/ +*.tsbuildinfo +.parcel-cache/ +.turbo/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# React production build (deploy artifact only) +cms_frontend_new/build/ + +# ============================================================ +# Flutter / Dart (planxo) +# ============================================================ +# Dart / pub +.dart_tool/ +.packages +.pub-cache/ +.pub/ +build/ +.flutter-plugins +.flutter-plugins-dependencies +**/doc/api/ +**/generated_plugin_registrant.* +**/GeneratedPluginRegistrant.* +# analyzer scratch dump +planxo/errors.txt + +# Flutter — iOS +**/ios/Pods/ +**/ios/.symlinks/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral/ +**/ios/Flutter/flutter_export_environment.sh + +# Flutter — macOS +**/macos/Pods/ +**/macos/Flutter/ephemeral/ +**/macos/Flutter/Flutter-Generated.xcconfig +**/macos/Flutter/GeneratedPluginRegistrant.swift + +# Flutter — Android +**/android/.gradle/ +**/android/captures/ +**/android/local.properties +**/android/key.properties +**/android/app/debug/ +**/android/app/profile/ +**/android/app/release/ +**/.cxx/ + +# Flutter — Linux / Windows ephemeral build +**/linux/flutter/ephemeral/ +**/windows/flutter/ephemeral/ + +# CocoaPods lockfile (generated) +**/Podfile.lock + +# Xcode user/derived data +**/xcuserdata/ +**/DerivedData/ +*.moved-aside +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +# Desktop sync app per-machine state (not source) +*.planxo_sync_meta.json +*.planxo_sync_settings.json + +# ============================================================ +# C / C++ build (in case the AutomizPDF SDK is added here) +# ============================================================ +CMakeBuild/ +CMakeCache.txt +CMakeFiles/ +*.o +*.obj +*.so +*.dylib +*.a + +# ============================================================ +# Archives / large local artifacts +# ============================================================ +*.zip +*.tar +*.tar.gz +*.7z diff --git a/Automiz_App_Plan.docx b/Automiz_App_Plan.docx new file mode 100644 index 0000000..e69de29 diff --git a/development/CLAUDE.md b/development/CLAUDE.md new file mode 100644 index 0000000..69cf44f --- /dev/null +++ b/development/CLAUDE.md @@ -0,0 +1,425 @@ +# TPM CMS — Compact Codebase Reference + +> **Purpose:** Load this file at the start of any AI session to understand the full stack without reading source files. +> Last updated: 2026-06-05 + +--- + +## Architecture Overview + +``` +Browser (React) ←→ tpm_cms_backend (Flask :5000) + ├── tpm_cms_workflow (Flask :5001) # email/node workflow engine + ├── tpm_cms_asset_manager (Flask :5002) # S3 file ops + └── tpm_asset_manager_app_web_socket # Node.js WS bridge + ├── WebSocket server (:WS_PORT) # desktop Flutter app connects here + └── HTTP bridge (:HTTP_PORT) # backend POSTs to /send_message +Flutter Desktop App ←→ WebSocket bridge +``` + +All Python services share the same MongoDB database (default database from MONGO_URI). No message queue; services call each other via HTTP. + +--- + +## Services + +### 1. `tpm_cms_backend` — main API (Flask + JWT) +- **Entry:** `app.py` (~3466 lines, single file) +- **Port:** 5000 (dev), proxied via Nginx in prod +- **Auth:** JWT (`flask_jwt_extended`), bcrypt passwords, optional Azure SSO +- **Key env vars:** `MONGO_URI`, `JWT_SECRET_KEY`, `FLASK_SECRET_KEY`, `AZURE_REDIRECT_URI`, `WS_BRIDGE_HTTP_URL`, `DESKTOP_UNIQUE_ID`, `ASSET_MANAGER_URL` + +#### Collections used +| Collection | Purpose | +|---|---| +| `users` | auth, roles (admin/pm/lead/user) | +| `clients` | client companies | +| `projects` | projects with embedded stages[] | +| `tasks` | user task assignments with time tracking | +| `brief_templates` | project brief + workflow templates | +| `sections` | reusable brief sections | +| `histories` | project history log | +| `dashboard_configs` | per-user dashboard widget configs | +| `planxo_auth_keys` | desktop app auth tokens | +| `azure_config` | Azure SSO config (single doc) | +| `settings` | `{type:'desktop_sync'}`, `{type:'folder_sync'}` | +| `planxo_approvals` | desktop access approval records | + +#### API routes (all `@jwt_required()` unless noted) +``` +POST /register # public +POST /login # public; GET returns HTML login page +GET /me +GET /health # public + +# Clients +GET/POST /clients +GET/PUT/DELETE /clients/ + +# Projects +GET/POST /projects +GET/PUT/DELETE /projects/ # id = MongoDB ObjectId +GET /projects/ # id = numeric project_id +GET /projects/search +GET/POST /projects//history +GET /projects//brief_template +POST /projects//brief +GET /projects//stages +POST /projects//stages/ # set status +POST /projects//stages//start +POST /projects//stages//pause +POST /projects//stages//complete +POST /projects//stages//assign +POST /projects//desktop-download # triggers WS bridge + +# Brief Templates / Sections +GET/POST /brief_templates +GET/PUT/DELETE /brief_templates/ +GET /clients//brief_templates +GET/POST /sections +PUT/DELETE /sections/ + +# Tasks +GET/POST /tasks +POST /tasks//assign|start|pause|resume|complete|reject + +# Users (admin only for write) +GET/POST /users +PUT /users/ +POST /users//activate|deactivate + +# Dashboard +GET /dashboard-stats +GET/POST /dashboard-configs +GET/PUT/DELETE /dashboard-configs/ +GET /dashboard-configs/default +POST /dashboard-data # widget data with filters +POST /dashboard-export # CSV + +# Settings +GET/POST /settings/desktop-sync +GET/POST /settings/folder-sync + +# PlanXO Desktop Auth +GET /planxo-auth/ # HTML approval page +POST /planxo/app/auth/register-key # public +POST /api/planxo/app/auth//approve +POST /planxo/app/auth//approve # alias +POST /api/planxo-auth//approve # alias +GET /planxo/app/auth/check +POST /planxo/app/auth/revoke +GET /planxo/app/auth/keys +POST /planxo/app/auth/validate-key # public (called by WS server) +GET /planxo/folders/filtered # role-filtered S3 folder list + +# Azure SSO +GET /azure-login-url +POST /azure-callback +POST /azure-config (admin) + +# Server admin +GET /server-status +GET /server-status/logs/ +POST /server-status/restart/ # admin only +GET/POST /desktop-bridge/health|clients # proxy to WS bridge + +# Files (GridFS — legacy) +POST /files/upload +GET /files/ + +# Color (prepress) +POST /compute # Pantone→ECG via transicc +``` + +#### Role system +- `role_required('admin')` — admin only +- `role_required('pm','admin','lead','user')` — most write ops +- `jwt_required()` — any authenticated user +- `get_authenticated_user()` — reads token from URL param `?token=` OR `Authorization: Bearer` + +--- + +### 2. `tpm_cms_asset_manager` — S3 file service (Flask :5002) +- **Entry:** `asset_manager_app.py` +- **No auth** — internal calls only from backend +- **Key env vars:** `S3_BUCKET`, `AWS_REGION`, `MONGO_URI` + +#### S3 path convention +``` +clients/{client_name}/{numeric_project_id}/ ← if client exists +projects/{numeric_project_id}/ ← no client +``` +Folders created by uploading `{path}/.keep` placeholder. + +#### Routes +``` +POST /clients//create-folder +POST /projects//create-folder +POST /folders/create # generic, validates root prefix +POST /folders/batch-create # {base_folder, subfolders:[]} +GET /assets # ?folder=&q=&owner_id=&include_folders= +DELETE /assets/ +POST /assets/presign-upload # returns S3 presigned URL +POST /assets/confirm-upload # save asset record to MongoDB +GET /assets//download # presigned GET URL +POST /assets/batch-delete +GET /assets/folder-contents # flat list with S3 metadata +POST /zip-download # zip multiple keys +``` + +Assets stored in MongoDB `assets` collection with `s3_key`, `folder`, `filename`, `content_type`, `size`, `owner_id`, `created_at`. + +--- + +### 3. `tpm_cms_workflow` — workflow engine (Flask :5001) +- **Entry:** `workflow_app.py` +- **No auth** — internal calls only from backend +- **Key env vars:** `MONGO_URI`, `AWS_REGION`, `SENDER_EMAIL`, `SENDER_NAME` +- Uses `ThreadPoolExecutor(max_workers=5)` for async node processing + +#### Collections +- `workflows` — `{project_id, nodes:[], edges:[]}` +- `workflow_logs` — execution log per node + +#### Node types +- `project` — pass-through start node +- `sendEmail` — sends via AWS SES; resolves `{{variable}}` placeholders +- `router` — conditional branching +- `stage` — maps to project stage key +- `approval` — waits for human approval action + +#### Routes +``` +POST /workflow # create workflow for project +POST /workflow//process # {node_id, variables:{}} — triggers async execution +GET /workflow/ +GET /workflow/project/ +POST /workflow//nodes//approve|reject +``` + +--- + +### 4. `tpm_asset_manager_app_web_socket` — WS bridge (Node.js) +- **Entry:** `server.js` +- **Ports:** `WS_PORT` (WebSocket), `HTTP_PORT` (Express HTTP) +- **Auth:** `?apiKey=` on WebSocket connect + `unique_id` per client +- Stores connected clients in `Map` + +#### HTTP endpoints (called by backend) +``` +POST /send_message # {unique_id, message:{type,data}} → forward to WS client +POST /request_download # {unique_id, folder, projectId} → trigger download on desktop +GET /health # returns {clients:[...unique_ids]} +GET /clients +``` + +#### WebSocket message types (server→client) +- `auth_approved` — desktop auth approved; includes user, expires_at, sync_interval +- `auth_revoked` — user logged in from web; desktop must logout +- `download_request` — trigger file download + +#### WebSocket message types (client→server) +- `register_auth_key` — desktop registers key before browser approval +- `file_sync_complete`, `file_upload_complete` — status callbacks + +--- + +## Data Models (key fields) + +### Project +```json +{ + "_id": ObjectId, + "project_id": 1000007, // numeric, auto-increment from last+1 + "projectName": "string", // indexed unique per clientId + "clientId": ObjectId|null, + "project_name": "string", // duplicate of projectName (legacy) + "client_id": "string"|null, // duplicate of clientId (legacy) + "brand": "", "product": "", "variant": "", + "brief": {}, + "template_id": "string", + "stages": [ + { + "key": "stage_key", + "title": "Stage Title", + "status": "pending|in_progress|paused|completed", + "time": {"total_seconds": 0}, + "start_time": 1234567890, // unix timestamp, present only when in_progress + "assigned_to": "user_id", + "history": [{"action":"start","timestamp":0,"user_id":""}] + } + ], + "version": 1, + "created_at": ISODate, + "created_by": "user_id", + "project_update_history": [{"user_id":"","user_name":"","changed_fields":[],"timestamp":ms}] +} +``` + +### User +```json +{ + "_id": ObjectId, + "username": "string", + "password": "bcrypt_hash", + "role": "admin|pm|lead|user", + "email": "", "name": "", "fullName": "", // name+fullName kept in sync + "mobile": "", + "isActive": true, "active": true, // both kept in sync + "last_active": ISODate // updated on /me call +} +``` + +### PlanXO Auth Key +```json +{ + "auth_key": "string", + "unique_id": "desktop_client_id", + "status": "pending|approved|revoked", + "is_active": true, + "user_id": ObjectId, + "role": "string", + "expires_at": ISODate, // admin: +100 years; others: +8 hours + "approved_at": ISODate +} +``` + +--- + +## Code Review Findings + +### 🔴 Critical Issues + +**1. Password logged in plaintext (backend/app.py:300)** +```python +print(f"Login attempt for user: {username}, password: {password}") # REMOVE THIS +``` + +**2. `get_current_user_id()` referenced but never defined (app.py:3402)** +`/planxo/folders/filtered` calls `get_current_user_id()` — this will raise `NameError` at runtime. Replace with `get_jwt_identity()` and add `@jwt_required()`. + +**3. `safe_text()` referenced but never defined (app.py:3142)** +`/projects//desktop-download` calls `safe_text(resp)` which doesn't exist — will crash. + +**4. `pymongo` imported twice; `pymongo.errors.DuplicateKeyError` used without top-level import** +`app.py:7` imports `secrets` twice. `pymongo` is used at line 785 but only imported via `from pymongo import ...` — `pymongo.errors` won't resolve. Add `import pymongo` at top. + +**5. `/compute` endpoint has no auth** +The Pantone/ECG color conversion endpoint is publicly accessible. Add `@jwt_required()`. + +**6. Asset manager has no authentication** +All routes in `asset_manager_app.py` are unauthenticated. If the port is ever exposed, anyone can read/write S3. Add at minimum an internal shared secret header check. + +**7. Unreachable code in `start_stage` (app.py:1232)** +```python +return jsonify({'success': True, 'stages': stages, 'workflow_result': workflow_result}) +return jsonify({'success': True, 'stages': stages}) # ← dead code, never reached +``` + +### 🟡 Important Issues + +**8. `list_projects` loads ALL projects with no pagination** +`projects_col.find().sort(...)` returns everything. With hundreds of projects this will be slow. Add `limit`/`skip` or cursor-based pagination. + +**9. Duplicate field names in MongoDB documents** +`project_name`/`projectName`, `client_id`/`clientId`, `name`/`fullName`, `active`/`isActive`, `created_at`/`createdAt` are all stored twice. This doubles write load and creates inconsistency risk. Pick one canonical name per field. + +**10. Workflow service URL hardcoded** +`app.py:878,885,894` uses `http://localhost:5001` directly instead of an env var like `WORKFLOW_URL`. Inconsistent with other services. + +**11. Stage parsing handles both JSON string and list** +Multiple endpoints do: +```python +if isinstance(project['stages'], str): + stages = json.loads(project['stages']) +else: + stages = project['stages'] +``` +Stages should always be stored as a list. This defensive code masks a schema inconsistency. + +**12. `before_request` logs every endpoint — noisy in production** +```python +@app.before_request +def log_request(): + print(f">>> Endpoint called: {request.endpoint}") +``` +Replace with proper logging or remove for production. + +**13. DEBUG print statements left in approval flows (app.py:2394–2512)** +Many `print(f"DEBUG: ...")` lines in the PlanXO approval endpoints should be removed or converted to `logging.debug()`. + +**14. `get_azure_config()` is a function, not a route** +`app.py:2937` defines `get_azure_config()` without a `@app.route` decorator, so it's never reachable. + +**15. WS bridge API key is in env with a weak default** +`server.js:22`: `process.env.API_KEY || "aasdf345scwe"` — the fallback default is weak. Fail hard if `API_KEY` not set in production. + +**16. `delete_asset` in asset manager uses string `_id`** +`assets.find_one({"_id": asset_id})` — MongoDB stores `_id` as ObjectId, not string. This will never find anything. Use `ObjectId(asset_id)`. + +### 🟢 Suggestions + +**17. Extract stage manipulation into a helper** +`start_stage`, `pause_stage`, `complete_stage`, and `assign_stage` share ~40 lines of identical stage-parsing boilerplate. Extract to `_get_stages(project)` and `_save_stages(project_id, stages)`. + +**18. `get_project_folder_path` is duplicated logic** +The folder path logic in `app.py:3082` and `asset_manager_app.py` should live in one place (asset manager) and backend should call it. + +**19. JWT token expiry is 1 hour; comment says 12h/1d/30d** +`JWT_ACCESS_TOKEN_EXPIRES = timedelta(hours=1)` — the comment is stale. Clarify intended expiry and consider refresh tokens. + +**20. No index on `planxo_auth_keys.auth_key`** +This field is queried on every desktop connect. Add a unique index. + +--- + +## Environment Variables Reference + +### Backend (`.env` / `.env.prod`) +``` +MONGO_URI= +JWT_SECRET_KEY= +FLASK_SECRET_KEY= +FLASK_ENV=production +AZURE_REDIRECT_URI=https://cms.techpremedia.com/azure-callback +AZURE_CLIENT_SECRET= +WS_BRIDGE_HTTP_URL=http://localhost:5003 +DESKTOP_UNIQUE_ID= +ASSET_MANAGER_URL=http://localhost:5002 +``` + +### Asset Manager +``` +MONGO_URI= +S3_BUCKET= +AWS_REGION= +``` + +### Workflow +``` +MONGO_URI= +AWS_REGION= +SENDER_EMAIL= +SENDER_NAME= +FLASK_SECRET_KEY= +``` + +### WebSocket Bridge +``` +WS_PORT= +HTTP_PORT= +API_KEY= +ASSET_MANAGER_URL=http://localhost:5002 +CMS_BACKEND_URL=https://cms.techpremedia.com +NODE_ENV=production +``` + +--- + +## Key Patterns + +- **ObjectId serialization:** every route converts `_id` via `str(doc['_id'])` before jsonify +- **`now()`:** all services define their own `now()` returning `datetime.utcnow()` +- **S3 "folders":** implemented as empty `.keep` placeholder objects +- **Project numeric ID:** auto-incremented by querying `projects_col.find_one(sort=[("project_id",-1)])` — not atomic, could duplicate under concurrent creates +- **Desktop auth flow:** desktop → register-key → browser opens `/planxo-auth/` → user approves → WS bridge notified → desktop receives `auth_approved` diff --git a/development/artwork_template_creater_and_editor/prepress_multi_artboard.html b/development/artwork_template_creater_and_editor/prepress_multi_artboard.html new file mode 100644 index 0000000..fddbf1c --- /dev/null +++ b/development/artwork_template_creater_and_editor/prepress_multi_artboard.html @@ -0,0 +1,1328 @@ + + + + + +Prepress Studio + + + + +
+ +
+ + +
+
+ + + + + + + +
+
+ + +
+ + +
+
Bleed
+
Trim
+
Crease
+
Safe
+
+
+
+ + +
+
+
+ +
+ + +
+
+ + + + +
+
+ +
+
Text
+
+
H
Heading
+
Paragraph
+
T
Single line
+
Aa
Legal text
+
+
Tables
+
+
Nutrition EU
+
Nutrition US
+
Ingredients
+
Custom table
+
+
Compliance
+
+
▮▮
Barcode
+
QR Code
+
Claim badge
+
Symbol
+
+
Media
+
+
Image
+
Shape
+
+ +
Auto layout
+
+
+ + +
+
Gappx
+ +
+ +
Alignment
+
+
Align selected to artboard or first object
+
+
+ + +
+
+
+ + + + + + + + + +
+
+ + +
+
+ + +
+
+
+ + + + + + + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+
+ + 100% + + +
+
+ + + +
+ +
Ready100%
+
+
+

New artboard

+
+
+ + +
+
+
+ + + + diff --git a/development/asset_manager_app_web_socket b/development/asset_manager_app_web_socket new file mode 160000 index 0000000..ca15bcb --- /dev/null +++ b/development/asset_manager_app_web_socket @@ -0,0 +1 @@ +Subproject commit ca15bcb4e6d0a9c518502ecf00dafb73149d5538 diff --git a/development/cms_asset_manager b/development/cms_asset_manager new file mode 160000 index 0000000..68b59e3 --- /dev/null +++ b/development/cms_asset_manager @@ -0,0 +1 @@ +Subproject commit 68b59e38483aa042a45814e89d2ea02935fc9bae diff --git a/development/cms_backend b/development/cms_backend new file mode 160000 index 0000000..481428a --- /dev/null +++ b/development/cms_backend @@ -0,0 +1 @@ +Subproject commit 481428ae55d491eee1bae30bb541c1c19e810109 diff --git a/development/cms_frontend_new b/development/cms_frontend_new new file mode 160000 index 0000000..ff0e604 --- /dev/null +++ b/development/cms_frontend_new @@ -0,0 +1 @@ +Subproject commit ff0e604afad28c15ab0e5f738fe974e8bc3a12c2 diff --git a/development/cms_workflow b/development/cms_workflow new file mode 160000 index 0000000..f81ae56 --- /dev/null +++ b/development/cms_workflow @@ -0,0 +1 @@ +Subproject commit f81ae56eb1cc488a7a908d137cf4363f00d859fd diff --git a/development/dbase_manager b/development/dbase_manager new file mode 160000 index 0000000..fcebcc3 --- /dev/null +++ b/development/dbase_manager @@ -0,0 +1 @@ +Subproject commit fcebcc3a3d9591c0a4873316d9d60c8e449d072b diff --git a/development/planxo/.gitignore b/development/planxo/.gitignore new file mode 100644 index 0000000..3820a95 --- /dev/null +++ b/development/planxo/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/development/planxo/.metadata b/development/planxo/.metadata new file mode 100644 index 0000000..5f4336f --- /dev/null +++ b/development/planxo/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: android + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: ios + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: linux + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: macos + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: web + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: windows + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/development/planxo/PLANXO_SYSTEM_DOC.md b/development/planxo/PLANXO_SYSTEM_DOC.md new file mode 100644 index 0000000..accbe05 --- /dev/null +++ b/development/planxo/PLANXO_SYSTEM_DOC.md @@ -0,0 +1,236 @@ +# PlanXO Desktop Sync – System Documentation & Issue Report + +> Last reviewed: March 2026 +> Target platform: macOS Desktop (Flutter); Windows Desktop planned + +--- + +## 1. System Architecture + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ PlanXO Desktop App (Flutter/Dart) │ +│ main.dart │ +└───────────────────────────┬─────────────────────────────────────┘ + WebSocket (wss) │ HTTP (https / dio) + ┌──────────────────┘──────────────────────┐ + ▼ ▼ +┌─────────────────────┐ ┌──────────────────────────┐ +│ WebSocket Bridge │ axios (HTTP)│ Asset Manager (Python) │ +│ server.js (Node) │◄──────────────┤ asset_manager_app.py │ +│ Port: WS_PORT | │ │ Port: 5002 │ +│ Port: HTTP_PORT │ │ S3 + MongoDB │ +└─────────┬───────────┘ └──────────────────────────┘ + │ HTTP (axios) + ▼ +┌─────────────────────┐ +│ CMS Backend │ +│ app.py (Flask) │ +│ + MongoDB + JWT │ +└─────────────────────┘ +``` + +### Component Roles + +| Component | Language | Responsibility | +|---|---|---| +| `main.dart` | Flutter/Dart | Desktop UI, file watch, upload/download sync | +| `server.js` | Node.js (Express + WS) | WebSocket relay, auth key registration/approval, message routing | +| `asset_manager_app.py` | Python (Flask) | S3 operations: upload presign, download folder as ZIP, asset CRUD | +| `app.py` | Python (Flask) | CMS logic: users, projects, auth key CRUD, JWT, role enforcement | + +### Frontend Admin Settings + +| File | Purpose | +|---|---| +| `DesktopSyncSettings.js` | Sets global sync interval (stored in CMS backend via `/settings/desktop-sync`) | +| `FolderSyncSettings.js` | Sets admin folder age filter (how many days back to sync; via `/settings/folder-sync`) | + +--- + +## 2. Authentication Flow + +``` +Desktop App WebSocket Server CMS Backend Browser + │ │ │ │ + │─── WSS connect (apiKey, unique_id) ───────────────────► │ │ + │ │ │ │ + │─── register_auth_key ─────────► │ │ + │ │─── POST /planxo/app/auth/register-key ──────────► │ + │ │◄── {auth_key, browser_url} ───────────────────── │ + │◄── auth_key_registered ───────│ │ │ + │ │ │ │ + │─── open browser with /planxo-auth/{auth_key} ─────────────────────────────────► │ + │ │ │ │ + │ (polling validate_auth every 2s) ──────────────────────► │ │ + │ │ │ │ + │ │ Admin approves in browser ◄────────────────│ + │ │◄── POST /api/planxo/app/auth/{key}/approve ────── │ + │◄── auth_approved (user, sync_interval) ────────────────── │ │ + │ │ │ │ + │ store auth key, start sync │ │ +``` + +--- + +## 3. Sync Logic (Download Path) + +1. After successful auth, `fetchFileList()` is called. +2. App fetches filtered folders list: `GET /planxo/folders/filtered` (HTTP, with `X-Auth-Key` header). +3. For each folder in the list, `_downloadAndExtractFolder(folder)` is called: + - `GET /folders/download?folder=` → returns a ZIP stream. + - ZIP is decoded with `archive` package. + - For each file in ZIP: if local file does NOT exist OR remote mtime is newer → write to disk. + - After extraction, `_primeKnownKeys(prefix)` fetches the S3 asset list into `_knownS3Keys`. + - A `DirectoryWatcher` is started on the local folder. +4. Periodic sync (per-folder timer or global timer) calls `_downloadAndExtractFolder` again to check for remote changes. + +## 4. Sync Logic (Upload Path) + +1. `DirectoryWatcher` fires `ADD` or `MODIFY` events. +2. `_onLocalFileChanged(path, folderPrefix)` is called: + - Debounces: skip if same file was processed < 1 second ago. + - Computes SHA-256 hash. Compares to `_syncMeta[path]['hash']`. Skips if unchanged. + - If file key is in `_knownS3Keys`: calls `_replaceExisting()` (presign-replace → PUT to S3 → complete-replace). + - Else: calls `_uploadNew()` (presign-upload → PUT to S3 → register-upload). + - Updates `_syncMeta` and persists to `~/.planxo_sync_meta.json`. +3. Periodic `_syncLocalChanges()` also scans all files and uploads modified ones (same logic). + +## 5. Persistence Files (macOS `$HOME`) + +| File | Content | +|---|---| +| `~/.planxo_client` | Last used client name (subdomain) | +| `~/.planxo_auth_key` | Saved auth key (plaintext) | +| `~/.planxo_storage` | Storage base path | +| `~/.planxo_sync_settings.json` | Per-folder sync enabled/interval | +| `~/.planxo_sync_meta.json` | Per-file `{lastModified, hash}` for change detection | +| `~/Library/.../sync_data.db` | SQLite event log via DatabaseHelper | + +## 6. Role-Based Sync Intent (Design Goal) + +| Role | Intended Behaviour | +|---|---| +| **Normal user** | Sync only folders/projects assigned to them | +| **Admin** | Sync all projects created within `folder_age_days` (configured in Frontend `FolderSyncSettings.js`) | + +The filtering is supposed to happen at `GET /planxo/folders/filtered` on the CMS backend. The desktop app currently passes `X-Auth-Key` so the backend knows who the user is. + +--- + +## 7. Issues Found + +### 🔴 Critical Bugs + + + +### 🟠 Logic Bugs + + + + + + +#### 7.16 `_buildLoginScreen` Shows WS Status But Never Initiates Connection + +The login screen shows a red/green dot for WS status, but `_connectWs()` is never called on app launch. The dot will always be red until the user clicks "Login". + +See also issue 7.14 above. + +--- + +#### 7.17 `MyApp` (Root Widget) Holds All State + +The entire app state including network connections, timers, and file watchers lives in `_MyAppState` which wraps `MaterialApp`. This is an anti-pattern in Flutter. A rebuild of `MyApp` disposes and re-creates all state including open WebSockets. + +**Recommendation:** Break out a `HomePage` stateful widget and keep `MyApp` as a thin shell containing only `MaterialApp` configuration. + +--- + +#### 7.18 Auth Key Stored as Plaintext File + +`~/.planxo_auth_key` is a plaintext file readable by any process running as the same user. On a shared machine this is a security risk. + +**Recommendation (macOS):** Use the macOS Keychain via the `flutter_secure_storage` package. + +--- + +#### 7.19 `_storageController` and `_clientController` Are Leaked + +These `TextEditingController` instances are initialized in `initState` but the `_storageController.text` is only set later in async callbacks (`_loadStoragePath`, `_loadClientName`). If the widget is disposed before these complete, there could be a "setState called after dispose" error. The async loaders call `setState()` without a `mounted` guard. + +**Fix:** Wrap all `setState()` calls inside async methods with `if (!mounted) return;`. + +--- + +#### 7.20 `_syncInterval` from Backend Not Passed to Per-Folder Timers + +`_syncInterval` (received from `auth_approved` or `auth_success`) is used only for `_periodicSyncTimer`. The per-folder timers (`_syncTimers`) use a locally configured interval. There is no reconciliation between the admin-set global interval from the frontend (`DesktopSyncSettings.js`) and the per-folder interval. + +**Fix:** When `_syncInterval` is received from the server, apply it as the default for any new folder timers and update existing ones. + +--- + +## 8. Windows Desktop Readiness + +| Item | Status | +|---|---| +| `dart:io` WebSocket | ✅ Works on Windows | +| `file_selector` | ✅ Has Windows support | +| `watcher` | ✅ Uses native FS events | +| `sqflite` + FFI | ⚠️ Needs `sqflite_common_ffi` + Windows SQLite DLL | +| `Process.run('open', [...])` | ❌ macOS only – all `openInFinder`, `_openUrl`, `_ensureStorageBaseExists` use `open` command | +| `Platform.environment['HOME']` | ⚠️ On Windows use `Platform.environment['USERPROFILE']` | +| Sandbox / path permissions | ✅ Windows has fewer restrictions than macOS | + +**Recommended abstraction:** + +```dart +String getHomeDir() { + if (Platform.isMacOS || Platform.isLinux) { + return Platform.environment['HOME'] ?? Directory.current.path; + } else if (Platform.isWindows) { + return Platform.environment['USERPROFILE'] ?? Platform.environment['HOMEPATH'] ?? 'C:\\Users\\Default'; + } + return Directory.current.path; +} + +Future openInExplorer(String path) async { + if (Platform.isMacOS) { + await Process.run('open', ['-R', path]); + } else if (Platform.isWindows) { + await Process.run('explorer', ['/select,', path]); + } else { + await Process.run('xdg-open', [p.dirname(path)]); + } +} +``` + +--- + +## 9. Summary Table + +| # | Severity | Category | Issue | +|---|---|---|---| +| 7.1 | 🔴 Critical | Architecture | `unique_id` hardcoded – breaks multi-machine | +| 7.2 | 🔴 Critical | Platform | `sqflite` won't work on macOS/Windows desktop without FFI | +| 7.3 | 🔴 Critical | Logic | `_uploadFile` ignores `relativePath` param | +| 7.4 | 🔴 Critical | Logic | ZIP mtime is DOS format, not Unix – skip-overwrite logic wrong | +| 7.5 | 🔴 Critical | Stability | `_ws!.add` without null/open guard → potential crash | +| 7.6 | 🟠 Bug | Stability | Double reconnect scheduling, exponential reconnect storms | +| 7.7 | 🟠 Bug | Logic | `_handleAuthRevoked` leaks per-folder timers | +| 7.8 | 🟠 Bug | Performance | Auth polling sends WS validate during pending phase (noise) | +| 7.9 | 🟠 Bug | Logic | `_primeKnownKeys` expects List, gets Map → always empty | +| 7.10 | 🟠 Bug | Logic | Role-based folder filtering skipped when WS is connected | +| 7.11 | 🟠 Bug | Logic | Two overlapping periodic sync timers cause race conditions | +| 7.12 | 🟡 Quality | State | `_knownS3Keys` lost on restart → all files re-uploaded as new | +| 7.13 | 🟡 Quality | Deps | `http` and `web_socket_channel` are unused dependencies | +| 7.14 | 🟡 Quality | UX | WS not auto-connected on startup with saved auth | +| 7.15 | 🟡 Quality | Feature | `guessContentType` missing most media file types | +| 7.16 | 🟡 Quality | UX | Login screen WS indicator always red at launch | +| 7.17 | 🟡 Quality | Architecture | All state in root `MyApp` widget (anti-pattern) | +| 7.18 | 🟡 Quality | Security | Auth key stored as plaintext file | +| 7.19 | 🟡 Quality | Stability | `setState` after dispose possible in async loaders | +| 7.20 | 🟡 Quality | Feature | Backend sync interval not applied to per-folder timers | +| W.1 | 🟠 Platform | Windows | All `Process.run('open', ...)` calls are macOS-only | +| W.2 | 🟠 Platform | Windows | `HOME` env var not set on Windows – use `USERPROFILE` | diff --git a/development/planxo/README.md b/development/planxo/README.md new file mode 100644 index 0000000..f50e0a0 --- /dev/null +++ b/development/planxo/README.md @@ -0,0 +1,16 @@ +# planxo + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/development/planxo/analysis_options.yaml b/development/planxo/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/development/planxo/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/development/planxo/android/.gitignore b/development/planxo/android/.gitignore new file mode 100644 index 0000000..be3943c --- /dev/null +++ b/development/planxo/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/development/planxo/android/app/build.gradle.kts b/development/planxo/android/app/build.gradle.kts new file mode 100644 index 0000000..5ca28c5 --- /dev/null +++ b/development/planxo/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.planxo" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.planxo" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/development/planxo/android/app/src/debug/AndroidManifest.xml b/development/planxo/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/development/planxo/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/development/planxo/android/app/src/main/AndroidManifest.xml b/development/planxo/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..209d504 --- /dev/null +++ b/development/planxo/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/android/app/src/main/kotlin/com/example/planxo/MainActivity.kt b/development/planxo/android/app/src/main/kotlin/com/example/planxo/MainActivity.kt new file mode 100644 index 0000000..e045fa6 --- /dev/null +++ b/development/planxo/android/app/src/main/kotlin/com/example/planxo/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.planxo + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/development/planxo/android/app/src/main/res/drawable-v21/launch_background.xml b/development/planxo/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/development/planxo/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/development/planxo/android/app/src/main/res/drawable/launch_background.xml b/development/planxo/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/development/planxo/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/development/planxo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/development/planxo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/development/planxo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/development/planxo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/development/planxo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/development/planxo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/development/planxo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/development/planxo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/development/planxo/android/app/src/main/res/values-night/styles.xml b/development/planxo/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/development/planxo/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/development/planxo/android/app/src/main/res/values/styles.xml b/development/planxo/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/development/planxo/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/development/planxo/android/app/src/profile/AndroidManifest.xml b/development/planxo/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/development/planxo/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/development/planxo/android/build.gradle.kts b/development/planxo/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/development/planxo/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/development/planxo/android/gradle.properties b/development/planxo/android/gradle.properties new file mode 100644 index 0000000..f018a61 --- /dev/null +++ b/development/planxo/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/development/planxo/android/gradle/wrapper/gradle-wrapper.properties b/development/planxo/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ac3b479 --- /dev/null +++ b/development/planxo/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/development/planxo/android/settings.gradle.kts b/development/planxo/android/settings.gradle.kts new file mode 100644 index 0000000..fb605bc --- /dev/null +++ b/development/planxo/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.9.1" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app") diff --git a/development/planxo/cocoapods.readme b/development/planxo/cocoapods.readme new file mode 100644 index 0000000..eeaff2e --- /dev/null +++ b/development/planxo/cocoapods.readme @@ -0,0 +1,55 @@ +# install a modern Ruby with rbenv (safe, no sudo for gems) +# 1) Install Homebrew (if you don't have it) +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +# 2) Install rbenv + ruby-build +brew update +brew install rbenv ruby-build + +# 3) Initialize rbenv in your shell (zsh) +echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc +echo 'eval "$(rbenv init -)"' >> ~/.zshrc +source ~/.zshrc + +# 4) Install a modern Ruby (pick a 3.x version; 3.2.x or 3.1.x are fine) +rbenv install 3.2.2 # or `rbenv install 3.3.0` if available and you want latest +rbenv global 3.2.2 + +# verify +ruby -v + +# 5) Install CocoaPods (no sudo) +gem install cocoapods + +# 6) Rehash rbenv shims +rbenv rehash + + +# 1. Confirm rbenv state and active ruby +rbenv versions +rbenv global # shows global version +ruby -v + +# 2. Make sure the active ruby is what you expect (optional if you already set it) +# If `rbenv global` is not 3.2.2, set it: +rbenv global 3.2.2 + +# 3. Install CocoaPods for the active Ruby (no sudo) +gem install cocoapods + +# 4. Rebuild rbenv shims so `pod` is available +rbenv rehash + +# 5. Verify +which pod +pod --version + + +cd # e.g. ~/Dev/planxo or wherever +# if project has macOS support: +cd macos +pod install --repo-update +cd .. +flutter clean +flutter pub get +flutter run -d macos diff --git a/development/planxo/errors.txt b/development/planxo/errors.txt new file mode 100644 index 0000000..efc8470 --- /dev/null +++ b/development/planxo/errors.txt @@ -0,0 +1,789 @@ +Launching lib/main.dart on macOS in debug mode... +Running pod install... +Building macOS application... + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:82359:23: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 82359 | int nCopy = MIN(nOut, nIn); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:82393:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 82393 | nOut = MIN(pBt->usableSize - 4, nRem); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:84401:21: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 84401 | const int nCopy = MIN(nSrcPgsz, nDestPgsz); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:84672:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 84672 | iEnd = MIN(PENDING_BYTE + pgszDest, iSize); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:86227:49: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 86227 | if( sqlite3VdbeMemClearAndResize(pMem, (int)MAX(nAlloc,32)) ){ + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:86309:49: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 86309 | if( sqlite3VdbeMemClearAndResize(pMem, (int)MAX(nAlloc,32)) ){ + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:92009:22: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 92009 | int nCmp = MIN(mem1.n, pRhs->n); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:92037:22: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 92037 | int nCmp = MIN(nStr, pRhs->n); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:92245:12: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 92245 | nCmp = MIN( pPKey2->n, nStr ); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:94656:42: warning: implicit conversion loses integer precision: 'sqlite3_uint64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 94656 | rc = sqlite3_bind_zeroblob(pStmt, i, n); + | ~~~~~~~~~~~~~~~~~~~~~ ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:95497:19: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 95497 | nextIndex = MAX(idx + 1, nextIndex); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:95475:41: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 95475 | sqlite3_str_append(&out, zRawSql, n); + | ~~~~~~~~~~~~~~~~~~ ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:95493:53: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 95493 | idx = sqlite3VdbeParameterIndex(p, zRawSql, nToken); + | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:96416:48: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 96416 | rc = sqlite3BtreePayload(pC->uc.pCursor, iOffset, len, pBuf); + | ~~~~~~~~~~~~~~~~~~~ ^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:96439:50: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 96439 | rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, iOffset, len, pDest); + | ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:99361:21: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 99361 | pOut->u.nZero = nZero; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:106058:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 106058 | sqlite3_int64 nNew = MAX(128, 2*(sqlite3_int64)p->nAlloc); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:106062:19: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 106062 | p->nAlloc = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:106339:25: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 106339 | res = memcmp(v1, v2, (MIN(n1, n2) - 13)/2); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:106535:17: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 106535 | mxCache = MIN(mxCache, SQLITE_MAX_PMASZ); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:106536:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 106536 | pSorter->mxPmaSize = MAX(pSorter->mnPmaSize, (int)mxCache); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:107372:26: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 107372 | pSorter->mxKeysize = nPMA; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:107376:33: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 107376 | int nMin = pSorter->iMemory + nReq; + | ~~~~ ~~~~~~~~~~~~~~~~~^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:107383:45: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 107383 | iListOff = (u8*)pSorter->list.pList - pSorter->list.aMemory; + | ~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:107394:26: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 107394 | pSorter->nMemory = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:107548:19: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 107548 | pIncr->mxSz = MAX(pTask->pSorter->mxKeysize+9,pTask->pSorter->mxPmaSize/2); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:108002:21: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 108002 | nReader = MIN(pTask->nPMA - i, SORTER_MAX_MERGE_COUNT); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:108879:17: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 108879 | int nCopy = MIN(nRead, (p->nChunkSize - iChunkOffset)); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:108919:40: warning: implicit conversion loses integer precision: 'sqlite_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 108919 | nChunk = copy.endpoint.iOffset - iOff; + | ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:108986:22: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 108986 | int iSpace = MIN(nWrite, p->nChunkSize - iChunkOffset); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:109200:10: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 109200 | return MAX(pVfs->szOsFile, (int)sizeof(MemJournal)); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:121896:13: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 121896 | int n = sqlite3GetToken(&z[nRet], &t); + | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:122359:18: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 122359 | int nToken = sqlite3GetToken(&zTmp[iOff], &t); + | ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:122401:72: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 122401 | nCons = alterRtrimConstraint(pParse->db, pCons, pParse->sLastToken.z - pCons); + | ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:122521:72: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 122521 | nCons = alterRtrimConstraint(pParse->db, pCons, pParse->sLastToken.z - pCons); + | ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:123609:18: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 123609 | pParse->nTab = MAX(pParse->nTab, iTab); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:130012:15: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 130012 | int nCopy = MIN(ArraySize(aVal), pIdx->nKeyCol); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:130279:20: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 130279 | pSrc->nAlloc = nAlloc; + | ~ ^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:133459:24: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 133459 | sqlite3_randomness(n, p); + | ~~~~~~~~~~~~~~~~~~ ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:133460:44: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 133460 | sqlite3_result_blob(context, (char*)p, n, sqlite3_free); + | ~~~~~~~~~~~~~~~~~~~ ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:133997:31: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 133997 | pStr->nChar = nBlob*2 + 3; + | ~ ~~~~~~~~^~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:134073:11: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 134073 | n = z - &zIn[i]; + | ~ ~~^~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:134310:39: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 134310 | sqlite3_result_blob(pCtx, pBlob, (p - pBlob), sqlite3_free); + | ~~~~~~~~~~~~~~~~~~~ ~~^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:137661:75: warning: possible misuse of comma operator here [-Wcomma] + 137661 | pRaise = sqlite3Expr(db, TK_STRING, "FOREIGN KEY constraint failed"), + | ^ + 137661 | pRaise = sqlite3Expr(db, TK_STRING, "FOREIGN KEY constraint failed"), + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | (void)( ) +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:142782:36: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 142782 | sqlite3OsDlError(pVfs, nMsg-1, zErrmsg); + | ~~~~~~~~~~~~~~~~ ~~~~^~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:142823:34: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 142823 | sqlite3OsDlError(pVfs, nMsg-1, zErrmsg); + | ~~~~~~~~~~~~~~~~ ~~~~^~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:146025:28: warning: implicit conversion loses integer precision: 'const u64' (aka 'const unsigned long long') to 'int' [-Wshorten-64-to-32] + 146025 | int iCookie = pPragma->iArg; /* Which cookie to read or write */ + | ~~~~~~~ ~~~~~~~~~^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:154021:29: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 154021 | int flags = pParse->db->flags; + | ~~~~~ ~~~~~~~~~~~~^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:164719:19: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 164719 | nExtraReg = MAX(nExtraReg, pLoop->u.btree.nBtm); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:164726:19: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 164726 | nExtraReg = MAX(nExtraReg, pLoop->u.btree.nTop); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:168124:43: warning: possible misuse of comma operator here [-Wcomma] + 168124 | && (pX = pTerm->pExpr->pRight, ALWAYS(pX!=0)) + | ^ + 168124 | && (pX = pTerm->pExpr->pRight, ALWAYS(pX!=0)) + | ^~~~~~~~~~~~~~~~~~~~~~~~~ + | (void)( ) +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:168807:14: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 168807 | mxBitCol = MIN(BMS-1,pTable->nCol); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:170416:25: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 170416 | pTemplate->rRun = MIN(p->rRun, pTemplate->rRun); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:170417:25: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 170417 | pTemplate->nOut = MIN(p->nOut - 1, pTemplate->nOut); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:170425:25: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 170425 | pTemplate->rRun = MAX(p->rRun, pTemplate->rRun); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:170426:25: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 170426 | pTemplate->nOut = MAX(p->nOut + 1, pTemplate->nOut); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:170856:10: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 170856 | nCmp = MIN(nCmp, (pIdx->nColumn - nEq)); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:173616:19: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 173616 | aFrom[0].nRow = MIN(pParse->nQueryLoop, 48); assert( 48==sqlite3LogEst(28) ); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:176049:28: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 176049 | int nSize = (p->nTotal / p->nParam); + | ~~~~~ ~~~~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:177598:12: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 177598 | nArg = MAX(nArg, windowArgCount(pWin)); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:178886:64: warning: implicit conversion loses integer precision: 'sqlite3_uint64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 178886 | void *p = sqlite3FaultSim(700) ? 0 : sqlite3_realloc(pOld, newSize); + | ~~~~~~~~~~~~~~~ ^~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:183838:173: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 183838 | sqlite3AlterAddConstraint(pParse, yymsp[-8].minor.yy203, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy0.z+1, (yymsp[-1].minor.yy0.z-yymsp[-3].minor.yy0.z-1)); + | ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:183844:154: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 183844 | sqlite3AlterAddConstraint(pParse, yymsp[-6].minor.yy203, &yymsp[-4].minor.yy0, 0, yymsp[-3].minor.yy0.z+1, (yymsp[-1].minor.yy0.z-yymsp[-3].minor.yy0.z-1)); + | ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:182506:9: warning: code will never be executed [-Wunreachable-code] + 182506 | YYMINORTYPE yylhsminor; + | ^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:187039:19: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 187039 | nBig = szAlloc/(3*LOOKASIDE_SMALL+sz); + | ~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:187040:40: warning: implicit conversion loses integer precision: 'sqlite_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 187040 | nSm = (szAlloc - (i64)sz*(i64)nBig)/LOOKASIDE_SMALL; + | ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:187042:19: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 187042 | nBig = szAlloc/(LOOKASIDE_SMALL+sz); + | ~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:187043:40: warning: implicit conversion loses integer precision: 'sqlite_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 187043 | nSm = (szAlloc - (i64)sz*(i64)nBig)/LOOKASIDE_SMALL; + | ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:187047:19: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 187047 | nBig = szAlloc/sz; + | ~ ~~~~~~~^~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:212369:28: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 212369 | pParse->nJson = p->nUsed; + | ~ ~~~^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:213603:20: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] + 213603 | px.nJson = pStr->nUsed; + | ~ ~~~~~~^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:214147:43: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 214147 | jsonBlobExpand(pParse, pParse->nBlob+d); + | ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~^~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:216731:19: warning: implicit conversion loses integer precision: 'u64' (aka 'unsigned long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 216731 | u32 n = p->path.nUsed; + | ~ ~~~~~~~~^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219319:26: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 219319 | p1->aCoord[ii].f = MIN(p1->aCoord[ii].f, p2->aCoord[ii].f); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219320:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 219320 | p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219325:26: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 219325 | p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219326:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 219326 | p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219367:12: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 219367 | x1 = MAX(DCOORD(p->aCoord[jj]), DCOORD(aCell[ii].aCoord[jj])); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:219368:12: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 219368 | x2 = MIN(DCOORD(p->aCoord[jj+1]), DCOORD(aCell[ii].aCoord[jj+1])); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:220488:21: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 220488 | pRtree->nRowEst = MAX(nRow, RTREE_MIN_ROWEST); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:220747:10: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 220747 | return sqlite3GetToken((const unsigned char*)z,&dummy); + | ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:223383:20: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'u32' (aka 'unsigned int') [-Wshorten-64-to-32] + 223383 | pBlob->iSize = nBlob; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:233398:66: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 233398 | int iHash = sessionChangeHash(pTab, bPkOnly, p->aRecord, nNew); + | ~~~~~~~~~~~~~~~~~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:233406:21: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 233406 | pTab->nChange = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:233840:19: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 233840 | p->nAlloc = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:234094:22: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 234094 | int nIncr = nNew - pC->nMaxSize; + | ~~~~~ ~~~~~^~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:234095:20: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 234095 | pC->nMaxSize = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:234249:21: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 234249 | pC->nRecord = nByte; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:238132:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 238132 | pNew->nRecord = pOut - pNew->aRecord; + | ~ ~~~~~^~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:238168:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 238168 | pNew->nRecord = pOut - pNew->aRecord; + | ~ ~~~~~^~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:238854:22: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 238854 | pBuf->nBuf = pOut-pBuf->aBuf; + | ~ ~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:238926:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 238926 | pBuf->nBuf = (pOut - pBuf->aBuf); + | ~ ~~~~~^~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:239018:29: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 239017 | sessionAppendRecordMerge(&sOut, pIter->nCol, + | ~~~~~~~~~~~~~~~~~~~~~~~~ + 239018 | pCsr, nRec-(pCsr-aRec), + | ~~~~^~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:242000:9: warning: code will never be executed [-Wunreachable-code] + 242000 | fts5YYMINORTYPE fts5yylhsminor; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:244037:29: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 244037 | pConfig->t.nArg = nArg; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:245078:23: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 245078 | pToken->n = (z2 - z); + | ~ ~~~^~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:245090:23: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 245090 | pToken->n = (z2 - z); + | ~ ~~~^~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:247128:18: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 247128 | p->iHeight = MAX(p->iHeight, p->apChild[ii]->iHeight + 1); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:248538:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 248538 | int nMin = MIN(p1->nKey, p2->nKey); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:249522:10: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 249522 | nCmp = MIN(pLeft->n, pRight->n); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:249597:20: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 249597 | pRet->nn = nByte; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:249604:50: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 249604 | rc = sqlite3_blob_read(p->pReader, aOut, nByte, 0); + | ~~~~~~~~~~~~~~~~~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:249904:27: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 249904 | nOriginCntr = MAX(nOriginCntr, pSeg->iOrigin2); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250595:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 250595 | int iEod = MIN(pIter->iEndofDoclist, pIter->pLeaf->szLeaf); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250592:23: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250592 | int iOff = pIter->iLeafOffset; /* Offset to read at */ + | ~~~~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250666:28: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250666 | pIter->iTermLeafOffset = iOff; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250707:26: warning: implicit conversion loses integer precision: 'const i64' (aka 'const long long') to 'int' [-Wshorten-64-to-32] + 250707 | pNew->nTombstone = nTomb; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250777:18: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250777 | int i = pIter->iLeafOffset; + | ~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250815:29: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250815 | pIter->nRowidOffset = nNew; + | ~ ^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250818:50: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250818 | pIter->aRowidOffset[iRowidOffset++] = pIter->iLeafOffset; + | ~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250911:19: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250911 | iOff = pIter->iLeafOffset; + | ~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:250940:17: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 250940 | iOff = pIter->iLeafOffset; + | ~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:251021:29: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 251021 | iOff = pIter->iLeafOffset + pIter->nPos; + | ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:251296:19: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 251296 | nCmp = (u32)MIN(nNew, nTerm-nMatch); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:251364:35: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 251364 | pIter->iTermLeafOffset = pIter->iLeafOffset; + | ~ ~~~~~~~^~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252171:18: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 252171 | pNew->nSeg = nSlot; + | ~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252301:16: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 252301 | int nChunk = MIN(nRem, pSeg->pLeaf->szLeaf - pSeg->iLeafOffset); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252326:16: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 252326 | nChunk = MIN(nRem, pData->szLeaf - 4); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252301:46: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 252301 | int nChunk = MIN(nRem, pSeg->pLeaf->szLeaf - pSeg->iLeafOffset); + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252423:32: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 252423 | pIter->base.nData = p-aCopy; + | ~ ~^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252543:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 252543 | pIter->base.nData = aOut - pIter->poslist.p; + | ~ ~~~~~^~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:252670:14: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 252670 | nSeg = MIN(pStruct->aLevel[iLevel].nSeg, nSegment); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:253176:14: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 253176 | int nMin = MIN(pPage->term.n, nTerm); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:253651:38: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 253651 | int nPercent = (nTomb * 100) / nEntry; + | ~~~~~~~~ ~~~~~~~~~~~~~~^~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:254128:17: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 254128 | nPrefix = MIN(nPrefix, nPrefix2); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:254185:51: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 254185 | fts5DataWrite(p, iId, pTerm->p, iTermOff+nTermIdx); + | ~~~~~~~~~~~~~ ~~~~~~~~^~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:254574:20: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 254574 | pNew->nLevel = MIN(pStruct->nLevel+1, FTS5_MAX_LEVEL); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255239:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 255239 | int n1 = MIN(nHalf, pT->nMap-i1); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255240:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 255240 | int n2 = MIN(nHalf, pT->nMap-i1-n1); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255239:22: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 255239 | int n1 = MIN(nHalf, pT->nMap-i1); + | ~~ ^~~~~ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255239:37: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 255239 | int n1 = MIN(nHalf, pT->nMap-i1); + | ~~ ~~~~~~~~^~~ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255240:22: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 255240 | int n2 = MIN(nHalf, pT->nMap-i1-n1); + | ~~ ^~~~~ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:255240:40: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 255240 | int n2 = MIN(nHalf, pT->nMap-i1-n1); + | ~~ ~~~~~~~~~~~^~~ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:256338:12: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 256338 | i2 = pT->nMap; + | ~ ~~~~^~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:256693:22: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 256693 | int nSlotPerPage = MAX(MINSLOT, (p->pConfig->pgsz - 8) / szKey); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:256723:13: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro] + 256723 | nSlot = MAX(nElem*4, MINSLOT); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 218 | #define MAX(a, b) (((a)>(b))?(a):(b)) + | ^ + 15576 | # define MAX(A,B) ((A)>(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:257241:53: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 257241 | res = fts5Memcmp(&pLeaf->p[iOff], zIdxTerm, MIN(nTerm, nIdxTerm)); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:259152:40: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 259152 | pSorter->aIdx[i] = &aBlob[nBlob] - a; + | ~ ~~~~~~~~~~~~~~^~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:261897:38: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 261897 | sqlite3_result_text(pCtx, zText, nText, SQLITE_TRANSIENT); + | ~~~~~~~~~~~~~~~~~~~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:261920:38: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32] + 261920 | sqlite3_result_blob(pCtx, pBlob, nBlob, sqlite3_free); + | ~~~~~~~~~~~~~~~~~~~ ^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:264142:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 264142 | is = zCsr - (unsigned char*)pText; + | ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:264149:21: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 264149 | is = zCsr - (unsigned char*)pText; + | ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:264199:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 264199 | ie = zCsr - (unsigned char*)pText; + | ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:264203:37: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 264203 | rc = xToken(pCtx, 0, aFold, zOut-aFold, is, ie); + | ~~~~~~ ~~~~^~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:265030:24: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 265030 | aStart[ii] = zIn - (const unsigned char*)pText; + | ~ ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:265052:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 265052 | iNext = zIn - (const unsigned char*)pText; + | ~ ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:265062:36: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] + 265062 | rc = xToken(pCtx, 0, aBuf, zOut-aBuf, aStart[0], iNext); + | ~~~~~~ ~~~~^~~~~ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:266727:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 266727 | int nCmp = MIN(nTerm, pCsr->nLeTerm); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +/Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:266801:20: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro] + 266801 | int nCmp = MIN(nTerm, pCsr->nLeTerm); + | ^ +In module 'Darwin' imported from /Users/mac/Desktop/TP/CMS/planxo/macos/Pods/sqlite3/sqlite-src-3520000/sqlite3.c:27675: + 215 | #define MIN(a, b) (((a)<(b))?(a):(b)) + | ^ + 15573 | # define MIN(A,B) ((A)<(B)?(A):(B)) + | ^ +192 warnings generated. +✓ Built build/macos/Build/Products/Debug/planxo.app +2026-03-10 10:28:26.480 planxo[25765:2717534] Running with merged UI and platform thread. Experimental. +Failed to foreground app; open returned 1 +Debug service listening on ws://127.0.0.1:51205/6sznUIvsZIU=/ws +Syncing files to device macOS... +flutter: *** sqflite warning *** + +You are changing sqflite default factory. +Be aware of the potential side effects. Any library using sqflite +will have this factory as the default for all operations. + +*** sqflite warning *** + +flutter: Device ID created: 34264b4d-8303-4593-af2d-49c90fc4689b +flutter: Updated URLs for client cms: https://cms.techpremedia.com +flutter: Updated URLs for client cms: https://cms.techpremedia.com +flutter: Attempting WebSocket connect to: wss://cms.techpremedia.com/ws?apiKey=aasdf345scwe&unique_id=34264b4d-8303-4593-af2d-49c90fc4689b +flutter: Connected to WS at wss://cms.techpremedia.com/ws?apiKey=aasdf345scwe&unique_id=34264b4d-8303-4593-af2d-49c90fc4689b +flutter: Successfully opened URL with open command +flutter: Successfully opened URL with open command +flutter: Auth transient: Invalid or expired auth key +flutter: Updated URLs for client cms: https://cms.techpremedia.com +flutter: Successfully opened URL with open command +flutter: Successfully opened URL with open command +flutter: Starting periodic sync every 30 minutes +flutter: Skipping periodic sync - not ready (auth: true, project: false) \ No newline at end of file diff --git a/development/planxo/ios/.gitignore b/development/planxo/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/development/planxo/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/development/planxo/ios/Flutter/AppFrameworkInfo.plist b/development/planxo/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..1dc6cf7 --- /dev/null +++ b/development/planxo/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 13.0 + + diff --git a/development/planxo/ios/Flutter/Debug.xcconfig b/development/planxo/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/development/planxo/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/development/planxo/ios/Flutter/Release.xcconfig b/development/planxo/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/development/planxo/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/development/planxo/ios/Podfile b/development/planxo/ios/Podfile new file mode 100644 index 0000000..620e46e --- /dev/null +++ b/development/planxo/ios/Podfile @@ -0,0 +1,43 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/development/planxo/ios/Runner.xcodeproj/project.pbxproj b/development/planxo/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..491fd70 --- /dev/null +++ b/development/planxo/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = 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_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = 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_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = 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_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/development/planxo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/development/planxo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/development/planxo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..e3773d4 --- /dev/null +++ b/development/planxo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/ios/Runner.xcworkspace/contents.xcworkspacedata b/development/planxo/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/development/planxo/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/development/planxo/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/development/planxo/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/development/planxo/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/development/planxo/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/development/planxo/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/development/planxo/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/development/planxo/ios/Runner/AppDelegate.swift b/development/planxo/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..6266644 --- /dev/null +++ b/development/planxo/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5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KmY{a8G{2BHG%w!^T|Njr!h9TO2LaP^_f22Q1=l$QiU84ao zHe_#{S6;qrC6w~7{y(hs-?-j?lbOfgH^E=XcSgnwW*eEz{_Z<_xN#0001NP)t-s|Ns9~ z#rXRE|M&d=0au&!`~QyF`q}dRnBDt}*!qXo`c{v z{Djr|@Adh0(D_%#_&mM$D6{kE_x{oE{l@J5@%H*?%=t~i_`ufYOPkAEn!pfkr2$fs z652Tz0001XNklqeeKN4RM4i{jKqmiC$?+xN>3Apn^ z0QfuZLym_5b<*QdmkHjHlj811{If)dl(Z2K0A+ekGtrFJb?g|wt#k#pV-#A~bK=OT ts8>{%cPtyC${m|1#B1A6#u!Q;umknL1chzTM$P~L002ovPDHLkV1lTfnu!1a literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..797d452e458972bab9d994556c8305db4c827017 GIT binary patch literal 406 zcmV;H0crk;P))>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d933e1120817fe9182483a228007b18ab6ae GIT binary patch literal 450 zcmV;z0X_bSP)iGWQ_5NJQ_~rNh*z)}eT%KUb z`7gNk0#AwF^#0T0?hIa^`~Ck;!}#m+_uT050aTR(J!bU#|IzRL%^UsMS#KsYnTF*!YeDOytlP4VhV?b} z%rz_<=#CPc)tU1MZTq~*2=8~iZ!lSa<{9b@2Jl;?IEV8)=fG217*|@)CCYgFze-x? zIFODUIA>nWKpE+bn~n7;-89sa>#DR>TSlqWk*!2hSN6D~Qb#VqbP~4Fk&m`@1$JGr zXPIdeRE&b2Thd#{MtDK$px*d3-Wx``>!oimf%|A-&-q*6KAH)e$3|6JV%HX{Hig)k suLT-RhftRq8b9;(V=235Wa|I=027H2wCDra;{X5v07*qoM6N<$f;9x^2LJ#7 literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd7b0099ca80c806f8fe495613e8d6c69460d76 GIT binary patch literal 282 zcmV+#0p(^bcu7P-R4C8Q z&e;xxFbF_Vrezo%_kH*OKhshZ6BFpG-Y1e10`QXJKbND7AMQ&cMj60B5TNObaZxYybcN07*qoM6N<$g3m;S%K!iX literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fe730945a01f64a61e2235dbe3f45b08f7729182 GIT binary patch literal 462 zcmV;<0WtoGP)-}iV`2<;=$?g5M=KQbZ{F&YRNy7Nn@%_*5{gvDM0aKI4?ESmw z{NnZg)A0R`+4?NF_RZexyVB&^^ZvN!{I28tr{Vje;QNTz`dG&Jz0~Ek&f2;*Z7>B|cg}xYpxEFY+0YrKLF;^Q+-HreN0P{&i zK~zY`?b7ECf-n?@;d<&orQ*Q7KoR%4|C>{W^h6@&01>0SKS`dn{Q}GT%Q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iconset/Icon-App-40x40@2x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..502f463a9bc882b461c96aadf492d1729e49e725 GIT binary patch literal 586 zcmV-Q0=4~#P)+}#`wDE{8-2Mebf5<{{PqV{TgVcv*r8?UZ3{-|G?_}T*&y;@cqf{ z{Q*~+qr%%p!1pS*_Uicl#q9lc(D`!D`LN62sNwq{oYw(Wmhk)k<@f$!$@ng~_5)Ru z0Z)trIA5^j{DIW^c+vT2%lW+2<(RtE2wR;4O@)Tm`Xr*?A(qYoM}7i5Yxw>D(&6ou zxz!_Xr~yNF+waPe00049Nkl*;a!v6h%{rlvIH#gW3s8p;bFr=l}mRqpW2h zw=OA%hdyL~z+UHOzl0eKhEr$YYOL-c-%Y<)=j?(bzDweB7{b+%_ypvm_cG{SvM=DK zhv{K@m>#Bw>2W$eUI#iU)Wdgs8Y3U+A$Gd&{+j)d)BmGKx+43U_!tik_YlN)>$7G! zhkE!s;%oku3;IwG3U^2kw?z+HM)jB{@zFhK8P#KMSytSthr+4!c(5c%+^UBn`0X*2 zy3(k600_CSZj?O$Qu%&$;|TGUJrptR(HzyIx>5E(2r{eA(<6t3e3I0B)7d6s7?Z5J zZ!rtKvA{MiEBm&KFtoifx>5P^Z=vl)95XJn()aS5%ad(s?4-=Tkis9IGu{`Fy8r+H07*qoM6N<$f20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec303439225b78712f49115768196d8d76f6790 GIT binary patch literal 862 zcmV-k1EKthP)20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f5fea27c705180eb716271f41b582e76dcbd90 GIT binary patch literal 1674 zcmV;526g#~P){YQnis^a@{&-nmRmq)<&%Mztj67_#M}W?l>kYSliK<%xAp;0j{!}J0!o7b zE>q9${Lb$D&h7k=+4=!ek^n+`0zq>LL1O?lVyea53S5x`Nqqo2YyeuIrQrJj9XjOp z{;T5qbj3}&1vg1VK~#9!?b~^C5-}JC@Pyrv-6dSEqJqT}#j9#dJ@GzT@B8}x zU&J@bBI>f6w6en+CeI)3^kC*U?}X%OD8$Fd$H&LV$H&LV$H&LV#|K5~mLYf|VqzOc zkc7qL~0sOYuM{tG`rYEDV{DWY`Z8&)kW*hc2VkBuY+^Yx&92j&StN}Wp=LD zxoGxXw6f&8sB^u})h@b@z0RBeD`K7RMR9deyL(ZJu#39Z>rT)^>v}Khq8U-IbIvT> z?4pV9qGj=2)TNH3d)=De<+^w;>S7m_eFKTvzeaBeir45xY!^m!FmxnljbSS_3o=g( z->^wC9%qkR{kbGnW8MfFew_o9h3(r55Is`L$8KI@d+*%{=Nx+FXJ98L0PjFIu;rGnnfY zn1R5Qnp<{Jq0M1vX=X&F8gtLmcWv$1*M@4ZfF^9``()#hGTeKeP`1!iED ztNE(TN}M5}3Bbc*d=FIv`DNv&@|C6yYj{sSqUj5oo$#*0$7pu|Dd2TLI>t5%I zIa4Dvr(iayb+5x=j*Vum9&irk)xV1`t509lnPO0%skL8_1c#Xbamh(2@f?4yUI zhhuT5<#8RJhGz4%b$`PJwKPAudsm|at?u;*hGgnA zU1;9gnxVBC)wA(BsB`AW54N{|qmikJR*%x0c`{LGsSfa|NK61pYH(r-UQ4_JXd!Rsz)=k zL{GMc5{h138)fF5CzHEDM>+FqY)$pdN3}Ml+riTgJOLN0F*Vh?{9ESR{SVVg>*>=# zix;VJHPtvFFCRY$Ks*F;VX~%*r9F)W`PmPE9F!(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|=5sVHk#C7=~epA~VAf-~%aPC=%Qw01h8mnSZ|p?hz91 z7p83F3%LVu9;S$tSI$C^%^yud1dfTM_6p2|+5Ejp$bd`GDvbR|xit>i!ZD&F>@CJrPmu*UjD&?DfZs=$@e3FQA(vNiU+$A*%a} z?`XcG2jDxJ_ZQ#Md`H{4Lpf6QBDp81_KWZ6Tk#yCy1)32zO#3<7>b`eT7UyYH1eGz z;O(rH$=QR*L%%ZcBpc=eGua?N55nD^K(8<#gl2+pN_j~b2MHs4#mcLmv%DkspS-3< zpI1F=^9siI0s-;IN_IrA;5xm~3?3!StX}pUv0vkxMaqm+zxrg7X7(I&*N~&dEd0kD z-FRV|g=|QuUsuh>-xCI}vD2imzYIOIdcCVV=$Bz@*u0+Bs<|L^)32nN*=wu3n%Ynw z@1|eLG>!8ruU1pFXUfb`j>(=Gy~?Rn4QJ-c3%3T|(Frd!bI`9u&zAnyFYTqlG#&J7 zAkD(jpw|oZLNiA>;>hgp1KX7-wxC~31II47gc zHcehD6Uxlf%+M^^uN5Wc*G%^;>D5qT{>=uxUhX%WJu^Z*(_Wq9y}npFO{Hhb>s6<9 zNi0pHXWFaVZnb)1+RS&F)xOv6&aeILcI)`k#0YE+?e)5&#r7J#c`3Z7x!LpTc01dx zrdC3{Z;joZ^KN&))zB_i)I9fWedoN>Zl-6_Iz+^G&*ak2jpF07*qoM6N<$f;w%0(f|Me literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/development/planxo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0467bf12aa4d28f374bb26596605a46dcbb3e7c8 GIT binary patch literal 1418 zcmV;51$Fv~P)q zKfU)WzW*n(@|xWGCA9ScMt*e9`2kdxPQ&&>|-UCa7_51w+ zLUsW@ZzZSW0y$)Hp~e9%PvP|a03ks1`~K?q{u;6NC8*{AOqIUq{CL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PEUC YUoZo%k(ykuW&i*H07*qoM6N<$f+CH{y8r+H literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/development/planxo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/development/planxo/ios/Runner/Base.lproj/LaunchScreen.storyboard b/development/planxo/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/development/planxo/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/ios/Runner/Base.lproj/Main.storyboard b/development/planxo/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/development/planxo/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/ios/Runner/Info.plist b/development/planxo/ios/Runner/Info.plist new file mode 100644 index 0000000..8e22f2b --- /dev/null +++ b/development/planxo/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Planxo + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + planxo + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/development/planxo/ios/Runner/Runner-Bridging-Header.h b/development/planxo/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/development/planxo/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/development/planxo/ios/RunnerTests/RunnerTests.swift b/development/planxo/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/development/planxo/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/development/planxo/lib/helpers/database_helper.dart b/development/planxo/lib/helpers/database_helper.dart new file mode 100644 index 0000000..d06fe98 --- /dev/null +++ b/development/planxo/lib/helpers/database_helper.dart @@ -0,0 +1,122 @@ +import 'dart:async'; +import 'package:path/path.dart'; +import 'package:sqflite/sqflite.dart'; + +class DatabaseHelper { + static final DatabaseHelper _instance = DatabaseHelper._internal(); + factory DatabaseHelper() => _instance; + + static Database? _database; + + DatabaseHelper._internal(); + + Future get database async { + if (_database != null) return _database!; + _database = await _initDatabase(); + return _database!; + } + + Future _initDatabase() async { + final dbPath = await getDatabasesPath(); + final path = join(dbPath, 'sync_data.db'); + + return await openDatabase( + path, + version: 2, + onCreate: (db, version) async { + await db.execute(''' + CREATE TABLE sync_data ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + folder TEXT NOT NULL, + enabled INTEGER NOT NULL, + interval INTEGER NOT NULL, + last_synced TEXT, + file_path TEXT, + sync_status INTEGER NOT NULL DEFAULT 0 + ) + '''); + await db.execute(''' + CREATE TABLE sync_events ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + event_type TEXT NOT NULL, + folder TEXT, + s3_key TEXT, + local_path TEXT, + size INTEGER, + hash TEXT, + status TEXT, + message TEXT, + ts TEXT NOT NULL + ) + '''); + }, + onUpgrade: (db, oldVersion, newVersion) async { + if (oldVersion < 2) { + await db.execute(''' + CREATE TABLE IF NOT EXISTS sync_events ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + event_type TEXT NOT NULL, + folder TEXT, + s3_key TEXT, + local_path TEXT, + size INTEGER, + hash TEXT, + status TEXT, + message TEXT, + ts TEXT NOT NULL + ) + '''); + } + }, + ); + } + + Future insertSyncData(Map data) async { + final db = await database; + return await db.insert('sync_data', data); + } + + Future>> getUnsyncedOrUpdatedData() async { + final db = await database; + return await db.query('sync_data', where: 'sync_status IN (0, 2)'); + } + + Future updateSyncStatus(int id, int status) async { + final db = await database; + return await db.update( + 'sync_data', + {'sync_status': status}, + where: 'id = ?', + whereArgs: [id], + ); + } + + Future insertEvent({ + required String eventType, + String? folder, + String? s3Key, + String? localPath, + int? size, + String? hash, + String? status, + String? message, + }) async { + final db = await database; + return await db.insert('sync_events', { + 'event_type': eventType, + 'folder': folder, + 's3_key': s3Key, + 'local_path': localPath, + 'size': size, + 'hash': hash, + 'status': status, + 'message': message, + 'ts': DateTime.now().toIso8601String(), + }); + } + + Future>> recentEvents({int limit = 100}) async { + final db = await database; + return await db.query('sync_events', orderBy: 'id DESC', limit: limit); + } +} \ No newline at end of file diff --git a/development/planxo/lib/main.dart b/development/planxo/lib/main.dart new file mode 100644 index 0000000..1739cdf --- /dev/null +++ b/development/planxo/lib/main.dart @@ -0,0 +1,4267 @@ +// lib/main.dart +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'dart:math'; + +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:path/path.dart' as p; +import 'package:archive/archive.dart'; +import 'package:file_selector/file_selector.dart'; +import 'package:watcher/watcher.dart'; +import 'package:crypto/crypto.dart' as crypto; +import 'helpers/database_helper.dart'; + +// Global ScaffoldMessenger key to allow showing SnackBars even during early lifecycle +final GlobalKey rootMessengerKey = GlobalKey(); +// Global Navigator key so dialogs can be shown from _MyAppState (which is above MaterialApp) +final GlobalKey rootNavigatorKey = GlobalKey(); + +// ── Secure config ───────────────────────────────────────────────────────────── +// All secrets are stored in the OS keychain (macOS Keychain / Windows Credential +// Locker) via flutter_secure_storage — never hardcoded or written to plain files. +const _secureStorage = FlutterSecureStorage(); + +/// Returns the WS bridge API key. On first run a random 32-char key is generated +/// and stored in the keychain. You must set the SAME key on the server side. +Future _getOrCreateApiKey() async { + const storageKey = 'planxo_ws_api_key'; + final stored = await _secureStorage.read(key: storageKey); + if (stored != null && stored.isNotEmpty) return stored; + // Generate a cryptographically random key on first run + final rng = Random.secure(); + final bytes = List.generate(24, (_) => rng.nextInt(256)); + final key = base64UrlEncode(bytes).replaceAll('=', ''); + await _secureStorage.write(key: storageKey, value: key); + return key; +} + +/// Returns this machine's unique client ID. Generated once and stored in keychain. +Future _getOrCreateUniqueId() async { + const storageKey = 'planxo_unique_id'; + final stored = await _secureStorage.read(key: storageKey); + if (stored != null && stored.isNotEmpty) return stored; + final rng = Random.secure(); + final bytes = List.generate(16, (_) => rng.nextInt(256)); + final uid = bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join(); + await _secureStorage.write(key: storageKey, value: uid); + return uid; +} + +// Runtime values — populated in main() before the app starts +String apiKey = ''; +String uniqueId = ''; + +// Dynamic URLs based on client name +String wsUrl = 'wss://cms.techpremedia.com/ws'; +String backendUrl = 'https://cms.techpremedia.com'; +String assetManagerUrl = 'https://cms.techpremedia.com/assets-api'; + +final Dio dio = Dio(); + +// Asset manager shared secret — loaded from keychain at startup. +// Must match ASSET_MANAGER_SECRET on the server. +String _assetManagerSecret = ''; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + // Load / generate secrets before the UI starts + apiKey = await _getOrCreateApiKey(); + uniqueId = await _getOrCreateUniqueId(); + _assetManagerSecret = await _secureStorage.read(key: 'planxo_asset_manager_secret') ?? ''; + // Inject the secret into every Dio request to the asset manager via interceptor + dio.interceptors.add(InterceptorsWrapper( + onRequest: (options, handler) { + if (_assetManagerSecret.isNotEmpty) { + options.headers['X-Internal-Token'] = _assetManagerSecret; + } + return handler.next(options); + }, + )); + runApp(const MyApp()); +} + +class FileItem { + final String key; // S3 key or object identifier + final String name; // display filename + final int? size; // optional bytes + + // runtime state: + bool isDownloading = false; + int received = 0; + int total = 0; + CancelToken? cancelToken; + String? localPath; // if downloaded, path on disk + FileItem({ + required this.key, + required this.name, + this.size, + }); +} + +class ChangeItem { + final String path; + final String status; // 'new_local', 'modified_local', 'new_remote' + final File? localFile; + final FileItem? remoteItem; + ChangeItem(this.path, this.status, {this.localFile, this.remoteItem}); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State with SingleTickerProviderStateMixin { + bool _isLoginInProgress = false; + List files = []; + List folders = []; + // Local folders detected on disk (full paths) + List localFolders = []; + bool loading = false; + String? error; + // Client login state + final TextEditingController _clientController = TextEditingController(); + String _clientName = ''; + String _authKey = ''; + Map? _userInfo; + bool _isAuthenticated = false; + int _syncInterval = 15; // Sync interval in minutes from backend + Timer? _periodicSyncTimer; + // Storage base path (where we create ProjectsCache / Downloads). Persisted. + String _storageBasePath = ''; + final TextEditingController _storageController = TextEditingController(); + + // Sync settings: stored as map folder -> { enabled: bool, interval: int } + Map _syncSettings = {}; + final Map _syncTimers = {}; + final Map _syncRunning = {}; + // Extraction preference: when true, extract into storage root using folder path + bool _extractToRoot = true; + // Auto auth polling to avoid manual "Check Auth" button + Timer? _authPollTimer; + // Debounce timer for post-upload file list refresh (avoids cascade on batch uploads) + Timer? _refreshDebounceTimer; + // Per-file debounce timers: fire only after the file has been stable for 5 s. + // This prevents uploading partial/temp files created by Illustrator, Photoshop, etc. + final Map _uploadDebounceTimers = {}; + int _authPollAttempts = 0; + // Track repetitive auth errors to avoid noisy logs + String? _lastAuthError; + int _lastAuthErrorCount = 0; + + // WebSocket members + WebSocket? _ws; + bool _wsOpen = false; + bool _wsConnecting = false; + DateTime? _lastWsAttempt; + final Map>> _pendingListRequests = {}; + final Map> _pendingPresign = {}; + + // Folder sync state + Directory? _currentProjectDir; // local root for extracted folder + String? _currentFolderPrefix; // e.g. 'projects//' + StreamSubscription? _watchSub; // legacy single-watcher (kept for compat) + final Map _watchSubs = {}; // multi-folder watchers + final Map _lastUpload = {}; + final Set _knownS3Keys = {}; // populated from API for the folder + final Map _lastUploadedHash = {}; // localPath -> sha256 + final Map _folderDownloading = {}; // folder -> in-progress + final Map _lastFolderDownloadTs = {}; // folder -> last ts + final DatabaseHelper _db = DatabaseHelper(); + // Sync log state + List> _recentEvents = []; + bool _logLoading = false; + bool _logFilterCurrentOnly = true; + // Track last synced folder for easy resume + String? _lastSyncedFolder; + String? _lastSyncedLocalPath; + + // Store sync metadata: localPath -> {modified, hash} + final Map> _syncMeta = {}; + + // Changes state + List _changes = []; + List _remoteMissingFiles = []; // Added missing field + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + // load sync settings from disk + _loadSyncSettings(); + _loadSyncMeta(); // Load persisted meta + // load saved client name and auth key + _loadClientName(); + _loadAuthKey(); + // load storage path + _loadStoragePath(); + } + + @override + void dispose() { + _tabController.dispose(); + _ws?.close(); + _watchSub?.cancel(); + _authPollTimer?.cancel(); + _refreshDebounceTimer?.cancel(); + _periodicSyncTimer?.cancel(); + _clientController.dispose(); + _storageController.dispose(); + // cancel any active sync timers + for (final t in _syncTimers.values) { + if (t.isActive) t.cancel(); + } + // cancel any pending per-file upload debounce timers + for (final t in _uploadDebounceTimers.values) { + if (t.isActive) t.cancel(); + } + _uploadDebounceTimers.clear(); + super.dispose(); + } + + // --- Added missing methods --- + + Future _syncMetaFile() async { + final home = Platform.environment['HOME'] ?? Directory.current.path; + final f = File(p.join(home, '.planxo_sync_meta.json')); + if (!await f.exists()) await f.create(recursive: true); + return f; + } + + Future _loadSyncMeta() async { + try { + final f = await _syncMetaFile(); + final content = await f.readAsString(); + if (content.trim().isEmpty) return; + final Map data = jsonDecode(content); + data.forEach((k, v) { + if (v is Map) _syncMeta[k] = Map.from(v); + }); + } catch (e) { + print('Failed to load sync meta: $e'); + } + } + + Future _saveSyncMeta() async { + try { + final f = await _syncMetaFile(); + await f.writeAsString(jsonEncode(_syncMeta)); + } catch (e) { + print('Failed to save sync meta: $e'); + } + } + + void _detectRemoteMissingFiles(List list) { + _remoteMissingFiles.clear(); + if (_currentFolderPrefix == null || _currentProjectDir == null) { + return; + } + final prefix = _currentFolderPrefix!; + for (final fi in list) { + if (!fi.key.startsWith(prefix)) continue; + final rel = fi.key.substring(prefix.length); + final localCandidate = p.join(_currentProjectDir!.path, rel); + if (!File(localCandidate).existsSync()) { + _remoteMissingFiles.add(fi); + } + } + } + + Future _checkForChanges() async { + if (_currentProjectDir == null || _currentFolderPrefix == null) return; + + final localDir = _currentProjectDir!; + final prefix = _currentFolderPrefix!; + final newChanges = []; + final remoteMap = {}; + + // Index remote files by relative path + for (var f in files) { + if (f.key.startsWith(prefix)) { + final rel = f.key.substring(prefix.length); + remoteMap[rel] = f; + } + } + + // Scan local + if (await localDir.exists()) { + await for (final entity in localDir.list(recursive: true)) { + if (entity is File) { + final rel = p.relative(entity.path, from: localDir.path).replaceAll('\\', '/'); + if (p.basename(rel) == '.DS_Store' || p.basename(rel) == '.keep') continue; + + final remote = remoteMap[rel]; + if (remote == null) { + newChanges.add(ChangeItem(rel, 'new_local', localFile: entity)); + } else { + // Check modification + final meta = _syncMeta[entity.path]; + final stat = await entity.stat(); + bool isModified = false; + + if (meta == null) { + // No sync record. Check size as proxy if available + if (remote.size != null && remote.size != stat.size) { + isModified = true; + } + } else { + // Check timestamp first + if (stat.modified.millisecondsSinceEpoch != meta['lastModified']) { + // Timestamp changed, check hash + final currentHash = await _hashFile(entity.path); + if (currentHash != meta['hash']) { + isModified = true; + } else { + // Update meta timestamp to avoid re-hashing next time + _syncMeta[entity.path]!['lastModified'] = stat.modified.millisecondsSinceEpoch; + _saveSyncMeta(); + } + } + } + + if (isModified) { + newChanges.add(ChangeItem(rel, 'modified_local', localFile: entity, remoteItem: remote)); + } else { + // Synced + newChanges.add(ChangeItem(rel, 'synced', localFile: entity, remoteItem: remote)); + } + remoteMap.remove(rel); // Handled + } + } + } + } + + // Remaining remote files are missing locally + remoteMap.forEach((rel, item) { + newChanges.add(ChangeItem(rel, 'new_remote', remoteItem: item)); + }); + + // Sort: pending first + newChanges.sort((a, b) { + final aSynced = a.status == 'synced'; + final bSynced = b.status == 'synced'; + if (aSynced && !bSynced) return 1; + if (!aSynced && bSynced) return -1; + return a.path.compareTo(b.path); + }); + + setState(() { + _changes = newChanges; + }); + } + + // ── App-managed storage (hidden, protected) ────────────────────────────────── + // The storage folder is ALWAYS ~/Library/Application Support/PlanXO/. + // It is hidden from Finder via `chflags hidden` and the root folder is + // made user-immutable via `chflags uchg` so users cannot delete or rename it. + // The app temporarily lifts the immutable flag before writing, then restores it. + + /// Canonical managed path — always ~/Library/Application Support/PlanXO + String get _managedStoragePath { + final home = Platform.environment['HOME'] ?? Directory.current.path; + return p.join(home, 'Library', 'Application Support', 'PlanXO'); + } + + /// Remove user-immutable flag so the app can write to the folder. + Future _unlockStorage() async { + try { + await Process.run('chflags', ['nouchg', _managedStoragePath]); + } catch (_) {} + } + + /// Re-apply hidden + user-immutable flags. + Future _lockStorage() async { + try { + await Process.run('chflags', ['hidden', _managedStoragePath]); + await Process.run('chflags', ['uchg', _managedStoragePath]); + } catch (_) {} + } + + Future _loadStoragePath() async { + final managed = _managedStoragePath; + + // One-time migration: if old Downloads/PlanXO (or any previously saved path) + // has data, move it into the managed location. + await _migrateOldStorage(managed); + + // Always use the managed path — ignore any previously saved custom path. + _storageBasePath = managed; + _storageController.text = managed; + setState(() {}); + + // Ensure the folder exists and is hidden/protected. + await _ensureStorageBaseExists(); + + // Populate local folders from the managed directory immediately. + await _scanStorageFolders(); + } + + /// Migrate data from old location (~/Downloads/PlanXO or saved path) into + /// the managed location, then delete the old location. + Future _migrateOldStorage(String managedPath) async { + final home = Platform.environment['HOME'] ?? Directory.current.path; + final candidates = [ + p.join(home, 'Downloads', 'PlanXO'), + p.join(home, 'PlanXO'), + ]; + // Also check previously saved path + try { + final legacyFile = File(p.join(home, '.planxo_storage')); + if (await legacyFile.exists()) { + final saved = (await legacyFile.readAsString()).trim(); + if (saved.isNotEmpty && !candidates.contains(saved)) { + candidates.add(saved); + } + // Remove the legacy config file — path is now fixed. + await legacyFile.delete(); + } + } catch (_) {} + + for (final oldPath in candidates) { + final oldDir = Directory(oldPath); + if (await oldDir.exists() && oldPath != managedPath) { + try { + await _unlockStorage(); + final newDir = Directory(managedPath); + if (!await newDir.exists()) await newDir.create(recursive: true); + // Copy all contents recursively + await for (final entity in oldDir.list(recursive: true, followLinks: false)) { + final rel = p.relative(entity.path, from: oldPath); + final dest = p.join(managedPath, rel); + if (entity is Directory) { + await Directory(dest).create(recursive: true); + } else if (entity is File) { + await Directory(p.dirname(dest)).create(recursive: true); + await entity.copy(dest); + } + } + // Remove old location after successful copy + await oldDir.delete(recursive: true); + _showSnack('Migrated existing data to managed storage.'); + } catch (e) { + print('Storage migration failed: $e'); + } + break; // only migrate first found + } + } + } + + // _saveStoragePath is kept for internal use but no longer exposed to users. + Future _saveStoragePath(String path) async { + _storageBasePath = path; + _storageController.text = path; + } + + Future _ensureStorageBaseExists() async { + try { + await _unlockStorage(); + final d = Directory(_storageBasePath); + if (!await d.exists()) { + await d.create(recursive: true); + } + await _lockStorage(); + } catch (e) { + print('Failed to initialise managed storage: $e'); + } + } + + Future _isPathWritable(String dirPath) async { + try { + await _unlockStorage(); + final testFile = File(p.join(dirPath, '.planxo_write_test')); + await testFile.writeAsString('ok', flush: true); + await testFile.delete(); + await _lockStorage(); + return true; + } catch (e) { + return false; + } + } + + // _pickStorageFolder is no longer exposed — storage path is app-managed. + Future _pickStorageFolder() async { + // No-op: path is now fixed to the managed location. + } + + // ── Secure credential storage (OS keychain) ───────────────────────────────── + // All secrets go through _secureStorage — no plaintext files on disk. + + Future _loadClientName() async { + try { + final name = await _secureStorage.read(key: 'planxo_client_name'); + if (name != null && name.trim().isNotEmpty) { + _clientName = name.trim(); + _clientController.text = _clientName; + _updateUrls(_clientName); + setState(() {}); + } + } catch (e) { + print('Failed to load client name: $e'); + } + } + + void _updateUrls(String clientName) { + if (clientName.isEmpty) return; + final subdomain = clientName.trim().toLowerCase(); + wsUrl = 'wss://$subdomain.techpremedia.com/ws'; + backendUrl = 'https://$subdomain.techpremedia.com'; + assetManagerUrl = 'https://$subdomain.techpremedia.com/assets-api'; + print('Updated URLs for client $subdomain: $backendUrl'); + } + + Future _saveClientName(String name) async { + try { + await _secureStorage.write(key: 'planxo_client_name', value: name); + } catch (e) { + print('Failed to save client name: $e'); + } + } + + Future _loadAuthKey() async { + try { + final key = await _secureStorage.read(key: 'planxo_auth_key'); + if (key != null && key.trim().isNotEmpty) { + _authKey = key.trim(); + setState(() {}); + } + } catch (e) { + print('Failed to load auth key: $e'); + } + } + + Future _saveAuthKey(String key) async { + try { + await _secureStorage.write(key: 'planxo_auth_key', value: key); + _authKey = key; + setState(() {}); + } catch (e) { + print('Failed to save auth key: $e'); + } + } + + Future _clearAuthKey() async { + try { + await _secureStorage.delete(key: 'planxo_auth_key'); + _authKey = ''; + _userInfo = null; + _isAuthenticated = false; + _periodicSyncTimer?.cancel(); + _periodicSyncTimer = null; + setState(() {}); + } catch (e) { + print('Failed to clear auth key: $e'); + } + } + + void _startPeriodicSync() { + // Cancel any existing periodic sync timer + _periodicSyncTimer?.cancel(); + + if (_syncInterval <= 0) return; + + print('Starting periodic sync every $_syncInterval minutes'); + + // Run sync immediately on start + _performPeriodicSync(); + + // Then schedule periodic syncs + _periodicSyncTimer = Timer.periodic(Duration(minutes: _syncInterval), (timer) { + _performPeriodicSync(); + }); + } + + Future _performPeriodicSync() async { + if (!_isAuthenticated || _currentProjectDir == null || _currentFolderPrefix == null) { + print('Skipping periodic sync - not ready (auth: $_isAuthenticated, project: ${_currentProjectDir != null})'); + return; + } + + // Guard: only sync specific job folders (depth ≥ 3, e.g. "clients/ClientName/JobID/") + // A too-broad prefix like "clients/" would download the entire client tree. + final prefixDepth = _currentFolderPrefix!.split('/').where((s) => s.isNotEmpty).length; + if (prefixDepth < 3) { + print('Skipping periodic sync — prefix too broad ($_currentFolderPrefix), depth=$prefixDepth < 3'); + return; + } + + print('⏰ Periodic sync triggered for $_currentFolderPrefix'); + + try { + // 1. Check for local changes and upload + int uploads = await _syncLocalChanges(); + + // 2. Check for remote changes and download + int downloads = await _syncRemoteChanges(); + + if (uploads == 0 && downloads == 0) { + _showSnack('Sync complete: Up to date.'); + } else { + _showSnack('Sync complete: Uploaded $uploads, Downloaded $downloads files.'); + } + + await _logEvent( + eventType: 'periodic_sync', + folder: _currentFolderPrefix!, + status: 'ok', + message: 'Periodic sync completed successfully' + ); + } catch (e) { + print('Periodic sync error: $e'); + await _logEvent( + eventType: 'periodic_sync', + folder: _currentFolderPrefix!, + status: 'error', + message: 'Periodic sync failed: $e' + ); + } + } + + Future _syncLocalChanges() async { + if (_currentProjectDir == null || _currentFolderPrefix == null) return 0; + + int uploadCount = 0; + final localFiles = {}; + final dir = _currentProjectDir!; + + if (!await dir.exists()) return 0; + + await for (final entity in dir.list(recursive: true)) { + if (entity is File) { + final rel = p.relative(entity.path, from: dir.path); + final basename = p.basename(entity.path); + // Ignore system files + if (basename == '.DS_Store' || basename == '.keep') continue; + localFiles[rel] = entity; + } + } + + // Check each local file for changes + for (final entry in localFiles.entries) { + final relPath = entry.key; + final file = entry.value; + final path = file.path; + + // Check sync meta + final stat = await file.stat(); + final lastModified = stat.modified.millisecondsSinceEpoch; + final meta = _syncMeta[path]; + + if (meta != null && meta['lastModified'] == lastModified) { + continue; + } + + final bytes = await file.readAsBytes(); + final hash = crypto.sha256.convert(bytes).toString(); + + if (meta != null && meta['hash'] == hash) { + // Update timestamp only + _syncMeta[path]!['lastModified'] = lastModified; + _saveSyncMeta(); + continue; + } + + print('Uploading modified file: $relPath'); + await _uploadFile(file, relPath); + uploadCount++; + } + return uploadCount; + } + + Future _syncRemoteChanges() async { + if (_currentFolderPrefix == null) return 0; + + // Re-download the folder to get latest changes + // This will extract new/updated files + print('Checking for remote changes in $_currentFolderPrefix'); + return await _downloadAndExtractFolder(_currentFolderPrefix!); + } + + Future _uploadFile(File file, String relativePath) async { + if (_currentProjectDir == null || _currentFolderPrefix == null) return; + await _onLocalFileChanged(file.path, _currentFolderPrefix!); + await _checkForChanges(); // Refresh changes list after upload + } + + Future _checkAuthentication() async { + if (_authKey.isEmpty) { + _isAuthenticated = false; + setState(() {}); + return; + } + + // If already authenticated, skip redundant checks + if (_isAuthenticated) { + return; + } + + if (!_wsOpen) { + _showSnack('WebSocket not connected. Cannot validate authentication.'); + return; + } + + // Send auth validation request via WebSocket + final msg = jsonEncode({ + 'type': 'validate_auth', + 'data': {'auth_key': _authKey} + }); + _ws!.add(msg); + } + + void _handleAuthResult(Map authData) { + if (authData.containsKey('user')) { + _userInfo = authData['user']; + _isAuthenticated = true; + _authPollTimer?.cancel(); + _authPollTimer = null; + + // Get sync interval from auth data + if (authData.containsKey('sync_interval')) { + _syncInterval = authData['sync_interval'] as int; + } + + _showSnack('✅ Authenticated as ${_userInfo!['username']} (${_userInfo!['role']}) - Sync: ${_syncInterval}min'); + setState(() {}); + + // Now we can fetch files + fetchFileList(); + + // Start periodic sync timer + _startPeriodicSync(); + } else { + _isAuthenticated = false; + _userInfo = null; + _showSnack('❌ Authentication failed: ${authData['message'] ?? 'Unknown error'}'); + setState(() {}); + } + } + + void _handleAuthApproval(Map approvalData) { + final authKey = approvalData['auth_key']; + final user = approvalData['user']; + + if (authKey != null && user != null) { + _userInfo = user; + _isAuthenticated = true; + _authKey = authKey; + _saveAuthKey(authKey); + // Stop polling upon success + _authPollTimer?.cancel(); + _authPollTimer = null; + + // Get sync interval from approval data + if (approvalData.containsKey('sync_interval')) { + _syncInterval = approvalData['sync_interval'] as int; + } + + _showSnack('🎉 Authorization approved by ${user['username']}! Sync: ${_syncInterval}min'); + setState(() {}); + + // Fetch files now that we're authorized + fetchFileList(); + + // Start periodic sync timer + _startPeriodicSync(); + } + } + + void _startAuthPolling() { + // Cancel any existing poller + _authPollTimer?.cancel(); + _authPollAttempts = 0; + + // Poll every 2 seconds for up to 2 minutes + _authPollTimer = Timer.periodic(const Duration(seconds: 2), (t) async { + if (!mounted) { + t.cancel(); + return; + } + if (_isAuthenticated) { + t.cancel(); + return; + } + + if (_wsOpen && _authKey.isNotEmpty) { + try { + await _checkAuthentication(); + } catch (_) {} + } + + _authPollAttempts++; + if (_authPollAttempts >= 60) { + t.cancel(); + _showSnack('Authorization is taking longer than expected.'); + } + }); + } + + Future _openUrl(String url) async { + // Security: only open URLs that belong to the configured backend domain. + // This prevents a malicious server response from opening arbitrary URLs. + final uri = Uri.tryParse(url); + if (uri == null || !(uri.scheme == 'https' || uri.scheme == 'http')) { + print('_openUrl blocked — not a valid http/https URL: $url'); + _showSnack('Cannot open URL: invalid format'); + return; + } + final allowedHost = Uri.tryParse(backendUrl)?.host ?? ''; + if (allowedHost.isNotEmpty && uri.host != allowedHost) { + print('_openUrl blocked — host ${uri.host} != expected $allowedHost'); + _showSnack('Cannot open URL: unexpected domain'); + return; + } + try { + // Try multiple methods to open URL + + // Method 1: Direct open command + var result = await Process.run('open', [url]); + if (result.exitCode == 0) { + print('Successfully opened URL with open command'); + return; + } + + // Method 2: Try with specific browser + result = await Process.run('open', ['-a', 'Safari', url]); + if (result.exitCode == 0) { + print('Successfully opened URL with Safari'); + return; + } + + // Method 3: Try with Chrome + result = await Process.run('open', ['-a', 'Google Chrome', url]); + if (result.exitCode == 0) { + print('Successfully opened URL with Chrome'); + return; + } + + // If all methods fail + print('All browser opening methods failed'); + _showSnack('Please manually open: $url'); + + } catch (e) { + print('Error opening URL: $e'); + _showSnack('Please manually open: $url'); + } + } + + // Generate a cryptographically secure auth key (256 bits of entropy) + String _generateAuthKey() { + final rng = Random.secure(); + final bytes = List.generate(32, (_) => rng.nextInt(256)); + return base64UrlEncode(bytes).replaceAll('=', ''); + } + + Future _openLoginForClient(String client) async { + if (client.trim().isEmpty) { + _showSnack('Client name cannot be empty'); + return; + } + + // Prevent multiple login processes + if (_isLoginInProgress) return; + _isLoginInProgress = true; + + try { + final newClientName = client.trim(); + bool clientChanged = newClientName != _clientName; + + _clientName = newClientName; + await _saveClientName(_clientName); + _updateUrls(_clientName); + + // If client changed or WS not open, reconnect + if (clientChanged && _wsOpen) { + _ws!.close(); + } + + // Try to connect WebSocket (non-blocking — if it fails we fall back to HTTP) + if (!_wsOpen) { + await _connectWs(); + } + + // Generate unique auth key + final authKey = _generateAuthKey(); + await _saveAuthKey(authKey); + + // Register auth key — prefer WS, fall back to HTTP + bool usedWs = false; + if (_wsOpen && _ws != null) { + final msg = jsonEncode({ + 'type': 'register_auth_key', + 'data': {'auth_key': authKey} + }); + try { + _ws!.add(msg); + usedWs = true; + } catch (_) {} + } + + if (!usedWs) { + // WS unavailable — register via HTTP then open browser directly + try { + await dio.post( + '$backendUrl/planxo/auth/register-key', + data: {'auth_key': authKey}, + ); + } catch (_) { + // Best-effort: server may not support this endpoint yet, continue anyway + } + _showSnack('Opening browser for authentication...'); + final authUrl = '$backendUrl/planxo-auth/$authKey'; + await _openUrl(authUrl); + } else { + // WS connected — browser will be opened when server sends 'auth_key_registered' + _showSnack('Waiting for server to open browser...'); + } + + setState(() {}); + } catch (e) { + _showSnack('Error during login: $e'); + } finally { + _isLoginInProgress = false; + } +} + + Future _enterAuthKey() async { + // Check if the widget is still mounted and has proper context + if (!mounted) return; + + try { + final controller = TextEditingController(text: _authKey); + final result = await showDialog( + context: rootNavigatorKey.currentContext!, + builder: (ctx) => AlertDialog( + title: const Text('Enter Authorization Key'), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Enter the authorization key you copied from the browser:'), + const SizedBox(height: 16), + TextField( + controller: controller, + decoration: const InputDecoration( + labelText: 'Auth Key', + hintText: 'Paste the key here...', + border: OutlineInputBorder(), + ), + maxLines: 3, + ), + ], + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(ctx), + child: const Text('Cancel'), + ), + TextButton( + onPressed: () => Navigator.pop(ctx, controller.text.trim()), + child: const Text('Save & Validate'), + ), + ], + ), + ); + + if (result != null && result.isNotEmpty) { + await _saveAuthKey(result); + await _checkAuthentication(); + } + } catch (e) { + print('Error opening auth key dialog: $e'); + _showSnack('Unable to open dialog. Please try again.'); + } + } + + /// Scan common locations for a `root/client/` directory and list its subfolders. + Future _scanLocalClientFolders() async { + setState(() { loading = true; }); + try { + final home = Platform.environment['HOME'] ?? ''; + final candidates = []; + candidates.add('/root/client'); + if (home.isNotEmpty) candidates.add(p.join(home, 'root', 'client')); + candidates.add(p.join(Directory.current.path, 'root', 'client')); + + String? found; + for (final c in candidates) { + final d = Directory(c); + if (await d.exists()) { + found = c; + break; + } + } + + if (found == null) { + _showSnack('No `root/client` folder found in checked locations.'); + return; + } + + final dir = Directory(found); + final List foundDirs = []; + await for (final e in dir.list()) { + if (e is Directory) foundDirs.add(e.path); + } + + if (foundDirs.isEmpty) { + _showSnack('No subfolders found in $found'); + return; + } + + localFolders = foundDirs; + setState(() {}); + _showSnack('Found ${localFolders.length} local folders in $found'); + } catch (e) { + _showSnack('Failed to scan local folders: $e'); + } finally { + setState(() { loading = false; }); + } + } + + /// Scan the storage base path and populate [localFolders] with any + /// subdirectories found (recursing one level into clients/ if present). + /// This makes already-synced folders visible in the sidebar and center pane + /// without requiring an API fetch. + Future _scanStorageFolders() async { + if (_storageBasePath.trim().isEmpty) return; + final base = Directory(_storageBasePath); + if (!await base.exists()) return; + try { + final found = {}; + // Walk depth-1 and depth-2 to catch both flat and clients// structures + await for (final e1 in base.list()) { + if (e1 is! Directory) continue; + final name1 = p.basename(e1.path); + // Skip hidden or system dirs + if (name1.startsWith('.') || name1 == 'ProjectsCache') continue; + // If this looks like a wrapper folder (e.g. 'clients'), recurse one more level + bool hasSubFolders = false; + await for (final e2 in e1.list()) { + if (e2 is Directory) { + hasSubFolders = true; + final name2 = p.basename(e2.path); + if (name2.startsWith('.')) continue; + // Recurse one more level for clients// + bool hasDeep = false; + await for (final e3 in e2.list()) { + if (e3 is Directory && !p.basename(e3.path).startsWith('.')) { + found.add(e3.path); + hasDeep = true; + } + } + if (!hasDeep) found.add(e2.path); + } + } + if (!hasSubFolders) found.add(e1.path); + } + if (!mounted) return; + setState(() { + localFolders = found.toList()..sort(); + }); + } catch (e) { + print('Failed to scan storage folders: \$e'); + } + } + + /// Use an existing local folder as the current project folder to watch and upload changes. + Future _useLocalFolderAsProject(String fullPath) async { + final dir = Directory(fullPath); + if (!await dir.exists()) { + _showSnack('Folder not found: $fullPath'); + return; + } + + _currentProjectDir = dir; + + // Derive the S3 folder prefix by stripping the storage base path. + // e.g. storageBase = ".../PlanXO", fullPath = ".../PlanXO/clients/Test Client 1/1000014" + // → prefix = "clients/Test Client 1/1000014/" + // If the path is not under storageBase, fall back to just the basename. + String folderPrefix; + if (_storageBasePath.isNotEmpty && fullPath.startsWith(_storageBasePath)) { + var rel = fullPath.substring(_storageBasePath.length); + if (rel.startsWith('/')) rel = rel.substring(1); + folderPrefix = rel.endsWith('/') ? rel : '$rel/'; + } else { + final name = p.basename(fullPath); + folderPrefix = name.endsWith('/') ? name : '$name/'; + } + + _currentFolderPrefix = folderPrefix; + await _primeKnownKeys(_currentFolderPrefix!); + _startWatcher(dir, _currentFolderPrefix!); + _showSnack('Watching $fullPath and syncing to prefix $_currentFolderPrefix'); + + // Track for easy resume + _lastSyncedFolder = _currentFolderPrefix; + _lastSyncedLocalPath = fullPath; + setState(() {}); + } + + Future _connectWs() async { + const retryDelay = Duration(seconds: 30); + + if (_wsOpen || _wsConnecting) return; // already connected/in-flight + + final base = Uri.parse(wsUrl); + final uri = base.replace(queryParameters: { + ...base.queryParameters, + if (apiKey.isNotEmpty) 'apiKey': apiKey, + if (uniqueId.isNotEmpty) 'unique_id': uniqueId, + }); + + try { + _wsConnecting = true; + _lastWsAttempt = DateTime.now(); + if (mounted) setState(() {}); + print('Attempting WebSocket connect to: $uri'); + _ws = await WebSocket.connect(uri.toString()).timeout(const Duration(seconds: 15)); + _wsOpen = true; + _wsConnecting = false; + _ws!.listen( + _onWsMessage, + onDone: () { + print('WebSocket closed by server'); + _wsOpen = false; + _ws = null; + if (mounted) setState(() {}); + if (mounted) Future.delayed(retryDelay, () { if (mounted) _connectWs(); }); + }, + onError: (err) { + print('WebSocket error: $err'); + _wsOpen = false; + _ws = null; + if (mounted) setState(() {}); + if (mounted) Future.delayed(retryDelay, () { if (mounted) _connectWs(); }); + }, + cancelOnError: true, + ); + if (mounted) setState(() {}); + print('Connected to WS at $uri'); + return; + } catch (e) { + print('WebSocket connect failed to $uri: $e'); + _wsOpen = false; + _wsConnecting = false; + _ws = null; + if (mounted) setState(() {}); + // Schedule reconnect only if still mounted + if (mounted) Future.delayed(retryDelay, () { if (mounted) _connectWs(); }); + } + } + + void _onWsDone() { + print('WebSocket closed by server'); + _wsOpen = false; + _authPollTimer?.cancel(); + setState(() {}); + // Optionally: schedule reconnect logic here + } + + void _onWsError(dynamic err) { + print('WebSocket error: $err'); + _wsOpen = false; + _authPollTimer?.cancel(); + setState(() {}); + // Optionally: schedule reconnect logic here + } + + void _onWsMessage(dynamic raw) async { + try { + if (raw is String) { + final Map msg = jsonDecode(raw); + final type = msg['type'] as String?; + final data = msg['data']; + + if (type == null) return; + + switch (type) { + case 'auth_key_registered': + // Auth key registered, open browser + final authKey = data?['auth_key']; + final browserUrl = data?['browser_url']; + if (authKey != null && browserUrl != null) { + _saveAuthKey(authKey); + _showSnack('Auth key registered. Opening browser for approval...'); + await _openUrl(browserUrl); + _showSnack('Waiting for approval in browser...'); + // Start polling to auto-detect approval + _startAuthPolling(); + } + break; + + case 'auth_approved': + // Browser approval received + _handleAuthApproval(data ?? {}); + break; + + case 'auth_success': + _handleAuthResult(data ?? {}); + break; + + case 'auth_revoked': + // Handle logout/session expiration from server + _handleAuthRevoked(data ?? {}); + break; + + case 'auth_error': + // Ignore stray errors after we are authenticated + if (_isAuthenticated) { + break; + } + + _isAuthenticated = false; + _userInfo = null; + final errorMsg = data?['message'] ?? 'Authentication failed'; + final errorDetails = data?['details'] ?? ''; + final fullMessage = errorDetails.isNotEmpty ? '$errorMsg ($errorDetails)' : errorMsg; + + // Transient errors commonly seen during pending approval + final isTransient = errorMsg == 'Invalid or expired auth key' || errorMsg == 'User not found'; + + // During polling, suppress noisy repeats of transient auth errors + final pollingActive = _authPollTimer != null && _authPollTimer!.isActive; + if (pollingActive && isTransient) { + if (_lastAuthError != errorMsg) { + _lastAuthError = errorMsg; + _lastAuthErrorCount = 1; + // Log once when message changes + print('Auth transient: $errorMsg'); + } else { + _lastAuthErrorCount += 1; + if (_lastAuthErrorCount % 10 == 0) { + // Periodic heartbeat to show it's still happening + print('Auth transient repeating: $errorMsg (x$_lastAuthErrorCount)'); + } + } + setState(() {}); + break; + } + + // Only show snack for non-transient errors + _showSnack('❌ Auth Error: $fullMessage'); + print('Auth Error Details: $data'); + setState(() {}); + break; + case 'connected': + // server acknowledged + print('Server connected: $data'); + break; + case 'download_folder': + final folder = data['folder'] as String?; + final projectId = data['projectId']; + if (folder != null) { + final last = _lastFolderDownloadTs[folder]; + final now = DateTime.now(); + if (_folderDownloading[folder] == true || (last != null && now.difference(last) < const Duration(seconds: 60))) { + break; + } + _downloadAndExtractFolder(folder); + } + break; + + case 'files_list': + // data expected to be list of {key,name,size} + final List list = []; + if (data is List) { + for (final e in data) { + final key = e['key'] as String? ?? ''; + final name = e['name'] as String? ?? key.split('/').last; + final size = e['size'] != null ? (e['size'] as num).toInt() : null; + list.add(FileItem(key: key, name: name, size: size)); + } + } + // complete any pending completer (if request made) + _completeFileListPending(list); + // update UI if not from pending (server push) + if (mounted) { + setState(() { + files = list; + loading = false; + }); + } + break; + + case 'presigned_url': + // data expected { key, url } + final key = data != null ? data['key'] as String? : null; + final url = data != null ? data['url'] as String? : null; + if (key != null) _completePresignPending(key, url); + break; + + case 'error': + final msgText = data != null && data['message'] != null ? data['message'] : data; + _showSnack('Server error: $msgText'); + break; + + default: + print('Unhandled WS message type: $type | data: $data'); + } + } + } catch (e, st) { + print('Failed to parse WS message: $e\n$st'); + } + } + + void _completeFileListPending(List list) { + // find all pending list completers and complete them + if (_pendingListRequests.isEmpty) return; + final keys = List.from(_pendingListRequests.keys); + for (final k in keys) { + final c = _pendingListRequests.remove(k); + if (c != null && !c.isCompleted) c.complete(list); + } + } + + void _completePresignPending(String key, String? url) { + final completer = _pendingPresign.remove(key); + if (completer != null && !completer.isCompleted) completer.complete(url); + } + + Future fetchFileList() async { + if (!_wsOpen) { + // attempt HTTP fallback immediately + await _fetchFileListHttpFallback(); + return; + } + + if (!_isAuthenticated) { + _showSnack('Please authenticate first before accessing files'); + return; + } + + setState(() { + loading = true; + error = null; + }); + + // use a requestId to be robust; server currently responds with 'files_list' + final requestId = DateTime.now().millisecondsSinceEpoch.toString(); + final completer = Completer>(); + _pendingListRequests[requestId] = completer; + + // We send a 'list_files' message. Server should respond with 'files_list'. + final msg = jsonEncode({'type': 'list_files', 'data': {'requestId': requestId}}); + _ws!.add(msg); + + // Race between WS response and fallback HTTP after timeout + List? wsResult; + try { + wsResult = await completer.future.timeout(const Duration(seconds: 6)); + } catch (_) { + // ignore, we'll fallback + } + if (wsResult != null) { + // Also fetch role-filtered folders — the WS 'list_files' response only + // returns file items, not the folders list. Without this, the sidebar and + // center pane would stay empty even when files exist (the HTTP fallback + // path populates folders, but the WS path did not). + List filteredFolders = []; + try { + if (_isAuthenticated && _authKey.isNotEmpty) { + final folderRes = await dio.get( + '$backendUrl/planxo/folders/filtered', + options: Options(headers: {'X-Auth-Key': _authKey}), + ); + if (folderRes.statusCode == 200) { + // Server may return {"folders":[...]} or a raw list directly + List rawList = []; + if (folderRes.data is Map && folderRes.data['folders'] is List) { + rawList = folderRes.data['folders'] as List; + } else if (folderRes.data is List) { + rawList = folderRes.data as List; + } + for (final f in rawList) { + if (f is String) filteredFolders.add(f); + else if (f is Map) { + final val = f['folder'] ?? f['path'] ?? f['prefix'] ?? f['name']; + if (val is String) filteredFolders.add(val); + } + } + } + } + } catch (_) {} + if (!mounted) return; + setState(() { + files = wsResult!; + if (filteredFolders.isNotEmpty) folders = filteredFolders; + loading = false; + }); + _detectRemoteMissingFiles(wsResult!); + _checkForChanges(); // Check changes after fetch + await _scanStorageFolders(); // refresh local folders from disk + } else { + await _fetchFileListHttpFallback(); + } + } + + Future _fetchFileListHttpFallback() async { + setState(() { loading = true; error = null; }); + try { + // 1. Try to fetch filtered folders from backend first + List filteredFolders = []; + try { + if (_isAuthenticated && _authKey.isNotEmpty) { + final folderRes = await dio.get( + '$backendUrl/planxo/folders/filtered', + options: Options(headers: {'X-Auth-Key': _authKey}) + ); + if (folderRes.statusCode == 200) { + // Server may return {"folders":[...]} or a raw list directly + List rawList = []; + if (folderRes.data is Map && folderRes.data['folders'] is List) { + rawList = folderRes.data['folders'] as List; + } else if (folderRes.data is List) { + rawList = folderRes.data as List; + } + for (final f in rawList) { + if (f is String) filteredFolders.add(f); + else if (f is Map) { + final val = f['folder'] ?? f['path'] ?? f['prefix'] ?? f['name']; + if (val is String) filteredFolders.add(val); + } + } + print('Fetched ${filteredFolders.length} filtered folders from backend'); + } + } + } catch (e) { + print('Failed to fetch filtered folders: $e'); + } + + // If we got role-filtered folders, only fetch assets for those folders. + // This prevents non-admin users from seeing files they're not assigned to. + if (filteredFolders.isNotEmpty) { + setState(() { folders = filteredFolders; loading = false; }); + _checkForChanges(); + await _scanStorageFolders(); + return; + } + + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + print('Falling back to HTTP GET $baseUrl/assets'); + final res = await dio.get('$baseUrl/assets'); + final List list = []; + final List foundFolders = []; + + if (res.statusCode == 200) { + final data = res.data; + // data can be array or object { assets: [], folders: [] } + if (data is List) { + for (final e in data) { + final key = (e['s3_key'] as String?) ?? ''; + final name = (e['filename'] as String?) ?? key.split('/').last; + final size = e['size'] is num ? (e['size'] as num).toInt() : null; + list.add(FileItem(key: key, name: name, size: size)); + } + } else if (data is Map) { + // assets + final assetsData = (data['assets'] is List) ? data['assets'] as List : (data['items'] is List ? data['items'] as List : []); + for (final e in assetsData) { + final key = (e['s3_key'] as String?) ?? e['key'] ?? ''; + final name = (e['filename'] as String?) ?? (key.split('/').isNotEmpty ? key.split('/').last : key); + final size = e['size'] is num ? (e['size'] as num).toInt() : null; + list.add(FileItem(key: key, name: name, size: size)); + } + + // folders (returned by asset_manager_app.py) + final foldersData = (data['folders'] is List) ? data['folders'] as List : []; + for (final f in foldersData) { + final folderPath = f['folder'] as String? ?? f['prefix'] as String? ?? f['path'] as String?; + if (folderPath != null) foundFolders.add(folderPath); + } + } + } + + setState(() { + files = list; + folders = filteredFolders.isNotEmpty ? filteredFolders : foundFolders; + loading = false; + }); + _detectRemoteMissingFiles(list); + _checkForChanges(); // Check changes after fetch + await _scanStorageFolders(); // refresh local folders from disk + } catch (e) { + setState(() { loading = false; error = 'HTTP fallback failed: $e'; }); + } + } + + // Sync settings persistence (simple JSON in HOME) + Future _settingsFile() async { + final home = Platform.environment['HOME'] ?? Directory.current.path; + final f = File(p.join(home, '.planxo_sync_settings.json')); + if (!await f.exists()) await f.create(recursive: true); + return f; + } + + Future _loadSyncSettings() async { + try { + final f = await _settingsFile(); + final content = await f.readAsString(); + if (content.trim().isEmpty) return; + final Map data = jsonDecode(content); + _syncSettings = data.map((k, v) => MapEntry(k, v)); + // Load prefs + final prefs = _syncSettings['_prefs']; + if (prefs is Map && prefs['extract_to_root'] is bool) { + _extractToRoot = prefs['extract_to_root'] as bool; + } + // start timers for enabled ones + _syncSettings.forEach((folder, cfg) { + if (cfg is Map && cfg['enabled'] == true && cfg['interval'] is int) { + _startFolderPeriodicSync(folder, cfg['interval']); + } + }); + } catch (e) { + print('No sync settings or failed to load: $e'); + } + } + + Future _saveSyncSettings() async { + try { + // persist prefs inside settings file + final prefs = (_syncSettings['_prefs'] is Map) + ? Map.from(_syncSettings['_prefs']) + : {}; + prefs['extract_to_root'] = _extractToRoot; + _syncSettings['_prefs'] = prefs; + final f = await _settingsFile(); + await f.writeAsString(jsonEncode(_syncSettings)); + } catch (e) { + print('Failed to save sync settings: $e'); + } + } + + Future _verifyStoragePath() async { + final path = _storageBasePath.trim(); + if (path.isEmpty) { + _showSnack('Set a storage path first'); + return; + } + try { + final d = Directory(path); + if (!await d.exists()) { + await d.create(recursive: true); + } + final testFile = File(p.join(path, '.planxo_write_test')); + await testFile.writeAsString('ok'); + await testFile.delete(); + _showSnack('Storage path verified and writable'); + } catch (e) { + _showSnack('Storage path not writable: $e'); + } + } + + void _startFolderPeriodicSync(String folder, int intervalMinutes) { + // stop any existing + _stopFolderPeriodicSync(folder); + final timer = Timer.periodic(Duration(minutes: intervalMinutes), (_) async { + if (_syncRunning[folder] == true) return; // skip if already running + _syncRunning[folder] = true; + try { + await _downloadAndExtractFolder(folder); + } catch (e) { + print('Periodic sync failed for $folder: $e'); + } finally { + _syncRunning[folder] = false; + } + }); + _syncTimers[folder] = timer; + // update settings map + _syncSettings[folder] = { + 'enabled': true, + 'interval': intervalMinutes, + 'last_started': DateTime.now().toIso8601String() + }; + _saveSyncSettings(); + } + + void _stopFolderPeriodicSync(String folder) { + final t = _syncTimers.remove(folder); + if (t != null && t.isActive) t.cancel(); + if (_syncSettings.containsKey(folder)) { + final cfg = _syncSettings[folder] as Map; + cfg['enabled'] = false; + _syncSettings[folder] = cfg; + _saveSyncSettings(); + } + } + + Future _toggleSyncForFolder(String folder, bool enable) async { + if (enable) { + final interval = (_syncSettings[folder] != null && _syncSettings[folder]['interval'] is int) ? _syncSettings[folder]['interval'] as int : 15; + _startFolderPeriodicSync(folder, interval); + } else { + _stopFolderPeriodicSync(folder); + } + setState(() {}); + } + + Future _setIntervalForFolder(String folder, int minutes) async { + final cfg = _syncSettings[folder] is Map ? Map.from(_syncSettings[folder]) : {}; + cfg['interval'] = minutes; + _syncSettings[folder] = cfg; + _saveSyncSettings(); + // restart timer if enabled + if (cfg['enabled'] == true) { + _startFolderPeriodicSync(folder, minutes); + } + setState(() {}); + } + + Future _showIntervalDialog(String folder) async { + final current = _syncSettings[folder] is Map && _syncSettings[folder]['interval'] is int ? _syncSettings[folder]['interval'] as int : 15; + int selected = current; + await showDialog(context: rootNavigatorKey.currentContext!, builder: (ctx) { + return AlertDialog( + title: Text('Sync interval for $folder'), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + RadioListTile(value: 15, groupValue: selected, title: const Text('Every 15 minutes'), onChanged: (v) { if (v!=null) { selected = v; setState(() {}); } }), + RadioListTile(value: 30, groupValue: selected, title: const Text('Every 30 minutes'), onChanged: (v) { if (v!=null) { selected = v; setState(() {}); } }), + RadioListTile(value: 45, groupValue: selected, title: const Text('Every 45 minutes'), onChanged: (v) { if (v!=null) { selected = v; setState(() {}); } }), + ], + ), + actions: [ + TextButton(onPressed: () => Navigator.of(ctx).pop(), child: const Text('Cancel')), + ElevatedButton(onPressed: () { _setIntervalForFolder(folder, selected); Navigator.of(ctx).pop(); }, child: const Text('Save')), + ], + ); + }); + } + + Future fetchPresignedUrl(String key) async { + if (!_wsOpen) { + _showSnack('WebSocket not connected'); + return null; + } + + // create completer and wait for presigned_url with matching key + final completer = Completer(); + _pendingPresign[key] = completer; + + final msg = jsonEncode({'type': 'presign', 'data': {'key': key}}); + _ws!.add(msg); + + try { + final url = await completer.future.timeout(const Duration(seconds: 10)); + return url; + } catch (e) { + _pendingPresign.remove(key); + _showSnack('Failed to get presigned URL: $e'); + return null; + } + } + +Future _downloadAndExtractFolder(String folder) async { + try { + if (_folderDownloading[folder] == true) return 0; + _folderDownloading[folder] = true; + await _unlockStorage(); // lift immutable flag before writing + int updates = 0; + await _logEvent(eventType: 'download_folder_start', folder: folder, status: 'started'); + _showSnack('Checking folder $folder...'); + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + final url = '$baseUrl/folders/download?folder=${Uri.encodeComponent(folder)}'; + + final response = await dio.get>( + url, + options: Options(responseType: ResponseType.bytes, followRedirects: true), + ); + + final bytes = response.data; + if (bytes == null) { + _showSnack('Folder download returned empty'); + return 0; + } + + final base = _storageBasePath.isNotEmpty ? _storageBasePath : (Platform.environment['HOME'] ?? Directory.current.path); + + // Ensure base storage path exists + final baseDir = Directory(base); + if (!baseDir.existsSync()) { + try { + baseDir.createSync(recursive: true); + print('Created base storage directory: ${baseDir.path}'); + } catch (e) { + _showSnack('Failed to create base storage path: $e'); + await _logEvent(eventType: 'download_folder_error', folder: folder, status: 'error', message: 'Failed to create base directory: $e'); + return 0; + } + } + + Directory projectDir; + if (_extractToRoot) { + var normalized = folder; + if (normalized.startsWith('/')) normalized = normalized.substring(1); + if (normalized.endsWith('/')) normalized = normalized.substring(0, normalized.length - 1); + projectDir = Directory(p.join(base, normalized)); + } else { + projectDir = Directory(p.join(base, 'ProjectsCache', folder.replaceAll('/', '_'))); + } + // Ensure all parent directories exist (e.g., base/clients/691481da936c80306db4cab9/691b07252227750fbe8703ee/) + if (!projectDir.existsSync()) { + try { + projectDir.createSync(recursive: true); + print('Created project directory: ${projectDir.path}'); + } catch (e) { + _showSnack('Failed to create project folder: $e'); + await _logEvent(eventType: 'download_folder_error', folder: folder, status: 'error', message: 'Failed to create project directory: $e'); + return 0; + } + } + + final archive = ZipDecoder().decodeBytes(bytes); + for (final file in archive) { + // ── Zip Slip protection ────────────────────────────────────────────── + // Normalise the entry name, reject any path that escapes the project dir. + final safeName = p.normalize(file.name).replaceAll('\\', '/'); + if (safeName.startsWith('..') || safeName.contains('/../')) { + print('Skipping unsafe zip entry: ${file.name}'); + continue; + } + final outPath = p.join(projectDir.path, safeName); + // Double-check: resolved path must still be inside projectDir + if (!p.isWithin(projectDir.path, outPath) && outPath != projectDir.path) { + print('Zip Slip blocked: $outPath is outside ${projectDir.path}'); + continue; + } + if (file.isFile) { + final outFile = File(outPath); + final parentDir = outFile.parent; + parentDir.createSync(recursive: true); + + // Only overwrite if remote is newer or file doesn't exist + bool shouldWrite = true; + if (await outFile.exists()) { + final localStat = await outFile.stat(); + final remoteMtime = DateTime.fromMillisecondsSinceEpoch(file.lastModTime * 1000); + if (localStat.modified.isAfter(remoteMtime)) { + shouldWrite = false; + } + } + if (shouldWrite) { + outFile.writeAsBytesSync(file.content as List); + // Update sync meta + _syncMeta[outFile.path] = { + 'lastModified': (await outFile.stat()).modified.millisecondsSinceEpoch, + 'hash': await _hashFile(outFile.path), + }; + updates++; + } + } else { + Directory(outPath).createSync(recursive: true); + } + } + + _currentProjectDir = projectDir; + _currentFolderPrefix = folder.endsWith('/') ? folder : '$folder/'; + await _primeKnownKeys(_currentFolderPrefix!); + + if (updates > 0) { + _showSnack('Updated $updates files in ${projectDir.path}'); + } + await _logEvent(eventType: 'download_folder_extracted', folder: folder, localPath: projectDir.path, status: 'ok'); + _startWatcher(projectDir, _currentFolderPrefix!); + _lastFolderDownloadTs[folder] = DateTime.now(); + + // Track for easy resume + _lastSyncedFolder = _currentFolderPrefix; + _lastSyncedLocalPath = projectDir.path; + + _checkForChanges(); // Refresh changes list + return updates; + } on DioException catch (e) { + if (e.type == DioExceptionType.connectionError) { + _showSnack('Folder download failed: Connection error. Please check the server.'); + } else { + _showSnack('Folder download failed: ${e.message}'); + } + await _logEvent(eventType: 'download_folder_error', folder: folder, status: 'error', message: e.message); + return 0; + } catch (e) { + _showSnack('Folder download failed: $e'); + await _logEvent(eventType: 'download_folder_error', folder: folder, status: 'error', message: '$e'); + return 0; + } finally { + _folderDownloading[folder] = false; + await _lockStorage(); // re-apply hidden + immutable flag + } +} + + /// Trigger a full sync for all known folders. + /// This will sequentially download and extract each folder. + Future syncFiles() async { + if (folders.isEmpty) { + _showSnack('No folders to sync'); + return; + } + + int totalUpdates = 0; + for (final folder in folders) { + try { + totalUpdates += await _downloadAndExtractFolder(folder); + } catch (e) { + print('syncFiles: error syncing $folder: $e'); + _showSnack('Sync failed for $folder: $e'); + } + } + if (totalUpdates == 0) { + _showSnack('All folders up to date.'); + } else { + _showSnack('Sync completed. Updated $totalUpdates files.'); + } + } + + void startFileWatcher(Directory directory, String folderPrefix) { + final watcher = DirectoryWatcher(directory.path); + + watcher.events.listen((event) async { + if (event.type == ChangeType.ADD || event.type == ChangeType.MODIFY) { + final file = File(event.path); + if (await file.exists()) { + await syncFile(file, folderPrefix, _currentProjectDir!); + } + } + }); + } + + Future syncFile(File file, String folderPrefix, Directory directory) async { + final now = DateTime.now(); + final localPath = file.path; + + // Debounce rapid consecutive writes + final last = _lastUpload[localPath]; + if (last != null && now.difference(last) < const Duration(seconds: 1)) return; + _lastUpload[localPath] = now; + + // Compute file hash + final bytes = await file.readAsBytes(); + final hash = crypto.sha256.convert(bytes).toString(); + + // Skip upload if content hash is unchanged + if (_lastUploadedHash[localPath] == hash) return; + + // Determine relative path for S3 + final relativePath = p.relative(file.path, from: directory.path).replaceAll('\\', '/'); + final s3Key = (folderPrefix.endsWith('/') ? folderPrefix : '$folderPrefix/') + relativePath; + + // Get last modified and hash + final stat = await file.stat(); + final lastModified = stat.modified.millisecondsSinceEpoch; + final currHash = await _hashFile(localPath); + + // Check sync meta to avoid redundant upload + final meta = _syncMeta[localPath]; + if (meta != null && + meta['lastModified'] == lastModified && + meta['hash'] == currHash) { + // No change since last sync + return; + } + + // Upload file + try { + final contentType = guessContentType(file.path); + if (_lastUploadedHash.containsKey(file.path)) { + await _replaceExisting(file.path, s3Key, contentType); + } else { + // Always use relativePath (with subfolders) for upload + await _uploadNew(file.path, folderPrefix, relativePath, contentType); + } + _lastUploadedHash[localPath] = hash; // Update hash after successful upload + // Update sync meta + _syncMeta[localPath] = { + 'lastModified': lastModified, + 'hash': currHash, + }; + _saveSyncMeta(); // Persist + } catch (e) { + print('Error syncing file $localPath: $e'); + } + } + + Future _primeKnownKeys(String folderPrefix) async { + try { + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + final url = '$baseUrl/assets?folder=${Uri.encodeComponent(folderPrefix)}'; + final res = await dio.get(url); + _knownS3Keys.clear(); + if (res.statusCode == 200 && res.data is List) { + for (final a in (res.data as List)) { + final key = a['s3_key']; + if (key is String) _knownS3Keys.add(key); + } + } + } catch (e) { + // non-fatal + print('primeKnownKeys error: $e'); + } + } + + void _startWatcher(Directory dir, String folderPrefix) { + // Cancel existing watcher for this folder if any, then register a new one. + // Using a Map so we can watch multiple folders simultaneously. + _watchSubs[folderPrefix]?.cancel(); + final sub = DirectoryWatcher(dir.path).events.listen((event) { + if (event.type == ChangeType.ADD || event.type == ChangeType.MODIFY) { + _onLocalFileChanged(event.path, folderPrefix); + } else if (event.type == ChangeType.REMOVE) { + _onLocalFileDeleted(event.path, folderPrefix); + } + }); + _watchSubs[folderPrefix] = sub; + // Also keep legacy _watchSub pointing to the most recent one for dispose() + _watchSub = sub; + } + + void _stopAllWatchers() { + for (final sub in _watchSubs.values) sub.cancel(); + _watchSubs.clear(); + _watchSub = null; + } + + Future _onLocalFileDeleted(String localPath, String folderPrefix) async { + final baseName = p.basename(localPath); + if (baseName == '.DS_Store' || baseName == '.keep' || baseName.startsWith('~') || baseName.endsWith('~')) return; + if (_currentProjectDir == null) return; + + final relative = p.relative(localPath, from: _currentProjectDir!.path).replaceAll('\\', '/'); + final s3Key = (folderPrefix.endsWith('/') ? folderPrefix : '$folderPrefix/') + relative; + + try { + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + await dio.delete('$baseUrl/assets/delete-by-key', queryParameters: {'key': s3Key}); + _knownS3Keys.remove(s3Key); + _syncMeta.remove(localPath); + _saveSyncMeta(); + _showSnack('Deleted $baseName from S3'); + await _logEvent(eventType: 'delete_local', folder: folderPrefix, s3Key: s3Key, localPath: localPath, status: 'ok'); + _checkForChanges(); + } catch (e) { + print('Delete sync error for $s3Key: $e'); + await _logEvent(eventType: 'delete_local', folder: folderPrefix, s3Key: s3Key, localPath: localPath, status: 'error', message: '$e'); + } + } + + Future _onLocalFileChanged(String localPath, String folderPrefix) async { + // Skip non-existent files (already cleaned up by OS) + if (!File(localPath).existsSync()) return; + + final baseName = p.basename(localPath); + + // ── Skip system files ──────────────────────────────────────────────────── + if (baseName == '.DS_Store' || baseName == '.keep') return; + + // ── Skip temp / backup files created by Illustrator, Photoshop & others ─ + // Illustrator writes ~filename.ai and filename.ai~ during save. + // Photoshop writes ~PST*.tmp and similar intermediate files. + // Office apps write ~$filename.docx lock/temp files. + if (baseName.startsWith('~') || // any leading-tilde temp file + baseName.endsWith('~') || // trailing-tilde backup copy + baseName.endsWith('.tmp') || // generic temp extension + baseName.endsWith('.lock') || // lock files + baseName.endsWith('.lck') || // alternative lock extension + baseName == 'Thumbs.db') return; // Windows thumbnail cache + + // ── Stable-file debounce ───────────────────────────────────────────────── + // Reset the timer every time the watcher fires for this path. + // The upload only happens after the file has been UNTOUCHED for 5 seconds, + // which gives Illustrator/Photoshop time to finish their multi-step save. + _uploadDebounceTimers[localPath]?.cancel(); + // 5 s stable-file window: enough for Illustrator/Photoshop multi-step saves + _uploadDebounceTimers[localPath] = Timer(const Duration(seconds: 5), () { + _uploadDebounceTimers.remove(localPath); + _performFileUpload(localPath, folderPrefix); + }); + } + + Future _performFileUpload(String localPath, String folderPrefix) async { + final file = File(localPath); + if (!file.existsSync()) return; + if (_currentProjectDir == null) return; + + // Use relative path from project dir, preserving all subfolders + final relative = p.relative(localPath, from: _currentProjectDir!.path).replaceAll('\\', '/'); + // S3 key must preserve folder structure: folderPrefix + relative + final s3Key = (folderPrefix.endsWith('/') ? folderPrefix : '$folderPrefix/') + relative; + final contentType = guessContentType(localPath); + + // Get last modified and hash + final stat = await file.stat(); + final lastModified = stat.modified.millisecondsSinceEpoch; + final currHash = await _hashFile(localPath); + + // Check sync meta to avoid redundant upload + final meta = _syncMeta[localPath]; + if (meta != null && + meta['lastModified'] == lastModified && + meta['hash'] == currHash) { + // No change since last sync + return; + } + + try { + if (_knownS3Keys.contains(s3Key)) { + await _replaceExisting(localPath, s3Key, contentType); + } else { + // Always use relative (with subfolders) for upload + await _uploadNew(localPath, folderPrefix, relative, contentType); + _knownS3Keys.add(s3Key); + } + _lastUploadedHash[localPath] = currHash; + // Update sync meta + _syncMeta[localPath] = { + 'lastModified': lastModified, + 'hash': currHash, + }; + _saveSyncMeta(); // Persist + _checkForChanges(); // Refresh changes list + } catch (e) { + print('Upload error for $localPath: $e'); + try { + await _logEvent(eventType: 'upload_error', folder: folderPrefix, s3Key: s3Key, localPath: localPath, status: 'error', message: '$e'); + } catch (_) {} + } + } + + Future _hashFile(String path) async { + final f = File(path); + final bytes = await f.readAsBytes(); + final digest = crypto.sha256.convert(bytes); + return digest.toString(); + } + + Future _logEvent({ + required String eventType, + String? folder, + String? s3Key, + String? localPath, + int? size, + String? hash, + String? status, + String? message, + }) async { + try { + await _db.insertEvent( + eventType: eventType, + folder: folder, + s3Key: s3Key, + localPath: localPath, + size: size, + hash: hash, + status: status, + message: message, + ); + } catch (_) {} + } + + Future _refreshEvents() async { + setState(() { + _logLoading = true; + }); + try { + var rows = await _db.recentEvents(limit: 200); + final filterPrefix = _logFilterCurrentOnly ? _currentFolderPrefix : null; + if (filterPrefix != null) { + rows = rows.where((e) => (e['folder'] as String?) == filterPrefix).toList(); + } + setState(() { + _recentEvents = rows; + }); + } catch (e) { + _showSnack('Failed to load sync log: $e'); + } finally { + if (mounted) { + setState(() { + _logLoading = false; + }); + } + } + } + + String guessContentType(String path) { + final ext = p.extension(path).toLowerCase(); + switch (ext) { + case '.txt': + return 'text/plain'; + case '.json': + return 'application/json'; + case '.png': + return 'image/png'; + case '.jpg': + case '.jpeg': + return 'image/jpeg'; + case '.pdf': + return 'application/pdf'; + default: + return 'application/octet-stream'; + } + } + + Future _replaceExisting(String localPath, String s3Key, String contentType) async { + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + final presignRes = await dio.post('$baseUrl/assets/presign-replace', data: { + 's3_key': s3Key, + 'owner_id': uniqueId, + 'content_type': contentType, + }); + + final uploadUrl = presignRes.data['upload_url']; + final assetId = presignRes.data['asset_id']; + + final file = File(localPath); + final bytes = await file.readAsBytes(); + + // Perform upload and capture full response for diagnostics (don't throw immediately on 500) + final putRes = await dio.put( + uploadUrl, + data: Stream.fromIterable([bytes]), + options: Options( + headers: { + 'Content-Type': contentType, + 'Content-Length': bytes.length.toString(), + }, + validateStatus: (status) => true, + ), + ); + + if (putRes.statusCode == null || putRes.statusCode! >= 400) { + print('Upload (replace) failed. status=${putRes.statusCode} statusMessage=${putRes.statusMessage}'); + print('Upload (replace) response data: ${putRes.data}'); + _showSnack('Upload failed (status ${putRes.statusCode}). See logs for details.'); + throw DioException(requestOptions: RequestOptions(path: uploadUrl), response: putRes); + } + + await dio.post('$baseUrl/assets/complete-replace', data: { + 'asset_id': assetId, + 'size': bytes.length, + 'owner_id': uniqueId, + }); + _showSnack('Updated $s3Key'); + + // Update files list locally to reflect changes immediately + setState(() { + final idx = files.indexWhere((f) => f.key == s3Key); + if (idx != -1) { + files[idx] = FileItem( + key: s3Key, + name: files[idx].name, + size: bytes.length, + ); + } + }); + + try { + await _logEvent(eventType: 'upload_replace', folder: _currentFolderPrefix, s3Key: s3Key, localPath: localPath, size: bytes.length, status: 'ok'); + } catch (_) {} + + // Debounce refresh: batch rapid uploads into a single refresh 3 s after the last one + _refreshDebounceTimer?.cancel(); + _refreshDebounceTimer = Timer(const Duration(seconds: 3), _fetchFileListHttpFallback); + } + + Future _uploadNew(String localPath, String folderPrefix, String relativePath, String contentType) async { + // baseUrl resolved from env or fallback constant + final envUrl = const String.fromEnvironment('ASSET_MANAGER_URL'); + final baseUrl = envUrl.isNotEmpty ? envUrl : assetManagerUrl; + final normalizedFolderPrefix = folderPrefix.endsWith('/') ? folderPrefix : '$folderPrefix/'; + + // preserve folder structure separators + final normalizedRelativePath = relativePath.replaceAll('\\', '/'); + + // final S3 key we intend + final s3Key = '$normalizedFolderPrefix$normalizedRelativePath'; + + // determine directory part of relativePath (may be "." for root) + final String fileDir = p.dirname(normalizedRelativePath); + final String folderForPresign = (fileDir == '.' || fileDir.isEmpty) + ? normalizedFolderPrefix + : (normalizedFolderPrefix + (fileDir.endsWith('/') ? fileDir : '$fileDir/')); + + // presign payload: folder contains subfolder, filename is basename, still provide explicit s3_key + final presignPayload = { + 'folder': folderForPresign, + 'filename': p.basename(normalizedRelativePath), + 's3_key': s3Key, + 'content_type': contentType, + 'owner_id': uniqueId, + }; + + // debug: log what we are about to send + print('presignPayload: $presignPayload'); + + Response presignRes; + try { + presignRes = await dio.post( + '$baseUrl/assets/presign-upload', + data: presignPayload, + ); + } catch (e) { + throw Exception('Presign request failed: $e'); + } + + print('presign response: ${presignRes.data}'); + + // Use server-returned s3_key (server may sanitize filename, e.g. spaces → underscores) + String effectiveS3Key = s3Key; + String effectiveFilename = p.basename(normalizedRelativePath); + try { + final returnedKey = presignRes.data is Map ? presignRes.data['s3_key'] as String? : null; + if (returnedKey != null && returnedKey.isNotEmpty) { + if (returnedKey != s3Key) { + print('Note: server sanitized s3_key: $returnedKey (requested $s3Key) — using server key'); + } + effectiveS3Key = returnedKey; + effectiveFilename = effectiveS3Key.split('/').last; + } + } catch (_) {} + + // tolerant extraction of upload URL (some APIs use 'upload_url' or 'url' or 'put_url') + final uploadUrl = presignRes.data is Map + ? (presignRes.data['upload_url'] ?? presignRes.data['url'] ?? presignRes.data['put_url']) + : null; + + if (uploadUrl == null || uploadUrl.toString().isEmpty) { + throw Exception('Presign response missing upload URL: ${presignRes.data}'); + } + + final file = File(localPath); + if (!await file.exists()) throw Exception('File not found: $localPath'); + final bytes = await file.readAsBytes(); + + Response putRes; + try { + putRes = await dio.put( + uploadUrl, + data: bytes, + options: Options( + headers: {'Content-Type': contentType}, + ), + ); + } catch (e) { + throw Exception('Upload to S3 failed: $e'); + } + + final status = putRes.statusCode ?? 0; + if (status >= 400) { + throw Exception('Failed to upload new file to S3 (status $status)'); + } + + // Confirm upload so MongoDB record moves from status:uploading → active + try { + final presignAssetId = presignRes.data is Map ? presignRes.data['asset_id'] as String? : null; + if (presignAssetId != null) { + await dio.post('$baseUrl/assets/complete-upload', data: { + 'asset_id': presignAssetId, + 'size': bytes.length, + }); + } + } catch (e) { + print('Warning: failed to confirm upload on backend: $e'); + } + + // Update local metadata using the effective (server-assigned) key + try { + _knownS3Keys.add(effectiveS3Key); + _lastUploadedHash[localPath] = crypto.sha256.convert(bytes).toString(); + final stat = await file.stat(); + final lastModified = stat.modified.millisecondsSinceEpoch; + _syncMeta[localPath] = { + 'lastModified': lastModified, + 'hash': _lastUploadedHash[localPath], + }; + + // Add to files list so UI updates immediately + setState(() { + final newItem = FileItem( + key: effectiveS3Key, + name: effectiveFilename, + size: bytes.length, + ); + files.removeWhere((f) => f.key == effectiveS3Key || f.key == s3Key); + files.add(newItem); + }); + + await _logEvent(eventType: 'upload_new', folder: folderForPresign, s3Key: effectiveS3Key, localPath: localPath, status: 'ok'); + + // Debounce refresh: batch rapid uploads into a single refresh 3 s after the last one + _refreshDebounceTimer?.cancel(); + _refreshDebounceTimer = Timer(const Duration(seconds: 3), _fetchFileListHttpFallback); + } catch (e) { + print('Warning: failed to update local sync metadata: $e'); + } + + print('Uploaded $localPath → $s3Key'); + } + + Future downloadFile(FileItem item) async { + final presigned = await fetchPresignedUrl(item.key); + if (presigned == null) return null; + + await _unlockStorage(); // lift immutable flag before writing + final base = _storageBasePath.isNotEmpty ? _storageBasePath : (Platform.environment['HOME'] ?? ''); + final downloadsDir = Directory(p.join(base, 'Downloads')); + if (!await downloadsDir.exists()) { + await downloadsDir.create(recursive: true); + } + + final targetPath = p.join(downloadsDir.path, item.name); + final tempPath = '$targetPath.part'; + + final token = CancelToken(); + item.cancelToken = token; + item.isDownloading = true; + item.received = 0; + item.total = 0; + + void updateState() => setState(() {}); + + try { + await dio.download( + presigned, + tempPath, + cancelToken: token, + options: Options(responseType: ResponseType.stream, followRedirects: true), + onReceiveProgress: (received, total) { + item.received = received; + item.total = total; + updateState(); + + // report progress to server via WebSocket (non-blocking) + if (_wsOpen) { + try { + _ws!.add(jsonEncode({ + 'type': 'download_progress', + 'data': {'key': item.key, 'received': received, 'total': total} + })); + } catch (e) { + // ignore WS send errors (non-fatal) + } + } + }, + ); + + final tmp = File(tempPath); + final finalFile = File(targetPath); + if (await finalFile.exists()) { + // overwrite + await finalFile.delete(); + } + await tmp.rename(finalFile.path); + item.localPath = finalFile.path; + _showSnack('Saved ${item.name} → ${finalFile.path}'); + + // notify server of completion + if (_wsOpen) { + try { + _ws!.add(jsonEncode({ + 'type': 'download_complete', + 'data': {'key': item.key, 'path': item.localPath} + })); + } catch (_) {} + } + + return finalFile; + } on DioException catch (e) { + if (CancelToken.isCancel(e)) { + _showSnack('Download cancelled: ${item.name}'); + } else { + _showSnack('Download failed: ${item.name} (${e.message})'); + } + return null; + } catch (e) { + _showSnack('Download error: $e'); + return null; + } finally { + item.isDownloading = false; + item.cancelToken = null; + item.received = 0; + item.total = 0; + updateState(); + await _lockStorage(); // re-apply hidden + immutable flag + } + } + + void cancelDownload(FileItem item) { + if (item.cancelToken != null && !item.cancelToken!.isCancelled) { + item.cancelToken!.cancel('user cancelled'); + } + } + + void openInFinder(String path) { + // macOS: open containing folder in Finder + Process.run('open', ['-R', path]); + } + + void _showSnack(String message) { + // Prefer global messenger key to avoid early-lifecycle issues + final messenger = rootMessengerKey.currentState; + if (messenger != null) { + messenger.showSnackBar(SnackBar(content: Text(message))); + return; + } + + // Fallback to context-based messenger when available + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(message))); + } else { + // Schedule after first frame if neither is ready + WidgetsBinding.instance.addPostFrameCallback((_) { + final m2 = rootMessengerKey.currentState; + m2?.showSnackBar(SnackBar(content: Text(message))); + }); + } + } + + String prettyBytes(int bytes) { + if (bytes < 1024) return '$bytes B'; + if (bytes < 1024 * 1024) return '${(bytes / 1024).toStringAsFixed(1)} KB'; + return '${(bytes / (1024 * 1024)).toStringAsFixed(1)} MB'; + } + + // ─── New 3-column Dropinside-style layout ─────────────────────────────────── + + /// Sidebar selection: null = All Files overview, non-null = selected folder + String? _selectedSidebarFolder; + /// Sub-folder navigation stack within the selected sidebar folder. + final List _folderNavStack = []; + /// Search text in center pane + String _searchQuery = ''; + /// Selected file for the right-panel file-details view + FileItem? _selectedFile; + /// Whether the right panel is showing file details (true) or sync status (false) + bool _showFileDetails = false; + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Plan XO', + scaffoldMessengerKey: rootMessengerKey, + navigatorKey: rootNavigatorKey, + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFFE2601A)), + useMaterial3: true, + fontFamily: 'Inter', + ), + home: loading + ? const Scaffold(body: Center(child: CircularProgressIndicator())) + : !_isAuthenticated + ? _buildLoginScreen() + : _buildMainShell(), + ); + } + + // ── Main shell: top bar + 3 columns ───────────────────────────────────────── + Widget _buildMainShell() { + return Scaffold( + backgroundColor: const Color(0xFFF0F2F5), + body: Column( + children: [ + _buildTopBar(), + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildLeftSidebar(), + Expanded(child: _buildCenterPane()), + _buildRightPanel(), + ], + ), + ), + ], + ), + ); + } + + // ── Brand colour ───────────────────────────────────────────────────────────── + static const _coral = Color(0xFFE2601A); + + // ── Top bar ────────────────────────────────────────────────────────────────── + Widget _buildTopBar() { + final pending = _changes.where((c) => c.status != 'synced').length; + final username = _userInfo != null + ? ((_userInfo!['username'] as String?) ?? 'U') + : (_clientName.isNotEmpty ? _clientName : 'U'); + final initial = username.substring(0, 1).toUpperCase(); + + return Container( + height: 52, + decoration: const BoxDecoration( + color: Colors.white, + border: Border(bottom: BorderSide(color: Color(0xFFEEEEEE))), + ), + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Row( + children: [ + Container( + width: 30, height: 30, + decoration: BoxDecoration(color: _coral, borderRadius: BorderRadius.circular(8)), + child: const Icon(Icons.folder_rounded, color: Colors.white, size: 17), + ), + const SizedBox(width: 10), + const Text('PlanXO', style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Color(0xFF1A1A2E))), + const Spacer(), + // WS status pill + Container( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), + decoration: BoxDecoration( + color: _wsOpen ? const Color(0xFFEAF6EC) : const Color(0xFFFCECEC), + borderRadius: BorderRadius.circular(20), + ), + child: Row(mainAxisSize: MainAxisSize.min, children: [ + _buildWsIndicator(), + const SizedBox(width: 5), + Text( + _wsOpen ? 'Online' : (_wsConnecting ? 'Connecting…' : 'Offline'), + style: TextStyle( + fontSize: 11, fontWeight: FontWeight.w600, + color: _wsOpen ? Colors.green.shade700 : Colors.red.shade700, + ), + ), + ]), + ), + if (pending > 0) ...[ + const SizedBox(width: 8), + Container( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), + decoration: BoxDecoration( + color: const Color(0xFFFFF3EC), + borderRadius: BorderRadius.circular(20), + border: Border.all(color: _coral.withValues(alpha: 0.3)), + ), + child: Row(mainAxisSize: MainAxisSize.min, children: [ + const Icon(Icons.sync_outlined, size: 12, color: _coral), + const SizedBox(width: 4), + Text('$pending pending', style: const TextStyle(fontSize: 11, fontWeight: FontWeight.w600, color: _coral)), + ]), + ), + ], + const SizedBox(width: 12), + PopupMenuButton( + tooltip: '', + onSelected: (val) { + if (val == 'logout') { + WidgetsBinding.instance.addPostFrameCallback((_) async { + await _clearAuthKey(); + _showSnack('Logged out successfully'); + }); + } else if (val == 'storage') { + _showStorageDialog(); + } + }, + itemBuilder: (_) => [ + const PopupMenuItem(value: 'storage', child: Row(children: [Icon(Icons.folder_outlined, size: 16), SizedBox(width: 8), Text('Storage settings')])), + const PopupMenuDivider(), + const PopupMenuItem(value: 'logout', child: Row(children: [Icon(Icons.logout_rounded, size: 16), SizedBox(width: 8), Text('Logout')])), + ], + child: Row(mainAxisSize: MainAxisSize.min, children: [ + CircleAvatar(radius: 15, backgroundColor: _coral, child: Text(initial, style: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.bold))), + const SizedBox(width: 4), + const Icon(Icons.keyboard_arrow_down_rounded, size: 16, color: Color(0xFF888888)), + ]), + ), + ], + ), + ); + } + + Widget _topBarTab(String label, bool active) { + return InkWell( + onTap: () {}, + borderRadius: BorderRadius.circular(6), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(label, + style: TextStyle( + fontSize: 14, + fontWeight: active ? FontWeight.w600 : FontWeight.normal, + color: active ? const Color(0xFF1A1A2E) : const Color(0xFF888888), + )), + const SizedBox(height: 2), + if (active) + Container( + height: 2, width: 36, + decoration: BoxDecoration( + color: const Color(0xFF1A73E8), + borderRadius: BorderRadius.circular(2), + ), + ), + ], + ), + ), + ); + } + + // ── Left Sidebar ───────────────────────────────────────────────────────────── + Widget _buildLeftSidebar() { + final recent = files.take(6).toList(); + return Container( + width: 248, + decoration: const BoxDecoration( + color: Colors.white, + border: Border(right: BorderSide(color: Color(0xFFEEEEEE))), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Header + Padding( + padding: const EdgeInsets.fromLTRB(16, 16, 12, 10), + child: Row(children: [ + const Text('Files', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: Color(0xFF1A1A2E))), + const Spacer(), + IconButton(icon: const Icon(Icons.open_in_full_rounded, size: 14, color: Color(0xFFAAAAAA)), onPressed: _showStorageDialog, visualDensity: VisualDensity.compact, tooltip: 'Storage'), + ]), + ), + // Search bar + Padding( + padding: const EdgeInsets.fromLTRB(12, 0, 12, 12), + child: Container( + height: 34, + decoration: BoxDecoration(color: const Color(0xFFF3F4F6), borderRadius: BorderRadius.circular(10)), + child: TextField( + onChanged: (v) => setState(() => _searchQuery = v.toLowerCase()), + style: const TextStyle(fontSize: 13), + decoration: const InputDecoration( + hintText: 'Search…', + hintStyle: TextStyle(fontSize: 13, color: Color(0xFFAAAAAA)), + prefixIcon: Icon(Icons.search, size: 16, color: Color(0xFFAAAAAA)), + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(vertical: 8), + ), + ), + ), + ), + // CATEGORIES label + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 6), + child: Text('CATEGORIES', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.grey.shade500, letterSpacing: 0.8)), + ), + // All Files + _sidebarCategoryRow(icon: Icons.grid_view_rounded, label: 'All Files', count: folders.length + localFolders.length, + selected: _selectedSidebarFolder == null, onTap: () => setState(() { _selectedSidebarFolder = null; _folderNavStack.clear(); }), active: true), + // Remote folders + for (final folder in folders) + _sidebarCategoryRow(icon: Icons.folder_rounded, label: folder.replaceAll(RegExp(r'/$'), '').split('/').last, count: null, + selected: _selectedSidebarFolder == folder, onTap: () => setState(() { _selectedSidebarFolder = folder; _folderNavStack.clear(); }), active: false), + // Local folders + for (final full in localFolders) + _sidebarCategoryRow(icon: Icons.folder_open_rounded, label: p.basename(full), count: null, + selected: _selectedSidebarFolder == full, onTap: () => setState(() { _selectedSidebarFolder = full; _folderNavStack.clear(); }), active: false, isLocal: true), + + const SizedBox(height: 8), + const Padding(padding: EdgeInsets.symmetric(horizontal: 16), child: Divider(height: 1, color: Color(0xFFF0F0F0))), + const SizedBox(height: 8), + + // LATEST FILES label + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 12, 8), + child: Row(children: [ + Text('LATEST FILES', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.grey.shade500, letterSpacing: 0.8)), + const Spacer(), + GestureDetector(onTap: fetchFileList, child: const Icon(Icons.add, size: 16, color: Color(0xFFAAAAAA))), + ]), + ), + + // Recent files list + Expanded( + child: SingleChildScrollView( + child: Column(children: [ + if (recent.isEmpty) + const Padding(padding: EdgeInsets.all(16), child: Text('No files yet', style: TextStyle(fontSize: 12, color: Color(0xFFAAAAAA)))) + else + for (final file in recent) _sidebarFileRow(file), + ]), + ), + ), + + // Footer: user info + if (_userInfo != null) + Container( + padding: const EdgeInsets.fromLTRB(16, 10, 16, 14), + decoration: const BoxDecoration(border: Border(top: BorderSide(color: Color(0xFFF0F0F0)))), + child: Row(children: [ + CircleAvatar(radius: 13, backgroundColor: _coral, child: Text( + ((_userInfo!['username'] as String?) ?? 'U').substring(0, 1).toUpperCase(), + style: const TextStyle(color: Colors.white, fontSize: 11, fontWeight: FontWeight.bold), + )), + const SizedBox(width: 8), + Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text((_userInfo!['username'] as String?) ?? '', style: const TextStyle(fontSize: 11, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis), + Text((_userInfo!['role'] as String?) ?? '', style: const TextStyle(fontSize: 10, color: Color(0xFFAAAAAA))), + ])), + ]), + ), + ], + ), + ); + } + + Widget _sidebarCategoryRow({required IconData icon, required String label, required int? count, required bool selected, required VoidCallback onTap, required bool active, bool isLocal = false}) { + final isSyncing = isLocal + ? localFolders.any((f) => p.basename(f) == label && _currentProjectDir?.path == f) + : (_currentFolderPrefix != null && _currentFolderPrefix!.contains(label)); + return GestureDetector( + onTap: onTap, + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 1), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8), + decoration: BoxDecoration(color: selected ? _coral : Colors.transparent, borderRadius: BorderRadius.circular(10)), + child: Row(children: [ + Container( + width: 26, height: 26, + decoration: BoxDecoration(color: selected ? Colors.white.withValues(alpha: 0.25) : const Color(0xFFF0F0F0), borderRadius: BorderRadius.circular(7)), + child: Icon(icon, size: 14, color: selected ? Colors.white : (isLocal ? const Color(0xFFFBBC04) : const Color(0xFF888888))), + ), + const SizedBox(width: 10), + Expanded(child: Text(label, style: TextStyle(fontSize: 13, fontWeight: FontWeight.w500, color: selected ? Colors.white : const Color(0xFF444444)), overflow: TextOverflow.ellipsis)), + if (isSyncing) Container(width: 6, height: 6, decoration: const BoxDecoration(color: Colors.green, shape: BoxShape.circle)), + if (count != null && count > 0) ...[ + const SizedBox(width: 4), + Container( + padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), + decoration: BoxDecoration(color: selected ? Colors.white.withValues(alpha: 0.25) : const Color(0xFFE5E7EB), borderRadius: BorderRadius.circular(10)), + child: Text('$count', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: selected ? Colors.white : const Color(0xFF666666))), + ), + ] else + Icon(active ? Icons.keyboard_arrow_down : Icons.chevron_right, size: 14, color: selected ? Colors.white.withValues(alpha: 0.7) : const Color(0xFFCCCCCC)), + ]), + ), + ); + } + + Widget _sidebarFileRow(FileItem file) { + final ext = file.name.contains('.') ? file.name.split('.').last.toLowerCase() : ''; + final sizeStr = file.size != null + ? (file.size! > 1024 * 1024 ? '${(file.size! / (1024 * 1024)).toStringAsFixed(1)} MB' : '${(file.size! / 1024).toStringAsFixed(1)} KB') + : '—'; + final isSelected = _selectedFile?.key == file.key; + return GestureDetector( + onTap: () => setState(() { _selectedFile = file; _showFileDetails = true; }), + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 1), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7), + decoration: BoxDecoration(color: isSelected ? const Color(0xFFFFF3EC) : Colors.transparent, borderRadius: BorderRadius.circular(10)), + child: Row(children: [ + Container(width: 32, height: 32, + decoration: BoxDecoration(color: _fileExtColor(ext).withValues(alpha: 0.12), borderRadius: BorderRadius.circular(8)), + child: Icon(_fileIcon(ext), size: 16, color: _fileExtColor(ext))), + const SizedBox(width: 8), + Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text(file.name, style: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500, color: Color(0xFF333333)), overflow: TextOverflow.ellipsis), + Text(sizeStr, style: const TextStyle(fontSize: 10, color: Color(0xFFAAAAAA))), + ])), + const Icon(Icons.more_horiz, size: 14, color: Color(0xFFCCCCCC)), + ]), + ), + ); + } + + Color _fileExtColor(String ext) { + switch (ext) { + case 'pdf': return const Color(0xFFD85A30); + case 'ai': case 'eps': return const Color(0xFF3B6D11); + case 'psd': case 'png': case 'jpg': case 'jpeg': return const Color(0xFF185FA5); + case 'xls': case 'xlsx': case 'csv': return const Color(0xFF0F6E56); + case 'doc': case 'docx': return const Color(0xFF2563EB); + default: return const Color(0xFF888888); + } + } + + Widget _sidebarSectionHeader(String label, String count) { + return Padding( + padding: const EdgeInsets.fromLTRB(12, 8, 12, 2), + child: Row( + children: [ + Text(label.toUpperCase(), style: const TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFFAAAAAA), letterSpacing: 0.5)), + const SizedBox(width: 4), + Text(count, style: const TextStyle(fontSize: 10, color: Color(0xFFAAAAAA))), + ], + ), + ); + } + + Widget _sidebarItem({required IconData icon, required Color iconColor, required String label, required bool selected, required VoidCallback onTap}) { + return InkWell( + onTap: onTap, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 7), + decoration: BoxDecoration( + color: selected ? const Color(0xFFE8F0FE) : Colors.transparent, + borderRadius: BorderRadius.circular(6), + ), + margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 1), + child: Row( + children: [ + Icon(icon, size: 16, color: selected ? const Color(0xFF1A73E8) : iconColor), + const SizedBox(width: 8), + Expanded(child: Text(label, style: TextStyle(fontSize: 13, color: selected ? const Color(0xFF1A73E8) : const Color(0xFF333333), fontWeight: selected ? FontWeight.w600 : FontWeight.normal), overflow: TextOverflow.ellipsis)), + ], + ), + ), + ); + } + + Widget _sidebarFolderTile(String folderPath, {required bool isLocal}) { + final displayName = isLocal ? p.basename(folderPath) : folderPath.replaceAll(RegExp(r'/$'), '').split('/').last; + final fullLabel = isLocal ? folderPath : folderPath; + final selected = _selectedSidebarFolder == fullLabel; + final isSyncing = _currentFolderPrefix == folderPath || (isLocal && _currentProjectDir?.path == folderPath); + return InkWell( + onTap: () => setState(() { _selectedSidebarFolder = fullLabel; _folderNavStack.clear(); }), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 7), + decoration: BoxDecoration( + color: selected ? const Color(0xFFE8F0FE) : Colors.transparent, + borderRadius: BorderRadius.circular(6), + ), + margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 1), + child: Row( + children: [ + Icon( + isLocal ? Icons.folder_open_rounded : Icons.folder_rounded, + size: 16, + color: selected ? const Color(0xFF1A73E8) : const Color(0xFFFBBC04), + ), + const SizedBox(width: 8), + Expanded(child: Text(displayName, style: TextStyle(fontSize: 13, color: selected ? const Color(0xFF1A73E8) : const Color(0xFF333333), fontWeight: selected ? FontWeight.w600 : FontWeight.normal), overflow: TextOverflow.ellipsis)), + if (isSyncing) + Container( + width: 7, height: 7, + decoration: const BoxDecoration(color: Colors.green, shape: BoxShape.circle), + ), + ], + ), + ), + ); + } + + // ── Center Pane ────────────────────────────────────────────────────────────── + Widget _buildCenterPane() { + // Current folder display name + final folderLabel = _selectedSidebarFolder == null + ? 'All Files' + : (_selectedSidebarFolder!.contains('/') + ? _selectedSidebarFolder!.replaceAll(RegExp(r'/$'), '').split('/').last + : p.basename(_selectedSidebarFolder!)); + final totalCount = folders.length + localFolders.length + files.length; + + return Column( + children: [ + // Folder header bar (matches screenshot) + Container( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + decoration: const BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Color(0xFFEEEEEE)))), + child: Row( + children: [ + // Coral folder icon + Container( + width: 48, height: 48, + decoration: BoxDecoration(color: _coral, borderRadius: BorderRadius.circular(14)), + child: const Icon(Icons.folder_rounded, color: Colors.white, size: 26), + ), + const SizedBox(width: 14), + Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text(folderLabel, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Color(0xFF1A1A2E))), + Text('$totalCount items${_selectedSidebarFolder != null ? ' in folder' : ''}', + style: const TextStyle(fontSize: 12, color: Color(0xFFAAAAAA))), + ])), + // Refresh + IconButton(icon: const Icon(Icons.refresh, size: 18, color: Color(0xFFAAAAAA)), onPressed: fetchFileList, tooltip: 'Refresh'), + // Sync Now button (if folder selected) + if (_selectedSidebarFolder != null) + GestureDetector( + onTap: () async { + final isLocal = localFolders.contains(_selectedSidebarFolder); + if (isLocal) { _useLocalFolderAsProject(_selectedSidebarFolder!); } + else { await _downloadAndExtractFolder(_selectedSidebarFolder!); } + }, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), + decoration: BoxDecoration(color: _coral, borderRadius: BorderRadius.circular(10)), + child: const Row(children: [ + Icon(Icons.sync, size: 14, color: Colors.white), + SizedBox(width: 5), + Text('Sync', style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: Colors.white)), + ]), + ), + ), + ], + ), + ), + // Body + Expanded( + child: _selectedSidebarFolder == null + ? _buildOverviewContent() + : _buildFolderDetailContent(_selectedSidebarFolder!), + ), + ], + ); + } + + // Dummy LayoutBuilder row to avoid compile errors from removed toolbar: + + // Overview: recent folders grid + full folder table + Widget _buildOverviewContent() { + // Build (displayName, selectionKey) pairs so tapping a recent-folder card passes + // the correct value to _selectedSidebarFolder: + // • local folders → selectionKey = full disk path (so isLocal lookup works) + // • remote folders → selectionKey = S3 prefix key + final allFolderEntries = [ + ...localFolders.map((f) => (p.basename(f), f)), + ...folders.where((key) { + final base = key.replaceAll(RegExp(r'/$'), '').split('/').last; + return !localFolders.any((lf) => p.basename(lf) == base); + }).map((key) => (key.replaceAll(RegExp(r'/$'), '').split('/').last, key)), + ]; + final allFolderNames = [ + ...localFolders.map((f) => p.basename(f)), + ...folders, + ]; + final recentFolders = allFolderNames.take(5).toList(); + final recentEntries = allFolderEntries.take(5).toList(); + + return SingleChildScrollView( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Breadcrumb + Row(children: [ + const Text('Home', style: TextStyle(fontSize: 13, color: Color(0xFF888888))), + const Text(' / ', style: TextStyle(fontSize: 13, color: Color(0xFF888888))), + const Text('All Folders', style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: Color(0xFF1A1A2E))), + const Spacer(), + IconButton( + icon: const Icon(Icons.refresh, size: 18), + onPressed: () => fetchFileList(), + tooltip: 'Refresh', + visualDensity: VisualDensity.compact, + ), + ]), + const SizedBox(height: 12), + // Recent folders grid + if (recentEntries.isNotEmpty) ...[ + const Text('Recent Files', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600)), + const SizedBox(height: 10), + SizedBox( + height: 120, + child: ListView.separated( + scrollDirection: Axis.horizontal, + itemCount: recentEntries.length, + separatorBuilder: (_, __) => const SizedBox(width: 10), + itemBuilder: (context, i) { + final (displayName, selectionKey) = recentEntries[i]; + return GestureDetector( + onTap: () => setState(() { _selectedSidebarFolder = selectionKey; _folderNavStack.clear(); }), + child: Container( + width: 100, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + border: Border.all(color: const Color(0xFFE5E7EB)), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.folder_rounded, color: Color(0xFFFBBC04), size: 40), + const SizedBox(height: 6), + Text(displayName, style: const TextStyle(fontSize: 11), textAlign: TextAlign.center, overflow: TextOverflow.ellipsis, maxLines: 2), + ], + ), + ), + ); + }, + ), + ), + const SizedBox(height: 20), + ], + // Folders table + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + border: Border.all(color: const Color(0xFFE5E7EB)), + ), + child: Column( + children: [ + // Header + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + child: Row(children: [ + const SizedBox(width: 24), + const Expanded(flex: 4, child: Text('Name', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const Expanded(flex: 2, child: Text('Type', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const Expanded(flex: 2, child: Text('Status', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const SizedBox(width: 100), + ]), + ), + const Divider(height: 1), + // Remote folders + ...folders.where((f) => _searchQuery.isEmpty || f.toLowerCase().contains(_searchQuery)).map((folder) { + final cfg = _syncSettings[folder] is Map ? _syncSettings[folder] as Map : null; + final enabled = cfg != null && cfg['enabled'] == true; + final interval = cfg != null && cfg['interval'] is int ? cfg['interval'] as int : 15; + return _folderTableRow( + name: folder.replaceAll(RegExp(r'/$'), '').split('/').last, + fullPath: folder, + type: 'Remote Folder', + enabled: enabled, + interval: interval, + isLocal: false, + ); + }), + // Local folders + ...localFolders.where((f) => _searchQuery.isEmpty || f.toLowerCase().contains(_searchQuery)).map((full) { + final cfg = _syncSettings[full] is Map ? _syncSettings[full] as Map : null; + final enabled = cfg != null && cfg['enabled'] == true; + final interval = cfg != null && cfg['interval'] is int ? cfg['interval'] as int : 15; + return _folderTableRow( + name: p.basename(full), + fullPath: full, + type: 'Local Folder', + enabled: enabled, + interval: interval, + isLocal: true, + ); + }), + if (folders.isEmpty && localFolders.isEmpty) + const Padding( + padding: EdgeInsets.all(32), + child: Center(child: Text('No folders found. Connect to sync.', style: TextStyle(color: Color(0xFF888888)))), + ), + ], + ), + ), + ], + ), + ); + } + + Widget _folderTableRow({required String name, required String fullPath, required String type, required bool enabled, required int interval, required bool isLocal}) { + final isSyncing = _currentFolderPrefix == fullPath || (isLocal && _currentProjectDir?.path == fullPath); + return InkWell( + onTap: () => setState(() { _selectedSidebarFolder = fullPath; _folderNavStack.clear(); }), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Color(0xFFF3F4F6)))), + child: Row( + children: [ + const SizedBox(width: 4), + Icon(Icons.folder_rounded, color: const Color(0xFFFBBC04), size: 18), + const SizedBox(width: 20), + Expanded(flex: 4, child: Text(name, style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis)), + Expanded(flex: 2, child: Text(type, style: const TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded( + flex: 2, + child: Row(children: [ + Container( + width: 7, height: 7, + decoration: BoxDecoration( + color: isSyncing ? Colors.green : (enabled ? const Color(0xFF1A73E8) : Colors.grey), + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 6), + Text(isSyncing ? 'Syncing' : (enabled ? 'Auto ($interval min)' : 'Manual'), + style: const TextStyle(fontSize: 12, color: Color(0xFF888888))), + ]), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: const Icon(Icons.sync, size: 16, color: Color(0xFF1A73E8)), + onPressed: () async { + if (isLocal) { + _useLocalFolderAsProject(fullPath); + } else { + await _downloadAndExtractFolder(fullPath); + } + }, + tooltip: 'Sync now', + visualDensity: VisualDensity.compact, + ), + IconButton( + icon: const Icon(Icons.settings_outlined, size: 16, color: Color(0xFF888888)), + onPressed: () => _showIntervalDialog(fullPath), + tooltip: 'Settings', + visualDensity: VisualDensity.compact, + ), + Switch.adaptive( + value: enabled, + onChanged: (v) => _toggleSyncForFolder(fullPath, v), + ), + ], + ), + ], + ), + ), + ); + } + + // Folder detail: browses the folder tree at the current nav level + Widget _buildFolderDetailContent(String folderPath) { + final isLocal = localFolders.contains(folderPath); + final folderBaseName = p.basename(folderPath.replaceAll(RegExp(r'/$'), '')); + + // Current browsed path: top of nav-stack (or the root folder itself) + final String currentBrowsePath = _folderNavStack.isNotEmpty + ? _folderNavStack.last + : folderPath; + + // Breadcrumb: root segment + one per nav-stack entry + final List crumbLabels = [ + folderBaseName, + ..._folderNavStack.map((seg) => + isLocal ? p.basename(seg) : seg.replaceAll(RegExp(r'/$'), '').split('/').last), + ]; + + final pendingChanges = _changes + .where((c) => + c.status != 'synced' && + (c.path.contains(folderBaseName) || + (c.remoteItem?.key.contains(folderBaseName) ?? false))) + .toList(); + + return SingleChildScrollView( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // ── Breadcrumb + actions ───────────────────────────────────────── + Row( + children: [ + GestureDetector( + onTap: () => setState(() { _selectedSidebarFolder = null; _folderNavStack.clear(); }), + child: const Text('Home', style: TextStyle(fontSize: 13, color: Color(0xFF1A73E8), decoration: TextDecoration.underline)), + ), + ...List.generate(crumbLabels.length, (i) { + final isLast = i == crumbLabels.length - 1; + final label = crumbLabels[i]; + return Row(mainAxisSize: MainAxisSize.min, children: [ + const Text(' / ', style: TextStyle(fontSize: 13, color: Color(0xFF888888))), + isLast + ? Text(label, style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: Color(0xFF1A1A2E))) + : GestureDetector( + onTap: () => setState(() { + if (i == 0) { + _folderNavStack.clear(); + } else { + while (_folderNavStack.length > i) _folderNavStack.removeLast(); + } + }), + child: Text(label, style: const TextStyle(fontSize: 13, color: Color(0xFF1A73E8), decoration: TextDecoration.underline)), + ), + ]); + }), + const Spacer(), + ElevatedButton.icon( + onPressed: () async { + if (isLocal) { + _useLocalFolderAsProject(folderPath); + } else { + await _downloadAndExtractFolder(folderPath); + } + }, + icon: const Icon(Icons.sync, size: 14), + label: const Text('Sync Folder'), + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFF1A73E8), + foregroundColor: Colors.white, + visualDensity: VisualDensity.compact, + textStyle: const TextStyle(fontSize: 12), + ), + ), + const SizedBox(width: 8), + OutlinedButton.icon( + onPressed: () { + final openPath = isLocal + ? currentBrowsePath + : (_storageBasePath.isNotEmpty ? p.join(_storageBasePath, folderBaseName) : folderPath); + Process.run('open', [openPath]); + }, + icon: const Icon(Icons.open_in_new, size: 14), + label: const Text('Open'), + style: OutlinedButton.styleFrom(visualDensity: VisualDensity.compact, textStyle: const TextStyle(fontSize: 12)), + ), + ], + ), + const SizedBox(height: 16), + + // ── Contents table ──────────────────────────────────────────────── + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + border: Border.all(color: const Color(0xFFE5E7EB)), + ), + child: FutureBuilder<_FolderListing>( + future: _listFolderLevel( + isLocal: isLocal, + currentBrowsePath: currentBrowsePath, + folderBaseName: folderBaseName, + ), + builder: (ctx, snap) { + if (snap.connectionState == ConnectionState.waiting) { + return const Padding( + padding: EdgeInsets.all(48), + child: Center(child: CircularProgressIndicator(strokeWidth: 2)), + ); + } + final listing = snap.data ?? _FolderListing(subFolders: [], fileRows: []); + final q = _searchQuery.toLowerCase(); + final filteredFolders = listing.subFolders.where((s) => q.isEmpty || s.name.toLowerCase().contains(q)).toList(); + final filteredFiles = listing.fileRows.where((r) => q.isEmpty || r.name.toLowerCase().contains(q)).toList(); + final hasContent = filteredFolders.isNotEmpty || filteredFiles.isNotEmpty; + + return Column(children: [ + // Header + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + child: Row(children: [ + const Expanded(flex: 4, child: Text('Name', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const Expanded(flex: 2, child: Text('Type', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const Expanded(flex: 1, child: Text('Size', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const Expanded(flex: 2, child: Text('Status', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF888888)))), + const SizedBox(width: 40), + ]), + ), + const Divider(height: 1), + if (!hasContent) + const Padding( + padding: EdgeInsets.all(32), + child: Center(child: Text('This folder is empty.', style: TextStyle(color: Color(0xFF888888)))), + ) + else ...[ + ...filteredFolders.map((sub) => _subFolderRow(sub)), + ...filteredFiles.map((row) => _localFileRow(row)), + ], + ]); + }, + ), + ), + + // ── Pending changes ─────────────────────────────────────────────── + if (pendingChanges.isNotEmpty) ...[ + const SizedBox(height: 16), + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + border: Border.all(color: const Color(0xFFE5E7EB)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + child: Row(children: [ + const Icon(Icons.pending_outlined, size: 16, color: Color(0xFF1A73E8)), + const SizedBox(width: 8), + Text('Pending Changes (${pendingChanges.length})', style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600)), + ]), + ), + const Divider(height: 1), + ...pendingChanges.map((change) => _pendingChangeRow(change)), + ], + ), + ), + ], + ], + ), + ); + } + + /// Lists sub-folders and files at the given browse level. + Future<_FolderListing> _listFolderLevel({ + required bool isLocal, + required String currentBrowsePath, + required String folderBaseName, + }) async { + if (isLocal) { + final dir = Directory(currentBrowsePath); + if (!await dir.exists()) return _FolderListing(subFolders: [], fileRows: []); + + final entities = await dir.list(recursive: false, followLinks: false).toList(); + entities.sort((a, b) { + final ad = a is Directory ? 0 : 1; + final bd = b is Directory ? 0 : 1; + if (ad != bd) return ad - bd; + return p.basename(a.path).toLowerCase().compareTo(p.basename(b.path).toLowerCase()); + }); + + final subFolders = <_SubFolderEntry>[]; + final fileRows = <_FileRow>[]; + for (final e in entities) { + final name = p.basename(e.path); + if (name.startsWith('.')) continue; + if (e is Directory) { + subFolders.add(_SubFolderEntry(name: name, fullPath: e.path)); + } else if (e is File) { + FileStat? stat; + try { stat = e.statSync(); } catch (_) {} + fileRows.add(_FileRow( + name: name, + ext: name.contains('.') ? name.split('.').last.toLowerCase() : '', + sizeBytes: stat?.size, + status: 'local', + )); + } + } + return _FolderListing(subFolders: subFolders, fileRows: fileRows); + } else { + // Remote: derive from in-memory files list + final prefix = currentBrowsePath.endsWith('/') ? currentBrowsePath : '$currentBrowsePath/'; + final matchingFiles = files.where((f) => + f.key.startsWith(prefix) || + f.key.contains('/$folderBaseName/') || + f.key.startsWith('$folderBaseName/')).toList(); + + final effectivePrefix = (matchingFiles.isNotEmpty && matchingFiles.first.key.startsWith(prefix)) + ? prefix + : ''; + + final subFolderNames = {}; + final fileRows = <_FileRow>[]; + for (final f in matchingFiles) { + final rel = effectivePrefix.isNotEmpty && f.key.startsWith(effectivePrefix) + ? f.key.substring(effectivePrefix.length) + : f.key; + final slash = rel.indexOf('/'); + if (slash > 0) { + subFolderNames.add(rel.substring(0, slash)); + } else if (slash == -1 && rel.isNotEmpty) { + final ext = f.name.contains('.') ? f.name.split('.').last.toLowerCase() : ''; + final change = _changes.where((c) => c.remoteItem?.key == f.key).firstOrNull; + fileRows.add(_FileRow( + name: f.name, + ext: ext, + sizeBytes: f.size, + status: change?.status ?? 'synced', + fileItem: f, + )); + } + } + + final sorted = subFolderNames.toList() + ..sort((a, b) => a.toLowerCase().compareTo(b.toLowerCase())); + return _FolderListing( + subFolders: sorted.map((name) => _SubFolderEntry( + name: name, + fullPath: '$effectivePrefix$name/', + fileCount: matchingFiles.where((f) { + final rel = effectivePrefix.isNotEmpty && f.key.startsWith(effectivePrefix) + ? f.key.substring(effectivePrefix.length) : f.key; + return rel.startsWith('$name/'); + }).length, + )).toList(), + fileRows: fileRows, + ); + } + } + + Widget _subFolderRow(_SubFolderEntry sub) { + return InkWell( + onTap: () => setState(() => _folderNavStack.add(sub.fullPath)), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Color(0xFFF3F4F6)))), + child: Row(children: [ + const Icon(Icons.folder_rounded, size: 18, color: Color(0xFFFBBC04)), + const SizedBox(width: 10), + Expanded( + flex: 4, + child: Text(sub.name, + style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w500), + overflow: TextOverflow.ellipsis), + ), + const Expanded(flex: 2, child: Text('Folder', style: TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded( + flex: 1, + child: Text( + sub.fileCount != null ? '${sub.fileCount} items' : '—', + style: const TextStyle(fontSize: 12, color: Color(0xFF888888)), + ), + ), + const Expanded(flex: 2, child: SizedBox()), + const Icon(Icons.chevron_right, size: 16, color: Color(0xFFBBBBBB)), + const SizedBox(width: 8), + ]), + ), + ); + } + + Widget _localFileRow(_FileRow row) { + if (row.fileItem != null) return _fileTableRow(row.fileItem!); + final sizeStr = row.sizeBytes != null + ? (row.sizeBytes! > 1024 * 1024 + ? '${(row.sizeBytes! / (1024 * 1024)).toStringAsFixed(1)} MB' + : '${(row.sizeBytes! / 1024).toStringAsFixed(1)} KB') + : '—'; + return Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Color(0xFFF3F4F6)))), + child: Row(children: [ + Icon(_fileIcon(row.ext), size: 18, color: const Color(0xFF1A73E8)), + const SizedBox(width: 10), + Expanded(flex: 4, child: Text(row.name, style: const TextStyle(fontSize: 13), overflow: TextOverflow.ellipsis)), + Expanded(flex: 2, child: Text(row.ext.toUpperCase().isNotEmpty ? row.ext.toUpperCase() : 'File', style: const TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded(flex: 1, child: Text(sizeStr, style: const TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded( + flex: 2, + child: Row(children: [ + Container(width: 7, height: 7, decoration: BoxDecoration(color: _statusColor(row.status), shape: BoxShape.circle)), + const SizedBox(width: 6), + Text(_statusLabel(row.status), style: const TextStyle(fontSize: 12, color: Color(0xFF888888))), + ]), + ), + const SizedBox(width: 40), + ]), + ); + } + + Widget _fileTableRow(FileItem file) { + final ext = file.name.contains('.') ? file.name.split('.').last.toLowerCase() : ''; + final sizeStr = file.size != null ? '${(file.size! / 1024).toStringAsFixed(1)} KB' : '—'; + final change = _changes.where((c) => c.path.contains(file.name) || (c.remoteItem?.key == file.key)).firstOrNull; + final status = change?.status ?? 'synced'; + return Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Color(0xFFF3F4F6)))), + child: Row( + children: [ + Icon(_fileIcon(ext), size: 18, color: const Color(0xFF1A73E8)), + const SizedBox(width: 10), + Expanded(flex: 4, child: Text(file.name, style: const TextStyle(fontSize: 13), overflow: TextOverflow.ellipsis)), + Expanded(flex: 2, child: Text(ext.toUpperCase().isNotEmpty ? ext.toUpperCase() : 'File', style: const TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded(flex: 1, child: Text(sizeStr, style: const TextStyle(fontSize: 12, color: Color(0xFF888888)))), + Expanded( + flex: 2, + child: Row(children: [ + Container( + width: 7, height: 7, + decoration: BoxDecoration(color: _statusColor(status), shape: BoxShape.circle), + ), + const SizedBox(width: 6), + Text(_statusLabel(status), style: const TextStyle(fontSize: 12, color: Color(0xFF888888))), + ]), + ), + SizedBox( + width: 40, + child: change != null && status != 'synced' + ? IconButton( + icon: Icon(_changeActionIcon(status), size: 16, color: const Color(0xFF1A73E8)), + onPressed: () async { + if (status == 'new_local' || status == 'modified_local') { + await _uploadFile(change.localFile!, change.path); + } else if (status == 'new_remote' && change.remoteItem != null) { + await downloadFile(change.remoteItem!); + _checkForChanges(); + } + }, + tooltip: _changeActionLabel(status), + visualDensity: VisualDensity.compact, + ) + : const SizedBox.shrink(), + ), + ], + ), + ); + } + + Widget _pendingChangeRow(ChangeItem change) { + final status = change.status; + return Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Color(0xFFF3F4F6)))), + child: Row( + children: [ + Icon(_statusIcon(status), size: 16, color: _statusColor(status)), + const SizedBox(width: 10), + Expanded(child: Text(change.path, style: const TextStyle(fontSize: 12), overflow: TextOverflow.ellipsis)), + const SizedBox(width: 8), + Text(status.replaceAll('_', ' '), style: TextStyle(fontSize: 11, color: _statusColor(status))), + const SizedBox(width: 8), + if (status != 'synced') + TextButton( + onPressed: () async { + if (status == 'new_local' || status == 'modified_local') { + await _uploadFile(change.localFile!, change.path); + } else if (status == 'new_remote' && change.remoteItem != null) { + await downloadFile(change.remoteItem!); + _checkForChanges(); + } + }, + style: TextButton.styleFrom(visualDensity: VisualDensity.compact, textStyle: const TextStyle(fontSize: 11)), + child: Text(_changeActionLabel(status)), + ), + ], + ), + ); + } + + // ── Right Sync Panel ───────────────────────────────────────────────────────── + Widget _buildRightPanel() { + return _showFileDetails && _selectedFile != null + ? _buildFileDetailsPanel(_selectedFile!) + : _buildSyncStatusPanel(); + } + + // File Details panel — shown when user taps a file + Widget _buildFileDetailsPanel(FileItem file) { + final ext = file.name.contains('.') ? file.name.split('.').last.toLowerCase() : ''; + final sizeStr = file.size != null + ? (file.size! > 1024 * 1024 ? '${(file.size! / (1024 * 1024)).toStringAsFixed(1)} MB' : '${(file.size! / 1024).toStringAsFixed(1)} KB') + : '—'; + return Container( + width: 272, + decoration: const BoxDecoration(color: Colors.white, border: Border(left: BorderSide(color: Color(0xFFEEEEEE)))), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Panel header + Padding( + padding: const EdgeInsets.fromLTRB(16, 14, 14, 10), + child: Row(children: [ + const Icon(Icons.insert_drive_file_outlined, size: 14, color: Color(0xFFAAAAAA)), + const SizedBox(width: 6), + const Text('File Details', style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600)), + const Spacer(), + // Toggle back to sync status + IconButton( + icon: const Icon(Icons.sync, size: 16, color: Color(0xFFAAAAAA)), + onPressed: () => setState(() => _showFileDetails = false), + tooltip: 'Sync Status', + visualDensity: VisualDensity.compact, + ), + IconButton( + icon: const Icon(Icons.close, size: 16, color: Color(0xFFAAAAAA)), + onPressed: () => setState(() { _selectedFile = null; _showFileDetails = false; }), + visualDensity: VisualDensity.compact, + ), + ]), + ), + const Divider(height: 1, color: Color(0xFFF0F0F0)), + + Expanded(child: SingleChildScrollView( + padding: const EdgeInsets.all(12), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + // Preview card + Container( + height: 120, + width: double.infinity, + decoration: BoxDecoration( + color: _fileExtColor(ext).withValues(alpha: 0.08), + borderRadius: BorderRadius.circular(12), + ), + child: Center(child: Icon(_fileIcon(ext), size: 52, color: _fileExtColor(ext))), + ), + const SizedBox(height: 12), + + // Name + size + Text(file.name, style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: Color(0xFF1A1A2E))), + const SizedBox(height: 2), + Text(sizeStr, style: const TextStyle(fontSize: 12, color: Color(0xFFAAAAAA))), + const SizedBox(height: 12), + + // Action buttons + Row(children: [ + Expanded(child: GestureDetector( + onTap: () async { + final presigned = await fetchPresignedUrl(file.key); + if (presigned != null) _openUrl(presigned); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration(color: const Color(0xFFFFF3EC), borderRadius: BorderRadius.circular(8)), + child: const Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + Icon(Icons.download_outlined, size: 14, color: _coral), + SizedBox(width: 4), + Text('Download', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _coral)), + ]), + ), + )), + const SizedBox(width: 8), + GestureDetector( + onTap: () { + if (_currentProjectDir != null) { + final localPath = p.join(_currentProjectDir!.path, file.name); + if (File(localPath).existsSync()) openInFinder(localPath); + else _showSnack('File not found locally. Sync first.'); + } + }, + child: Container( + width: 36, height: 36, + decoration: BoxDecoration(border: Border.all(color: const Color(0xFFE5E7EB)), borderRadius: BorderRadius.circular(8)), + child: const Icon(Icons.folder_open_outlined, size: 16, color: Color(0xFF888888)), + ), + ), + ]), + const SizedBox(height: 16), + const Divider(height: 1, color: Color(0xFFF0F0F0)), + const SizedBox(height: 12), + + // Description section + Row(children: [ + const Icon(Icons.description_outlined, size: 14, color: Color(0xFFAAAAAA)), + const SizedBox(width: 6), + const Text('Details', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF444444))), + const Spacer(), + const Icon(Icons.keyboard_arrow_up, size: 16, color: Color(0xFFAAAAAA)), + ]), + const SizedBox(height: 10), + _detailRow('Type', ext.toUpperCase().isNotEmpty ? ext.toUpperCase() : 'File'), + _detailRow('Size', sizeStr), + _detailRow('S3 Key', file.key, small: true), + + // Sync status for this file + const SizedBox(height: 12), + const Divider(height: 1, color: Color(0xFFF0F0F0)), + const SizedBox(height: 12), + Row(children: [ + const Icon(Icons.sync_outlined, size: 14, color: Color(0xFFAAAAAA)), + const SizedBox(width: 6), + const Text('Sync Status', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF444444))), + ]), + const SizedBox(height: 8), + Builder(builder: (ctx) { + final change = _changes.where((c) => c.remoteItem?.key == file.key).firstOrNull; + final status = change?.status ?? 'synced'; + return Container( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), + decoration: BoxDecoration( + color: _statusColor(status).withValues(alpha: 0.08), + borderRadius: BorderRadius.circular(8), + border: Border.all(color: _statusColor(status).withValues(alpha: 0.25)), + ), + child: Row(children: [ + Icon(_statusIcon(status), size: 13, color: _statusColor(status)), + const SizedBox(width: 6), + Text(_statusLabel(status), style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, color: _statusColor(status))), + ]), + ); + }), + ]), + )), + ], + ), + ); + } + + Widget _detailRow(String label, String value, {bool small = false}) { + return Padding( + padding: const EdgeInsets.only(bottom: 6), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + SizedBox(width: 56, child: Text(label, style: const TextStyle(fontSize: 11, color: Color(0xFFAAAAAA)))), + Expanded(child: Text(value, style: TextStyle(fontSize: small ? 10 : 11, fontWeight: FontWeight.w500, color: const Color(0xFF444444)), overflow: TextOverflow.ellipsis, maxLines: small ? 2 : 1)), + ]), + ); + } + + // Sync Status panel — shown by default / when no file selected + Widget _buildSyncStatusPanel() { + final pending = _changes.where((c) => c.status != 'synced').toList(); + return Container( + width: 272, + decoration: const BoxDecoration( + color: Colors.white, + border: Border(left: BorderSide(color: Color(0xFFEEEEEE))), + ), + child: Column( + children: [ + // Panel header + Padding( + padding: const EdgeInsets.fromLTRB(16, 14, 14, 10), + child: Row(children: [ + Container(width: 6, height: 6, margin: const EdgeInsets.only(right: 8), + decoration: BoxDecoration(color: _currentProjectDir != null ? Colors.green : Colors.grey, shape: BoxShape.circle)), + const Text('Sync Status', style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600)), + const Spacer(), + IconButton( + icon: const Icon(Icons.refresh, size: 16), + onPressed: _refreshEvents, + tooltip: 'Refresh log', + visualDensity: VisualDensity.compact, + ), + ]), + ), + const Divider(height: 1), + Expanded( + child: SingleChildScrollView( + padding: const EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Active sync / paused card + if (_currentProjectDir != null && _currentFolderPrefix != null) + _syncStatusCard( + title: 'Syncing', + subtitle: _currentFolderPrefix!, + local: _currentProjectDir!.path, + color: Colors.green, + icon: Icons.sync, + onSync: () async { + setState(() { loading = true; }); + try { + await _performPeriodicSync(); + await _checkForChanges(); + _showSnack('✅ Sync completed'); + } catch (e) { + _showSnack('❌ Sync failed: $e'); + } finally { + setState(() { loading = false; }); + } + }, + onStop: () async { + await _watchSub?.cancel(); + _watchSub = null; + setState(() { + _currentProjectDir = null; + _currentFolderPrefix = null; + _changes.clear(); + }); + _showSnack('Stopped syncing'); + }, + ) + else if (_lastSyncedFolder != null && _lastSyncedLocalPath != null) + _syncStatusCard( + title: 'Paused', + subtitle: _lastSyncedFolder!, + local: _lastSyncedLocalPath!, + color: Colors.orange, + icon: Icons.pause_circle_outline, + onSync: () async { + final dir = Directory(_lastSyncedLocalPath!); + if (!await dir.exists()) { + _showSnack('Local folder no longer exists.'); + return; + } + _currentProjectDir = dir; + _currentFolderPrefix = _lastSyncedFolder; + await _primeKnownKeys(_currentFolderPrefix!); + _startWatcher(dir, _currentFolderPrefix!); + _showSnack('Resumed syncing $_lastSyncedFolder'); + setState(() {}); + }, + onStop: null, + ) + else + Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration(color: const Color(0xFFF8F9FA), borderRadius: BorderRadius.circular(8), border: Border.all(color: const Color(0xFFE5E7EB))), + child: const Row(children: [ + Icon(Icons.info_outline, size: 16, color: Color(0xFF888888)), + SizedBox(width: 8), + Expanded(child: Text('No active sync. Select a folder to sync.', style: TextStyle(fontSize: 12, color: Color(0xFF888888)))), + ]), + ), + // const SizedBox(height: 16), + // // Storage path + // const Text('STORAGE', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFFAAAAAA), letterSpacing: 0.5)), + // const SizedBox(height: 6), + // Container( + // padding: const EdgeInsets.all(10), + // decoration: BoxDecoration(color: const Color(0xFFF8F9FA), borderRadius: BorderRadius.circular(8), border: Border.all(color: const Color(0xFFE5E7EB))), + // child: Row(children: [ + // const Icon(Icons.folder_outlined, size: 14, color: Color(0xFF888888)), + // const SizedBox(width: 6), + // Expanded(child: Text(_storageBasePath.isNotEmpty ? _storageBasePath : 'Not set', style: const TextStyle(fontSize: 11, color: Color(0xFF555555)), overflow: TextOverflow.ellipsis)), + // IconButton( + // icon: const Icon(Icons.edit_outlined, size: 14), + // onPressed: _showStorageDialog, + // visualDensity: VisualDensity.compact, + // tooltip: 'Change', + // ), + // ]), + // ), + const SizedBox(height: 16), + // Pending changes summary + Row(children: [ + const Text('PENDING', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFFAAAAAA), letterSpacing: 0.5)), + const SizedBox(width: 6), + Container( + padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 1), + decoration: BoxDecoration(color: pending.isNotEmpty ? const Color(0xFFE8F0FE) : const Color(0xFFF3F4F6), borderRadius: BorderRadius.circular(10)), + child: Text('${pending.length}', style: TextStyle(fontSize: 10, color: pending.isNotEmpty ? const Color(0xFF1A73E8) : const Color(0xFF888888), fontWeight: FontWeight.w600)), + ), + ]), + const SizedBox(height: 8), + if (pending.isEmpty) + const Text('All files synced ✓', style: TextStyle(fontSize: 12, color: Colors.green)) + else + ...pending.take(8).map((c) => Padding( + padding: const EdgeInsets.symmetric(vertical: 3), + child: Row(children: [ + Icon(_statusIcon(c.status), size: 13, color: _statusColor(c.status)), + const SizedBox(width: 6), + Expanded(child: Text(c.path.split('/').last, style: const TextStyle(fontSize: 11), overflow: TextOverflow.ellipsis)), + ]), + )), + if (pending.length > 8) + Text('+${pending.length - 8} more…', style: const TextStyle(fontSize: 11, color: Color(0xFF888888))), + const SizedBox(height: 16), + // Sync log + Row(children: [ + const Text('LOG', style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFFAAAAAA), letterSpacing: 0.5)), + const Spacer(), + Row(children: [ + SizedBox( + height: 20, + child: Switch.adaptive( + value: _logFilterCurrentOnly, + onChanged: (v) async { + setState(() { _logFilterCurrentOnly = v; }); + await _refreshEvents(); + }, + ), + ), + const SizedBox(width: 4), + const Text('Current only', style: TextStyle(fontSize: 10, color: Color(0xFF888888))), + ]), + ]), + const SizedBox(height: 8), + if (_logLoading) + const Center(child: SizedBox(height: 24, width: 24, child: CircularProgressIndicator(strokeWidth: 2))) + else if (_recentEvents.isEmpty) + const Text('No events yet.', style: TextStyle(fontSize: 12, color: Color(0xFF888888))) + else + ...(_recentEvents.take(12).map((e) { + final ts = ((e['ts'] as String?) ?? '').split('T').join(' ').split('.').first; + final type = (e['event_type'] as String?) ?? ''; + final s3Key = (e['s3_key'] as String?) ?? (e['local_path'] as String?) ?? ''; + final short = s3Key.split('/').last; + final status = (e['status'] as String?) ?? ''; + Color dot = status == 'success' ? Colors.green : (status == 'error' ? Colors.red : Colors.orange); + return Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container(margin: const EdgeInsets.only(top: 4), width: 6, height: 6, decoration: BoxDecoration(color: dot, shape: BoxShape.circle)), + const SizedBox(width: 6), + Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text('$type${short.isNotEmpty ? ': $short' : ''}', style: const TextStyle(fontSize: 11), overflow: TextOverflow.ellipsis), + Text(ts, style: const TextStyle(fontSize: 10, color: Color(0xFF888888))), + ])), + ]), + ); + })), + ], + ), + ), + ), + ], + ), + ); + } + + Widget _syncStatusCard({ + required String title, + required String subtitle, + required String local, + required Color color, + required IconData icon, + required VoidCallback onSync, + VoidCallback? onStop, + }) { + return Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: color.withValues(alpha: 0.06), + borderRadius: BorderRadius.circular(8), + border: Border.all(color: color.withValues(alpha: 0.3)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row(children: [ + Icon(icon, color: color, size: 16), + const SizedBox(width: 6), + Text(title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: color)), + ]), + const SizedBox(height: 6), + Text(subtitle, style: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis), + Text(local, style: const TextStyle(fontSize: 10, color: Color(0xFF888888)), overflow: TextOverflow.ellipsis), + const SizedBox(height: 8), + Row(children: [ + Expanded( + child: SizedBox( + height: 28, + child: ElevatedButton.icon( + onPressed: onSync, + icon: Icon(icon, size: 12), + label: Text(onStop != null ? 'Sync Now' : 'Resume'), + style: ElevatedButton.styleFrom( + backgroundColor: color, + foregroundColor: Colors.white, + textStyle: const TextStyle(fontSize: 11), + visualDensity: VisualDensity.compact, + ), + ), + ), + ), + if (onStop != null) ...[ + const SizedBox(width: 6), + SizedBox( + height: 28, + child: OutlinedButton( + onPressed: onStop, + style: OutlinedButton.styleFrom(textStyle: const TextStyle(fontSize: 11), visualDensity: VisualDensity.compact), + child: const Text('Stop'), + ), + ), + ], + ]), + ], + ), + ); + } + + // ── Storage dialog ─────────────────────────────────────────────────────────── + void _showStorageDialog() { + showDialog( + context: rootNavigatorKey.currentContext!, + builder: (ctx) => AlertDialog( + title: const Row(children: [ + Icon(Icons.lock_outline, size: 18, color: Color(0xFF1A73E8)), + SizedBox(width: 8), + Text('Managed Storage'), + ]), + content: SizedBox( + width: 420, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: const Color(0xFFF0F4FF), + borderRadius: BorderRadius.circular(8), + border: Border.all(color: const Color(0xFFBDD0FF)), + ), + child: Row( + children: [ + const Icon(Icons.folder_special_outlined, color: Color(0xFF1A73E8), size: 20), + const SizedBox(width: 10), + Expanded( + child: Text( + _storageBasePath, + style: const TextStyle(fontSize: 13, fontFamily: 'monospace'), + ), + ), + IconButton( + icon: const Icon(Icons.copy_outlined, size: 16), + tooltip: 'Copy path', + visualDensity: VisualDensity.compact, + onPressed: () { + Clipboard.setData(ClipboardData(text: _storageBasePath)); + _showSnack('Path copied to clipboard'); + }, + ), + ], + ), + ), + const SizedBox(height: 12), + const Text( + 'This folder is managed automatically by PlanXO. It is hidden in Finder and protected against accidental deletion.', + style: TextStyle(fontSize: 12, color: Color(0xFF666666)), + ), + const SizedBox(height: 8), + OutlinedButton.icon( + onPressed: () { + Process.run('open', [p.dirname(_storageBasePath)]); + }, + icon: const Icon(Icons.open_in_new, size: 14), + label: const Text('Reveal in Finder'), + style: OutlinedButton.styleFrom( + visualDensity: VisualDensity.compact, + textStyle: const TextStyle(fontSize: 12), + ), + ), + ], + ), + ), + actions: [ + ElevatedButton( + onPressed: () => Navigator.pop(ctx), + child: const Text('Done'), + ), + ], + ), + ); + } + + // ── Helper methods for new UI ──────────────────────────────────────────────── + Color _statusColor(String status) { + switch (status) { + case 'synced': return Colors.green; + case 'new_local': return Colors.green; + case 'modified_local': return Colors.orange; + case 'new_remote': return const Color(0xFF1A73E8); + default: return Colors.grey; + } + } + + String _statusLabel(String status) { + switch (status) { + case 'synced': return 'Synced'; + case 'new_local': return 'Upload'; + case 'modified_local': return 'Modified'; + case 'new_remote': return 'Download'; + default: return status.replaceAll('_', ' '); + } + } + + IconData _statusIcon(String status) { + switch (status) { + case 'synced': return Icons.check_circle_outline; + case 'new_local': return Icons.upload_outlined; + case 'modified_local': return Icons.edit_outlined; + case 'new_remote': return Icons.download_outlined; + default: return Icons.help_outline; + } + } + + IconData _changeActionIcon(String status) { + switch (status) { + case 'new_local': return Icons.upload_outlined; + case 'modified_local': return Icons.upload_outlined; + case 'new_remote': return Icons.download_outlined; + default: return Icons.sync; + } + } + + String _changeActionLabel(String status) { + switch (status) { + case 'new_local': return 'Upload'; + case 'modified_local': return 'Upload Update'; + case 'new_remote': return 'Download'; + default: return 'Sync'; + } + } + + IconData _fileIcon(String ext) { + switch (ext) { + case 'pdf': return Icons.picture_as_pdf_outlined; + case 'jpg': case 'jpeg': case 'png': case 'gif': case 'webp': case 'svg': + return Icons.image_outlined; + case 'mp4': case 'mov': case 'avi': return Icons.video_file_outlined; + case 'mp3': case 'wav': case 'aac': return Icons.audio_file_outlined; + case 'zip': case 'rar': case 'tar': case 'gz': return Icons.folder_zip_outlined; + case 'doc': case 'docx': return Icons.description_outlined; + case 'xls': case 'xlsx': return Icons.table_chart_outlined; + case 'ppt': case 'pptx': return Icons.slideshow_outlined; + default: return Icons.insert_drive_file_outlined; + } + } + + // (Tab 2 logic kept — pending changes full view accessible via top bar later) + // Dummy shim so existing references compile + Widget _buildTitleBar() => const SizedBox.shrink(); + Widget _buildWsIndicator() { + Color color; + if (_wsOpen) { + color = Colors.green; + } else if (_wsConnecting) { + color = Colors.orange; + } else { + color = Colors.red; + } + return AnimatedContainer( + duration: const Duration(milliseconds: 300), + width: 12, + height: 12, + decoration: BoxDecoration( + color: color, + shape: BoxShape.circle, + boxShadow: [ + BoxShadow(color: color.withValues(alpha: 0.6), blurRadius: 4, spreadRadius: 1), + ], + ), + ); + } + + void _handleAuthRevoked(Map data) { + WidgetsBinding.instance.addPostFrameCallback((_) async { + await _clearAuthKey(); + _userInfo = null; + _isAuthenticated = false; + _authPollTimer?.cancel(); + _periodicSyncTimer?.cancel(); + for (final t in _syncTimers.values) { + if (t.isActive) t.cancel(); + } + _syncTimers.clear(); + _syncRunning.clear(); + _showSnack('Authentication revoked. Please log in again.'); + if (mounted) setState(() {}); + }); + } + + Widget _buildLoginScreen() { + final secretController = TextEditingController(text: _assetManagerSecret); + bool showAdvanced = _assetManagerSecret.isEmpty; // show on first run + + return StatefulBuilder(builder: (ctx, setLocal) { + return Scaffold( + backgroundColor: const Color(0xFFF5F6FA), + body: Center( + child: Container( + constraints: const BoxConstraints(maxWidth: 420), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: const EdgeInsets.all(32), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + boxShadow: [BoxShadow(color: Colors.black.withValues(alpha: 0.08), blurRadius: 24, offset: const Offset(0, 8))], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + Container(width: 38, height: 38, decoration: BoxDecoration(color: _coral, borderRadius: BorderRadius.circular(10)), + child: const Icon(Icons.folder_rounded, color: Colors.white, size: 22)), + const SizedBox(width: 10), + const Text('PlanXO', style: TextStyle(fontSize: 26, fontWeight: FontWeight.bold, color: Color(0xFF1A1A2E))), + ]), + const SizedBox(height: 6), + const Text('Asset Sync', textAlign: TextAlign.center, style: TextStyle(fontSize: 14, color: Color(0xFF888888))), + const SizedBox(height: 28), + TextField( + controller: _clientController, + decoration: InputDecoration( + labelText: 'Client Name', + hintText: 'e.g. cms', + border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)), + prefixIcon: const Icon(Icons.business_outlined), + ), + ), + const SizedBox(height: 12), + // Advanced / first-run section for asset manager secret + GestureDetector( + onTap: () => setLocal(() => showAdvanced = !showAdvanced), + child: Row(children: [ + Icon(showAdvanced ? Icons.expand_less : Icons.expand_more, size: 16, color: const Color(0xFF888888)), + const SizedBox(width: 4), + Text(showAdvanced ? 'Hide advanced settings' : 'Advanced settings', + style: const TextStyle(fontSize: 12, color: Color(0xFF888888))), + if (_assetManagerSecret.isEmpty) ...[ + const SizedBox(width: 6), + Container(padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), + decoration: BoxDecoration(color: Colors.orange.shade50, borderRadius: BorderRadius.circular(6)), + child: Text('Setup required', style: TextStyle(fontSize: 10, color: Colors.orange.shade700, fontWeight: FontWeight.w600))), + ], + ]), + ), + if (showAdvanced) ...[ + const SizedBox(height: 10), + TextField( + controller: secretController, + obscureText: true, + decoration: InputDecoration( + labelText: 'Asset Manager Secret', + hintText: 'Matches ASSET_MANAGER_SECRET on server', + helperText: 'Ask your admin for this value', + border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)), + prefixIcon: const Icon(Icons.key_outlined), + ), + onChanged: (v) async { + _assetManagerSecret = v.trim(); + await _secureStorage.write(key: 'planxo_asset_manager_secret', value: _assetManagerSecret); + }, + ), + const SizedBox(height: 6), + Text('This machine\'s ID: $uniqueId', + style: const TextStyle(fontSize: 10, color: Color(0xFFAAAAAA))), + ], + const SizedBox(height: 16), + FilledButton.icon( + onPressed: () => _openLoginForClient(_clientController.text), + icon: const Icon(Icons.login), + label: const Text('Continue'), + style: FilledButton.styleFrom( + backgroundColor: _coral, + padding: const EdgeInsets.symmetric(vertical: 14), + textStyle: const TextStyle(fontSize: 15), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ], + ), + ), + const SizedBox(height: 20), + Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + AnimatedContainer( + duration: const Duration(milliseconds: 300), + width: 8, height: 8, + decoration: BoxDecoration( + color: _wsOpen ? Colors.green : (_wsConnecting ? Colors.orange : Colors.red), + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 8), + Text( + _wsOpen ? 'Connected to server' : (_wsConnecting ? 'Connecting…' : 'Offline'), + style: TextStyle(fontSize: 12, color: _wsOpen ? Colors.green : (_wsConnecting ? Colors.orange : Colors.red)), + ), + ]), + ], + ), + ), + ), + ); + }); // end StatefulBuilder + } +} + +// ── Data classes for folder browsing ───────────────────────────────────────── + +class _SubFolderEntry { + final String name; + /// Full path: absolute disk path (local) or S3 prefix ending with '/' (remote). + final String fullPath; + final int? fileCount; + _SubFolderEntry({required this.name, required this.fullPath, this.fileCount}); +} + +class _FileRow { + final String name; + final String ext; + final int? sizeBytes; + final String status; + /// Set when this row corresponds to a remote [FileItem]. + final FileItem? fileItem; + _FileRow({ + required this.name, + required this.ext, + this.sizeBytes, + required this.status, + this.fileItem, + }); +} + +class _FolderListing { + final List<_SubFolderEntry> subFolders; + final List<_FileRow> fileRows; + _FolderListing({required this.subFolders, required this.fileRows}); +} + diff --git a/development/planxo/lib/models/sync_data.dart b/development/planxo/lib/models/sync_data.dart new file mode 100644 index 0000000..4a46b93 --- /dev/null +++ b/development/planxo/lib/models/sync_data.dart @@ -0,0 +1,35 @@ +class SyncData { + final int? id; + final String folder; + final bool enabled; + final int interval; + final String? lastSynced; + + SyncData({ + this.id, + required this.folder, + required this.enabled, + required this.interval, + this.lastSynced, + }); + + Map toMap() { + return { + 'id': id, + 'folder': folder, + 'enabled': enabled ? 1 : 0, + 'interval': interval, + 'last_synced': lastSynced, + }; + } + + factory SyncData.fromMap(Map map) { + return SyncData( + id: map['id'], + folder: map['folder'], + enabled: map['enabled'] == 1, + interval: map['interval'], + lastSynced: map['last_synced'], + ); + } +} \ No newline at end of file diff --git a/development/planxo/linux/.gitignore b/development/planxo/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/development/planxo/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/development/planxo/linux/CMakeLists.txt b/development/planxo/linux/CMakeLists.txt new file mode 100644 index 0000000..1304aab --- /dev/null +++ b/development/planxo/linux/CMakeLists.txt @@ -0,0 +1,128 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "planxo") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.planxo") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/development/planxo/linux/flutter/CMakeLists.txt b/development/planxo/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/development/planxo/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/development/planxo/linux/flutter/generated_plugins.cmake b/development/planxo/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..9c56b4c --- /dev/null +++ b/development/planxo/linux/flutter/generated_plugins.cmake @@ -0,0 +1,27 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux + flutter_secure_storage_linux + sqlite3_flutter_libs +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/development/planxo/linux/runner/CMakeLists.txt b/development/planxo/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/development/planxo/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/development/planxo/linux/runner/main.cc b/development/planxo/linux/runner/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/development/planxo/linux/runner/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/development/planxo/linux/runner/my_application.cc b/development/planxo/linux/runner/my_application.cc new file mode 100644 index 0000000..d1bb1b5 --- /dev/null +++ b/development/planxo/linux/runner/my_application.cc @@ -0,0 +1,144 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Called when first Flutter frame received. +static void first_frame_cb(MyApplication* self, FlView *view) +{ + gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); +} + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "planxo"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "planxo"); + } + + gtk_window_set_default_size(window, 1280, 720); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + GdkRGBA background_color; + // Background defaults to black, override it here if necessary, e.g. #00000000 for transparent. + gdk_rgba_parse(&background_color, "#000000"); + fl_view_set_background_color(view, &background_color); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + // Show the window when Flutter renders. + // Requires the view to be realized so we can start rendering. + g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), self); + gtk_widget_realize(GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/development/planxo/linux/runner/my_application.h b/development/planxo/linux/runner/my_application.h new file mode 100644 index 0000000..72271d5 --- /dev/null +++ b/development/planxo/linux/runner/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/development/planxo/macos/.gitignore b/development/planxo/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/development/planxo/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/development/planxo/macos/Flutter/Flutter-Debug.xcconfig b/development/planxo/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..4b81f9b --- /dev/null +++ b/development/planxo/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/development/planxo/macos/Flutter/Flutter-Release.xcconfig b/development/planxo/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..5caa9d1 --- /dev/null +++ b/development/planxo/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/development/planxo/macos/Podfile b/development/planxo/macos/Podfile new file mode 100644 index 0000000..ff5ddb3 --- /dev/null +++ b/development/planxo/macos/Podfile @@ -0,0 +1,42 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/development/planxo/macos/Runner.xcodeproj/project.pbxproj b/development/planxo/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0d9c63c --- /dev/null +++ b/development/planxo/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,801 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 2479F6295B81210E9C2B5D74 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2FA5DC5F7716F4549CA0845 /* Pods_RunnerTests.framework */; }; + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + B83E32400CE0E63D937A3DB3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8B657E2B33DD591C0462181 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* planxo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = planxo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 39155466C2D1A9BF4CBAF461 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 6BB9321BF99BC8DEFDA2389B /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + CFA8E4396645FCD7AD79CF5A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + D3E3EE0CB25D5CC763600C8C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + D5029A70F57884515C070A87 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + D8B657E2B33DD591C0462181 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E48A63B423A1EEDAC33E7DF9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + F2FA5DC5F7716F4549CA0845 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2479F6295B81210E9C2B5D74 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B83E32400CE0E63D937A3DB3 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 97CAACA72205D349F1A1B9FB /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* planxo.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 97CAACA72205D349F1A1B9FB /* Pods */ = { + isa = PBXGroup; + children = ( + E48A63B423A1EEDAC33E7DF9 /* Pods-Runner.debug.xcconfig */, + D3E3EE0CB25D5CC763600C8C /* Pods-Runner.release.xcconfig */, + CFA8E4396645FCD7AD79CF5A /* Pods-Runner.profile.xcconfig */, + D5029A70F57884515C070A87 /* Pods-RunnerTests.debug.xcconfig */, + 6BB9321BF99BC8DEFDA2389B /* Pods-RunnerTests.release.xcconfig */, + 39155466C2D1A9BF4CBAF461 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D8B657E2B33DD591C0462181 /* Pods_Runner.framework */, + F2FA5DC5F7716F4549CA0845 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 81B9E979FD4EA9761F1ED876 /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 8FD316E523682FD9A5657E4A /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + 92743C4D8D09C696E1E6EEBC /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* planxo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 81B9E979FD4EA9761F1ED876 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-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; + }; + 8FD316E523682FD9A5657E4A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-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; + }; + 92743C4D8D09C696E1E6EEBC /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D5029A70F57884515C070A87 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/planxo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/planxo"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6BB9321BF99BC8DEFDA2389B /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/planxo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/planxo"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 39155466C2D1A9BF4CBAF461 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/planxo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/planxo"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/development/planxo/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/development/planxo/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/development/planxo/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/development/planxo/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/development/planxo/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..5337b54 --- /dev/null +++ b/development/planxo/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/macos/Runner.xcworkspace/contents.xcworkspacedata b/development/planxo/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/development/planxo/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/development/planxo/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/development/planxo/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/development/planxo/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/development/planxo/macos/Runner/AppDelegate.swift b/development/planxo/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..3d22acc --- /dev/null +++ b/development/planxo/macos/Runner/AppDelegate.swift @@ -0,0 +1,19 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationDidFinishLaunching(_ aNotification: Notification) { + let window = NSApplication.shared.windows.first + window?.minSize = NSSize(width: 800, height: 700) // Set minimum width and height + super.applicationDidFinishLaunching(aNotification) + } + + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } +} diff --git a/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..86254a920fabbcb3d03e797a9b097d6ded1ce7a2 GIT binary patch literal 33410 zcmdSBWn5HS{5QI106{=OT1h1p35$@J5d%Rf73q)=krruT1{Fa-KvF?M5IF|jjf9kl zg3{gHH83;#u08mF?u+MhpU-`H?|E@N?pb@S-}=S(m;1cb)>J)2e~cc2phIfcuiSzl zYVe=b5ZwXr2aZ?#8TjMq~ZgrHFU|!$--Jd&EcMn^)2grR$ea6)`}4H zR7ma0r8}N|3xf=g6RqEhk!6RlDH=zP2^GE{Y{-|DF{DUpyso z?zYVa-tILYZ-3SWY1gnZ`A)PdDm^$TIzeqU65p3PEhI+&pg+ap6zYWbt%*~(J$Oi} z{JfgfMAbIAYS<~WvP0$MVpR65U(&W$k}N{?|4;sD`apl&9Ou5+ci}j}Ir2ILVS7uz zq^6F!+{2;-hMS)(e;~I7EUVt8mx3UHge9qpRDGVEtE2tJoXV$;i9y=;Uy{`Vu8=>N z9weWBje?*9Gh3!KPs`~8{PzN`qVQuPd$;MENeK)GtFQ1w5La7mjY&Xl&0;W`9tw4= ztyXBp*^G`;>wq_dCstK-Mgjw#)|jZILN&iw$tMG@;NCw6uZcZ-TJsA0@M`Oz7_>5` z1~1(vGtqGGpdkDjy8^n(Q0%~f6c0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T>aiOT98Su{-l`?GZ@&8F3GgHYL@0cj;ohUc?>FZdy1O|4Kr9XcA%anwK- zPSiF(=>ASe7!5IMQM7_GoV`Vy*H03 zS+9T+dQAqwZ;BW(cTcdA1cR9H?%2vdNmuh+uhwM53>KZpBnLTC$XdJk@544EX?|V* zK*f`2>^OcNcAUm3xLPDio_7cO>qHXL_-ikzgU8unrr?0lPFTwy!-hOK-@ z)19%_9gVXgsA9^h=dp0!+mk<9TNUMHA8q=3i=*zElXF=D9^6+LpaOjVSG@SXow!?; zWgBxf?(yW`fu4sa)YA&0Bn9oI%m>1itNc;xzLC{wI`hCV!PiKKnb*!A-3=!)tN%P- z64OLGu{*-xj-+?{dTtL$UpxuJ$NuJdIl0iCR%ebA(XFHyF+aa3zDWR6J>s`bYF;exJ;%CUv#~)-{^KRS&$LC;emdM)^g!@tu5}luA zfd{X1ST&p%42VPy55CCtC9fmu@D`_=766ftITgqVx<>M=AfVp8-Zn>1!vL~*bf-h2 zt5lnXS@$c;fIOt`{oHzk*r_iLCu?PXIB79=)?hN~|Ns4ODNx&pN|hm2PCG3NAKGJN PL^Mz7oJ>D)_4a=O<;Aq( literal 0 HcmV?d00001 diff --git a/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..f5f8d7076f38e0b3f90ac9cc1ee7bd0c26f48681 GIT binary patch literal 3922 zcmV-Y53TTtP)YkEy=7lm9|CCw%VR_v(?VYeooq+1$9qF3ua~sYG|(VQwnW4 zB&*qyq9PqFgWr{7K>#V9;iiP3$%XCa6ihh)nlupuMGx6k;@2xL8oA+VN13Kp5b{QBIIIw zTP+z3Dgqybhv%@(=j+>{Km?eLM5uI_02usx@sNWph_7dd#R4S3O3eho;6H+gxA^*b z1u~HYvsDv-gYP>eFtj22g?zny!ww8~625($<$E=TBMHh{{$p(Q!}%P1ug7b46~Nm2 z&-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Xb(Cm$ z*ix6Q@Txdv5?<&Wj%93}3SFsULtad|c2712mqhjHIl35_!pm4MuVe%*#9*=>^`8Tm z?KN5txp|y?m_P#*#t1nI#vEB=-8M@KNHd3pGF4 z6(aI*H_2C+&=pvD&t~!ZHhmtd$OPUJRyacTX3_0-?qt|*6S@bFM{mpag8JJhD-%aa zVG-M$ya3?{M`a7PS#--P2;1^CAE$zCXdWKmrnZW1g;v9#nQikUlUuoOdR{9)O{mGrGr-3-JJ{MUgvS4|~9T z6$Dm(7z#YFG4pxsWwJTrlaj%#CBF;2)|#bzj!Ds!6i31B{(CX%peQ~9N%v)RT1Yh> z0&40`zeZ1feg9=IHU=OWV1=B?TlohLoGRR*lWj}2wzt3iQ9i6YVy|gXB(@0u9|w=f b2?|0AuJ!#`u*C@@{vD~Up{HJ^Y9IMO$$#9D literal 0 HcmV?d00001 diff --git a/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000000000000000000000000000000000000..824966899681e46d96998d26d3cb468073b027a7 GIT binary patch literal 1000 zcmV>P)54hMAqYq}Yc^7XfytGcn{KBhTp->dU z2E4#L^Hv}!VDY@bMG@Gow8-u%+o_y^m^(D3tE<4x_D9hL1D-wVfPa8D4&@{{+*p%U zg>T&^1nB}1bs$<=8+hA?miz|v8N2Y4&nh#ZVx4&|^2S_U5PUX9z#}Sfastt7LvbU| zfHor#9JT<78Bun@jU`4rt!Rd)ryA>X5~Q`R+BO(ZQ~~`%@CjdlAd;Fz0<%b9z}Sgi z{=ffrGXhR0zz#KDW+{UGRr zEEzmJJqpW?terr*x8f<@ovOx%lhyE883?yU8v8krlA%Kcfd@=OxOk#+!i&nXDltT$ z;Mh`G7&CK?Xb!>GF)6KOO7GpL zN%|=f_(s|96gS!=p#g)IP|OH{OUEnmoq!=MOA(4M-F>LFB%;#^)D#=>m`Nyr({mEB zEn9BQ57`CZu(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vd*DYN-lJ4F$()-GwV>+fDuk-q$Ti;@aouHMo$*uG}W8otc&HlU4ng+DJfm{0fPAY zVRY*Hp3~pJNHf3etP!i84R4{DGeF1#FU6Uvq`%1?mG2uIQ;K<^zQ!$3D;W0_ERb>nH zjB06D#Vr@z7Eb_us{o}$s{STFi6eXtckGh{Lfk+gK}2xfLtvfLG-EVdY>{fR*anZl z3L*tbD_M2;Euv_qtM*^Lqc-`JQO38uH*@DIe=4rmg`F#+Lm-HK07chyHZ}$esT+Xg zWfrH`J+d<%T{*F}Uhbi8!Li{NzRA`)~21>`HQ+#c7Wn^s$MkD!li5?!u9PkIFU6j`4i zzCjnssPmEO?(@Th1K;a)m^4;v{{C2@7Y?*2a$VB{b@HG%I`lYZQ#gw-0niQ zA3nL(UDkA`=lAsyuKptb(W3*wyYJ^5?EL$fp!7st5}osCSN*q8xmwr=7l0r5`v2jB zvLx`F`U_hPDOXhmp)D$O02Rs$nvZI08IWIMF8UUa#a;jGV|~8j^$smhoo1Y^zfEa z=I>E33~wnlEkLmgsw$c@J$1o}83A}DOQT#>4agGzJ#NMlo=1~eUc7jrvGg#|#sJ=a zx?v#Bz3^k46<9!Vkjf+T9a%GhZ;0ueki`j86&EY@K}c&K09p@0dKh)!aKM*u6-%};s4EXV~KPa zxf{e|W>ptj*dGG88>_Kn^_hwCLTe}Tm{wTs&mfT!4kX_vwCPbeJC4x`bkySSbXaMh zer=#@cOo9u_dPV|{pzvFMZjfU{u%B482y9cHoOP&|MQ1_g2v|n_Ov{!ZU%P4aR8uq M(da_id56gV1AT|VTmS$7 literal 0 HcmV?d00001 diff --git a/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/development/planxo/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..722ff623e7946fc1d5eb9480c3c03af0dddf948e GIT binary patch literal 2044 zcmVXff^sBAdZ=-qh_gK56T&72B{ov#%d}xN3hZ{&Bq@p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59uoIF$FIng?#$SThpO7Mt3ddjy6*iR7>=J-8u$i03dvb~|*6fLI1FGy2i<_B`pax8wimg)xk0pL?G-y*5)1tHB%OpWPw z4r6{Aw_v&e2gp&0J-q^<&vz9sr<_vW2T5Lg(DK>Wwc{i#nfno zxq;F0I$nzn0JLi4J3=ZGi!!qS{8e$8K3{WK)|U*`53*vRGXYN0TT(`2e&A5%L4$D* zaHaAZ8=U5~T=_nLtBE41SpYuf?0z_GexjANdS(h!xTsJKjXIts-!BM^3z1cVZ?TOM zZj2>#qq3IjxqSdHZlAy+0J0%@rU80l`vS|>Pw$aLf}#Q`nggz6V=>ino0kzOa=*fM zhtKaXxA-|XYZ^)W_P6q|4C%XBs{!nMz~1d8vc9F_=19*A9I;@|lPim>xuhy=HZsYn z^6K#kgwLZ3chhCHX_L4PAhjQ=sbc1rq6SE9Kj5Pzlk<%34mZQwFPgrE>JWxl(U6@F zh)D>gw`@EcAg&-wweWOjX%v8r*Y?oS0*%N#YyN}0Y5krTZ9W~+83nS7 z={VG14}f_3WXmk_=eD!{0b|Sru0k6P4oI-Mx)UN@{T*Xmp=JFON09I0apqoSrO~Qz zaF`#3qN#Lfj*Sn!Ys`ylhb1vky{;oN?Apwd9u5E>eD>M=yqFJMR{vpeL`F}Zk|Q$g z|NEi>Eq)h4q347OCwi2mvA4>BGe5KEIN#IAct2)z0^y+)Jq)w aC%^z_!D+xB9qRS~0000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/planxo/macos/Runner/Configs/AppInfo.xcconfig b/development/planxo/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..4a1ba1b --- /dev/null +++ b/development/planxo/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = planxo + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.planxo + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved. diff --git a/development/planxo/macos/Runner/Configs/Debug.xcconfig b/development/planxo/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/development/planxo/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/development/planxo/macos/Runner/Configs/Release.xcconfig b/development/planxo/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/development/planxo/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/development/planxo/macos/Runner/Configs/Warnings.xcconfig b/development/planxo/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/development/planxo/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/development/planxo/macos/Runner/DebugProfile.entitlements b/development/planxo/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..15985ce --- /dev/null +++ b/development/planxo/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,28 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.assets.movies.read-write + + com.apple.security.assets.music.read-write + + com.apple.security.assets.pictures.read-write + + com.apple.security.cs.allow-jit + + com.apple.security.files.downloads.read-write + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + com.apple.security.network.server + + keychain-access-groups + + $(AppIdentifierPrefix)$(CFBundleIdentifier) + + + diff --git a/development/planxo/macos/Runner/Info.plist b/development/planxo/macos/Runner/Info.plist new file mode 100644 index 0000000..e6ce592 --- /dev/null +++ b/development/planxo/macos/Runner/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + NSLocalNetworkUsageDescription + This app needs access to the local network to connect to the WebSocket server. + + diff --git a/development/planxo/macos/Runner/MainFlutterWindow.swift b/development/planxo/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..379195f --- /dev/null +++ b/development/planxo/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,16 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = NSRect(x: self.frame.origin.x, y: self.frame.origin.y, width: 800, height: 700) + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + self.minSize = NSSize(width: 800, height: 700) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/development/planxo/macos/Runner/Release.entitlements b/development/planxo/macos/Runner/Release.entitlements new file mode 100644 index 0000000..acdeb9d --- /dev/null +++ b/development/planxo/macos/Runner/Release.entitlements @@ -0,0 +1,26 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.assets.movies.read-write + + com.apple.security.assets.music.read-write + + com.apple.security.assets.pictures.read-write + + com.apple.security.files.downloads.read-write + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + com.apple.security.network.server + + keychain-access-groups + + $(AppIdentifierPrefix)$(CFBundleIdentifier) + + + diff --git a/development/planxo/macos/Runner/entitlements.plist b/development/planxo/macos/Runner/entitlements.plist new file mode 100644 index 0000000..a027489 --- /dev/null +++ b/development/planxo/macos/Runner/entitlements.plist @@ -0,0 +1,12 @@ + + + + + + com.apple.security.network.client + + + com.apple.security.network.server + + + diff --git a/development/planxo/macos/RunnerTests/RunnerTests.swift b/development/planxo/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..61f3bd1 --- /dev/null +++ b/development/planxo/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/development/planxo/pubspec.lock b/development/planxo/pubspec.lock new file mode 100644 index 0000000..fd6fbc3 --- /dev/null +++ b/development/planxo/pubspec.lock @@ -0,0 +1,618 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: "direct main" + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "942a4791cd385a68ccb3b32c71c427aba508a1bb949b86dff2adbe4049f16239" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + crypto: + dependency: "direct main" + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dio: + dependency: "direct main" + description: + name: dio + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 + url: "https://pub.dev" + source: hosted + version: "5.9.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + file_selector: + dependency: "direct main" + description: + name: file_selector + sha256: "5f1d15a7f17115038f433d1b0ea57513cc9e29a9d5338d166cb0bef3fa90a7a0" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + file_selector_android: + dependency: transitive + description: + name: file_selector_android + sha256: "2db9a2d05f66b49a3b45c4a7c2f040dd5fcd457ca30f39df7cdcf80b8cd7f2d4" + url: "https://pub.dev" + source: hosted + version: "0.5.2+1" + file_selector_ios: + dependency: transitive + description: + name: file_selector_ios + sha256: fc3c3fc567cd9bcae784dfeb98d37c46a8ded9e8757d37ea67e975c399bc14e0 + url: "https://pub.dev" + source: hosted + version: "0.5.3+3" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "88707a3bec4b988aaed3b4df5d7441ee4e987f20b286cddca5d6a8270cab23f2" + url: "https://pub.dev" + source: hosted + version: "0.9.4+5" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85" + url: "https://pub.dev" + source: hosted + version: "2.7.0" + file_selector_web: + dependency: transitive + description: + name: file_selector_web + sha256: c4c0ea4224d97a60a7067eca0c8fd419e708ff830e0c83b11a48faf566cec3e7 + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b" + url: "https://pub.dev" + source: hosted + version: "0.9.3+4" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_secure_storage: + dependency: "direct main" + description: + name: flutter_secure_storage + sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea" + url: "https://pub.dev" + source: hosted + version: "9.2.4" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + jni: + dependency: transitive + description: + name: jni + sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f + url: "https://pub.dev" + source: hosted + version: "1.0.0" + jni_flutter: + dependency: transitive + description: + name: jni_flutter + sha256: "8b59e590786050b1cd866677dddaf76b1ade5e7bc751abe04b86e84d379d3ba6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: "direct main" + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" + url: "https://pub.dev" + source: hosted + version: "2.5.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + sqflite: + dependency: "direct main" + description: + name: sqflite + sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88 + url: "https://pub.dev" + source: hosted + version: "2.4.2+2" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6" + url: "https://pub.dev" + source: hosted + version: "2.5.6" + sqflite_common_ffi: + dependency: "direct main" + description: + name: sqflite_common_ffi + sha256: "1f3ef3888d3bfbb47785cc1dda0dc7dd7ebd8c1955d32a9e8e9dae1e38d1c4c1" + url: "https://pub.dev" + source: hosted + version: "2.3.5" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb + url: "https://pub.dev" + source: hosted + version: "2.4.5" + sqlite3_flutter_libs: + dependency: "direct main" + description: + name: sqlite3_flutter_libs + sha256: eeb9e3a45207649076b808f8a5a74d68770d0b7f26ccef6d5f43106eee5375ad + url: "https://pub.dev" + source: hosted + version: "0.5.42" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 + url: "https://pub.dev" + source: hosted + version: "3.4.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + url: "https://pub.dev" + source: hosted + version: "0.7.6" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" + source: hosted + version: "15.0.2" + watcher: + dependency: "direct main" + description: + name: watcher + sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + win32: + dependency: transitive + description: + name: win32 + sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e + url: "https://pub.dev" + source: hosted + version: "5.15.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" +sdks: + dart: ">=3.9.2 <4.0.0" + flutter: ">=3.35.6" diff --git a/development/planxo/pubspec.yaml b/development/planxo/pubspec.yaml new file mode 100644 index 0000000..f31eba9 --- /dev/null +++ b/development/planxo/pubspec.yaml @@ -0,0 +1,99 @@ +name: planxo +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 0.0.1 + +environment: + sdk: ^3.9.2 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + dio: ^5.1.2 + archive: ^3.4.0 + sqflite: ^2.3.0 + sqflite_common_ffi: ^2.3.0+1 # required for macOS / Windows / Linux desktop + sqlite3_flutter_libs: ^0.5.0 # bundles the native SQLite library on desktop + path: ^1.8.2 + watcher: ^1.0.2 + file_selector: ^1.0.2 + crypto: ^3.0.3 + flutter_secure_storage: ^9.2.2 # OS keychain storage (macOS Keychain, Windows Credential Locker) + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/development/planxo/test/widget_test.dart b/development/planxo/test/widget_test.dart new file mode 100644 index 0000000..d3ab44f --- /dev/null +++ b/development/planxo/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:planxo/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/development/planxo/web/favicon.png b/development/planxo/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/development/planxo/web/index.html b/development/planxo/web/index.html new file mode 100644 index 0000000..710fdd1 --- /dev/null +++ b/development/planxo/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + planxo + + + + + + diff --git a/development/planxo/web/manifest.json b/development/planxo/web/manifest.json new file mode 100644 index 0000000..6545209 --- /dev/null +++ b/development/planxo/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "planxo", + "short_name": "planxo", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/development/planxo/windows/.gitignore b/development/planxo/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/development/planxo/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/development/planxo/windows/CMakeLists.txt b/development/planxo/windows/CMakeLists.txt new file mode 100644 index 0000000..dea825a --- /dev/null +++ b/development/planxo/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(planxo LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "planxo") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/development/planxo/windows/flutter/CMakeLists.txt b/development/planxo/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..903f489 --- /dev/null +++ b/development/planxo/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/development/planxo/windows/flutter/generated_plugins.cmake b/development/planxo/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..606b410 --- /dev/null +++ b/development/planxo/windows/flutter/generated_plugins.cmake @@ -0,0 +1,27 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + file_selector_windows + flutter_secure_storage_windows + sqlite3_flutter_libs +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/development/planxo/windows/runner/CMakeLists.txt b/development/planxo/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..394917c --- /dev/null +++ b/development/planxo/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/development/planxo/windows/runner/Runner.rc b/development/planxo/windows/runner/Runner.rc new file mode 100644 index 0000000..fc91510 --- /dev/null +++ b/development/planxo/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "planxo" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "planxo" "\0" + VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "planxo.exe" "\0" + VALUE "ProductName", "planxo" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/development/planxo/windows/runner/flutter_window.cpp b/development/planxo/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..955ee30 --- /dev/null +++ b/development/planxo/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/development/planxo/windows/runner/flutter_window.h b/development/planxo/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/development/planxo/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/development/planxo/windows/runner/main.cpp b/development/planxo/windows/runner/main.cpp new file mode 100644 index 0000000..6eaac99 --- /dev/null +++ b/development/planxo/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"planxo", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/development/planxo/windows/runner/resource.h b/development/planxo/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/development/planxo/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/development/planxo/windows/runner/resources/app_icon.ico b/development/planxo/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c04e20caf6370ebb9253ad831cc31de4a9c965f6 GIT binary patch literal 33772 zcmeHQc|26z|35SKE&G-*mXah&B~fFkXr)DEO&hIfqby^T&>|8^_Ub8Vp#`BLl3lbZ zvPO!8k!2X>cg~Elr=IVxo~J*a`+9wR=A83c-k-DFd(XM&UI1VKCqM@V;DDtJ09WB} zRaHKiW(GT00brH|0EeTeKVbpbGZg?nK6-j827q-+NFM34gXjqWxJ*a#{b_apGN<-L_m3#8Z26atkEn& ze87Bvv^6vVmM+p+cQ~{u%=NJF>#(d;8{7Q{^rWKWNtf14H}>#&y7$lqmY6xmZryI& z($uy?c5-+cPnt2%)R&(KIWEXww>Cnz{OUpT>W$CbO$h1= z#4BPMkFG1Y)x}Ui+WXr?Z!w!t_hjR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%)R+#yag067CU%yUEe47>wzGU8^` z1EXFT^@I!{J!F8!X?S6ph8J=gUi5tl93*W>7}_uR<2N2~e}FaG?}KPyugQ=-OGEZs z!GBoyYY+H*ANn4?Z)X4l+7H%`17i5~zRlRIX?t)6_eu=g2Q`3WBhxSUeea+M-S?RL zX9oBGKn%a!H+*hx4d2(I!gsi+@SQK%<{X22M~2tMulJoa)0*+z9=-YO+;DFEm5eE1U9b^B(Z}2^9!Qk`!A$wUE z7$Ar5?NRg2&G!AZqnmE64eh^Anss3i!{}%6@Et+4rr!=}!SBF8eZ2*J3ujCWbl;3; z48H~goPSv(8X61fKKdpP!Z7$88NL^Z?j`!^*I?-P4X^pMxyWz~@$(UeAcTSDd(`vO z{~rc;9|GfMJcApU3k}22a!&)k4{CU!e_ny^Y3cO;tOvOMKEyWz!vG(Kp*;hB?d|R3`2X~=5a6#^o5@qn?J-bI8Ppip{-yG z!k|VcGsq!jF~}7DMr49Wap-s&>o=U^T0!Lcy}!(bhtYsPQy z4|EJe{12QL#=c(suQ89Mhw9<`bui%nx7Nep`C&*M3~vMEACmcRYYRGtANq$F%zh&V zc)cEVeHz*Z1N)L7k-(k3np#{GcDh2Q@ya0YHl*n7fl*ZPAsbU-a94MYYtA#&!c`xGIaV;yzsmrjfieTEtqB_WgZp2*NplHx=$O{M~2#i_vJ{ps-NgK zQsxKK_CBM2PP_je+Xft`(vYfXXgIUr{=PA=7a8`2EHk)Ym2QKIforz# tySWtj{oF3N9@_;i*Fv5S)9x^z=nlWP>jpp-9)52ZmLVA=i*%6g{{fxOO~wEK literal 0 HcmV?d00001 diff --git a/development/planxo/windows/runner/runner.exe.manifest b/development/planxo/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..153653e --- /dev/null +++ b/development/planxo/windows/runner/runner.exe.manifest @@ -0,0 +1,14 @@ + + + + + PerMonitorV2 + + + + + + + + + diff --git a/development/planxo/windows/runner/utils.cpp b/development/planxo/windows/runner/utils.cpp new file mode 100644 index 0000000..3a0b465 --- /dev/null +++ b/development/planxo/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + unsigned int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/development/planxo/windows/runner/utils.h b/development/planxo/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/development/planxo/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/development/planxo/windows/runner/win32_window.cpp b/development/planxo/windows/runner/win32_window.cpp new file mode 100644 index 0000000..60608d0 --- /dev/null +++ b/development/planxo/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/development/planxo/windows/runner/win32_window.h b/development/planxo/windows/runner/win32_window.h new file mode 100644 index 0000000..e901dde --- /dev/null +++ b/development/planxo/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_