Compare commits
213 Commits
v1.0.0-rel
...
v1.6.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b176724fc5 | ||
|
|
d6519a76bf | ||
|
|
14b4fb4a0a | ||
|
|
1583eca7a4 | ||
|
|
2aef3148f6 | ||
|
|
3f83d67bc1 | ||
|
|
043a036075 | ||
|
|
0ec53c3a11 | ||
|
|
9782352909 | ||
|
|
db5c7311b1 | ||
|
|
bb3d398c9c | ||
|
|
3d5edf320e | ||
|
|
a0601cd6ae | ||
|
|
5043ef3e34 | ||
|
|
d902495312 | ||
|
|
c81014d530 | ||
|
|
4d5a078378 | ||
|
|
31f6960d44 | ||
|
|
0d13fdee37 | ||
|
|
c4d9cd7986 | ||
|
|
bc03dcbe89 | ||
|
|
f3a5238f50 | ||
|
|
9e07439f08 | ||
|
|
dccafc898b | ||
|
|
560a5db14d | ||
|
|
df0377b41f | ||
|
|
153377e9e6 | ||
|
|
c6d73d42ee | ||
|
|
45f1635e10 | ||
|
|
2b2349dd16 | ||
|
|
3868236816 | ||
|
|
52af77e1ed | ||
|
|
c150e3ccee | ||
|
|
c6cc68c9b4 | ||
|
|
961465ebb5 | ||
|
|
7ff04851f4 | ||
|
|
3baed3c328 | ||
|
|
3ade06eef1 | ||
|
|
c7b70dddc4 | ||
|
|
d747c66990 | ||
|
|
5673c2b627 | ||
|
|
32a0ac17ad | ||
|
|
dec957790c | ||
|
|
9319bbda48 | ||
|
|
ee26576c5e | ||
|
|
d6419d5b7c | ||
|
|
026ece2e29 | ||
|
|
3c996c78c9 | ||
|
|
492cf57520 | ||
|
|
c77ea96eaf | ||
|
|
813a0f06da | ||
|
|
3fc74df616 | ||
|
|
95fad14261 | ||
|
|
1ac43b0c4e | ||
|
|
3174e0bfe1 | ||
|
|
5404daa704 | ||
|
|
20870623f0 | ||
|
|
8ed92dcd7e | ||
|
|
0143c74415 | ||
|
|
6c53d988de | ||
|
|
26cebcc60e | ||
|
|
7c2b9ea087 | ||
|
|
b2645f1341 | ||
|
|
05eedbb910 | ||
|
|
3ea6d6b2ff | ||
|
|
326b7ec523 | ||
|
|
192c6e5158 | ||
|
|
ac53f7f74e | ||
|
|
5b9810b9de | ||
|
|
49e9c673b1 | ||
|
|
fb8260d346 | ||
|
|
fee557330d | ||
|
|
4c0e3b822c | ||
|
|
181852766a | ||
|
|
f108929dce | ||
|
|
2cf840e74d | ||
|
|
3810dfa8d2 | ||
|
|
d57b2f64b1 | ||
|
|
e45f10e496 | ||
|
|
4ae0737016 | ||
|
|
ae93cff719 | ||
|
|
abdd494727 | ||
|
|
4ccf3cace3 | ||
|
|
ca049033e4 | ||
|
|
5cf8bb7725 | ||
|
|
e5ff4ac233 | ||
|
|
4040429865 | ||
|
|
90b7783aaf | ||
|
|
65cc6747bf | ||
|
|
5bd450eb14 | ||
|
|
b0a4128bb7 | ||
|
|
4cdbb9f404 | ||
|
|
8d05406ef5 | ||
|
|
7842848152 | ||
|
|
07ced1bc11 | ||
|
|
335eb33613 | ||
|
|
c9a7045212 | ||
|
|
e861d00b68 | ||
|
|
d9f415c527 | ||
|
|
1993714752 | ||
|
|
b80e1094af | ||
|
|
0db4c0f80d | ||
|
|
f1f145a35f | ||
|
|
618d31d016 | ||
|
|
c8ae925dc1 | ||
|
|
2a7004e5a2 | ||
|
|
c7f4164f12 | ||
|
|
27c404687a | ||
|
|
c8e2727f69 | ||
|
|
728ec08ab0 | ||
|
|
23a056bfe5 | ||
|
|
76d0ece314 | ||
|
|
cd2ab00042 | ||
|
|
ee3906df80 | ||
|
|
ca68bd6059 | ||
|
|
aea4ac1102 | ||
|
|
62cf70e36e | ||
|
|
de0bd7f275 | ||
|
|
2ccd01c691 | ||
|
|
d696e1dfb6 | ||
|
|
07fe869eec | ||
|
|
5176c62e72 | ||
|
|
3f35c2d6a1 | ||
|
|
60b826d00e | ||
|
|
ca63aa95e3 | ||
|
|
fe0f298c0e | ||
|
|
0ac158eb4a | ||
|
|
7eb680c677 | ||
|
|
a30dace404 | ||
|
|
50d2c6cbf6 | ||
|
|
925804e546 | ||
|
|
4076d9657a | ||
|
|
789930049a | ||
|
|
09019915e7 | ||
|
|
16e1927ff1 | ||
|
|
02e43f78c3 | ||
|
|
8a109029ca | ||
|
|
cd5315b919 | ||
|
|
03f3419f72 | ||
|
|
7ace123b4b | ||
|
|
08f017fb0f | ||
|
|
7a199a3258 | ||
|
|
8c999c04cd | ||
|
|
dc8dc9f11b | ||
|
|
93f0d9edae | ||
|
|
793e735452 | ||
|
|
6a2c1230d2 | ||
|
|
b8834cd256 | ||
|
|
b8b9d4b797 | ||
|
|
4b1111a0a3 | ||
|
|
f80f125599 | ||
|
|
afa0ff94b2 | ||
|
|
02f3cb0077 | ||
|
|
c671f29930 | ||
|
|
68068214bb | ||
|
|
b00db130d7 | ||
|
|
5c28057fa1 | ||
|
|
106277faf4 | ||
|
|
f9351ba272 | ||
|
|
4a44ab96d6 | ||
|
|
904af42cbf | ||
|
|
cc0386ee97 | ||
|
|
08238eaad2 | ||
|
|
3fbcd8f092 | ||
|
|
aeea503060 | ||
|
|
69084be7bd | ||
|
|
14b52f8018 | ||
|
|
5301810c0e | ||
|
|
23713acb99 | ||
|
|
f5aeba473b | ||
|
|
f285a18563 | ||
|
|
ae220fc3f5 | ||
|
|
111bdc4254 | ||
|
|
731cdc4a4b | ||
|
|
a08d61fb98 | ||
|
|
5976ab4bab | ||
|
|
5568173c6e | ||
|
|
c4ec144f20 | ||
|
|
b636ab4d26 | ||
|
|
5e426c342d | ||
|
|
bbfeda8280 | ||
|
|
079448eeeb | ||
|
|
9ef06cdec2 | ||
|
|
bdde689ee7 | ||
|
|
2842481d98 | ||
|
|
e73a885544 | ||
|
|
d8b48c8fdb | ||
|
|
3e1fb58162 | ||
|
|
dbe667ee8b | ||
|
|
0bc420efca | ||
|
|
02c66b3785 | ||
|
|
fd47813bdf | ||
|
|
8b4b9722c4 | ||
|
|
dfb8eceaad | ||
|
|
c6db4396e4 | ||
|
|
40c78ab3b7 | ||
|
|
19de232484 | ||
|
|
bac033528c | ||
|
|
763fa31266 | ||
|
|
408b52cdb0 | ||
|
|
7d18656ec6 | ||
|
|
a7186ab2c5 | ||
|
|
b02099e3fe | ||
|
|
80c6d0a82d | ||
|
|
3e6a27cc15 | ||
|
|
4e072a34c0 | ||
|
|
9ad7e82e93 | ||
|
|
2fabc90be7 | ||
|
|
e41ea0488d | ||
|
|
acd010bcfa | ||
|
|
6c0981abdd | ||
|
|
1007a88dd2 | ||
|
|
6569ea9f57 |
339
.github/workflows/workflow.yml
vendored
Normal file
@@ -0,0 +1,339 @@
|
||||
name: Build and Release
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
get-version:
|
||||
name: Get Version and Release Info
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.set-version.outputs.version }}
|
||||
is_prerelease: ${{ steps.set-info.outputs.is_prerelease }}
|
||||
should_upload_to_stores: ${{ steps.set-info.outputs.should_upload_to_stores }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: set-version
|
||||
run: |
|
||||
echo version=$(grep "version:" pubspec.yaml | head -1 | cut -d ':' -f 2 | tr -d ' ' | cut -d '+' -f 1) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Determine release actions
|
||||
id: set-info
|
||||
run: |
|
||||
echo "is_prerelease=${{ github.event.release.prerelease }}" >> $GITHUB_OUTPUT
|
||||
|
||||
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
|
||||
echo "should_upload_to_stores=false" >> $GITHUB_OUTPUT
|
||||
echo "✅ Pre-release - will build and attach assets, no store uploads"
|
||||
else
|
||||
echo "should_upload_to_stores=true" >> $GITHUB_OUTPUT
|
||||
echo "✅ Full release - will build, attach assets, and upload to stores"
|
||||
fi
|
||||
|
||||
build-android-apk:
|
||||
name: Build Android APK
|
||||
needs: get-version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
dart run flutter_launcher_icons
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
- name: Decode Keystore
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
|
||||
|
||||
- name: Create key.properties
|
||||
run: |
|
||||
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
|
||||
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
|
||||
echo "keyAlias=${{ vars.KEY_ALIAS }}" >> android/key.properties
|
||||
echo "storeFile=keystore.jks" >> android/key.properties
|
||||
|
||||
- name: Build Android .apk
|
||||
run: flutter build apk --release --dart-define=OSM_PROD_CLIENTID='${{ secrets.OSM_PROD_CLIENTID }}' --dart-define=OSM_SANDBOX_CLIENTID='${{ secrets.OSM_SANDBOX_CLIENTID }}'
|
||||
|
||||
- name: Upload .apk artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.apk
|
||||
path: build/app/outputs/flutter-apk/app-release.apk
|
||||
if-no-files-found: 'error'
|
||||
|
||||
|
||||
build-android-aab:
|
||||
name: Build Android AAB
|
||||
needs: get-version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
dart run flutter_launcher_icons
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
- name: Decode Keystore
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
|
||||
|
||||
- name: Create key.properties
|
||||
run: |
|
||||
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
|
||||
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
|
||||
echo "keyAlias=${{ vars.KEY_ALIAS }}" >> android/key.properties
|
||||
echo "storeFile=keystore.jks" >> android/key.properties
|
||||
|
||||
- name: Build Android appBundle
|
||||
run: flutter build appbundle --dart-define=OSM_PROD_CLIENTID='${{ secrets.OSM_PROD_CLIENTID }}' --dart-define=OSM_SANDBOX_CLIENTID='${{ secrets.OSM_SANDBOX_CLIENTID }}'
|
||||
|
||||
- name: Upload .aab artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.aab
|
||||
path: build/app/outputs/bundle/release/app-release.aab
|
||||
if-no-files-found: 'error'
|
||||
|
||||
build-ios:
|
||||
name: Build iOS
|
||||
needs: get-version
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
dart run flutter_launcher_icons
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
- name: Install Apple certificate and provisioning profile
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_DISTRIBUTION_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ""
|
||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.IOS_APPSTORE_PROVISIONING_PROFILE_BASE64 }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# Set this keychain as the default
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
security default-keychain -s $KEYCHAIN_PATH
|
||||
|
||||
# install provisioning profile
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/61f9fdb9-bf2d-4d94-b249-63155ee71e74.mobileprovision
|
||||
|
||||
# Also install using the profile's internal UUID for better compatibility
|
||||
UUID=$(security cms -D -i $PP_PATH | plutil -extract UUID xml1 -o - - | xmllint --xpath "//string/text()" -)
|
||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision
|
||||
|
||||
# Debug: Check what we actually have
|
||||
echo "=== Certificates in keychain ==="
|
||||
security find-identity -v -p codesigning $KEYCHAIN_PATH
|
||||
echo "=== Provisioning profiles ==="
|
||||
ls -la ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
echo "=== Profile UUID extracted: $UUID ==="
|
||||
|
||||
- name: Create export options
|
||||
run: |
|
||||
cat > ios/exportOptions.plist << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>destination</key>
|
||||
<string>export</string>
|
||||
<key>method</key>
|
||||
<string>app-store</string>
|
||||
<key>teamID</key>
|
||||
<string>7XG8T28436</string>
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>me.deflock.deflockapp</key>
|
||||
<string>61f9fdb9-bf2d-4d94-b249-63155ee71e74</string>
|
||||
</dict>
|
||||
<key>signingStyle</key>
|
||||
<string>manual</string>
|
||||
<key>stripSwiftSymbols</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
- name: Build iOS .ipa
|
||||
run: |
|
||||
flutter build ipa --release \
|
||||
--export-options-plist=ios/exportOptions.plist \
|
||||
--dart-define=OSM_PROD_CLIENTID='${{ secrets.OSM_PROD_CLIENTID }}' \
|
||||
--dart-define=OSM_SANDBOX_CLIENTID='${{ secrets.OSM_SANDBOX_CLIENTID }}'
|
||||
cp build/ios/ipa/*.ipa Runner.ipa
|
||||
|
||||
- name: Clean up keychain and provisioning profile
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
rm ~/Library/MobileDevice/Provisioning\ Profiles/61f9fdb9-bf2d-4d94-b249-63155ee71e74.mobileprovision
|
||||
|
||||
- name: Upload IPA artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.ipa
|
||||
path: Runner.ipa
|
||||
if-no-files-found: 'error'
|
||||
|
||||
attach-to-release:
|
||||
name: Attach Assets to Release
|
||||
needs: [get-version, build-android-apk, build-android-aab, build-ios]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download APK artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.apk
|
||||
|
||||
- name: Download AAB artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.aab
|
||||
|
||||
- name: Download IPA artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.ipa
|
||||
|
||||
- name: Rename files for release
|
||||
run: |
|
||||
mv app-release.apk deflock_v${{ needs.get-version.outputs.version }}.apk
|
||||
mv app-release.aab deflock_v${{ needs.get-version.outputs.version }}.aab
|
||||
mv Runner.ipa deflock_v${{ needs.get-version.outputs.version }}.ipa
|
||||
|
||||
- name: Attach assets to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
deflock_v${{ needs.get-version.outputs.version }}.apk
|
||||
deflock_v${{ needs.get-version.outputs.version }}.aab
|
||||
deflock_v${{ needs.get-version.outputs.version }}.ipa
|
||||
|
||||
upload-to-stores:
|
||||
name: Upload to App Stores
|
||||
needs: [get-version, build-android-aab, build-ios]
|
||||
runs-on: macos-latest # Need macOS for iOS uploads
|
||||
if: needs.get-version.outputs.should_upload_to_stores == 'true'
|
||||
steps:
|
||||
- name: Download AAB artifact for Google Play
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.aab
|
||||
|
||||
- name: Download IPA artifact for App Store
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deflock_v${{ needs.get-version.outputs.version }}.ipa
|
||||
|
||||
# Temporarily disabled - uncomment when Google Play service account is ready
|
||||
# - name: Upload to Google Play Store
|
||||
# uses: r0adkll/upload-google-play@v1
|
||||
# with:
|
||||
# serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
# packageName: me.deflock.deflockapp
|
||||
# releaseFiles: app-release.aab
|
||||
# track: internal # Uploads to Internal Testing track for review before production
|
||||
# status: completed
|
||||
# inAppUpdatePriority: 0
|
||||
|
||||
- name: Upload to App Store Connect
|
||||
env:
|
||||
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
|
||||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
|
||||
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
|
||||
run: |
|
||||
# Create the private keys directory and decode API key
|
||||
mkdir -p ~/private_keys
|
||||
echo -n "$APP_STORE_CONNECT_API_KEY_BASE64" | base64 --decode > ~/private_keys/AuthKey_${APP_STORE_CONNECT_API_KEY_ID}.p8
|
||||
|
||||
# Upload to App Store Connect / TestFlight
|
||||
xcrun altool --upload-app \
|
||||
--type ios \
|
||||
--file Runner.ipa \
|
||||
--apiKey $APP_STORE_CONNECT_API_KEY_ID \
|
||||
--apiIssuer $APP_STORE_CONNECT_ISSUER_ID
|
||||
|
||||
# Clean up sensitive files
|
||||
rm -rf ~/private_keys
|
||||
|
||||
- name: Clean up artifacts
|
||||
run: |
|
||||
rm -f app-release.aab Runner.ipa
|
||||
18
.gitignore
vendored
@@ -25,6 +25,11 @@ android/app/profile/
|
||||
android/app/release/
|
||||
*.iml
|
||||
|
||||
# Generated icons and splash screens (exclude manually maintained files)
|
||||
android/app/src/main/res/drawable*/
|
||||
android/app/src/main/res/mipmap*/
|
||||
!android/app/src/main/res/values*/
|
||||
|
||||
# ───────────────────────────────
|
||||
# iOS / macOS
|
||||
# ───────────────────────────────
|
||||
@@ -37,10 +42,18 @@ ios/Runner.xcworkspace/
|
||||
macos/Pods/
|
||||
macos/.generated/
|
||||
macos/Flutter/ephemeral/
|
||||
# CocoaPods – commit Podfile.lock if you need reproducible iOS builds
|
||||
# CocoaPods – commit Podfile.lock if you need reproducible iOS builds
|
||||
Podfile.lock
|
||||
Pods/
|
||||
|
||||
# Generated icons and splash screens
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/*
|
||||
ios/Runner/Assets.xcassets/LaunchImage.imageset/*
|
||||
ios/Runner/Assets.xcassets/LaunchBackground.imageset/*
|
||||
!ios/Runner/Assets.xcassets/AppIcon.appiconset/.gitkeep
|
||||
!ios/Runner/Assets.xcassets/LaunchImage.imageset/.gitkeep
|
||||
!ios/Runner/Assets.xcassets/LaunchBackground.imageset/.gitkeep
|
||||
|
||||
# Xcode user data & build artifacts
|
||||
*.xcworkspace
|
||||
*.xcuserstate
|
||||
@@ -80,6 +93,9 @@ Thumbs.db
|
||||
*.keystore
|
||||
.env
|
||||
|
||||
# Local OSM client ID configuration (contains secrets)
|
||||
build_keys.conf
|
||||
|
||||
# ───────────────────────────────
|
||||
# For now - not targeting these
|
||||
# ───────────────────────────────
|
||||
|
||||
481
DEVELOPER.md
@@ -33,7 +33,10 @@ AppState (main coordinator)
|
||||
├── ProfileState (node profiles & toggles)
|
||||
├── SessionState (add/edit sessions)
|
||||
├── SettingsState (preferences & tile providers)
|
||||
└── UploadQueueState (pending operations)
|
||||
├── UploadQueueState (pending operations)
|
||||
├── SuspectedLocationState (permit data & display)
|
||||
├── NavigationState (routing & search)
|
||||
└── SearchState (location search results)
|
||||
```
|
||||
|
||||
**Why this approach:**
|
||||
@@ -62,64 +65,174 @@ External APIs (OSM, Overpass, Tile providers)
|
||||
|
||||
---
|
||||
|
||||
## Changelog & First Launch System
|
||||
|
||||
The app includes a comprehensive system for welcoming new users and notifying existing users of updates.
|
||||
|
||||
### Components
|
||||
- **ChangelogService**: Manages version tracking and changelog loading
|
||||
- **WelcomeDialog**: First launch popup with privacy information and quick links
|
||||
- **SubmissionGuideDialog**: One-time popup before first node submission with best practices
|
||||
- **ChangelogDialog**: Update notification popup for version changes
|
||||
- **ReleaseNotesScreen**: Settings page for viewing all changelog history
|
||||
|
||||
### Content Management
|
||||
Changelog content is stored in `assets/changelog.json`:
|
||||
```json
|
||||
{
|
||||
"1.2.4": {
|
||||
"content": "• New feature description\n• Bug fixes\n• Other improvements"
|
||||
},
|
||||
"1.2.3": {
|
||||
"content": "" // Empty string = skip popup for this version
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Developer Workflow
|
||||
1. **For each release**: Add entry to `changelog.json` with version from `pubspec.yaml`
|
||||
2. **Content required**: Every version must have an entry (can be empty string to skip)
|
||||
3. **Localization**: Welcome dialog supports i18n, changelog content is English-only
|
||||
4. **Testing**: Clear app data to test first launch, change version to test updates
|
||||
|
||||
### User Experience Flow
|
||||
- **First Launch**: Welcome popup with "don't show again" option
|
||||
- **First Submission**: Submission guide popup with best practices and resource links
|
||||
- **Version Updates**: Changelog popup (only if content exists, no "don't show again")
|
||||
- **Settings Access**: Complete changelog history available in Settings > About > Release Notes
|
||||
|
||||
### Privacy Integration
|
||||
The welcome popup explains that the app:
|
||||
- Runs entirely locally on device
|
||||
- Uses OpenStreetMap API for data storage only
|
||||
- DeFlock collects no user data
|
||||
- DeFlock is not responsible for OSM account management
|
||||
|
||||
---
|
||||
|
||||
## Core Components
|
||||
|
||||
### 1. MapDataProvider
|
||||
### 1. MapDataProvider & Smart Area Caching
|
||||
|
||||
**Purpose**: Unified interface for fetching map tiles and surveillance nodes
|
||||
**Purpose**: Unified interface for fetching map tiles and surveillance nodes with intelligent area caching
|
||||
|
||||
**Design decisions:**
|
||||
- **Pluggable sources**: Local (cached) vs Remote (live API)
|
||||
- **Offline-first**: Always try local first, graceful degradation
|
||||
- **Single fetch strategy**: Uses PrefetchAreaService for smart 3x area caching instead of dual immediate/background fetching
|
||||
- **Spatial + temporal refresh**: Fetches larger areas (3x visible bounds) and refreshes stale data (>60s old)
|
||||
- **Offline-first**: Always try local cache first, graceful degradation
|
||||
- **Mode-aware**: Different behavior for production vs sandbox
|
||||
- **Failure handling**: Never crash the UI, always provide fallbacks
|
||||
|
||||
**Key methods:**
|
||||
- `getNodes()`: Smart fetching with local/remote merging
|
||||
- `getTile()`: Tile fetching with caching
|
||||
- `getNodes()`: Returns cache immediately, triggers pre-fetch if needed (spatial or temporal)
|
||||
- `getTile()`: Tile fetching with unlimited retry strategy (retries until success)
|
||||
- `_fetchRemoteNodes()`: Handles Overpass → OSM API fallback
|
||||
|
||||
**Why unified interface:**
|
||||
The app needs to seamlessly switch between multiple data sources (local cache, Overpass API, OSM API, offline areas) based on network status, upload mode, and zoom level. A single interface prevents the UI from needing to know about these complexities.
|
||||
**Smart caching flow:**
|
||||
1. Check if current view within cached area AND data <60s old
|
||||
2. If not: trigger pre-fetch of 3x larger area, show loading state
|
||||
3. Return cache immediately for responsive UI
|
||||
4. When pre-fetch completes: update cache, refresh UI, report success
|
||||
|
||||
### 2. Node Operations (Create/Edit/Delete)
|
||||
**Why this approach:**
|
||||
Reduces API load by 3-4x while ensuring data freshness. User sees instant responses from cache while background fetching keeps data current. Eliminates complex dual-path logic in favor of simple spatial/temporal triggers.
|
||||
|
||||
### 2. Node Operations (Create/Edit/Delete/Extract)
|
||||
|
||||
**Upload Operations Enum:**
|
||||
```dart
|
||||
enum UploadOperation { create, modify, delete }
|
||||
enum UploadOperation { create, modify, delete, extract }
|
||||
```
|
||||
|
||||
**Why explicit enum vs boolean flags:**
|
||||
- **Brutalist**: Three explicit states instead of nullable booleans
|
||||
- **Brutalist**: Four explicit states instead of nullable booleans
|
||||
- **Extensible**: Easy to add new operations (like bulk operations)
|
||||
- **Clear intent**: `operation == UploadOperation.delete` is unambiguous
|
||||
|
||||
**Operations explained:**
|
||||
- **create**: Add new node to OSM
|
||||
- **modify**: Update existing node's tags/position/direction
|
||||
- **delete**: Remove existing node from OSM
|
||||
- **extract**: Create new node with tags copied from constrained node, leaving original unchanged
|
||||
|
||||
**Session Pattern:**
|
||||
- `AddNodeSession`: For creating new nodes
|
||||
- `EditNodeSession`: For modifying existing nodes
|
||||
- `AddNodeSession`: For creating new nodes with single or multiple directions
|
||||
- `EditNodeSession`: For modifying existing nodes, preserving all existing directions
|
||||
- No "DeleteSession": Deletions are immediate (simpler)
|
||||
|
||||
**Multi-Direction Support:**
|
||||
Sessions use a simple model for handling multiple directions:
|
||||
```dart
|
||||
class AddNodeSession {
|
||||
List<double> directions; // [90, 180, 270] - all directions
|
||||
int currentDirectionIndex; // Which direction is being edited
|
||||
|
||||
// Slider always shows the current direction
|
||||
double get directionDegrees => directions[currentDirectionIndex];
|
||||
set directionDegrees(value) => directions[currentDirectionIndex] = value;
|
||||
}
|
||||
```
|
||||
|
||||
**Direction Interaction:**
|
||||
- **Add**: New directions start at 0° and are automatically selected for editing
|
||||
- **Remove**: Current direction removed from list (minimum 1 direction)
|
||||
- **Cycle**: Switch between existing directions in the list
|
||||
- **Submit**: All directions combined as semicolon-separated string (e.g., "90;180;270")
|
||||
|
||||
**Why no delete session:**
|
||||
Deletions don't need position dragging or tag editing - they just need confirmation and queuing. A session would add complexity without benefit.
|
||||
|
||||
### 3. Upload Queue System
|
||||
### 3. Upload Queue System & Three-Stage Upload Process
|
||||
|
||||
**Design principles:**
|
||||
- **Operation-agnostic**: Same queue handles create/modify/delete
|
||||
- **Offline-capable**: Queue persists between app sessions
|
||||
- **Visual feedback**: Each operation type has distinct UI state
|
||||
- **Error recovery**: Retry mechanism with exponential backoff
|
||||
- **Three explicit stages**: Create changeset → Upload node → Close changeset
|
||||
- **Operation-agnostic**: Same queue handles create/modify/delete/extract
|
||||
- **Offline-capable**: Queue persists between app sessions
|
||||
- **Visual feedback**: Each operation type and stage has distinct UI state
|
||||
- **Stage-specific error recovery**: Appropriate retry logic for each of the 3 stages
|
||||
|
||||
**Queue workflow:**
|
||||
1. User action (add/edit/delete) → `PendingUpload` created
|
||||
**Three-stage upload workflow:**
|
||||
1. **Stage 1 - Create Changeset**: Generate changeset XML and create on OSM
|
||||
- Retries: Up to 3 attempts with 20s delays
|
||||
- Failures: Reset to pending for full retry
|
||||
2. **Stage 2 - Node Operation**: Create/modify/delete the surveillance node
|
||||
- Retries: Up to 3 attempts with 20s delays
|
||||
- Failures: Close orphaned changeset, then retry from stage 1
|
||||
3. **Stage 3 - Close Changeset**: Close the changeset to finalize
|
||||
- Retries: Exponential backoff up to 59 minutes
|
||||
- Failures: OSM auto-closes after 60 minutes, so we eventually give up
|
||||
|
||||
**Queue processing workflow:**
|
||||
1. User action (add/edit/delete) → `PendingUpload` created with `UploadState.pending`
|
||||
2. Immediate visual feedback (cache updated with temp markers)
|
||||
3. Background uploader processes queue when online
|
||||
3. Background uploader processes queue when online:
|
||||
- **Pending** → Create changeset → **CreatingChangeset** → **Uploading**
|
||||
- **Uploading** → Upload node → **ClosingChangeset**
|
||||
- **ClosingChangeset** → Close changeset → **Complete**
|
||||
4. Success → cache updated with real data, temp markers removed
|
||||
5. Failure → error state, retry available
|
||||
5. Failures → appropriate retry logic based on which stage failed
|
||||
|
||||
**Why three explicit stages:**
|
||||
The previous implementation conflated changeset creation + node operation as one step, making error handling unclear. The new approach:
|
||||
- **Tracks which stage failed**: Users see exactly what went wrong
|
||||
- **Handles step 2 failures correctly**: Node operation failures now properly close orphaned changesets
|
||||
- **Provides clear UI feedback**: "Creating changeset...", "Uploading...", "Closing changeset..."
|
||||
- **Enables appropriate retry logic**: Different stages have different retry needs
|
||||
|
||||
**Stage-specific error handling:**
|
||||
- **Stage 1 failure**: Simple retry (no cleanup needed)
|
||||
- **Stage 2 failure**: Close orphaned changeset, then retry from stage 1
|
||||
- **Stage 3 failure**: Keep retrying with exponential backoff (most important for OSM data integrity)
|
||||
|
||||
**Why immediate visual feedback:**
|
||||
Users expect instant response to their actions. By immediately updating the cache with temporary markers (e.g., `_pending_deletion`), the UI stays responsive while the actual API calls happen in background.
|
||||
|
||||
**Queue persistence & cache synchronization (v1.5.4+):**
|
||||
- **Startup repopulation**: Queue initialization now repopulates cache with pending nodes, ensuring visual continuity after app restarts
|
||||
- **Specific node cleanup**: Each upload stores a `tempNodeId` for precise removal, preventing accidental cleanup of other pending nodes at the same location
|
||||
- **Proximity awareness**: Proximity warnings now consider pending nodes to prevent duplicate submissions at the same location
|
||||
- **Processing status UI**: Upload queue screen shows clear indicators when processing is paused due to offline mode or user settings
|
||||
|
||||
### 4. Cache & Visual States
|
||||
|
||||
**Node visual states:**
|
||||
@@ -129,6 +242,11 @@ Users expect instant response to their actions. By immediately updating the cach
|
||||
- **Orange ring**: Node currently being edited
|
||||
- **Red ring**: Nodes pending deletion
|
||||
|
||||
**Direction cone visual states:**
|
||||
- **Full opacity**: Active session direction (currently being edited)
|
||||
- **Reduced opacity (40%)**: Inactive session directions
|
||||
- **Standard opacity**: Existing node directions (when not in edit mode)
|
||||
|
||||
**Cache tags for state tracking:**
|
||||
```dart
|
||||
'_pending_upload' // New node waiting to upload
|
||||
@@ -137,10 +255,21 @@ Users expect instant response to their actions. By immediately updating the cach
|
||||
'_original_node_id' // For drawing connection lines
|
||||
```
|
||||
|
||||
**Multi-direction parsing:**
|
||||
The app supports nodes with multiple directions specified as semicolon-separated values:
|
||||
```dart
|
||||
// OSM tag: direction="90;180;270"
|
||||
List<double> get directionDeg {
|
||||
final raw = tags['direction'] ?? tags['camera:direction'];
|
||||
// Splits on semicolons, parses each direction, normalizes to 0-359°
|
||||
return [90.0, 180.0, 270.0]; // Results in multiple FOV cones
|
||||
}
|
||||
```
|
||||
|
||||
**Why underscore prefix:**
|
||||
These are internal app tags, not OSM tags. The underscore prefix makes this explicit and prevents accidental upload to OSM.
|
||||
|
||||
### 5. Multi-API Data Sources
|
||||
### 5. Enhanced Overpass Integration & Error Handling
|
||||
|
||||
**Production mode:** Overpass API → OSM API fallback
|
||||
**Sandbox mode:** OSM API only (Overpass doesn't have sandbox data)
|
||||
@@ -149,10 +278,53 @@ These are internal app tags, not OSM tags. The underscore prefix makes this expl
|
||||
- **Production (Overpass)**: Zoom ≥ 10 (established limit)
|
||||
- **Sandbox (OSM API)**: Zoom ≥ 13 (stricter due to bbox limits)
|
||||
|
||||
**Why different zoom limits:**
|
||||
The OSM API returns ALL data types (nodes, ways, relations) in a bounding box and has stricter size limits. Overpass is more efficient for large areas. The zoom restrictions prevent API errors and excessive data transfer.
|
||||
**Smart error handling & splitting:**
|
||||
- **50k node limit**: Automatically splits query into 4 quadrants, recursively up to 3 levels deep
|
||||
- **Timeout errors**: Also triggers splitting (dense areas with many profiles)
|
||||
- **Rate limiting**: Extended backoff (30s), no splitting (would make it worse)
|
||||
- **Surgical detection**: Only splits on actual limit errors, not network issues
|
||||
|
||||
### 6. Offline vs Online Mode Behavior
|
||||
**Query optimization:**
|
||||
- **Pre-fetch limit**: 4x user's display limit (e.g., 1000 nodes for 250 display limit)
|
||||
- **User-initiated detection**: Only reports loading status for user-facing operations
|
||||
- **Background operations**: Pre-fetch runs silently, doesn't trigger loading states
|
||||
|
||||
**Why this approach:**
|
||||
Dense urban areas (SF, NYC) with many profiles enabled can easily exceed both 50k node limits and 25s timeouts. Splitting reduces query complexity while surgical error detection avoids unnecessary API load from network issues.
|
||||
|
||||
### 6. Uploader Service Architecture (Refactored v1.5.3)
|
||||
|
||||
**Three-method approach:**
|
||||
The `Uploader` class now provides three distinct methods matching the OSM API workflow:
|
||||
|
||||
```dart
|
||||
// Step 1: Create changeset
|
||||
Future<UploadResult> createChangeset(PendingUpload p) async
|
||||
|
||||
// Step 2: Perform node operation (create/modify/delete/extract)
|
||||
Future<UploadResult> performNodeOperation(PendingUpload p, String changesetId) async
|
||||
|
||||
// Step 3: Close changeset
|
||||
Future<UploadResult> closeChangeset(String changesetId) async
|
||||
```
|
||||
|
||||
**Simplified UploadResult:**
|
||||
Replaced complex boolean flags with simple success/failure:
|
||||
```dart
|
||||
UploadResult.success({changesetId, nodeId}) // Operation succeeded
|
||||
UploadResult.failure({errorMessage, ...}) // Operation failed with details
|
||||
```
|
||||
|
||||
**Legacy compatibility:**
|
||||
The `upload()` method still exists for simulate mode and backwards compatibility, but now internally calls the three-step methods in sequence.
|
||||
|
||||
**Why this architecture:**
|
||||
- **Brutalist simplicity**: Each method does exactly one thing
|
||||
- **Clear failure points**: No confusion about which step failed
|
||||
- **Easier testing**: Each stage can be unit tested independently
|
||||
- **Better error messages**: Specific failure context for each stage
|
||||
|
||||
### 7. Offline vs Online Mode Behavior
|
||||
|
||||
**Mode combinations:**
|
||||
```
|
||||
@@ -165,6 +337,165 @@ Sandbox + Offline → No nodes (cache is production data)
|
||||
**Why sandbox + offline = no nodes:**
|
||||
Local cache contains production data. Showing production nodes in sandbox mode would be confusing and could lead to users trying to edit production nodes with sandbox credentials.
|
||||
|
||||
### 8. Proximity Alerts & Background Monitoring
|
||||
|
||||
**Design approach:**
|
||||
- **Simple cooldown system**: In-memory tracking to prevent notification spam
|
||||
- **Dual alert types**: Push notifications (background) and visual banners (foreground)
|
||||
- **Configurable distance**: 25-200 meter alert radius
|
||||
- **Battery awareness**: Users explicitly opt into background location monitoring
|
||||
|
||||
**Implementation notes:**
|
||||
- Uses Flutter Local Notifications for cross-platform background alerts
|
||||
- Simple RecentAlert tracking prevents duplicate notifications
|
||||
- Visual callback system for in-app alerts when app is active
|
||||
|
||||
### 9. Compass Indicator & North Lock
|
||||
|
||||
**Purpose**: Visual compass showing map orientation with optional north-lock functionality
|
||||
|
||||
**Design decisions:**
|
||||
- **Separate from follow mode**: North lock is independent of GPS following behavior
|
||||
- **Smart rotation detection**: Distinguishes intentional rotation (>5°) from zoom gestures
|
||||
- **Visual feedback**: Clear skeumorphic compass design with red north indicator
|
||||
- **Mode awareness**: Disabled during follow+rotate mode (incompatible)
|
||||
|
||||
**Key behaviors:**
|
||||
- **North indicator**: Red arrow always points toward true north regardless of map rotation
|
||||
- **Tap to toggle**: Enable/disable north lock with visual animation to north
|
||||
- **Auto-disable**: North lock turns off when switching to follow+rotate mode
|
||||
- **Gesture intelligence**: Only disables on significant rotation changes, ignores zoom artifacts
|
||||
|
||||
**Visual states:**
|
||||
- **Normal**: White background, grey border, red north arrow
|
||||
- **North locked**: White background, blue border, bright red north arrow
|
||||
- **Disabled**: Grey background, muted colors (during follow+rotate mode)
|
||||
|
||||
**Why separate from follow mode:**
|
||||
Users often want to follow their location while keeping the map oriented north. Previous "north up" follow mode was confusing because it didn't actually keep north up. This separation provides clear, predictable behavior.
|
||||
|
||||
### 10. Network Status Indicator (Simplified in v1.5.2+)
|
||||
|
||||
**Purpose**: Show loading and error states for surveillance data fetching only
|
||||
|
||||
**Simplified approach (v1.5.2+):**
|
||||
- **Surveillance data focus**: Only tracks node/camera data loading, not tile loading
|
||||
- **Visual feedback**: Tiles show their own loading progress naturally
|
||||
- **Reduced complexity**: Eliminated tile completion tracking and multiple issue types
|
||||
|
||||
**Status types:**
|
||||
- **Loading**: Shows when fetching surveillance data from APIs
|
||||
- **Success**: Brief confirmation when data loads successfully
|
||||
- **Timeout**: Network request timeouts
|
||||
- **Limit reached**: When node display limit is hit
|
||||
- **API issues**: Overpass/OSM API problems only
|
||||
|
||||
**What was removed:**
|
||||
- Tile server issue tracking (tiles handle their own progress)
|
||||
- "Both" network issue type (only surveillance data matters)
|
||||
- Complex semaphore-based completion detection
|
||||
- Tile-related status messages and localizations
|
||||
|
||||
**Why the change:**
|
||||
The previous approach tracked both tile loading and surveillance data, creating redundancy since tiles already show loading progress visually on the map. Users don't need to be notified about tile loading issues when they can see tiles loading/failing directly. Focusing only on surveillance data makes the indicator more purposeful and less noisy.
|
||||
|
||||
### 11. Suspected Locations
|
||||
|
||||
**Data pipeline:**
|
||||
- **CSV ingestion**: Downloads utility permit data from alprwatch.org
|
||||
- **Dynamic field parsing**: Stores all CSV columns (except `location` and `ticket_no`) for flexible display
|
||||
- **GeoJSON processing**: Handles Point, Polygon, and MultiPolygon geometries
|
||||
- **Proximity filtering**: Hides suspected locations near confirmed devices
|
||||
- **Regional availability**: Currently select locations, expanding regularly
|
||||
|
||||
**Display approach:**
|
||||
- **Required fields**: `ticket_no` (for heading) and `location` (for map positioning)
|
||||
- **Dynamic display**: All other CSV fields shown automatically, no hardcoded field list
|
||||
- **Server control**: Field names and content controlled server-side via CSV headers
|
||||
- **Brutalist rendering**: Fields displayed as-is from CSV, empty fields hidden
|
||||
|
||||
**Why utility permits:**
|
||||
Utility companies often must file permits when installing surveillance infrastructure. This creates a paper trail that can indicate potential surveillance sites before devices are confirmed through direct observation.
|
||||
|
||||
### 12. Upload Mode Simplification
|
||||
|
||||
**Release vs Debug builds:**
|
||||
- **Release builds**: Production OSM only (simplified UX)
|
||||
- **Debug builds**: Full sandbox/simulate options available
|
||||
Most users should contribute to production; testing modes add complexity
|
||||
|
||||
**Implementation:**
|
||||
```dart
|
||||
// Upload mode selection disabled in release builds
|
||||
bool get showUploadModeSelector => kDebugMode;
|
||||
```
|
||||
|
||||
### 13. Tile Provider System & Clean Architecture (v1.5.2+)
|
||||
|
||||
**Architecture (post-v1.5.2):**
|
||||
- **Custom TileProvider**: Clean Flutter Map integration using `DeflockTileProvider`
|
||||
- **Direct MapDataProvider integration**: Tiles go through existing offline/online routing
|
||||
- **No HTTP interception**: Eliminated fake URLs and complex HTTP clients
|
||||
- **Simplified caching**: Single cache layer (FlutterMap's internal cache)
|
||||
|
||||
**Key components:**
|
||||
- `DeflockTileProvider`: Custom Flutter Map TileProvider implementation
|
||||
- `DeflockTileImageProvider`: Handles tile fetching through MapDataProvider
|
||||
- Automatic offline/online routing: Uses `MapSource.auto` for each tile
|
||||
|
||||
**Tile provider configuration:**
|
||||
- **Flexible URL templates**: Support multiple coordinate systems and load-balancing patterns
|
||||
- **Built-in providers**: Curated set of high-quality, reliable tile sources
|
||||
- **Custom providers**: Users can add any tile service with full validation
|
||||
- **API key management**: Secure storage with per-provider API keys
|
||||
|
||||
**Supported URL placeholders:**
|
||||
```
|
||||
{x}, {y}, {z} - Standard TMS tile coordinates
|
||||
{quadkey} - Bing Maps quadkey format (alternative to x/y/z)
|
||||
{0_3} - Subdomain 0-3 for load balancing
|
||||
{1_4} - Subdomain 1-4 for providers using 1-based indexing
|
||||
{api_key} - API key insertion point (optional)
|
||||
```
|
||||
|
||||
**Built-in providers:**
|
||||
- **OpenStreetMap**: Standard street map tiles, no API key required
|
||||
- **Bing Maps**: High-quality satellite imagery using quadkey system, no API key required
|
||||
- **Mapbox**: Satellite and street tiles, requires API key
|
||||
- **OpenTopoMap**: Topographic maps, no API key required
|
||||
|
||||
**Why the architectural change:**
|
||||
The previous HTTP interception approach (`SimpleTileHttpClient` with fake URLs) fought against Flutter Map's architecture and created unnecessary complexity. The new `TileProvider` approach:
|
||||
- **Cleaner integration**: Works with Flutter Map's design instead of against it
|
||||
- **Smart cache routing**: Only checks offline cache when needed, eliminating expensive filesystem searches
|
||||
- **Better error handling**: Graceful fallbacks for missing tiles
|
||||
- **Cross-platform performance**: Optimizations that work well on both iOS and Android
|
||||
|
||||
**Tile Loading Performance Fix (v1.5.2):**
|
||||
The major performance issue was discovered to be double caching with expensive operations:
|
||||
1. **Problem**: Every tile request checked offline areas via filesystem I/O, even when no offline data existed
|
||||
2. **Solution**: Smart cache detection - only check offline cache when in offline mode OR when offline areas actually exist for the current provider
|
||||
3. **Result**: Dramatically improved tile loading from 0.5-5 tiles/sec back to ~70 tiles/sec for normal browsing
|
||||
|
||||
**Cross-Platform Optimizations:**
|
||||
- **Request deduplication**: Prevents multiple simultaneous requests for identical tile coordinates
|
||||
- **Optimized retry timing**: Faster initial retry (150ms vs 200ms) with shorter backoff for quicker recovery
|
||||
- **Queue size limits**: Maximum 100 queued requests to prevent memory bloat
|
||||
- **Smart queue management**: Drops oldest requests when queue fills up
|
||||
- **Reduced concurrent connections**: 8 threads instead of 10 for better stability across platforms
|
||||
|
||||
### 14. Navigation & Routing (Implemented, Awaiting Integration)
|
||||
|
||||
**Current state:**
|
||||
- **Search functionality**: Fully implemented and active
|
||||
- **Avoidance routing**: Fully implemented and active
|
||||
- **Offline routing**: Requires vector map tiles
|
||||
|
||||
**Architecture:**
|
||||
- NavigationState manages routing computation and turn-by-turn instructions
|
||||
- RoutingService handles API communication and route calculation
|
||||
- SearchService provides location lookup and geocoding
|
||||
|
||||
---
|
||||
|
||||
## Key Design Decisions & Rationales
|
||||
@@ -227,6 +558,22 @@ Local cache contains production data. Showing production nodes in sandbox mode w
|
||||
- **Battery life**: Excessive network requests drain battery
|
||||
- **Clear feedback**: Users understand why nodes aren't showing
|
||||
|
||||
### 6. Why Separate Compass Indicator from Follow Mode?
|
||||
|
||||
**Alternative**: Combined "follow with north up" mode
|
||||
|
||||
**Why separate controls:**
|
||||
- **Clear user mental model**: "Follow me" vs "lock to north" are distinct concepts
|
||||
- **Flexible combinations**: Users can follow without north lock, or vice versa
|
||||
- **Avoid mode conflicts**: Follow+rotate is incompatible with north lock
|
||||
- **Reduced confusion**: Previous "north up" mode didn't actually keep north up
|
||||
|
||||
**Design benefits:**
|
||||
- **Brutalist approach**: Two simple, independent features instead of complex mode combinations
|
||||
- **Visual feedback**: Compass shows exact map orientation regardless of follow state
|
||||
- **Smart gesture detection**: Differentiates intentional rotation from zoom artifacts
|
||||
- **Predictable behavior**: Each control does exactly what it says
|
||||
|
||||
---
|
||||
|
||||
## Development Guidelines
|
||||
@@ -298,6 +645,84 @@ void updateMultipleThings() {
|
||||
|
||||
---
|
||||
|
||||
## Release Process & GitHub Actions
|
||||
|
||||
The app uses a **clean, release-triggered workflow** that rebuilds from scratch for maximum reliability:
|
||||
|
||||
### How It Works
|
||||
|
||||
**Trigger: GitHub Release Creation**
|
||||
- Create a GitHub release → Workflow automatically builds, attaches assets, and optionally uploads to stores
|
||||
- **Pre-release checkbox** controls store uploads:
|
||||
- ✅ **Checked** → Build + attach assets (no store uploads)
|
||||
- ✅ **Unchecked** → Build + attach assets + upload to App/Play stores
|
||||
|
||||
### Release Types
|
||||
|
||||
**Development/Beta Releases**
|
||||
1. Create GitHub release from any tag/branch
|
||||
2. ✅ **Check "pre-release"** checkbox
|
||||
3. Publish → Assets built and attached, no store uploads
|
||||
|
||||
**Production Releases**
|
||||
1. Create GitHub release from main/stable branch
|
||||
2. ❌ **Leave "pre-release" unchecked**
|
||||
3. Publish → Assets built and attached + uploaded to stores
|
||||
|
||||
### Store Upload Destinations
|
||||
|
||||
**Google Play Store:**
|
||||
- Uploads to **Internal Testing** track
|
||||
- Requires manual promotion to Beta/Production
|
||||
- You maintain full control over public release
|
||||
|
||||
**App Store Connect:**
|
||||
- Uploads to **TestFlight**
|
||||
- Requires manual App Store submission
|
||||
- You maintain full control over public release
|
||||
|
||||
### Required Secrets
|
||||
|
||||
**For Google Play Store Upload:**
|
||||
- `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` - Complete JSON service account key (plain text)
|
||||
|
||||
**For iOS App Store Upload:**
|
||||
- `APP_STORE_CONNECT_API_KEY_ID` - App Store Connect API key ID
|
||||
- `APP_STORE_CONNECT_ISSUER_ID` - App Store Connect issuer ID
|
||||
- `APP_STORE_CONNECT_API_KEY_BASE64` - Base64-encoded .p8 API key file
|
||||
|
||||
**For Building:**
|
||||
- `OSM_PROD_CLIENTID` - OpenStreetMap production OAuth2 client ID
|
||||
- `OSM_SANDBOX_CLIENTID` - OpenStreetMap sandbox OAuth2 client ID
|
||||
- Android signing secrets (keystore, passwords, etc.)
|
||||
- iOS signing certificates and provisioning profiles
|
||||
|
||||
### Google Play Store Setup
|
||||
|
||||
1. **Google Cloud Console:**
|
||||
- Create Service Account with "Project Editor" role
|
||||
- Enable Google Play Android Developer API
|
||||
- Download JSON key file
|
||||
|
||||
2. **Google Play Console:**
|
||||
- Add service account email to Users & Permissions
|
||||
- Grant "Release Manager" permissions for your app
|
||||
- Complete first manual release to activate app listing
|
||||
|
||||
3. **GitHub Secrets:**
|
||||
- Store entire JSON key as `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` (plain text)
|
||||
|
||||
### Workflow Benefits
|
||||
|
||||
✅ **Brutalist simplicity** - One trigger, clear behavior
|
||||
✅ **No external dependencies** - Only uses trusted `r0adkll/upload-google-play@v1`
|
||||
✅ **Explicit control** - GitHub's UI checkbox controls store uploads
|
||||
✅ **Always rebuilds** - No stale artifacts or cross-workflow complexity
|
||||
✅ **Safe defaults** - Pre-release prevents accidental production uploads
|
||||
✅ **No tag coordination** - Works with any commit, tag, or branch
|
||||
|
||||
---
|
||||
|
||||
## Build & Development Setup
|
||||
|
||||
### Prerequisites
|
||||
@@ -422,4 +847,4 @@ debugPrint('[ComponentName] Detailed message: $data');
|
||||
|
||||
---
|
||||
|
||||
This documentation should be updated as the architecture evolves. When making significant changes, update both the relevant section here and add a brief note explaining the rationale for the change.
|
||||
This documentation should be updated as the architecture evolves. When making significant changes, update both the relevant section here and add a brief note explaining the rationale for the change.
|
||||
|
||||
66
README.md
@@ -6,6 +6,14 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
|
||||
**For complete documentation, tutorials, and community info, visit [deflock.me](https://deflock.me)**
|
||||
|
||||
<a href="https://apps.apple.com/us/app/deflock-me/id6752760780" style="display: inline-block;">
|
||||
<img src="https://toolbox.marketingtools.apple.com/api/v2/badges/download-on-the-app-store/black/en-us?releaseDate=1695859200" alt="Download on the App Store" style="width: 246px; height: 82px; vertical-align: middle; object-fit: contain;" />
|
||||
</a>
|
||||
|
||||
<a href="https://play.google.com/store/apps/details?id=me.deflock.deflockapp" style="display: inline-block;">
|
||||
<img src="assets/GetItOnGooglePlay_Badge_Web_color_English.png" alt="Download on the Google Play Store" style="width: 246px; height: 82px; vertical-align: middle; object-fit: contain;" />
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
## What This App Does
|
||||
@@ -13,7 +21,7 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
- **Map surveillance infrastructure** including cameras, ALPRs, gunshot detectors, and more with precise location, direction, and manufacturer details
|
||||
- **Upload to OpenStreetMap** with OAuth2 integration (live or sandbox modes)
|
||||
- **Work completely offline** with downloadable map areas and device data, plus upload queue
|
||||
- **Multiple map types** including satellite imagery from Google, Esri, Mapbox, and OpenStreetMap, plus custom map tile provider support
|
||||
- **Multiple map types** including satellite imagery from Bing Maps, USGS, Esri, Mapbox, and topographic maps from OpenTopoMap, plus custom map tile provider support
|
||||
- **Editing Ability** to update existing device locations and properties
|
||||
- **Built-in device profiles** for Flock Safety, Motorola, Genetec, Leonardo, and other major manufacturers, plus custom profiles for more specific tag sets
|
||||
|
||||
@@ -22,17 +30,23 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
## Key Features
|
||||
|
||||
### Map & Navigation
|
||||
- **Multi-source tiles**: Switch between OpenStreetMap, Google Satellite, Esri imagery, Mapbox, and any custom providers
|
||||
- **Multi-source tiles**: Switch between OpenStreetMap, Bing satellite imagery, USGS imagery, Esri imagery, Mapbox, OpenTopoMap, and any custom providers
|
||||
- **Offline-first design**: Download a region for complete offline operation
|
||||
- **Smooth UX**: Intuitive controls, follow-me mode with GPS rotation, and gesture-friendly interactions
|
||||
- **Smooth UX**: Intuitive controls, follow-me mode with GPS rotation, compass indicator with north-lock, and gesture-friendly interactions
|
||||
- **Device visualization**: Color-coded markers showing real devices (blue), pending uploads (purple), pending edits (grey), devices being edited (orange), and pending deletions (red)
|
||||
|
||||
### Device Management
|
||||
- **Comprehensive profiles**: Built-in profiles for major manufacturers (Flock Safety, Motorola/Vigilant, Genetec, Leonardo/ELSAG, Neology) plus custom profile creation
|
||||
- **Full CRUD operations**: Create, edit, and delete surveillance devices
|
||||
- **Direction visualization**: Interactive field-of-view cones showing camera viewing angles
|
||||
- **Multi-direction support**: Devices can have multiple viewing directions (e.g. "90;180") with individual field-of-view cones
|
||||
- **Direction visualization**: Interactive field-of-view cones showing camera viewing angles with opacity-based selection
|
||||
- **Bulk operations**: Tag multiple devices efficiently with profile-based workflow
|
||||
|
||||
### Surveillance Intelligence
|
||||
- **Suspected locations**: Display potential surveillance sites from utility permit data with dynamic field display (select locations, more added regularly)
|
||||
- **Proximity alerts**: Get notified when approaching mapped surveillance devices, with configurable distance and background notifications
|
||||
- **Location search**: Find addresses and points of interest to aid in mapping missions
|
||||
|
||||
### Professional Upload & Sync
|
||||
- **OpenStreetMap integration**: Direct upload with full OAuth2 authentication
|
||||
- **Upload modes**: Production OSM, testing sandbox, or simulate-only mode
|
||||
@@ -49,14 +63,16 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **Install** the app on iOS or Android
|
||||
1. **Install** the app on iOS or Android - a welcome popup will guide you through key information
|
||||
2. **Enable location** permissions
|
||||
3. **Log into OpenStreetMap**: Choose upload mode and get OAuth2 credentials
|
||||
4. **Add your first device**: Tap the "New Node" button, position the pin, set direction, select a profile, and tap submit
|
||||
4. **Add your first device**: Tap the "New Node" button, position the pin, set direction(s), select a profile, and tap submit - a guidance popup will help you with best practices on your first submission
|
||||
5. **Edit or delete devices**: Tap any device marker to view details, then use Edit or Delete buttons
|
||||
|
||||
**New to OpenStreetMap?** Visit [deflock.me](https://deflock.me) for complete setup instructions and community guidelines.
|
||||
|
||||
**App Updates**: The app will automatically show you what's new when you update. You can always view release notes in Settings > About.
|
||||
|
||||
---
|
||||
|
||||
## For Developers
|
||||
@@ -64,6 +80,7 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
**See [DEVELOPER.md](DEVELOPER.md)** for comprehensive technical documentation including:
|
||||
- Architecture overview and design decisions
|
||||
- Development setup and build instructions
|
||||
- Release process and GitHub Actions automation
|
||||
- Code organization and contribution guidelines
|
||||
- Debugging tips and troubleshooting
|
||||
|
||||
@@ -74,29 +91,42 @@ cp lib/keys.dart.example lib/keys.dart
|
||||
# Add OAuth2 client IDs, then: flutter run
|
||||
```
|
||||
|
||||
**Releases**: The app uses GitHub's release system for automated building and store uploads. Simply create a GitHub release and use the "pre-release" checkbox to control whether builds go to app stores - checked for beta releases, unchecked for production releases.
|
||||
|
||||
---
|
||||
|
||||
## Roadmap
|
||||
|
||||
### Needed Bugfixes
|
||||
- Are offline areas preferred for fast loading even when online? Check working.
|
||||
|
||||
### Current Development
|
||||
- Clean cache when nodes have disappeared / been deletd by others
|
||||
- Clean up dev_config
|
||||
- Decide what to do for extracting nodes attached to a way/relation:
|
||||
- Auto extract (how?)
|
||||
- Leave it alone (wrong answer unless user chooses intentionally)
|
||||
- Manual cleanup (cognitive load for users)
|
||||
- Delete the old one (also wrong answer unless user chooses intentionally)
|
||||
- Give multiple of these options??
|
||||
- Dropdown on "refine tags" page to select acceptable options for camera:mount= (is this a boolean property of a profile?)
|
||||
- Option to pull in profiles from NSI (man_made=surveillance only?)
|
||||
|
||||
### On Pause
|
||||
- Import/Export map providers
|
||||
- Clean cache when nodes have disappeared / been deleted by others / queue item was deleted
|
||||
- Improve offline area node refresh live display
|
||||
- Add default operator profiles (Lowe’s etc)
|
||||
|
||||
### Future Features & Wishlist
|
||||
- Update offline area nodes while browsing?
|
||||
- Suspected locations toggle (alprwatch.com/flock/utilities)
|
||||
- Jump to location by coordinates, address, or POI name
|
||||
- Route planning that avoids surveillance devices (alprwatch.com/directions)
|
||||
- Offline navigation (pending vector map tiles)
|
||||
- Android Auto / CarPlay
|
||||
|
||||
### Maybes
|
||||
- Yellow ring for devices missing specific tag details?
|
||||
- "Cache accumulating" offline area?
|
||||
- "Offline areas" as tile provider?
|
||||
- Optional custom icons for camera profiles?
|
||||
- Upgrade device marker design? (considering nullplate's svg)
|
||||
- Custom device providers and OSM/Overpass alternatives?
|
||||
- Yellow ring for devices missing specific tag details
|
||||
- "Cache accumulating" offline area
|
||||
- "Offline areas" as tile provider
|
||||
- Grab the full latest database for each profile just like for suspected locations (instead of overpass)
|
||||
- Optional custom icons for profiles to aid identification
|
||||
- Custom device providers and OSM/Overpass alternatives
|
||||
|
||||
---
|
||||
|
||||
|
||||
243
REFACTORING_ROUND_1_SUMMARY.md
Normal file
@@ -0,0 +1,243 @@
|
||||
# Refactoring Rounds 1 & 2 Complete - v1.6.0
|
||||
|
||||
## Overview
|
||||
Successfully refactored the largest file in the codebase (MapView, 880 lines) by extracting specialized manager classes with clear separation of concerns. This follows the "brutalist code" philosophy of the project - simple, explicit, and maintainable.
|
||||
|
||||
## What Was Accomplished
|
||||
|
||||
### File Size Reduction
|
||||
- **MapView**: 880 lines → 572 lines (**35% reduction, -308 lines**)
|
||||
- **Total new code**: 4 new focused manager classes (351 lines total)
|
||||
- **Net complexity reduction**: Converted monolithic widget into clean orchestrator + specialized managers
|
||||
|
||||
### Step 1.5: Terminology Update (Camera → Node)
|
||||
- **Renamed 3 core files** to use "node" instead of "camera" terminology
|
||||
- **Updated all class names** to reflect current multi-device scope (not just cameras)
|
||||
- **Updated all method names** and comments for consistency
|
||||
- **Updated all imports/references** across the entire codebase
|
||||
- **Benefits**: Consistent terminology that reflects the app's expansion beyond just cameras to all surveillance devices
|
||||
=======
|
||||
|
||||
### New Manager Classes Created
|
||||
|
||||
#### 1. MapDataManager (`lib/widgets/map/map_data_manager.dart`) - 92 lines
|
||||
**Responsibility**: Data fetching, filtering, and node limit logic
|
||||
- `getNodesForRendering()` - Central method for getting filtered/limited nodes
|
||||
- `getMinZoomForNodes()` - Upload mode-aware zoom requirements
|
||||
- `showZoomWarningIfNeeded()` - Zoom level user feedback
|
||||
- `MapDataResult` - Clean result object with all node data + state
|
||||
|
||||
**Benefits**:
|
||||
- Encapsulates all node data logic
|
||||
- Clear separation between data concerns and UI concerns
|
||||
- Easily testable data operations
|
||||
|
||||
#### 2. MapInteractionManager (`lib/widgets/map/map_interaction_manager.dart`) - 45 lines
|
||||
**Responsibility**: Map gesture handling and interaction configuration
|
||||
- `getInteractionOptions()` - Constrained node interaction logic
|
||||
- `mapMovedSignificantly()` - Pan detection for tile queue management
|
||||
|
||||
**Benefits**:
|
||||
- Isolates gesture complexity from UI rendering
|
||||
- Clear constrained node behavior in one place
|
||||
- Reusable interaction logic
|
||||
|
||||
#### 3. MarkerLayerBuilder (`lib/widgets/map/marker_layer_builder.dart`) - 165 lines
|
||||
**Responsibility**: Building all map markers including surveillance nodes, suspected locations, navigation pins, route markers
|
||||
- `buildMarkerLayers()` - Main orchestrator for all marker types
|
||||
- `LocationPin` - Route start/end pin widget (extracted from MapView)
|
||||
- Private methods for each marker category
|
||||
- Proximity filtering for suspected locations
|
||||
|
||||
**Benefits**:
|
||||
- All marker logic in one place
|
||||
- Clean separation of marker types
|
||||
- Reusable marker building functions
|
||||
|
||||
#### 4. OverlayLayerBuilder (`lib/widgets/map/overlay_layer_builder.dart`) - 89 lines
|
||||
**Responsibility**: Building polygons, lines, and route overlays
|
||||
- `buildOverlayLayers()` - Direction cones, edit lines, suspected location bounds, route paths
|
||||
- Clean layer composition
|
||||
- Route visualization logic
|
||||
|
||||
**Benefits**:
|
||||
- Overlay logic separated from marker logic
|
||||
- Clear layer ordering and composition
|
||||
- Easy to add new overlay types
|
||||
|
||||
## Architectural Benefits
|
||||
|
||||
### Brutalist Code Principles Applied
|
||||
1. **Explicit over implicit**: Each manager has one clear responsibility
|
||||
2. **Simple delegation**: MapView orchestrates, managers execute
|
||||
3. **No clever abstractions**: Straightforward method calls and data flow
|
||||
4. **Clear failure points**: Each manager handles its own error cases
|
||||
|
||||
### Maintainability Gains
|
||||
1. **Focused testing**: Each manager can be unit tested independently
|
||||
2. **Clear debugging**: Issues confined to specific domains (data vs UI vs interaction)
|
||||
3. **Easier feature additions**: New marker types go in MarkerLayerBuilder, new data logic goes in MapDataManager
|
||||
4. **Reduced cognitive load**: Developers can focus on one concern at a time
|
||||
|
||||
### Code Organization Improvements
|
||||
1. **Single responsibility**: Each class does exactly one thing
|
||||
2. **Composition over inheritance**: MapView composes managers rather than inheriting complexity
|
||||
3. **Clean interfaces**: Result objects (MapDataResult) provide clear contracts
|
||||
4. **Consistent patterns**: All managers follow same initialization and method patterns
|
||||
|
||||
## Technical Implementation Details
|
||||
|
||||
### Manager Initialization
|
||||
```dart
|
||||
class MapViewState extends State<MapView> {
|
||||
late final MapDataManager _dataManager;
|
||||
late final MapInteractionManager _interactionManager;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// ... existing initialization ...
|
||||
_dataManager = MapDataManager();
|
||||
_interactionManager = MapInteractionManager();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Clean Delegation Pattern
|
||||
```dart
|
||||
// Before: Complex data logic mixed with UI
|
||||
final nodeData = _dataManager.getNodesForRendering(
|
||||
currentZoom: currentZoom,
|
||||
mapBounds: mapBounds,
|
||||
uploadMode: appState.uploadMode,
|
||||
maxNodes: appState.maxNodes,
|
||||
onNodeLimitChanged: widget.onNodeLimitChanged,
|
||||
);
|
||||
|
||||
// Before: Complex marker building mixed with layout
|
||||
final markerLayer = MarkerLayerBuilder.buildMarkerLayers(
|
||||
nodesToRender: nodeData.nodesToRender,
|
||||
mapController: _controller,
|
||||
appState: appState,
|
||||
// ... other parameters
|
||||
);
|
||||
```
|
||||
|
||||
### Result Objects for Clean Interfaces
|
||||
```dart
|
||||
class MapDataResult {
|
||||
final List<OsmNode> allNodes;
|
||||
final List<OsmNode> nodesToRender;
|
||||
final bool isLimitActive;
|
||||
final int validNodesCount;
|
||||
}
|
||||
```
|
||||
|
||||
## Testing Strategy for Round 1
|
||||
|
||||
### Critical Test Areas
|
||||
1. **MapView rendering**: Verify all markers, overlays, and controls still appear correctly
|
||||
2. **Node limit logic**: Test limit indicator shows/hides appropriately
|
||||
3. **Constrained node editing**: Ensure constrained nodes still lock interaction properly
|
||||
4. **Zoom warnings**: Verify zoom level warnings appear at correct thresholds
|
||||
5. **Route visualization**: Test navigation pins and route lines render correctly
|
||||
6. **Suspected locations**: Verify proximity filtering and bounds display
|
||||
7. **Sheet positioning**: Ensure map positioning with sheets still works
|
||||
|
||||
### Regression Prevention
|
||||
- **No functionality changes**: All existing behavior preserved
|
||||
- **Same performance**: No additional overhead from manager pattern
|
||||
- **Clean error handling**: Each manager handles its own error cases
|
||||
- **Memory management**: No memory leaks from manager lifecycle
|
||||
|
||||
## Round 2 Results: HomeScreen Extraction
|
||||
|
||||
Successfully completed HomeScreen refactoring (878 → 604 lines, **31% reduction**):
|
||||
|
||||
### New Coordinator Classes Created
|
||||
|
||||
#### 5. SheetCoordinator (`lib/screens/coordinators/sheet_coordinator.dart`) - 189 lines
|
||||
**Responsibility**: All bottom sheet operations including opening, closing, height tracking
|
||||
- `openAddNodeSheet()`, `openEditNodeSheet()`, `openNavigationSheet()` - Sheet lifecycle management
|
||||
- Height tracking and active sheet calculation
|
||||
- Sheet state management (edit/navigation shown flags)
|
||||
- Sheet transition coordination (prevents map bounce)
|
||||
|
||||
#### 6. NavigationCoordinator (`lib/screens/coordinators/navigation_coordinator.dart`) - 124 lines
|
||||
**Responsibility**: Route planning, navigation, and map centering/zoom logic
|
||||
- `startRoute()`, `resumeRoute()` - Route lifecycle with auto follow-me detection
|
||||
- `handleNavigationButtonPress()` - Search mode and route overview toggling
|
||||
- `zoomToShowFullRoute()` - Intelligent route visualization
|
||||
- Map centering logic based on GPS availability and user proximity
|
||||
|
||||
#### 7. MapInteractionHandler (`lib/screens/coordinators/map_interaction_handler.dart`) - 84 lines
|
||||
**Responsibility**: Map interaction events including node taps and search result selection
|
||||
- `handleNodeTap()` - Node selection with highlighting and centering
|
||||
- `handleSuspectedLocationTap()` - Suspected location interaction
|
||||
- `handleSearchResultSelection()` - Search result processing with map animation
|
||||
- `handleUserGesture()` - Selection clearing on user interaction
|
||||
|
||||
### Round 2 Benefits
|
||||
- **HomeScreen reduced**: 878 lines → 604 lines (**31% reduction, -274 lines**)
|
||||
- **Clear coordinator separation**: Each coordinator handles one domain (sheets, navigation, interactions)
|
||||
- **Simplified HomeScreen**: Now primarily orchestrates coordinators rather than implementing logic
|
||||
- **Better testability**: Coordinators can be unit tested independently
|
||||
- **Enhanced maintainability**: Feature additions have clear homes in appropriate coordinators
|
||||
|
||||
## Combined Results (Both Rounds)
|
||||
|
||||
### Total Impact
|
||||
- **MapView**: 880 → 572 lines (**-308 lines**)
|
||||
- **HomeScreen**: 878 → 604 lines (**-274 lines**)
|
||||
- **Total reduction**: **582 lines** removed from the two largest files
|
||||
- **New focused classes**: 7 manager/coordinator classes with clear responsibilities
|
||||
- **Net code increase**: 947 lines added across all new classes
|
||||
- **Overall impact**: +365 lines total, but dramatically improved organization and maintainability
|
||||
|
||||
### Architectural Transformation
|
||||
- **Before**: Two monolithic files handling multiple concerns each
|
||||
- **After**: Clean orchestrator pattern with focused managers/coordinators
|
||||
- **Maintainability**: Exponentially improved due to separation of concerns
|
||||
- **Testability**: Each manager/coordinator can be independently tested
|
||||
- **Feature Development**: Clear homes for new functionality
|
||||
|
||||
## Next Phase: AppState (Optional Round 3)
|
||||
|
||||
The third largest file is AppState (729 lines). If desired, could extract:
|
||||
1. **SessionCoordinator** - Add/edit session management
|
||||
2. **NavigationStateCoordinator** - Search and route state management
|
||||
3. **DataCoordinator** - Upload queue and node operations
|
||||
|
||||
Expected reduction: ~300-400 lines, but AppState is already well-organized as the central state provider.
|
||||
|
||||
## Files Modified
|
||||
|
||||
### New Files
|
||||
- `lib/widgets/map/map_data_manager.dart`
|
||||
- `lib/widgets/map/map_interaction_manager.dart`
|
||||
- `lib/widgets/map/marker_layer_builder.dart`
|
||||
- `lib/widgets/map/overlay_layer_builder.dart`
|
||||
- `lib/widgets/node_provider_with_cache.dart` (renamed from camera_provider_with_cache.dart)
|
||||
- `lib/widgets/map/node_refresh_controller.dart` (renamed from camera_refresh_controller.dart)
|
||||
- `lib/widgets/map/node_markers.dart` (renamed from camera_markers.dart)
|
||||
|
||||
### Modified Files
|
||||
- `lib/widgets/map_view.dart` (880 → 572 lines)
|
||||
- `lib/app_state.dart` (updated imports and references)
|
||||
- `lib/state/upload_queue_state.dart` (updated all references)
|
||||
- `lib/services/prefetch_area_service.dart` (updated references)
|
||||
|
||||
### Removed Files
|
||||
- `lib/widgets/camera_provider_with_cache.dart` (renamed to node_provider_with_cache.dart)
|
||||
- `lib/widgets/map/camera_refresh_controller.dart` (renamed to node_refresh_controller.dart)
|
||||
- `lib/widgets/map/camera_markers.dart` (renamed to node_markers.dart)
|
||||
|
||||
### Total Impact
|
||||
- **Lines removed**: 308 from MapView
|
||||
- **Lines added**: 351 across 4 focused managers
|
||||
- **Net addition**: 43 lines total
|
||||
- **Complexity reduction**: Significant (monolithic → modular)
|
||||
|
||||
---
|
||||
|
||||
This refactoring maintains backward compatibility while dramatically improving code organization and maintainability. The brutalist approach ensures each component has a clear, single purpose with explicit interfaces.
|
||||
125
UPLOAD_REFACTOR_SUMMARY.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Upload System Refactor - v1.5.3
|
||||
|
||||
## Overview
|
||||
Refactored the upload queue processing and OSM submission logic to properly handle the three distinct phases of OSM node operations, fixing the core issue where step 2 failures (node operations) weren't handled correctly.
|
||||
|
||||
## Problem Analysis
|
||||
The previous implementation incorrectly treated OSM interaction as a 2-step process:
|
||||
1. ~~Open changeset + submit node~~ (conflated)
|
||||
2. Close changeset
|
||||
|
||||
But OSM actually requires 3 distinct steps:
|
||||
1. **Create changeset**
|
||||
2. **Perform node operation** (create/modify/delete)
|
||||
3. **Close changeset**
|
||||
|
||||
### Issues Fixed:
|
||||
- **Step 2 failure handling**: Node operation failures now properly close orphaned changesets and retry appropriately
|
||||
- **State confusion**: Users now see exactly which of the 3 stages is happening or failed
|
||||
- **Error tracking**: Each stage has appropriate retry logic and error messages
|
||||
- **UI clarity**: Displays "Creating changeset...", "Uploading...", "Closing changeset..." with progress info
|
||||
|
||||
## Changes Made
|
||||
|
||||
### 1. Uploader Service (`lib/services/uploader.dart`)
|
||||
- **Simplified UploadResult**: Replaced complex boolean flags with simple `success/failure` pattern
|
||||
- **Three explicit methods**:
|
||||
- `createChangeset(PendingUpload)` → Returns changeset ID
|
||||
- `performNodeOperation(PendingUpload, changesetId)` → Returns node ID
|
||||
- `closeChangeset(changesetId)` → Returns success/failure
|
||||
- **Legacy compatibility**: `upload()` method still exists for simulate mode
|
||||
- **Better error context**: Each method provides specific error messages for its stage
|
||||
|
||||
### 2. Upload Queue State (`lib/state/upload_queue_state.dart`)
|
||||
- **Three processing methods**:
|
||||
- `_processCreateChangeset()` - Stage 1
|
||||
- `_processNodeOperation()` - Stage 2
|
||||
- `_processChangesetClose()` - Stage 3
|
||||
- **Proper state transitions**: Clear progression through `pending` → `creatingChangeset` → `uploading` → `closingChangeset` → `complete`
|
||||
- **Stage-specific retry logic**:
|
||||
- Stage 1 failure: Simple retry (no cleanup)
|
||||
- Stage 2 failure: Close orphaned changeset, retry from stage 1
|
||||
- Stage 3 failure: Exponential backoff up to 59 minutes
|
||||
- **Simulate mode support**: All three stages work in simulate mode
|
||||
|
||||
### 3. Upload Queue UI (`lib/screens/upload_queue_screen.dart`)
|
||||
- **Enhanced status display**: Shows retry attempts and time remaining (only when changeset close has failed)
|
||||
- **Better error visibility**: Tap error icon to see detailed failure messages
|
||||
- **Stage progression**: Clear visual feedback for each of the 3 stages
|
||||
- **Cleaner progress display**: Time countdown only shows when there have been changeset close issues
|
||||
|
||||
### 4. Cache Cleanup (`lib/state/upload_queue_state.dart`, `lib/services/node_cache.dart`)
|
||||
- **Fixed orphaned pending nodes**: Removing or clearing queue items now properly cleans up temporary cache markers
|
||||
- **Operation-specific cleanup**:
|
||||
- **Creates**: Remove temporary nodes with `_pending_upload` markers
|
||||
- **Edits**: Remove temp nodes + `_pending_edit` markers from originals
|
||||
- **Deletes**: Remove `_pending_deletion` markers from originals
|
||||
- **Extracts**: Remove temp extracted nodes (leave originals unchanged)
|
||||
- **Added NodeCache methods**: `removePendingDeletionMarker()` for deletion cancellation cleanup
|
||||
|
||||
### 5. Documentation Updates
|
||||
- **DEVELOPER.md**: Added detailed explanation of three-stage architecture
|
||||
- **Changelog**: Updated v1.5.3 release notes to highlight the fix
|
||||
- **Code comments**: Improved throughout for clarity
|
||||
|
||||
## Architecture Benefits
|
||||
|
||||
### Brutalist Code Principles Applied:
|
||||
1. **Explicit over implicit**: Three methods instead of one complex method
|
||||
2. **Simple error handling**: Success/failure instead of multiple boolean flags
|
||||
3. **Clear responsibilities**: Each method does exactly one thing
|
||||
4. **Minimal state complexity**: Straightforward state machine progression
|
||||
|
||||
### User Experience Improvements:
|
||||
- **Transparent progress**: Users see exactly what stage is happening
|
||||
- **Better error messages**: Specific context about which stage failed
|
||||
- **Proper retry behavior**: Stage 2 failures no longer leave orphaned changesets
|
||||
- **Time awareness**: Countdown shows when OSM will auto-close changesets
|
||||
|
||||
### Maintainability Gains:
|
||||
- **Easier debugging**: Each stage can be tested independently
|
||||
- **Clear failure points**: No confusion about which step failed
|
||||
- **Simpler testing**: Individual stages are unit-testable
|
||||
- **Future extensibility**: Easy to add new upload operations or modify stages
|
||||
|
||||
## Refined Retry Logic (Post-Testing Updates)
|
||||
|
||||
After initial testing feedback, the retry logic was refined to properly handle the 59-minute changeset window:
|
||||
|
||||
### Three-Phase Retry Strategy:
|
||||
- **Phase 1 (Create Changeset)**: Up to 3 attempts with 20s delays → Error state (user retry required)
|
||||
- **Phase 2 (Submit Node)**: Unlimited attempts within 59-minute window → Error if time expires
|
||||
- **Phase 3 (Close Changeset)**: Unlimited attempts within 59-minute window → Auto-complete if time expires (trust OSM auto-close)
|
||||
|
||||
### Key Behavioral Changes:
|
||||
- **59-minute timer starts** when changeset creation succeeds (not when node operation completes)
|
||||
- **Node submission failures** retry indefinitely within the 59-minute window
|
||||
- **Changeset close failures** retry indefinitely but never error out (always eventually complete)
|
||||
- **UI countdown** only shows when there have been failures in phases 2 or 3
|
||||
- **Proper error messages**: "Failed to create changeset after 3 attempts" vs "Could not submit node within 59 minutes"
|
||||
|
||||
## Testing Recommendations
|
||||
|
||||
When testing this refactor:
|
||||
|
||||
1. **Normal uploads**: Verify all three stages show proper progression
|
||||
2. **Network interruption**:
|
||||
- Test failure at each stage individually
|
||||
- Verify orphaned changesets are properly closed
|
||||
- Check retry logic works appropriately
|
||||
3. **Error handling**:
|
||||
- Tap error icons to see detailed messages
|
||||
- Verify different error types show stage-specific context
|
||||
4. **Simulate mode**: Confirm all three stages work in simulate mode
|
||||
5. **Queue management**: Verify queue continues processing when individual items fail
|
||||
6. **Changeset closing**: Test that changeset close retries work with exponential backoff
|
||||
|
||||
## Rollback Plan
|
||||
If issues are discovered, the legacy `upload()` method can be restored by:
|
||||
1. Reverting `_processCreateChangeset()` to call `up.upload(item)` directly
|
||||
2. Removing `_processNodeOperation()` and `_processChangesetClose()` calls
|
||||
3. This would restore the old 2-stage behavior while keeping the UI improvements
|
||||
|
||||
---
|
||||
|
||||
The core fix addresses the main issue you identified: **step 2 failures (node operations) are now properly tracked and handled with appropriate cleanup and retry logic**.
|
||||
@@ -1,3 +1,6 @@
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
@@ -5,11 +8,17 @@ plugins {
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "me.deflock.deflockapp"
|
||||
|
||||
// Matches current stable Flutter (compileSdk 34 as of July 2025)
|
||||
compileSdk = 35
|
||||
compileSdk = 36
|
||||
|
||||
// NDK only needed if you build native plugins; keep your pinned version
|
||||
ndkVersion = "27.0.12077973"
|
||||
@@ -31,17 +40,32 @@ android {
|
||||
// oauth2_client 4.x & flutter_web_auth_2 5.x require minSdk 23
|
||||
// ────────────────────────────────────────────────────────────
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
targetSdk = 36
|
||||
|
||||
// Flutter tool injects these during `flutter build`
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// Using debug signing so `flutter run --release` works out‑of‑box.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
} else {
|
||||
// Fall back to debug signing for development builds
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:hardwareAccelerated="true"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustNothing">
|
||||
|
||||
<!-- The theme behind the splash while Flutter initializes -->
|
||||
<meta-data
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 69 B |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 69 B |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
@@ -2,6 +2,9 @@
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="launch_background">#202020</color>
|
||||
<color name="launch_background">#152131</color>
|
||||
</resources>
|
||||
|
||||
BIN
assets/GetItOnGooglePlay_Badge_Web_color_English.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
assets/android_app_icon.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
190
assets/changelog.json
Normal file
@@ -0,0 +1,190 @@
|
||||
{
|
||||
"1.6.1": {
|
||||
"content": [
|
||||
"• IMPROVED: Navigation route calculation timeout increased from 15 to 30 seconds - better success rate for complex routes in dense areas",
|
||||
"• TECHNICAL: Route timeout is now configurable in dev_config for easier future adjustments"
|
||||
]
|
||||
},
|
||||
"1.6.0": {
|
||||
"content": [
|
||||
"• Internal code organization improvements - better separation of concerns for improved maintainability",
|
||||
"• Extracted specialized manager classes for map data, interactions, sheets, and navigation",
|
||||
"• Improved code modularity while preserving all existing functionality"
|
||||
]
|
||||
},
|
||||
"1.5.4": {
|
||||
"content": [
|
||||
"• OSM message notifications - dot appears on Settings button and OSM Account section when you have unread messages on OpenStreetMap",
|
||||
"• Download area max zoom level is now limited to the currently selected tile provider's maximum zoom level",
|
||||
"• Navigation route planning now prevents selecting start and end locations that are too close together",
|
||||
"• Cleaned up internal 'maxCameras' references to use 'maxNodes' terminology consistently",
|
||||
"• Proximity warnings now consider pending nodes - prevents submitting multiple nodes at the same location without warning",
|
||||
"• Pending nodes now reappear on the map after app restart - queue items repopulate the visual cache on startup",
|
||||
"• Upload queue screen shows when processing is paused (offline mode or manually paused)"
|
||||
]
|
||||
},
|
||||
"1.5.3": {
|
||||
"content": [
|
||||
"• Uploads now correctly track changeset creation, node operation, and changeset closing as separate steps",
|
||||
"• Upload queue processing is now more robust and continues when individual items encounter errors",
|
||||
"• Enhanced upload error handling - failures in each stage (create changeset, upload node, close changeset) are now handled appropriately",
|
||||
"• Improved upload status display - shows 'Creating changeset...', 'Uploading...', and 'Closing changeset...' with time remaining for changeset close",
|
||||
"• You can now tap the error icon (!) on failed uploads to see exactly what went wrong and at which stage",
|
||||
"• Moved 'Delete OSM Account' link from About page to OSM Account page - now only appears when logged in",
|
||||
"• Removing queue items or clearing the queue now properly removes temporary markers from the map",
|
||||
"• Removed placeholder FOV values from built-in profiles - FOV functionality remains available"
|
||||
]
|
||||
},
|
||||
"1.5.2": {
|
||||
"content": [
|
||||
"• Simplified tile loading architecture - replaced HTTP interception with clean TileProvider implementation",
|
||||
"• Improved tile loading performance - eliminate expensive filesystem searches on every tile request",
|
||||
"• Network status indicator now indicates only node data loading, not tile loading",
|
||||
"• Network status indicator no longer shows false timeouts during surveillance data splitting operations",
|
||||
"• Max nodes setting now correctly limits rendering only (not data fetching)",
|
||||
"• New node limit indicator shows when not all devices are displayed due to rendering limit"
|
||||
]
|
||||
},
|
||||
"1.5.1": {
|
||||
"content": [
|
||||
"• NEW: Bing satellite imagery - high-quality satellite tiles used by the iD editor, no API key required",
|
||||
"• IMPROVED: Enhanced tile provider system with quadkey format support (for Bing Maps and similar providers)",
|
||||
"• IMPROVED: Flexible subdomain patterns - supports both 0-3 and 1-4 subdomain ranges for load balancing",
|
||||
"• IMPROVED: Tile URL validation now accepts either {quadkey} or {x}/{y}/{z} coordinate systems"
|
||||
]
|
||||
},
|
||||
"1.5.0": {
|
||||
"content": [
|
||||
"• NEW: First-submission guide popup - provides essential guidance and links before your first device submission",
|
||||
"• NEW: Manual access to dialogs in Settings > About - view welcome message and submission guide anytime"
|
||||
]
|
||||
},
|
||||
"1.4.6": {
|
||||
"content": [
|
||||
"• IMPROVED: Tile fetching reliability - removed retry limits so visible tiles always load eventually",
|
||||
"• FIXED: Queue management - cancel requests for off-screen tiles, ongoing requests continue normally"
|
||||
]
|
||||
},
|
||||
"1.4.5": {
|
||||
"content": [
|
||||
"• NEW: Minimum zoom level (Z15) enforced for adding and editing surveillance nodes to ensure precise positioning",
|
||||
"• NEW: Minimum zoom level (Z10) enforced for offline area downloads to prevent insanely large areas",
|
||||
"• IMPROVED: Offline area download confirmation now shows as popup with 'View Progress in Settings' button instead of snackbar"
|
||||
]
|
||||
},
|
||||
"1.4.4": {
|
||||
"content": [
|
||||
"• FOV range notation parsing - now supports OSM data like '90-270' (180° FOV centered at 180°)",
|
||||
"• Complex range notation support: 'ESE;90-125;290' displays multiple FOV cones correctly",
|
||||
"• Profiles now support optional specific FOV values",
|
||||
"• Smart cone rendering - variable FOV widths, 360° cameras show full circles"
|
||||
]
|
||||
},
|
||||
"1.4.3": {
|
||||
"content": [
|
||||
"• NEW: Proximity warning when placing nodes too close together - prevents accidental duplicate submissions"
|
||||
]
|
||||
},
|
||||
"1.4.2": {
|
||||
"content": [
|
||||
"• NEW: Dedicated 'Upload Queue' page - queue items are now shown in a proper list view instead of a popup",
|
||||
"• NEW: 'OpenStreetMap Account' page for managing OSM login and account settings",
|
||||
"• NEW: 'View My Edits on OSM' button takes you directly to your edit history on OpenStreetMap"
|
||||
]
|
||||
},
|
||||
"1.4.1": {
|
||||
"content": [
|
||||
"• NEW: 'Extract node from way/relation' option for constrained nodes (currently disabled while we decide what that means)"
|
||||
]
|
||||
},
|
||||
"1.4.0": {
|
||||
"content": [
|
||||
"• IMPROVED: Advanced editing options now only show apps available on your platform (iOS/Android)",
|
||||
"• Supported editors: Vespucci (Android), StreetComplete (Android), EveryDoor (both), Go Map!! (iOS)",
|
||||
"• Web editors (iD, RapiD) remain available on all platforms as before"
|
||||
]
|
||||
},
|
||||
"1.3.4": {
|
||||
"content": [
|
||||
"• NEW: 'Pause Upload Queue' toggle in Offline Settings - stops uploads while keeping live data access",
|
||||
"• Useful for metered connections or when you want to batch uploads later",
|
||||
"• FIXED: Sheets now resize when rotating between orientations"
|
||||
]
|
||||
},
|
||||
"1.3.3": {
|
||||
"content": [
|
||||
"• UX: Edits re-enabled. Only nodes which are part of ways/relations cannot be moved",
|
||||
"• NEW: Added builtin surveillance device profiles for Rekor and Axis Communications ALPR cameras",
|
||||
"• NEW: Advanced editing options - access iD Editor, RapiD, Vespucci, StreetComplete, and other OSM editors",
|
||||
"• NEW: 'View on OSM' links to see nodes directly on OpenStreetMap website",
|
||||
"• UX: Auto-clickable URLs in all tag values - any URL becomes a tappable link",
|
||||
"• UX: Tag lists now scroll with max height to keep buttons and map visible"
|
||||
]
|
||||
},
|
||||
"1.3.2": {
|
||||
"content": [
|
||||
"• HOTFIX: Temporarily disabled node editing to prevent OSM database issues while a bug is resolved",
|
||||
"• UX: Fixed Android navigation bar covering settings page content"
|
||||
]
|
||||
},
|
||||
"1.3.1": {
|
||||
"content": [
|
||||
"• UX: Network status indicator always enabled",
|
||||
"• UX: Direction slider wider on small screens",
|
||||
"• UX: Fixed iOS keyboard missing 'Done' in settings",
|
||||
"• UX: Fixed multi-direction nodes in upload queue",
|
||||
"• UX: Improved suspected locations loading indicator; removed popup, fixed stuck spinner"
|
||||
]
|
||||
},
|
||||
"1.2.8": {
|
||||
"content": [
|
||||
"• UX: Profile selection is now a required step to prevent accidental submission of default profile",
|
||||
"• NEW: Note in welcome message about not submitting data you cannot vouch for personally (no street view etc)",
|
||||
"• NEW: Added default operator profiles for the most common private operators nationwide (Lowe's, Home Depot, et al)",
|
||||
"• NEW: Support for cardinal directions in OSM data, multiple directions on a node"
|
||||
]
|
||||
},
|
||||
"1.2.7": {
|
||||
"content": [
|
||||
"• NEW: Compass indicator shows map orientation; tap to spin north-up",
|
||||
"• Smart area caching: Loads 3x larger areas and refreshes data every 60 seconds for much faster browsing",
|
||||
"• Enhanced tile loading: Increased retry attempts with faster delays - tiles load much more reliably",
|
||||
"• Better network status: Simplified loading indicator logic",
|
||||
"• Instant node display: Surveillance devices now appear immediately when data finishes loading",
|
||||
"• Node limit alerts: Get notified when some nodes are not drawn"
|
||||
]
|
||||
},
|
||||
"1.2.4": {
|
||||
"content": [
|
||||
"• New welcome popup for first-time users with essential privacy information",
|
||||
"• Automatic changelog display when app updates (like this one!)",
|
||||
"• Added Release Notes viewer in Settings > About",
|
||||
"• Enhanced user onboarding and transparency about data handling",
|
||||
"• Improved documentation for contributors"
|
||||
]
|
||||
},
|
||||
"1.2.3": {
|
||||
"content": [
|
||||
"• Enhanced map performance and stability",
|
||||
"• Improved offline sync reliability",
|
||||
"• Added better error handling for uploads",
|
||||
"• Various bug fixes and improvements"
|
||||
]
|
||||
},
|
||||
"1.2.2": {
|
||||
"content": [
|
||||
"• New surveillance device profiles added",
|
||||
"• Improved tile loading performance",
|
||||
"• Fixed issue with GPS accuracy",
|
||||
"• Updated translations"
|
||||
]
|
||||
},
|
||||
"1.2.0": {
|
||||
"content": [
|
||||
"• Major UI improvements",
|
||||
"• Added proximity alerts",
|
||||
"• Enhanced offline capabilities",
|
||||
"• New suspected locations feature"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
🇺🇸 ENGLISH
|
||||
|
||||
DeFlock - Surveillance Transparency
|
||||
|
||||
DeFlock is a privacy-focused mobile app for mapping public surveillance infrastructure using OpenStreetMap. Document cameras, ALPRs, gunshot detectors, and other surveillance devices in your community to make this infrastructure visible and searchable.
|
||||
|
||||
• Offline-capable mapping with downloadable areas
|
||||
• Upload directly to OpenStreetMap with OAuth2
|
||||
• Built-in profiles for major manufacturers
|
||||
• Privacy-respecting - no user data collected
|
||||
• Multiple map tile providers (OSM, satellite imagery)
|
||||
|
||||
Part of the broader DeFlock initiative to promote surveillance transparency.
|
||||
|
||||
Visit: deflock.me
|
||||
Built with Flutter • Open Source
|
||||
|
||||
---
|
||||
|
||||
🇪🇸 ESPAÑOL
|
||||
|
||||
DeFlock - Transparencia en Vigilancia
|
||||
|
||||
DeFlock es una aplicación móvil enfocada en la privacidad para mapear infraestructura de vigilancia pública usando OpenStreetMap. Documenta cámaras, ALPRs, detectores de disparos y otros dispositivos de vigilancia en tu comunidad para hacer visible y consultable esta infraestructura.
|
||||
|
||||
• Mapeo con capacidad offline con áreas descargables
|
||||
• Subida directa a OpenStreetMap con OAuth2
|
||||
• Perfiles integrados para fabricantes principales
|
||||
• Respeta la privacidad - no se recopilan datos del usuario
|
||||
• Múltiples proveedores de mapas (OSM, imágenes satelitales)
|
||||
|
||||
Parte de la iniciativa más amplia DeFlock para promover la transparencia en vigilancia.
|
||||
|
||||
Visita: deflock.me
|
||||
Construido con Flutter • Código Abierto
|
||||
|
||||
---
|
||||
|
||||
🇫🇷 FRANÇAIS
|
||||
|
||||
DeFlock - Transparence de la Surveillance
|
||||
|
||||
DeFlock est une application mobile axée sur la confidentialité pour cartographier l'infrastructure de surveillance publique en utilisant OpenStreetMap. Documentez les caméras, ALPRs, détecteurs de coups de feu et autres dispositifs de surveillance dans votre communauté pour rendre cette infrastructure visible et consultable.
|
||||
|
||||
• Cartographie hors ligne avec zones téléchargeables
|
||||
• Upload direct vers OpenStreetMap avec OAuth2
|
||||
• Profils intégrés pour les principaux fabricants
|
||||
• Respectueux de la confidentialité - aucune donnée utilisateur collectée
|
||||
• Multiples fournisseurs de cartes (OSM, imagerie satellite)
|
||||
|
||||
Partie de l'initiative plus large DeFlock pour promouvoir la transparence de la surveillance.
|
||||
|
||||
Visitez : deflock.me
|
||||
Construit avec Flutter • Source Ouverte
|
||||
|
||||
---
|
||||
|
||||
🇩🇪 DEUTSCH
|
||||
|
||||
DeFlock - Überwachungs-Transparenz
|
||||
|
||||
DeFlock ist eine datenschutzorientierte mobile App zur Kartierung öffentlicher Überwachungsinfrastruktür mit OpenStreetMap. Dokumentieren Sie Kameras, ALPRs, Schussdetektoren und andere Überwachungsgeräte in Ihrer Gemeinde, um diese Infrastruktur sichtbar und durchsuchbar zu machen.
|
||||
|
||||
• Offline-fähige Kartierung mit herunterladbaren Bereichen
|
||||
• Direkter Upload zu OpenStreetMap mit OAuth2
|
||||
• Integrierte Profile für große Hersteller
|
||||
• Datenschutzfreundlich - keine Nutzerdaten gesammelt
|
||||
• Multiple Kartenanbieter (OSM, Satellitenbilder)
|
||||
|
||||
Teil der breiteren DeFlock-Initiative zur Förderung von Überwachungstransparenz.
|
||||
|
||||
Besuchen Sie: deflock.me
|
||||
Gebaut mit Flutter • Open Source
|
||||
10
build_keys.conf.example
Normal file
@@ -0,0 +1,10 @@
|
||||
# Local OSM client ID configuration for builds
|
||||
# Copy this file to build_keys.conf and fill in your values
|
||||
# This file is gitignored to keep your keys secret
|
||||
#
|
||||
# Get your client IDs from:
|
||||
# Production: https://www.openstreetmap.org/oauth2/applications
|
||||
# Sandbox: https://master.apis.dev.openstreetmap.org/oauth2/applications
|
||||
|
||||
OSM_PROD_CLIENTID=your_production_client_id_here
|
||||
OSM_SANDBOX_CLIENTID=your_sandbox_client_id_here
|
||||
68
do_builds.sh
@@ -4,6 +4,35 @@
|
||||
BUILD_IOS=true
|
||||
BUILD_ANDROID=true
|
||||
|
||||
# Function to read key=value from file
|
||||
read_from_file() {
|
||||
local key="$1"
|
||||
local file="build_keys.conf"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Read key=value pairs, ignoring comments and empty lines
|
||||
while IFS='=' read -r k v; do
|
||||
# Skip comments and empty lines
|
||||
if [[ "$k" =~ ^[[:space:]]*# ]] || [[ -z "$k" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Remove leading/trailing whitespace
|
||||
k=$(echo "$k" | xargs)
|
||||
v=$(echo "$v" | xargs)
|
||||
|
||||
if [ "$k" = "$key" ]; then
|
||||
echo "$v"
|
||||
return 0
|
||||
fi
|
||||
done < "$file"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
@@ -18,19 +47,52 @@ for arg in "$@"; do
|
||||
echo " --ios Build only iOS"
|
||||
echo " --android Build only Android"
|
||||
echo " (default builds both)"
|
||||
echo ""
|
||||
echo "OSM client IDs must be configured in build_keys.conf"
|
||||
echo "See build_keys.conf.example for format"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
appver=$(grep "kClientVersion" lib/dev_config.dart | cut -d '=' -f 2 | tr -d ';' | tr -d "\'" | tr -d " ")
|
||||
# Load client IDs from build_keys.conf
|
||||
if [ ! -f "build_keys.conf" ]; then
|
||||
echo "Error: build_keys.conf not found"
|
||||
echo "Copy build_keys.conf.example to build_keys.conf and fill in your OSM client IDs"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Loading OSM client IDs from build_keys.conf..."
|
||||
OSM_PROD_CLIENTID=$(read_from_file "OSM_PROD_CLIENTID")
|
||||
OSM_SANDBOX_CLIENTID=$(read_from_file "OSM_SANDBOX_CLIENTID")
|
||||
|
||||
# Check required keys
|
||||
if [ -z "$OSM_PROD_CLIENTID" ]; then
|
||||
echo "Error: OSM_PROD_CLIENTID not found in build_keys.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$OSM_SANDBOX_CLIENTID" ]; then
|
||||
echo "Error: OSM_SANDBOX_CLIENTID not found in build_keys.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build the dart-define arguments
|
||||
DART_DEFINE_ARGS="--dart-define=OSM_PROD_CLIENTID=$OSM_PROD_CLIENTID --dart-define=OSM_SANDBOX_CLIENTID=$OSM_SANDBOX_CLIENTID"
|
||||
|
||||
# Validate localizations before building
|
||||
echo "Validating localizations..."
|
||||
dart run scripts/validate_localizations.dart || exit 1
|
||||
echo
|
||||
|
||||
appver=$(grep "version:" pubspec.yaml | head -1 | cut -d ':' -f 2 | tr -d ' ' | cut -d '+' -f 1)
|
||||
echo
|
||||
echo "Building app version ${appver}..."
|
||||
echo
|
||||
|
||||
if [ "$BUILD_IOS" = true ]; then
|
||||
echo "Building iOS..."
|
||||
flutter build ios --no-codesign || exit 1
|
||||
flutter build ios --no-codesign $DART_DEFINE_ARGS || exit 1
|
||||
|
||||
echo "Converting .app to .ipa..."
|
||||
./app2ipa.sh build/ios/iphoneos/Runner.app || exit 1
|
||||
@@ -42,7 +104,7 @@ fi
|
||||
|
||||
if [ "$BUILD_ANDROID" = true ]; then
|
||||
echo "Building Android..."
|
||||
flutter build apk || exit 1
|
||||
flutter build apk $DART_DEFINE_ARGS || exit 1
|
||||
|
||||
echo "Moving Android files..."
|
||||
cp build/app/outputs/flutter-apk/app-release.apk "../deflock_v${appver}.apk" || exit 1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Generate splash screens..."
|
||||
flutter pub run flutter_native_splash:create
|
||||
echo
|
||||
echo
|
||||
echo "Generate icons..."
|
||||
flutter pub run flutter_launcher_icons:main
|
||||
dart run flutter_launcher_icons
|
||||
echo
|
||||
echo
|
||||
echo "Generate splash screens..."
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
@@ -470,7 +470,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = 7XG8T28436;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
@@ -479,6 +482,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.deflock.deflockapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "61f9fdb9-bf2d-4d94-b249-63155ee71e74";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
@@ -528,7 +532,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.flockMapApp.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.deflock.deflockapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
@@ -652,7 +656,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = 7XG8T28436;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
@@ -661,6 +668,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.deflock.deflockapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "61f9fdb9-bf2d-4d94-b249-63155ee71e74";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -674,15 +682,19 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = 7XG8T28436;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.flockMapApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.deflock.deflockapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "61f9fdb9-bf2d-4d94-b249-63155ee71e74";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"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":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"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":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@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"}}
|
||||
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 875 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB |
0
ios/Runner/Assets.xcassets/LaunchBackground.imageset/.gitkeep
vendored
Normal file
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "background.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 69 B |
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/.gitkeep
vendored
Normal file
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "LaunchImage.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 57 KiB |
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
@@ -25,7 +25,9 @@
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string>This app needs your location to show nearby cameras.</string>
|
||||
<string>This app optionally uses your location to show nearby cameras by centering the map on your location.</string>
|
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||
<string>This app optionally uses your location to center the map on your current position and provide proximity alerts for nearby surveillance devices. These features are entirely optional.</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'models/node_profile.dart';
|
||||
import 'models/operator_profile.dart';
|
||||
import 'models/osm_node.dart';
|
||||
import 'models/pending_upload.dart';
|
||||
import 'models/suspected_location.dart';
|
||||
import 'models/tile_provider.dart';
|
||||
import 'models/search_result.dart';
|
||||
import 'services/offline_area_service.dart';
|
||||
import 'services/node_cache.dart';
|
||||
import 'services/tile_preview_service.dart';
|
||||
import 'widgets/camera_provider_with_cache.dart';
|
||||
import 'services/changelog_service.dart';
|
||||
import 'services/operator_profile_service.dart';
|
||||
import 'widgets/node_provider_with_cache.dart';
|
||||
import 'services/profile_service.dart';
|
||||
import 'widgets/proximity_warning_dialog.dart';
|
||||
import 'widgets/reauth_messages_dialog.dart';
|
||||
import 'dev_config.dart';
|
||||
import 'state/auth_state.dart';
|
||||
import 'state/messages_state.dart';
|
||||
import 'state/navigation_state.dart';
|
||||
import 'state/operator_profile_state.dart';
|
||||
import 'state/profile_state.dart';
|
||||
import 'state/search_state.dart';
|
||||
import 'state/session_state.dart';
|
||||
import 'state/settings_state.dart';
|
||||
import 'state/suspected_location_state.dart';
|
||||
import 'state/upload_queue_state.dart';
|
||||
|
||||
// Re-export types
|
||||
export 'state/navigation_state.dart' show AppNavigationMode;
|
||||
export 'state/settings_state.dart' show UploadMode, FollowMeMode;
|
||||
export 'state/session_state.dart' show AddNodeSession, EditNodeSession;
|
||||
|
||||
@@ -28,29 +45,42 @@ class AppState extends ChangeNotifier {
|
||||
|
||||
// State modules
|
||||
late final AuthState _authState;
|
||||
late final MessagesState _messagesState;
|
||||
late final NavigationState _navigationState;
|
||||
late final OperatorProfileState _operatorProfileState;
|
||||
late final ProfileState _profileState;
|
||||
late final SearchState _searchState;
|
||||
late final SessionState _sessionState;
|
||||
late final SettingsState _settingsState;
|
||||
late final SuspectedLocationState _suspectedLocationState;
|
||||
late final UploadQueueState _uploadQueueState;
|
||||
|
||||
bool _isInitialized = false;
|
||||
Timer? _messageCheckTimer;
|
||||
|
||||
AppState() {
|
||||
instance = this;
|
||||
_authState = AuthState();
|
||||
_messagesState = MessagesState();
|
||||
_navigationState = NavigationState();
|
||||
_operatorProfileState = OperatorProfileState();
|
||||
_profileState = ProfileState();
|
||||
_searchState = SearchState();
|
||||
_sessionState = SessionState();
|
||||
_settingsState = SettingsState();
|
||||
_suspectedLocationState = SuspectedLocationState();
|
||||
_uploadQueueState = UploadQueueState();
|
||||
|
||||
// Set up state change listeners
|
||||
_authState.addListener(_onStateChanged);
|
||||
_messagesState.addListener(_onStateChanged);
|
||||
_navigationState.addListener(_onStateChanged);
|
||||
_operatorProfileState.addListener(_onStateChanged);
|
||||
_profileState.addListener(_onStateChanged);
|
||||
_searchState.addListener(_onStateChanged);
|
||||
_sessionState.addListener(_onStateChanged);
|
||||
_settingsState.addListener(_onStateChanged);
|
||||
_suspectedLocationState.addListener(_onStateChanged);
|
||||
_uploadQueueState.addListener(_onStateChanged);
|
||||
|
||||
_init();
|
||||
@@ -63,6 +93,37 @@ class AppState extends ChangeNotifier {
|
||||
bool get isLoggedIn => _authState.isLoggedIn;
|
||||
String get username => _authState.username;
|
||||
|
||||
// Navigation state - simplified
|
||||
AppNavigationMode get navigationMode => _navigationState.mode;
|
||||
LatLng? get provisionalPinLocation => _navigationState.provisionalPinLocation;
|
||||
String? get provisionalPinAddress => _navigationState.provisionalPinAddress;
|
||||
bool get showProvisionalPin => _navigationState.showProvisionalPin;
|
||||
bool get isInSearchMode => _navigationState.isInSearchMode;
|
||||
bool get isInRouteMode => _navigationState.isInRouteMode;
|
||||
bool get hasActiveRoute => _navigationState.hasActiveRoute;
|
||||
bool get showSearchButton => _navigationState.showSearchButton;
|
||||
bool get showRouteButton => _navigationState.showRouteButton;
|
||||
List<LatLng>? get routePath => _navigationState.routePath;
|
||||
|
||||
// Route state
|
||||
LatLng? get routeStart => _navigationState.routeStart;
|
||||
LatLng? get routeEnd => _navigationState.routeEnd;
|
||||
String? get routeStartAddress => _navigationState.routeStartAddress;
|
||||
String? get routeEndAddress => _navigationState.routeEndAddress;
|
||||
double? get routeDistance => _navigationState.routeDistance;
|
||||
bool get settingRouteStart => _navigationState.settingRouteStart;
|
||||
bool get isSettingSecondPoint => _navigationState.isSettingSecondPoint;
|
||||
bool get areRoutePointsTooClose => _navigationState.areRoutePointsTooClose;
|
||||
bool get isCalculating => _navigationState.isCalculating;
|
||||
bool get showingOverview => _navigationState.showingOverview;
|
||||
String? get routingError => _navigationState.routingError;
|
||||
bool get hasRoutingError => _navigationState.hasRoutingError;
|
||||
|
||||
// Navigation search state
|
||||
bool get isNavigationSearchLoading => _navigationState.isSearchLoading;
|
||||
List<SearchResult> get navigationSearchResults => _navigationState.searchResults;
|
||||
int get navigationAvoidanceDistance => _settingsState.navigationAvoidanceDistance;
|
||||
|
||||
// Profile state
|
||||
List<NodeProfile> get profiles => _profileState.profiles;
|
||||
List<NodeProfile> get enabledProfiles => _profileState.enabledProfiles;
|
||||
@@ -71,17 +132,31 @@ class AppState extends ChangeNotifier {
|
||||
// Operator profile state
|
||||
List<OperatorProfile> get operatorProfiles => _operatorProfileState.profiles;
|
||||
|
||||
// Search state
|
||||
bool get isSearchLoading => _searchState.isLoading;
|
||||
List<SearchResult> get searchResults => _searchState.results;
|
||||
String get lastSearchQuery => _searchState.lastQuery;
|
||||
|
||||
// Session state
|
||||
AddNodeSession? get session => _sessionState.session;
|
||||
EditNodeSession? get editSession => _sessionState.editSession;
|
||||
|
||||
// Settings state
|
||||
bool get offlineMode => _settingsState.offlineMode;
|
||||
int get maxCameras => _settingsState.maxCameras;
|
||||
bool get pauseQueueProcessing => _settingsState.pauseQueueProcessing;
|
||||
int get maxNodes => _settingsState.maxNodes;
|
||||
UploadMode get uploadMode => _settingsState.uploadMode;
|
||||
FollowMeMode get followMeMode => _settingsState.followMeMode;
|
||||
|
||||
bool get proximityAlertsEnabled => _settingsState.proximityAlertsEnabled;
|
||||
int get proximityAlertDistance => _settingsState.proximityAlertDistance;
|
||||
bool get networkStatusIndicatorEnabled => _settingsState.networkStatusIndicatorEnabled;
|
||||
int get suspectedLocationMinDistance => _settingsState.suspectedLocationMinDistance;
|
||||
|
||||
// Messages state
|
||||
int? get unreadMessageCount => _messagesState.unreadCount;
|
||||
bool get hasUnreadMessages => _messagesState.hasUnreadMessages;
|
||||
bool get isCheckingMessages => _messagesState.isChecking;
|
||||
|
||||
// Tile provider state
|
||||
List<TileProvider> get tileProviders => _settingsState.tileProviders;
|
||||
@@ -94,6 +169,12 @@ class AppState extends ChangeNotifier {
|
||||
int get pendingCount => _uploadQueueState.pendingCount;
|
||||
List<PendingUpload> get pendingUploads => _uploadQueueState.pendingUploads;
|
||||
|
||||
// Suspected location state
|
||||
SuspectedLocation? get selectedSuspectedLocation => _suspectedLocationState.selectedLocation;
|
||||
bool get suspectedLocationsEnabled => _suspectedLocationState.isEnabled;
|
||||
bool get suspectedLocationsLoading => _suspectedLocationState.isLoading;
|
||||
DateTime? get suspectedLocationsLastFetch => _suspectedLocationState.lastFetchTime;
|
||||
|
||||
void _onStateChanged() {
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -103,14 +184,48 @@ class AppState extends ChangeNotifier {
|
||||
// Initialize all state modules
|
||||
await _settingsState.init();
|
||||
|
||||
// Initialize changelog service
|
||||
await ChangelogService().init();
|
||||
|
||||
// Attempt to fetch missing tile type preview tiles (fails silently)
|
||||
_fetchMissingTilePreviews();
|
||||
|
||||
await _operatorProfileState.init();
|
||||
await _profileState.init();
|
||||
// Check if we should add default profiles (first launch OR no profiles of each type exist)
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
const firstLaunchKey = 'profiles_defaults_initialized';
|
||||
final isFirstLaunch = !(prefs.getBool(firstLaunchKey) ?? false);
|
||||
|
||||
// Load existing profiles to check each type independently
|
||||
final existingOperatorProfiles = await OperatorProfileService().load();
|
||||
final existingNodeProfiles = await ProfileService().load();
|
||||
|
||||
final shouldAddOperatorDefaults = isFirstLaunch || existingOperatorProfiles.isEmpty;
|
||||
final shouldAddNodeDefaults = isFirstLaunch || existingNodeProfiles.isEmpty;
|
||||
|
||||
await _operatorProfileState.init(addDefaults: shouldAddOperatorDefaults);
|
||||
await _profileState.init(addDefaults: shouldAddNodeDefaults);
|
||||
|
||||
// Mark defaults as initialized if this was first launch
|
||||
if (isFirstLaunch) {
|
||||
await prefs.setBool(firstLaunchKey, true);
|
||||
}
|
||||
|
||||
await _suspectedLocationState.init(offlineMode: _settingsState.offlineMode);
|
||||
await _uploadQueueState.init();
|
||||
await _authState.init(_settingsState.uploadMode);
|
||||
|
||||
// Set up callback to repopulate pending nodes after cache clears
|
||||
NodeProviderWithCache.instance.setOnCacheClearedCallback(() {
|
||||
_uploadQueueState.repopulateCacheFromQueue();
|
||||
});
|
||||
|
||||
// Check for messages on app launch if user is already logged in
|
||||
if (isLoggedIn) {
|
||||
checkMessages();
|
||||
}
|
||||
|
||||
// Note: Re-auth check will be triggered from home screen after init
|
||||
|
||||
// Initialize OfflineAreaService to ensure offline areas are loaded
|
||||
await OfflineAreaService().ensureInitialized();
|
||||
|
||||
@@ -118,16 +233,40 @@ class AppState extends ChangeNotifier {
|
||||
_startUploader();
|
||||
|
||||
_isInitialized = true;
|
||||
|
||||
// Start periodic message checking
|
||||
_startMessageCheckTimer();
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void _startMessageCheckTimer() {
|
||||
_messageCheckTimer?.cancel();
|
||||
|
||||
// Check messages every 10 minutes when logged in
|
||||
_messageCheckTimer = Timer.periodic(
|
||||
const Duration(minutes: 10),
|
||||
(timer) {
|
||||
if (isLoggedIn) {
|
||||
checkMessages();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// ---------- Auth Methods ----------
|
||||
Future<void> login() async {
|
||||
await _authState.login();
|
||||
// Check for messages after successful login
|
||||
if (isLoggedIn) {
|
||||
checkMessages();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> logout() async {
|
||||
await _authState.logout();
|
||||
// Clear message state when logging out
|
||||
clearMessages();
|
||||
}
|
||||
|
||||
Future<void> refreshAuthState() async {
|
||||
@@ -136,11 +275,103 @@ class AppState extends ChangeNotifier {
|
||||
|
||||
Future<void> forceLogin() async {
|
||||
await _authState.forceLogin();
|
||||
// Check for messages after successful login
|
||||
if (isLoggedIn) {
|
||||
checkMessages();
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> validateToken() async {
|
||||
return await _authState.validateToken();
|
||||
}
|
||||
|
||||
// ---------- Messages Methods ----------
|
||||
Future<void> checkMessages({bool forceRefresh = false}) async {
|
||||
final accessToken = await _authState.getAccessToken();
|
||||
await _messagesState.checkMessages(
|
||||
accessToken: accessToken,
|
||||
uploadMode: uploadMode,
|
||||
forceRefresh: forceRefresh,
|
||||
);
|
||||
}
|
||||
|
||||
String getMessagesUrl() {
|
||||
return _messagesState.getMessagesUrl(uploadMode);
|
||||
}
|
||||
|
||||
void clearMessages() {
|
||||
_messagesState.clearMessages();
|
||||
}
|
||||
|
||||
/// Check if the current OAuth token has required scopes for message notifications
|
||||
/// Returns true if re-authentication is needed
|
||||
Future<bool> needsReauthForMessages() async {
|
||||
// Only check if logged in and not in simulate mode
|
||||
if (!isLoggedIn || uploadMode == UploadMode.simulate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final accessToken = await _authState.getAccessToken();
|
||||
if (accessToken == null) return false;
|
||||
|
||||
try {
|
||||
// Try to fetch user details - this should include message data if scope is correct
|
||||
final response = await http.get(
|
||||
Uri.parse('${_getApiHost()}/api/0.6/user/details.json'),
|
||||
headers: {'Authorization': 'Bearer $accessToken'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 403) {
|
||||
// Forbidden - likely missing scope
|
||||
return true;
|
||||
}
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
final data = jsonDecode(response.body);
|
||||
final messages = data['user']?['messages'];
|
||||
// If messages field is missing, we might not have the right scope
|
||||
return messages == null;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
// On error, assume no re-auth needed to avoid annoying users
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Show re-authentication dialog if needed
|
||||
Future<void> checkAndPromptReauthForMessages(BuildContext context) async {
|
||||
if (await needsReauthForMessages()) {
|
||||
_showReauthDialog(context);
|
||||
}
|
||||
}
|
||||
|
||||
void _showReauthDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => ReauthMessagesDialog(
|
||||
onReauth: () {
|
||||
// Navigate to OSM account page where user can re-authenticate
|
||||
Navigator.of(context).pushNamed('/settings/osm-account');
|
||||
},
|
||||
onDismiss: () {
|
||||
// Just dismiss - will show again on next app start or mode change
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getApiHost() {
|
||||
switch (uploadMode) {
|
||||
case UploadMode.production:
|
||||
return 'https://api.openstreetmap.org';
|
||||
case UploadMode.sandbox:
|
||||
return 'https://api06.dev.openstreetmap.org';
|
||||
case UploadMode.simulate:
|
||||
return 'https://api.openstreetmap.org';
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- Profile Methods ----------
|
||||
void toggleProfile(NodeProfile p, bool e) {
|
||||
@@ -192,14 +423,35 @@ class AppState extends ChangeNotifier {
|
||||
NodeProfile? profile,
|
||||
OperatorProfile? operatorProfile,
|
||||
LatLng? target,
|
||||
bool? extractFromWay,
|
||||
}) {
|
||||
_sessionState.updateEditSession(
|
||||
directionDeg: directionDeg,
|
||||
profile: profile,
|
||||
operatorProfile: operatorProfile,
|
||||
target: target,
|
||||
extractFromWay: extractFromWay,
|
||||
);
|
||||
}
|
||||
|
||||
// For map view to check for pending snap backs
|
||||
LatLng? consumePendingSnapBack() {
|
||||
return _sessionState.consumePendingSnapBack();
|
||||
}
|
||||
|
||||
void addDirection() {
|
||||
_sessionState.addDirection();
|
||||
}
|
||||
|
||||
void removeDirection() {
|
||||
_sessionState.removeDirection();
|
||||
}
|
||||
|
||||
void cycleDirection() {
|
||||
_sessionState.cycleDirection();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void cancelSession() {
|
||||
_sessionState.cancelSession();
|
||||
@@ -230,6 +482,77 @@ class AppState extends ChangeNotifier {
|
||||
_startUploader();
|
||||
}
|
||||
|
||||
// ---------- Search Methods ----------
|
||||
Future<void> search(String query) async {
|
||||
await _searchState.search(query);
|
||||
}
|
||||
|
||||
void clearSearchResults() {
|
||||
_searchState.clearResults();
|
||||
}
|
||||
|
||||
// ---------- Navigation Methods - Simplified ----------
|
||||
void enterSearchMode(LatLng mapCenter) {
|
||||
_navigationState.enterSearchMode(mapCenter);
|
||||
}
|
||||
|
||||
void cancelNavigation() {
|
||||
_navigationState.cancel();
|
||||
}
|
||||
|
||||
void updateProvisionalPinLocation(LatLng newLocation) {
|
||||
_navigationState.updateProvisionalPinLocation(newLocation);
|
||||
}
|
||||
|
||||
void selectSearchResult(SearchResult result) {
|
||||
_navigationState.selectSearchResult(result);
|
||||
}
|
||||
|
||||
void startRoutePlanning({required bool thisLocationIsStart}) {
|
||||
_navigationState.startRoutePlanning(thisLocationIsStart: thisLocationIsStart);
|
||||
}
|
||||
|
||||
void selectSecondRoutePoint() {
|
||||
_navigationState.selectSecondRoutePoint();
|
||||
}
|
||||
|
||||
void startRoute() {
|
||||
_navigationState.startRoute();
|
||||
|
||||
// Auto-enable follow-me if user is near the start point
|
||||
// We need to get user location from the GPS controller
|
||||
// This will be handled in HomeScreen where we have access to MapView
|
||||
}
|
||||
|
||||
bool shouldAutoEnableFollowMe(LatLng? userLocation) {
|
||||
return _navigationState.shouldAutoEnableFollowMe(userLocation);
|
||||
}
|
||||
|
||||
void showRouteOverview() {
|
||||
_navigationState.showRouteOverview();
|
||||
}
|
||||
|
||||
void hideRouteOverview() {
|
||||
_navigationState.hideRouteOverview();
|
||||
}
|
||||
|
||||
void cancelRoute() {
|
||||
_navigationState.cancelRoute();
|
||||
}
|
||||
|
||||
// Navigation search methods
|
||||
Future<void> searchNavigation(String query) async {
|
||||
await _navigationState.search(query);
|
||||
}
|
||||
|
||||
void clearNavigationSearchResults() {
|
||||
_navigationState.clearSearchResults();
|
||||
}
|
||||
|
||||
void retryRouteCalculation() {
|
||||
_navigationState.retryRouteCalculation();
|
||||
}
|
||||
|
||||
// ---------- Settings Methods ----------
|
||||
Future<void> setOfflineMode(bool enabled) async {
|
||||
await _settingsState.setOfflineMode(enabled);
|
||||
@@ -242,18 +565,36 @@ class AppState extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
set maxCameras(int n) {
|
||||
_settingsState.maxCameras = n;
|
||||
Future<void> setPauseQueueProcessing(bool enabled) async {
|
||||
await _settingsState.setPauseQueueProcessing(enabled);
|
||||
if (!enabled) {
|
||||
_startUploader(); // Resume upload queue processing
|
||||
} else {
|
||||
_uploadQueueState.stopUploader(); // Stop uploader when paused
|
||||
}
|
||||
}
|
||||
|
||||
set maxNodes(int n) {
|
||||
_settingsState.maxNodes = n;
|
||||
}
|
||||
|
||||
Future<void> setUploadMode(UploadMode mode) async {
|
||||
// Clear node cache when switching upload modes to prevent mixing production/sandbox data
|
||||
NodeCache.instance.clear();
|
||||
CameraProviderWithCache.instance.notifyListeners();
|
||||
debugPrint('[AppState] Cleared node cache due to upload mode change');
|
||||
|
||||
await _settingsState.setUploadMode(mode);
|
||||
await _authState.onUploadModeChanged(mode);
|
||||
|
||||
// Clear and re-check messages for new mode
|
||||
clearMessages();
|
||||
if (isLoggedIn) {
|
||||
// Don't await - let it run in background
|
||||
checkMessages();
|
||||
|
||||
// Note: Re-auth check will be triggered from the settings screen after mode change
|
||||
}
|
||||
|
||||
_startUploader(); // Restart uploader with new mode
|
||||
}
|
||||
|
||||
@@ -276,7 +617,7 @@ class AppState extends ChangeNotifier {
|
||||
Future<void> setFollowMeMode(FollowMeMode mode) async {
|
||||
await _settingsState.setFollowMeMode(mode);
|
||||
}
|
||||
|
||||
|
||||
/// Set proximity alerts enabled/disabled
|
||||
Future<void> setProximityAlertsEnabled(bool enabled) async {
|
||||
await _settingsState.setProximityAlertsEnabled(enabled);
|
||||
@@ -287,6 +628,29 @@ class AppState extends ChangeNotifier {
|
||||
await _settingsState.setProximityAlertDistance(distance);
|
||||
}
|
||||
|
||||
/// Set network status indicator enabled/disabled
|
||||
Future<void> setNetworkStatusIndicatorEnabled(bool enabled) async {
|
||||
await _settingsState.setNetworkStatusIndicatorEnabled(enabled);
|
||||
}
|
||||
|
||||
/// Migrate upload queue to new two-stage changeset system (v1.5.3)
|
||||
Future<void> migrateUploadQueueToTwoStageSystem() async {
|
||||
// Migration is handled automatically in PendingUpload.fromJson via _migrateFromLegacyFields
|
||||
// This method triggers a queue reload to apply migrations
|
||||
await _uploadQueueState.reloadQueue();
|
||||
debugPrint('[AppState] Upload queue migration completed');
|
||||
}
|
||||
|
||||
/// Set suspected location minimum distance from real nodes
|
||||
Future<void> setSuspectedLocationMinDistance(int distance) async {
|
||||
await _settingsState.setSuspectedLocationMinDistance(distance);
|
||||
}
|
||||
|
||||
/// Set navigation avoidance distance
|
||||
Future<void> setNavigationAvoidanceDistance(int distance) async {
|
||||
await _settingsState.setNavigationAvoidanceDistance(distance);
|
||||
}
|
||||
|
||||
// ---------- Queue Methods ----------
|
||||
void clearQueue() {
|
||||
_uploadQueueState.clearQueue();
|
||||
@@ -301,6 +665,37 @@ class AppState extends ChangeNotifier {
|
||||
_startUploader(); // resume uploader if not busy
|
||||
}
|
||||
|
||||
// ---------- Suspected Location Methods ----------
|
||||
Future<void> setSuspectedLocationsEnabled(bool enabled) async {
|
||||
await _suspectedLocationState.setEnabled(enabled);
|
||||
}
|
||||
|
||||
Future<bool> refreshSuspectedLocations() async {
|
||||
return await _suspectedLocationState.refreshData();
|
||||
}
|
||||
|
||||
void selectSuspectedLocation(SuspectedLocation location) {
|
||||
_suspectedLocationState.selectLocation(location);
|
||||
}
|
||||
|
||||
void clearSuspectedLocationSelection() {
|
||||
_suspectedLocationState.clearSelection();
|
||||
}
|
||||
|
||||
List<SuspectedLocation> getSuspectedLocationsInBounds({
|
||||
required double north,
|
||||
required double south,
|
||||
required double east,
|
||||
required double west,
|
||||
}) {
|
||||
return _suspectedLocationState.getLocationsInBounds(
|
||||
north: north,
|
||||
south: south,
|
||||
east: east,
|
||||
west: west,
|
||||
);
|
||||
}
|
||||
|
||||
// ---------- Private Methods ----------
|
||||
/// Attempts to fetch missing tile preview images in the background (fire and forget)
|
||||
void _fetchMissingTilePreviews() {
|
||||
@@ -314,6 +709,7 @@ class AppState extends ChangeNotifier {
|
||||
void _startUploader() {
|
||||
_uploadQueueState.startUploader(
|
||||
offlineMode: offlineMode,
|
||||
pauseQueueProcessing: pauseQueueProcessing,
|
||||
uploadMode: uploadMode,
|
||||
getAccessToken: _authState.getAccessToken,
|
||||
);
|
||||
@@ -321,11 +717,16 @@ class AppState extends ChangeNotifier {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_messageCheckTimer?.cancel();
|
||||
_authState.removeListener(_onStateChanged);
|
||||
_messagesState.removeListener(_onStateChanged);
|
||||
_navigationState.removeListener(_onStateChanged);
|
||||
_operatorProfileState.removeListener(_onStateChanged);
|
||||
_profileState.removeListener(_onStateChanged);
|
||||
_searchState.removeListener(_onStateChanged);
|
||||
_sessionState.removeListener(_onStateChanged);
|
||||
_settingsState.removeListener(_onStateChanged);
|
||||
_suspectedLocationState.removeListener(_onStateChanged);
|
||||
_uploadQueueState.removeListener(_onStateChanged);
|
||||
|
||||
_uploadQueueState.dispose();
|
||||
|
||||
@@ -12,9 +12,12 @@ const int kPreviewTileY = 101300;
|
||||
const int kPreviewTileX = 41904;
|
||||
|
||||
// Direction cone for map view
|
||||
const double kDirectionConeHalfAngle = 30.0; // degrees
|
||||
const double kDirectionConeBaseLength = 0.001; // multiplier
|
||||
const Color kDirectionConeColor = Color(0xFF000000); // FOV cone color
|
||||
const double kDirectionConeHalfAngle = 35.0; // degrees
|
||||
const double kDirectionConeBaseLength = 5; // multiplier
|
||||
const Color kDirectionConeColor = Color(0xD0767474); // FOV cone color
|
||||
const double kDirectionConeOpacity = 0.5; // Fill opacity for FOV cones
|
||||
// Base values for thickness - use helper functions below for pixel-ratio scaling
|
||||
const double _kDirectionConeBorderWidthBase = 1.6;
|
||||
|
||||
// Bottom button bar positioning
|
||||
const double kBottomButtonBarOffset = 4.0; // Distance from screen bottom (above safe area)
|
||||
@@ -31,45 +34,116 @@ double bottomPositionFromButtonBar(double spacingAboveButtonBar, double safeArea
|
||||
return safeAreaBottom + kBottomButtonBarOffset + kButtonBarHeight + spacingAboveButtonBar;
|
||||
}
|
||||
|
||||
// Add Camera icon vertical offset (no offset needed since circle is centered)
|
||||
const double kAddPinYOffset = 0.0;
|
||||
// Helper to get left positioning that accounts for safe area (for landscape mode)
|
||||
double leftPositionWithSafeArea(double baseLeft, EdgeInsets safeArea) {
|
||||
return baseLeft + safeArea.left;
|
||||
}
|
||||
|
||||
// Client name and version for OSM uploads ("created_by" tag)
|
||||
// Helper to get right positioning that accounts for safe area (for landscape mode)
|
||||
double rightPositionWithSafeArea(double baseRight, EdgeInsets safeArea) {
|
||||
return baseRight + safeArea.right;
|
||||
}
|
||||
|
||||
// Helper to get top positioning that accounts for safe area
|
||||
double topPositionWithSafeArea(double baseTop, EdgeInsets safeArea) {
|
||||
return baseTop + safeArea.top;
|
||||
}
|
||||
|
||||
// Client name for OSM uploads ("created_by" tag)
|
||||
const String kClientName = 'DeFlock';
|
||||
const String kClientVersion = '1.0.0';
|
||||
// Note: Version is now dynamically retrieved from VersionService
|
||||
|
||||
// Upload and changeset configuration
|
||||
const Duration kUploadHttpTimeout = Duration(seconds: 30); // HTTP request timeout for uploads
|
||||
const Duration kChangesetCloseInitialRetryDelay = Duration(seconds: 10);
|
||||
const Duration kChangesetCloseMaxRetryDelay = Duration(minutes: 5); // Cap at 5 minutes
|
||||
const Duration kChangesetAutoCloseTimeout = Duration(minutes: 59); // Give up and trust OSM auto-close
|
||||
const double kChangesetCloseBackoffMultiplier = 2.0;
|
||||
|
||||
// Navigation routing configuration
|
||||
const Duration kNavigationRoutingTimeout = Duration(seconds: 30); // HTTP timeout for routing requests
|
||||
|
||||
// Suspected locations CSV URL
|
||||
const String kSuspectedLocationsCsvUrl = 'https://alprwatch.org/suspected-locations/deflock-latest.csv';
|
||||
|
||||
// Development/testing features - set to false for production builds
|
||||
const bool kEnableDevelopmentModes = false; // Set to false to hide sandbox/simulate modes and force production mode
|
||||
|
||||
// Navigation features - set to false to hide navigation UI elements while in development
|
||||
const bool kEnableNavigationFeatures = true; // Hide navigation until fully implemented
|
||||
|
||||
// Node editing features - set to false to temporarily disable editing
|
||||
const bool kEnableNodeEdits = true; // Set to false to temporarily disable node editing
|
||||
|
||||
// Node extraction features - set to false to hide extract functionality for constrained nodes
|
||||
const bool kEnableNodeExtraction = false; // Set to true to enable extract from way/relation feature (WIP)
|
||||
|
||||
/// Navigation availability: only dev builds, and only when online
|
||||
bool enableNavigationFeatures({required bool offlineMode}) {
|
||||
return kEnableNavigationFeatures && !offlineMode;
|
||||
}
|
||||
|
||||
// Marker/node interaction
|
||||
const int kCameraMinZoomLevel = 10; // Minimum zoom to show nodes (Overpass)
|
||||
const int kNodeMinZoomLevel = 10; // Minimum zoom to show nodes (Overpass)
|
||||
const int kOsmApiMinZoomLevel = 13; // Minimum zoom for OSM API bbox queries (sandbox mode)
|
||||
const int kMinZoomForNodeEditingSheets = 15; // Minimum zoom to open add/edit node sheets
|
||||
const int kMinZoomForOfflineDownload = 10; // Minimum zoom to download offline areas (prevents large area crashes)
|
||||
const Duration kMarkerTapTimeout = Duration(milliseconds: 250);
|
||||
const Duration kDebounceCameraRefresh = Duration(milliseconds: 500);
|
||||
|
||||
// Pre-fetch area configuration
|
||||
const double kPreFetchAreaExpansionMultiplier = 3.0; // Expand visible bounds by this factor for pre-fetching
|
||||
const int kPreFetchZoomLevel = 10; // Always pre-fetch at this zoom level for consistent area sizes
|
||||
const int kMaxPreFetchSplitDepth = 3; // Maximum recursive splits when hitting Overpass node limit
|
||||
|
||||
// Data refresh configuration
|
||||
const int kDataRefreshIntervalSeconds = 60; // Refresh cached data after this many seconds
|
||||
|
||||
// Follow-me mode smooth transitions
|
||||
const Duration kFollowMeAnimationDuration = Duration(milliseconds: 600);
|
||||
const double kMinSpeedForRotationMps = 1.0; // Minimum speed (m/s) to apply rotation
|
||||
|
||||
// Sheet content configuration
|
||||
const double kMaxTagListHeightRatioPortrait = 0.3; // Maximum height for tag lists in portrait mode
|
||||
const double kMaxTagListHeightRatioLandscape = 0.2; // Maximum height for tag lists in landscape mode
|
||||
|
||||
/// Get appropriate tag list height ratio based on screen orientation
|
||||
double getTagListHeightRatio(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
final isLandscape = size.width > size.height;
|
||||
return isLandscape ? kMaxTagListHeightRatioLandscape : kMaxTagListHeightRatioPortrait;
|
||||
}
|
||||
|
||||
// Proximity alerts configuration
|
||||
const int kProximityAlertDefaultDistance = 200; // meters
|
||||
const int kProximityAlertDefaultDistance = 400; // meters
|
||||
const int kProximityAlertMinDistance = 50; // meters
|
||||
const int kProximityAlertMaxDistance = 1000; // meters
|
||||
const int kProximityAlertMaxDistance = 1600; // meters
|
||||
const Duration kProximityAlertCooldown = Duration(minutes: 10); // Cooldown between alerts for same node
|
||||
|
||||
// Last map location and settings storage
|
||||
const String kLastMapLatKey = 'last_map_latitude';
|
||||
const String kLastMapLngKey = 'last_map_longitude';
|
||||
const String kLastMapZoomKey = 'last_map_zoom';
|
||||
// Node proximity warning configuration (for new/edited nodes that are too close to existing ones)
|
||||
const double kNodeProximityWarningDistance = 15.0; // meters - distance threshold to show warning
|
||||
|
||||
// Tile/OSM fetch retry parameters (for tunable backoff)
|
||||
const int kTileFetchMaxAttempts = 3;
|
||||
const int kTileFetchInitialDelayMs = 4000;
|
||||
const int kTileFetchJitter1Ms = 1000;
|
||||
const int kTileFetchSecondDelayMs = 15000;
|
||||
const int kTileFetchJitter2Ms = 4000;
|
||||
const int kTileFetchThirdDelayMs = 60000;
|
||||
const int kTileFetchJitter3Ms = 5000;
|
||||
// Navigation route planning configuration
|
||||
const double kNavigationMinRouteDistance = 100.0; // meters - minimum distance between start and end points
|
||||
|
||||
// Node display configuration
|
||||
const int kDefaultMaxNodes = 500; // Default maximum number of nodes to render on the map at once
|
||||
|
||||
// Map interaction configuration
|
||||
const double kNodeDoubleTapZoomDelta = 1.0; // How much to zoom in when double-tapping nodes (was 1.0)
|
||||
const double kScrollWheelVelocity = 0.01; // Mouse scroll wheel zoom speed (default 0.005)
|
||||
const double kPinchZoomThreshold = 0.2; // How much pinch required to start zoom (reduced for gesture race)
|
||||
const double kPinchMoveThreshold = 30.0; // How much drag required for two-finger pan (default 40.0)
|
||||
const double kRotationThreshold = 6.0; // Degrees of rotation required before map actually rotates (Google Maps style)
|
||||
|
||||
// Tile fetch configuration (brutalist approach: simple, configurable, unlimited retries)
|
||||
const int kTileFetchConcurrentThreads = 8; // Reduced from 10 to 8 for better cross-platform performance
|
||||
const int kTileFetchInitialDelayMs = 150; // Reduced from 200ms for faster retries
|
||||
const double kTileFetchBackoffMultiplier = 1.4; // Slightly reduced for faster recovery
|
||||
const int kTileFetchMaxDelayMs = 4000; // Reduced from 5000ms for faster max retry
|
||||
const int kTileFetchRandomJitterMs = 50; // Reduced jitter for more predictable timing
|
||||
const int kTileFetchMaxQueueSize = 100; // Reasonable queue size to prevent memory bloat
|
||||
// Note: Removed max attempts - tiles retry indefinitely until they succeed or are canceled
|
||||
|
||||
// User download max zoom span (user can download up to kMaxUserDownloadZoomSpan zooms above min)
|
||||
const int kMaxUserDownloadZoomSpan = 7;
|
||||
@@ -77,15 +151,31 @@ const int kMaxUserDownloadZoomSpan = 7;
|
||||
// Download area limits and constants
|
||||
const int kMaxReasonableTileCount = 20000;
|
||||
const int kAbsoluteMaxTileCount = 50000;
|
||||
const int kAbsoluteMaxZoom = 19;
|
||||
const int kAbsoluteMaxZoom = 23;
|
||||
|
||||
// Node icon configuration
|
||||
const double kNodeIconDiameter = 18.0;
|
||||
const double _kNodeRingThicknessBase = 2.5;
|
||||
const double kNodeDotOpacity = 0.3; // Opacity for the grey dot interior
|
||||
const Color kNodeRingColorReal = Color(0xFF3036F0); // Real nodes from OSM - blue
|
||||
const Color kNodeRingColorMock = Color(0xD0FFFFFF); // Add node mock point - white
|
||||
const Color kNodeRingColorPending = Color(0xD09C27B0); // Submitted/pending nodes - purple
|
||||
const Color kNodeRingColorEditing = Color(0xD0FF9800); // Node being edited - orange
|
||||
const Color kNodeRingColorPendingEdit = Color(0xD0757575); // Original node with pending edit - grey
|
||||
const Color kNodeRingColorPendingDeletion = Color(0xC0F44336); // Node pending deletion - red, slightly transparent
|
||||
|
||||
// Direction slider control buttons configuration
|
||||
const double kDirectionButtonMinWidth = 22.0;
|
||||
const double kDirectionButtonMinHeight = 32.0;
|
||||
|
||||
// Helper functions for pixel-ratio scaling
|
||||
double getDirectionConeBorderWidth(BuildContext context) {
|
||||
// return _kDirectionConeBorderWidthBase * MediaQuery.of(context).devicePixelRatio;
|
||||
return _kDirectionConeBorderWidthBase;
|
||||
}
|
||||
|
||||
double getNodeRingThickness(BuildContext context) {
|
||||
// return _kNodeRingThicknessBase * MediaQuery.of(context).devicePixelRatio;
|
||||
return _kNodeRingThicknessBase;
|
||||
}
|
||||
|
||||
// Camera icon configuration
|
||||
const double kCameraIconDiameter = 20.0;
|
||||
const double kCameraRingThickness = 4.0;
|
||||
const double kCameraDotOpacity = 0.4; // Opacity for the grey dot interior
|
||||
const Color kCameraRingColorReal = Color(0xC43F55F3); // Real nodes from OSM - blue
|
||||
const Color kCameraRingColorMock = Color(0xC4FFFFFF); // Add node mock point - white
|
||||
const Color kCameraRingColorPending = Color(0xC49C27B0); // Submitted/pending nodes - purple
|
||||
const Color kCameraRingColorEditing = Color(0xC4FF9800); // Node being edited - orange
|
||||
const Color kCameraRingColorPendingEdit = Color(0xC4757575); // Original node with pending edit - grey
|
||||
const Color kCameraRingColorPendingDeletion = Color(0xA4F44336); // Node pending deletion - red, slightly transparent
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
// OpenStreetMap OAuth client IDs for this app.
|
||||
//
|
||||
// NEVER commit real secrets to public repos. For open source, use keys.dart.example instead.
|
||||
// These must be provided via --dart-define at build time.
|
||||
|
||||
const String kOsmProdClientId = 'U8p_n6IjZfQiL1KtdiwbB0-o9nto6CAKz7LC2GifJzk'; // example - replace with real
|
||||
const String kOsmSandboxClientId = 'SBHWpWTKf31EdSiTApnah3Fj2rLnk2pEwBORlX0NyZI'; // example - replace with real
|
||||
String get kOsmProdClientId {
|
||||
const fromBuild = String.fromEnvironment('OSM_PROD_CLIENTID');
|
||||
if (fromBuild.isNotEmpty) return fromBuild;
|
||||
|
||||
throw Exception('OSM_PROD_CLIENTID not configured. Use --dart-define=OSM_PROD_CLIENTID=your_id');
|
||||
}
|
||||
|
||||
String get kOsmSandboxClientId {
|
||||
const fromBuild = String.fromEnvironment('OSM_SANDBOX_CLIENTID');
|
||||
if (fromBuild.isNotEmpty) return fromBuild;
|
||||
|
||||
throw Exception('OSM_SANDBOX_CLIENTID not configured. Use --dart-define=OSM_SANDBOX_CLIENTID=your_id');
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// Example OSM OAuth key config
|
||||
const String kOsmProdClientId = 'YOUR_PROD_CLIENT_ID_HERE';
|
||||
const String kOsmSandboxClientId = 'YOUR_SANDBOX_CLIENT_ID_HERE';
|
||||
@@ -18,6 +18,11 @@ Want to add support for your language? It's simple:
|
||||
"app": {
|
||||
"title": "DeFlock" ← Keep this as-is
|
||||
},
|
||||
"about": {
|
||||
"title": "Your Translation Here",
|
||||
"description": "Your Translation Here",
|
||||
...
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Your Translation Here",
|
||||
"download": "Your Translation Here",
|
||||
@@ -26,9 +31,7 @@ Want to add support for your language? It's simple:
|
||||
}
|
||||
```
|
||||
|
||||
3. **Add your language to the About screen**: Edit `assets/info.txt` and add your language section at the bottom (copy the English section and translate it)
|
||||
|
||||
4. **Submit a PR** with your JSON file and the updated about.txt. Done!
|
||||
3. **Submit a PR** with your JSON file. Done!
|
||||
|
||||
The new language will automatically appear in Settings → Language.
|
||||
|
||||
@@ -45,12 +48,14 @@ The new language will automatically appear in Settings → Language.
|
||||
- `es.json` - Español
|
||||
- `fr.json` - Français
|
||||
- `de.json` - Deutsch
|
||||
- `it.json` - Italiano
|
||||
- `pt.json` - Português
|
||||
- `zh.json` - 中文
|
||||
|
||||
## Files to Update
|
||||
|
||||
For a complete translation, you'll need to touch:
|
||||
1. **`lib/localizations/xx.json`** - Main UI translations (buttons, menus, etc.)
|
||||
2. **`assets/info.txt`** - About screen content (add your language section)
|
||||
For a complete translation, you only need to update:
|
||||
1. **`lib/localizations/xx.json`** - All UI translations including about content
|
||||
|
||||
## That's It!
|
||||
|
||||
|
||||
@@ -16,11 +16,32 @@
|
||||
"close": "Schließen",
|
||||
"submit": "Senden",
|
||||
"saveEdit": "Bearbeitung Speichern",
|
||||
"clear": "Löschen"
|
||||
"clear": "Löschen",
|
||||
"viewOnOSM": "Auf OSM anzeigen",
|
||||
"advanced": "Erweitert",
|
||||
"useAdvancedEditor": "Erweiterten Editor verwenden"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Knoten sehr nah an vorhandenem Gerät",
|
||||
"message": "Dieser Knoten ist nur {} Meter von einem vorhandenen Überwachungsgerät entfernt.",
|
||||
"suggestion": "Wenn mehrere Geräte am selben Mast sind, verwenden Sie bitte mehrere Richtungen auf einem einzigen Knoten, anstatt separate Knoten zu erstellen.",
|
||||
"nearbyNodes": "Nahegelegene Gerät(e) gefunden ({}):",
|
||||
"nodeInfo": "Knoten #{} - {}",
|
||||
"andMore": "...und {} weitere",
|
||||
"goBack": "Zurück",
|
||||
"submitAnyway": "Trotzdem senden",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR Kamera",
|
||||
"publicCamera": "Öffentliche Überwachungskamera",
|
||||
"camera": "Überwachungskamera",
|
||||
"amenity": "{}",
|
||||
"device": "{} Gerät",
|
||||
"unknown": "Unbekanntes Gerät"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Verfolgung aktivieren (Norden oben)",
|
||||
"northUp": "Verfolgung aktivieren (Rotation)",
|
||||
"off": "Verfolgung aktivieren",
|
||||
"follow": "Verfolgung aktivieren (Rotation)",
|
||||
"rotating": "Verfolgung deaktivieren"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +57,8 @@
|
||||
"maxNodesWarning": "Sie möchten das wahrscheinlich nicht tun, es sei denn, Sie sind absolut sicher, dass Sie einen guten Grund dafür haben.",
|
||||
"offlineMode": "Offline-Modus",
|
||||
"offlineModeSubtitle": "Alle Netzwerkanfragen außer für lokale/Offline-Bereiche deaktivieren.",
|
||||
"pauseQueueProcessing": "Upload-Warteschlange pausieren",
|
||||
"pauseQueueProcessingSubtitle": "Upload von wartenden Änderungen stoppen, aber Live-Datenzugriff beibehalten.",
|
||||
"offlineModeWarningTitle": "Aktive Downloads",
|
||||
"offlineModeWarningMessage": "Die Aktivierung des Offline-Modus bricht alle aktiven Bereichsdownloads ab. Möchten Sie fortfahren?",
|
||||
"enableOfflineMode": "Offline-Modus Aktivieren",
|
||||
@@ -45,7 +68,8 @@
|
||||
"offlineSettingsSubtitle": "Offline-Modus und heruntergeladene Bereiche verwalten",
|
||||
"advancedSettings": "Erweiterte Einstellungen",
|
||||
"advancedSettingsSubtitle": "Leistungs-, Warnungs- und Kachelanbieter-Einstellungen",
|
||||
"proximityAlerts": "Näherungswarnungen"
|
||||
"proximityAlerts": "Näherungswarnungen",
|
||||
"networkStatusIndicator": "Netzwerkstatus-Anzeige"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Benachrichtigung erhalten beim Annähern an Überwachungsgeräte",
|
||||
@@ -71,6 +95,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Profil auswählen...",
|
||||
"profileRequired": "Bitte wählen Sie ein Profil aus, um fortzufahren.",
|
||||
"direction": "Richtung {}°",
|
||||
"profileNoDirectionInfo": "Dieses Profil benötigt keine Richtung.",
|
||||
"mustBeLoggedIn": "Sie müssen angemeldet sein, um neue Knoten zu übertragen. Bitte melden Sie sich über die Einstellungen an.",
|
||||
@@ -82,12 +108,19 @@
|
||||
"editNode": {
|
||||
"title": "Knoten #{} Bearbeiten",
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Profil auswählen...",
|
||||
"profileRequired": "Bitte wählen Sie ein Profil aus, um fortzufahren.",
|
||||
"direction": "Richtung {}°",
|
||||
"profileNoDirectionInfo": "Dieses Profil benötigt keine Richtung.",
|
||||
"temporarilyDisabled": "Bearbeitungen wurden vorübergehend deaktiviert, während wir einen Fehler beheben - Entschuldigung - schauen Sie bald wieder vorbei.",
|
||||
"mustBeLoggedIn": "Sie müssen angemeldet sein, um Knoten zu bearbeiten. Bitte melden Sie sich über die Einstellungen an.",
|
||||
"sandboxModeWarning": "Bearbeitungen von Produktionsknoten können nicht an die Sandbox übertragen werden. Wechseln Sie in den Produktionsmodus in den Einstellungen, um Knoten zu bearbeiten.",
|
||||
"enableSubmittableProfile": "Aktivieren Sie ein übertragbares Profil in den Einstellungen, um Knoten zu bearbeiten.",
|
||||
"profileViewOnlyWarning": "Dieses Profil ist nur zum Anzeigen der Karte gedacht. Bitte wählen Sie ein übertragbares Profil aus, um Knoten zu bearbeiten.",
|
||||
"cannotMoveConstrainedNode": "Kann diese Kamera nicht verschieben - sie ist mit einem anderen Kartenelement verbunden (OSM-Weg/Relation). Sie können trotzdem ihre Tags und Richtung bearbeiten.",
|
||||
"zoomInRequiredMessage": "Zoomen Sie auf mindestens Stufe {} heran, um Überwachungsknoten hinzuzufügen oder zu bearbeiten. Dies gewährleistet eine präzise Positionierung für genaues Kartieren.",
|
||||
"extractFromWay": "Knoten aus Weg/Relation extrahieren",
|
||||
"extractFromWaySubtitle": "Neuen Knoten mit gleichen Tags erstellen, Verschieben an neuen Ort ermöglichen",
|
||||
"refineTags": "Tags Verfeinern",
|
||||
"refineTagsWithProfile": "Tags Verfeinern ({})"
|
||||
},
|
||||
@@ -101,9 +134,16 @@
|
||||
"withinTileLimit": "Innerhalb {} Kachel-Limit",
|
||||
"exceedsTileLimit": "Aktuelle Auswahl überschreitet {} Kachel-Limit",
|
||||
"offlineModeWarning": "Downloads im Offline-Modus deaktiviert. Deaktivieren Sie den Offline-Modus, um neue Bereiche herunterzuladen.",
|
||||
"areaTooBigMessage": "Zoomen Sie auf mindestens Stufe {} heran, um Offline-Bereiche herunterzuladen. Downloads großer Gebiete können die App zum Absturz bringen.",
|
||||
"downloadStarted": "Download gestartet! Lade Kacheln und Knoten...",
|
||||
"downloadFailed": "Download konnte nicht gestartet werden: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download gestartet",
|
||||
"message": "Download gestartet! Lade Kacheln und Knoten...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Fortschritt in Einstellungen anzeigen"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Upload-Ziel",
|
||||
"subtitle": "Wählen Sie, wohin Kameras hochgeladen werden",
|
||||
@@ -112,9 +152,12 @@
|
||||
"simulate": "Simulieren",
|
||||
"productionDescription": "Hochladen in die Live-OSM-Datenbank (für alle Benutzer sichtbar)",
|
||||
"sandboxDescription": "Uploads gehen an die OSM Sandbox (sicher zum Testen, wird regelmäßig zurückgesetzt).",
|
||||
"simulateDescription": "Uploads simulieren (kontaktiert OSM-Server nicht)"
|
||||
"simulateDescription": "Uploads simulieren (kontaktiert OSM-Server nicht)",
|
||||
"cannotChangeWithQueue": "Upload-Ziel kann nicht geändert werden, während {} Elemente in der Warteschlange sind. Warteschlange zuerst leeren."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "OpenStreetMap-Konto",
|
||||
"osmAccountSubtitle": "Ihr OSM-Login verwalten und Ihre Beiträge einsehen",
|
||||
"loggedInAs": "Angemeldet als {}",
|
||||
"loginToOSM": "Bei OpenStreetMap anmelden",
|
||||
"tapToLogout": "Zum Abmelden antippen",
|
||||
@@ -123,10 +166,37 @@
|
||||
"testConnection": "Verbindung Testen",
|
||||
"testConnectionSubtitle": "OSM-Anmeldedaten überprüfen",
|
||||
"connectionOK": "Verbindung OK - Anmeldedaten sind gültig",
|
||||
"connectionFailed": "Verbindung fehlgeschlagen - bitte erneut anmelden"
|
||||
"connectionFailed": "Verbindung fehlgeschlagen - bitte erneut anmelden",
|
||||
"viewMyEdits": "Meine Änderungen bei OSM Anzeigen",
|
||||
"viewMyEditsSubtitle": "Ihr Bearbeitungsverlauf bei OpenStreetMap einsehen",
|
||||
"aboutOSM": "Über OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap ist ein gemeinschaftliches Open-Source-Kartenprojekt, bei dem Mitwirkende eine kostenlose, bearbeitbare Karte der Welt erstellen und pflegen. Ihre Beiträge zu Überwachungsgeräten helfen dabei, diese Infrastruktur sichtbar und durchsuchbar zu machen.",
|
||||
"visitOSM": "OpenStreetMap Besuchen",
|
||||
"deleteAccount": "OSM-Konto Löschen",
|
||||
"deleteAccountSubtitle": "Ihr OpenStreetMap-Konto verwalten",
|
||||
"deleteAccountExplanation": "Um Ihr OpenStreetMap-Konto zu löschen, müssen Sie die OpenStreetMap-Website besuchen. Dies entfernt dauerhaft Ihr OSM-Konto und alle zugehörigen Daten.",
|
||||
"deleteAccountWarning": "Warnung: Diese Aktion kann nicht rückgängig gemacht werden und löscht Ihr OSM-Konto dauerhaft.",
|
||||
"goToOSM": "Zu OpenStreetMap gehen",
|
||||
"accountManagement": "Kontoverwaltung",
|
||||
"accountManagementDescription": "Um Ihr OpenStreetMap-Konto zu löschen, müssen Sie die entsprechende OpenStreetMap-Website besuchen. Dadurch werden Ihr Konto und alle zugehörigen Daten dauerhaft gelöscht.",
|
||||
"currentDestinationProduction": "Derzeit verbunden mit: Produktions-OpenStreetMap",
|
||||
"currentDestinationSandbox": "Derzeit verbunden mit: Sandbox-OpenStreetMap",
|
||||
"currentDestinationSimulate": "Derzeit im: Simulationsmodus (kein echtes Konto)",
|
||||
"viewMessages": "Nachrichten auf OSM anzeigen",
|
||||
"unreadMessagesCount": "Sie haben {} ungelesene Nachrichten",
|
||||
"noUnreadMessages": "Keine ungelesenen Nachrichten",
|
||||
"reauthRequired": "Authentifizierung aktualisieren",
|
||||
"reauthExplanation": "Sie müssen Ihre Authentifizierung aktualisieren, um OSM-Nachrichtenbenachrichtigungen über die App zu erhalten.",
|
||||
"reauthBenefit": "Dies ermöglicht Benachrichtigungspunkte, wenn Sie ungelesene Nachrichten auf OpenStreetMap haben.",
|
||||
"reauthNow": "Jetzt machen",
|
||||
"reauthLater": "Später"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Upload-Warteschlange",
|
||||
"subtitle": "Ausstehende Überwachungsgeräte-Uploads verwalten",
|
||||
"pendingUploads": "Ausstehende Uploads: {}",
|
||||
"pendingItemsCount": "Ausstehende Elemente: {}",
|
||||
"nothingInQueue": "Warteschlange ist leer",
|
||||
"simulateModeEnabled": "Simulationsmodus aktiviert – Uploads simuliert",
|
||||
"sandboxMode": "Sandbox-Modus – Uploads gehen an OSM Sandbox",
|
||||
"tapToViewQueue": "Zum Anzeigen der Warteschlange antippen",
|
||||
@@ -137,7 +207,7 @@
|
||||
"queueCleared": "Warteschlange geleert",
|
||||
"uploadQueueTitle": "Upload-Warteschlange ({} Elemente)",
|
||||
"queueIsEmpty": "Warteschlange ist leer",
|
||||
"cameraWithIndex": "Kamera {}",
|
||||
"itemWithIndex": "Objekt {}",
|
||||
"error": " (Fehler)",
|
||||
"completing": " (Wird abgeschlossen...)",
|
||||
"destination": "Ziel: {}",
|
||||
@@ -147,7 +217,14 @@
|
||||
"attempts": "Versuche: {}",
|
||||
"uploadFailedRetry": "Upload fehlgeschlagen. Zum Wiederholen antippen.",
|
||||
"retryUpload": "Upload wiederholen",
|
||||
"clearAll": "Alle Löschen"
|
||||
"clearAll": "Alle Löschen",
|
||||
"errorDetails": "Fehlerdetails",
|
||||
"creatingChangeset": " (Changeset erstellen...)",
|
||||
"uploading": " (Uploading...)",
|
||||
"closingChangeset": " (Changeset schließen...)",
|
||||
"processingPaused": "Warteschlangenverarbeitung pausiert",
|
||||
"pausedDueToOffline": "Upload-Verarbeitung ist pausiert, da der Offline-Modus aktiviert ist.",
|
||||
"pausedByUser": "Upload-Verarbeitung ist manuell pausiert."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Kachel-Anbieter",
|
||||
@@ -179,10 +256,15 @@
|
||||
"urlTemplate": "URL-Vorlage",
|
||||
"urlTemplateHint": "https://beispiel.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "URL-Vorlage ist erforderlich",
|
||||
"urlTemplatePlaceholders": "URL muss {z}, {x} und {y} Platzhalter enthalten",
|
||||
"urlTemplatePlaceholders": "URL muss entweder {quadkey} oder {z}, {x} und {y} Platzhalter enthalten",
|
||||
"attribution": "Zuschreibung",
|
||||
"attributionHint": "© Karten-Anbieter",
|
||||
"attributionRequired": "Zuschreibung ist erforderlich",
|
||||
"maxZoom": "Max Zoom-Stufe",
|
||||
"maxZoomHint": "Maximale Zoom-Stufe (1-23)",
|
||||
"maxZoomRequired": "Max Zoom ist erforderlich",
|
||||
"maxZoomInvalid": "Max Zoom muss eine Zahl sein",
|
||||
"maxZoomRange": "Max Zoom muss zwischen {} und {} liegen",
|
||||
"fetchPreview": "Vorschau Laden",
|
||||
"previewTileLoaded": "Vorschau-Kachel erfolgreich geladen",
|
||||
"previewTileFailed": "Vorschau laden fehlgeschlagen: {}",
|
||||
@@ -200,7 +282,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Karten-Kacheln",
|
||||
"manageProviders": "Anbieter Verwalten"
|
||||
"manageProviders": "Anbieter Verwalten",
|
||||
"attribution": "Karten-Zuschreibung"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Profil Anzeigen",
|
||||
@@ -211,6 +294,10 @@
|
||||
"profileNameRequired": "Profil-Name ist erforderlich",
|
||||
"requiresDirection": "Benötigt Richtung",
|
||||
"requiresDirectionSubtitle": "Ob Kameras dieses Typs ein Richtungs-Tag benötigen",
|
||||
"fov": "Sichtfeld",
|
||||
"fovHint": "Sichtfeld in Grad (leer lassen für Standard)",
|
||||
"fovSubtitle": "Kamera-Sichtfeld - verwendet für Kegelbreite und Bereichsübertragungsformat",
|
||||
"fovInvalid": "Sichtfeld muss zwischen 1 und 360 Grad liegen",
|
||||
"submittable": "Übertragbar",
|
||||
"submittableSubtitle": "Ob dieses Profil für Kamera-Übertragungen verwendet werden kann",
|
||||
"osmTags": "OSM-Tags",
|
||||
@@ -287,5 +374,143 @@
|
||||
"cannotChangeTileTypes": "Kachel-Typen können während des Herunterladens von Offline-Bereichen nicht geändert werden",
|
||||
"selectMapLayer": "Kartenschicht Auswählen",
|
||||
"noTileProvidersAvailable": "Keine Kachel-Anbieter verfügbar"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Erweiterte Bearbeitungsoptionen",
|
||||
"subtitle": "Diese Editoren bieten erweiterte Funktionen für komplexe Bearbeitungen.",
|
||||
"webEditors": "Web-Editoren",
|
||||
"mobileEditors": "Mobile Editoren",
|
||||
"iDEditor": "iD Editor",
|
||||
"iDEditorSubtitle": "Voll ausgestatteter Web-Editor - funktioniert immer",
|
||||
"rapidEditor": "RapiD Editor",
|
||||
"rapidEditorSubtitle": "KI-unterstütztes Bearbeiten mit Facebook-Daten",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Erweiterte Android OSM-Editor",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Umfragebasierte Mapping-App",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Schnelle POI-Bearbeitung",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "iOS OSM-Editor",
|
||||
"couldNotOpenEditor": "Editor konnte nicht geöffnet werden - App möglicherweise nicht installiert",
|
||||
"couldNotOpenURL": "URL konnte nicht geöffnet werden",
|
||||
"couldNotOpenOSMWebsite": "OSM-Website konnte nicht geöffnet werden"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Netzwerkstatus-Anzeige anzeigen",
|
||||
"showIndicatorSubtitle": "Ladestatus und Fehler für Überwachungsdaten anzeigen",
|
||||
"loading": "Lade Überwachungsdaten...",
|
||||
"timedOut": "Anfrage Zeitüberschreitung",
|
||||
"noData": "Keine Offline-Daten",
|
||||
"success": "Überwachungsdaten geladen",
|
||||
"nodeDataSlow": "Überwachungsdaten langsam"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Zeige {rendered} von {total} Geräten",
|
||||
"editingDisabledMessage": "Zu viele Geräte sichtbar für sicheres Bearbeiten. Vergrößern Sie die Ansicht, um die Anzahl sichtbarer Geräte zu reduzieren, und versuchen Sie es erneut."
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Überwachungs-Transparenz",
|
||||
"description": "DeFlock ist eine datenschutzorientierte mobile App zur Kartierung öffentlicher Überwachungsinfrastruktür mit OpenStreetMap. Dokumentieren Sie Kameras, ALPRs, Schussdetektoren und andere Überwachungsgeräte in Ihrer Gemeinde, um diese Infrastruktur sichtbar und durchsuchbar zu machen.",
|
||||
"features": "• Offline-fähige Kartierung mit herunterladbaren Bereichen\n• Direkter Upload zu OpenStreetMap mit OAuth2\n• Integrierte Profile für große Hersteller\n• Datenschutzfreundlich - keine Nutzerdaten gesammelt\n• Multiple Kartenanbieter (OSM, Satellitenbilder)",
|
||||
"initiative": "Teil der breiteren DeFlock-Initiative zur Förderung von Überwachungstransparenz.",
|
||||
"footer": "Besuchen Sie: deflock.me\nGebaut mit Flutter • Open Source",
|
||||
"showWelcome": "Willkommensnachricht anzeigen",
|
||||
"showSubmissionGuide": "Einreichungsleitfaden anzeigen",
|
||||
"viewReleaseNotes": "Release-Notizen anzeigen"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Willkommen bei DeFlock",
|
||||
"description": "DeFlock wurde auf der Idee gegründet, dass öffentliche Überwachungsinstrumente transparent sein sollten. In dieser mobilen App, wie auch auf der Website, können Sie die Standorte von ALPRs und anderer Überwachungsinfrastruktur in Ihrer Umgebung und weltweit einsehen.",
|
||||
"mission": "Dieses Projekt ist jedoch nicht automatisiert; es braucht uns alle, um dieses Projekt zu verbessern. Bei der Kartenansicht können Sie auf \"Neuer Knoten\" tippen, um eine bisher unbekannte Installation hinzuzufügen. Mit Ihrer Hilfe können wir unser Ziel erreichen: mehr Transparenz und öffentliches Bewusstsein für Überwachungsinfrastruktur.",
|
||||
"firsthandKnowledge": "WICHTIG: Tragen Sie nur Überwachungsgeräte bei, die Sie persönlich aus erster Hand beobachtet haben. OpenStreetMap- und Google-Richtlinien verbieten die Nutzung von Quellen wie Street View-Bildern für Beiträge. Ihre Beiträge sollten auf Ihren eigenen direkten, persönlichen Beobachtungen basieren.",
|
||||
"privacy": "Datenschutzhinweis: Diese App läuft vollständig lokal auf Ihrem Gerät und nutzt die OpenStreetMap-API von Drittanbietern nur für Datenspeicherung und Übermittlungen. DeFlock sammelt oder speichert keinerlei Nutzerdaten und ist nicht für die Kontoverwaltung verantwortlich.",
|
||||
"tileNote": "HINWEIS: Die kostenlosen Kartenkacheln von OpenStreetMap können sehr langsam laden. Alternative Kartenanbieter können unter Einstellungen > Erweitert konfiguriert werden.",
|
||||
"moreInfo": "Weitere Links finden Sie unter Einstellungen > Über.",
|
||||
"dontShowAgain": "Diese Willkommensnachricht nicht mehr anzeigen",
|
||||
"getStarted": "Los geht's mit DeFlocking!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Einreichungs-Richtlinien",
|
||||
"description": "Bevor Sie Ihr erstes Überwachungsgerät einreichen, lesen Sie bitte diese wichtigen Richtlinien für qualitativ hochwertige Beiträge zu OpenStreetMap.",
|
||||
"bestPractices": "• Nur Geräte erfassen, die Sie persönlich beobachtet haben\n• Zeit nehmen für genaue Identifikation von Typ und Hersteller\n• Präzise Positionierung - nah heranzoomen vor Markierung\n• Richtungsinformationen angeben, falls zutreffend\n• Tag-Auswahl vor dem Senden überprüfen",
|
||||
"placementNote": "Denken Sie daran: Genaue, persönlich verifizierte Daten sind essentiell für die DeFlock-Community und das OpenStreetMap-Projekt.",
|
||||
"moreInfo": "Für detaillierte Anleitungen zur Geräteerkennung und Kartierung:",
|
||||
"identificationGuide": "Identifikationsleitfaden",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Diese Anleitung nicht mehr anzeigen",
|
||||
"gotIt": "Verstanden!"
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Ort suchen",
|
||||
"searchPlaceholder": "Orte oder Koordinaten suchen...",
|
||||
"routeTo": "Route zu",
|
||||
"routeFrom": "Route von",
|
||||
"selectLocation": "Ort auswählen",
|
||||
"calculatingRoute": "Route wird berechnet...",
|
||||
"routeCalculationFailed": "Routenberechnung fehlgeschlagen",
|
||||
"start": "Start",
|
||||
"resume": "Fortsetzen",
|
||||
"endRoute": "Route beenden",
|
||||
"routeOverview": "Routenübersicht",
|
||||
"retry": "Wiederholen",
|
||||
"cancelSearch": "Suche abbrechen",
|
||||
"noResultsFound": "Keine Ergebnisse gefunden",
|
||||
"searching": "Suche...",
|
||||
"location": "Standort",
|
||||
"startPoint": "Start",
|
||||
"endPoint": "Ende",
|
||||
"startSelect": "Start (auswählen)",
|
||||
"endSelect": "Ende (auswählen)",
|
||||
"distance": "Entfernung: {} km",
|
||||
"routeActive": "Route aktiv",
|
||||
"locationsTooClose": "Start- und Endpositionen sind zu nah beieinander",
|
||||
"navigationSettings": "Navigation",
|
||||
"navigationSettingsSubtitle": "Routenplanung und Vermeidungseinstellungen",
|
||||
"avoidanceDistance": "Vermeidungsabstand",
|
||||
"avoidanceDistanceSubtitle": "Mindestabstand zu Überwachungsgeräten",
|
||||
"searchHistory": "Max. Suchverlauf",
|
||||
"searchHistorySubtitle": "Maximale Anzahl kürzlicher Suchen zum Merken",
|
||||
"units": "Einheiten",
|
||||
"unitsSubtitle": "Anzeigeeinheiten für Entfernungen und Messungen",
|
||||
"metric": "Metrisch (km, m)",
|
||||
"imperial": "Britisch (mi, ft)",
|
||||
"meters": "Meter",
|
||||
"feet": "Fuß"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Verdächtige Standorte",
|
||||
"showSuspectedLocations": "Verdächtige Standorte anzeigen",
|
||||
"showSuspectedLocationsSubtitle": "Fragezeichen-Marker für vermutete Überwachungsstandorte aus Versorgungsgenehmigungsdaten anzeigen",
|
||||
"lastUpdated": "Zuletzt aktualisiert",
|
||||
"refreshNow": "Jetzt aktualisieren",
|
||||
"dataSource": "Datenquelle",
|
||||
"dataSourceDescription": "Versorgungsgenehmigungsdaten, die auf potenzielle Installationsstandorte für Überwachungsinfrastruktur hinweisen",
|
||||
"dataSourceCredit": "Datensammlung und -hosting bereitgestellt von alprwatch.org",
|
||||
"minimumDistance": "Mindestabstand zu echten Geräten",
|
||||
"minimumDistanceSubtitle": "Verdächtige Standorte innerhalb von {}m vorhandener Überwachungsgeräte ausblenden",
|
||||
"updating": "Verdächtige Standorte werden aktualisiert",
|
||||
"downloadingAndProcessing": "Daten werden heruntergeladen und verarbeitet...",
|
||||
"updateSuccess": "Verdächtige Standorte erfolgreich aktualisiert",
|
||||
"updateFailed": "Aktualisierung der verdächtigen Standorte fehlgeschlagen",
|
||||
"neverFetched": "Nie abgerufen",
|
||||
"daysAgo": "vor {} Tagen",
|
||||
"hoursAgo": "vor {} Stunden",
|
||||
"minutesAgo": "vor {} Minuten",
|
||||
"justNow": "Gerade eben"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Verdächtiger Standort #{}",
|
||||
"ticketNo": "Ticket-Nr.",
|
||||
"address": "Adresse",
|
||||
"street": "Straße",
|
||||
"city": "Stadt",
|
||||
"state": "Bundesland",
|
||||
"intersectingStreet": "Kreuzende Straße",
|
||||
"workDoneFor": "Arbeit ausgeführt für",
|
||||
"remarks": "Bemerkungen",
|
||||
"url": "URL",
|
||||
"coordinates": "Koordinaten",
|
||||
"noAddressAvailable": "Keine Adresse verfügbar"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Surveillance Transparency",
|
||||
"description": "DeFlock is a privacy-focused mobile app for mapping public surveillance infrastructure using OpenStreetMap. Document cameras, ALPRs, gunshot detectors, and other surveillance devices in your community to make this infrastructure visible and searchable.",
|
||||
"features": "• Offline-capable mapping with downloadable areas\n• Upload directly to OpenStreetMap with OAuth2\n• Built-in profiles for major manufacturers\n• Privacy-respecting - no user data collected\n• Multiple map tile providers (OSM, satellite imagery)",
|
||||
"initiative": "Part of the broader DeFlock initiative to promote surveillance transparency.",
|
||||
"footer": "Visit: deflock.me\nBuilt with Flutter • Open Source",
|
||||
"showWelcome": "Show Welcome Message",
|
||||
"showSubmissionGuide": "Show Submission Guide",
|
||||
"viewReleaseNotes": "View Release Notes"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Welcome to DeFlock",
|
||||
"description": "DeFlock was founded on the idea that public surveillance tools should be transparent. Within this mobile app, as on the website, you will be able to view the location of ALPRs and other surveillance infrastructure in your local area and abroad.",
|
||||
"mission": "However, this project isn't automated; it takes all of us to make this project better. When viewing the map, you can tap \"New Node\" to add a previously unknown installation. With your help, we can achieve our goal of increased transparency and public awareness of surveillance infrastructure.",
|
||||
"firsthandKnowledge": "IMPORTANT: Only contribute surveillance devices that you have personally observed firsthand. OpenStreetMap and Google policies prohibit using sources like Street View imagery for submissions. Your contributions should be based on your own direct observations.",
|
||||
"privacy": "Privacy Note: This app runs entirely locally on your device and uses the third-party OpenStreetMap API for data storage and submissions. DeFlock does not collect or store any user data of any kind, and is not responsible for account management.",
|
||||
"tileNote": "NOTE: The free map tiles from OpenStreetMap can be very slow to load. Alternate tile providers can be configured in Settings > Advanced.",
|
||||
"moreInfo": "You can find more links under Settings > About.",
|
||||
"dontShowAgain": "Don't show this welcome message again",
|
||||
"getStarted": "Let's Get DeFlocking!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Submission Best Practices",
|
||||
"description": "Before submitting your first surveillance device, please take a moment to review these important guidelines to ensure high-quality contributions to OpenStreetMap.",
|
||||
"bestPractices": "• Only map devices you've personally observed firsthand\n• Take time to accurately identify the device type and manufacturer\n• Use precise positioning - zoom in close before placing the marker\n• Include direction information when applicable\n• Double-check your tag selections before submitting",
|
||||
"placementNote": "Remember: Accurate, first-hand data is essential for the DeFlock community and OpenStreetMap project.",
|
||||
"moreInfo": "For detailed guidance on device identification and mapping best practices:",
|
||||
"identificationGuide": "Identification Guide",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Don't show this guide again",
|
||||
"gotIt": "Got It!"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "New Node",
|
||||
"download": "Download",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "Close",
|
||||
"submit": "Submit",
|
||||
"saveEdit": "Save Edit",
|
||||
"clear": "Clear"
|
||||
"clear": "Clear",
|
||||
"viewOnOSM": "View on OSM",
|
||||
"advanced": "Advanced",
|
||||
"useAdvancedEditor": "Use Advanced Editor"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Node Very Close to Existing Device",
|
||||
"message": "This node is only {} meters from an existing surveillance device.",
|
||||
"suggestion": "If multiple devices are on the same pole, please use multiple directions on a single node instead of creating separate nodes.",
|
||||
"nearbyNodes": "Nearby device(s) found ({}):",
|
||||
"nodeInfo": "Node #{} - {}",
|
||||
"andMore": "...and {} more",
|
||||
"goBack": "Go Back",
|
||||
"submitAnyway": "Submit Anyway",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR Camera",
|
||||
"publicCamera": "Public Surveillance Camera",
|
||||
"camera": "Surveillance Camera",
|
||||
"amenity": "{}",
|
||||
"device": "{} Device",
|
||||
"unknown": "Unknown Device"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Enable follow-me (north up)",
|
||||
"northUp": "Enable follow-me (rotating)",
|
||||
"off": "Enable follow-me",
|
||||
"follow": "Enable follow-me (rotating)",
|
||||
"rotating": "Disable follow-me"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "You probably don't want to do that unless you are absolutely sure you have a good reason for it.",
|
||||
"offlineMode": "Offline Mode",
|
||||
"offlineModeSubtitle": "Disable all network requests except for local/offline areas.",
|
||||
"pauseQueueProcessing": "Pause Upload Queue",
|
||||
"pauseQueueProcessingSubtitle": "Stop uploading queued changes while keeping live data access.",
|
||||
"offlineModeWarningTitle": "Active Downloads",
|
||||
"offlineModeWarningMessage": "Enabling offline mode will cancel any active area downloads. Do you want to continue?",
|
||||
"enableOfflineMode": "Enable Offline Mode",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "Manage offline mode and downloaded areas",
|
||||
"advancedSettings": "Advanced Settings",
|
||||
"advancedSettingsSubtitle": "Performance, alerts, and tile provider settings",
|
||||
"proximityAlerts": "Proximity Alerts"
|
||||
"proximityAlerts": "Proximity Alerts",
|
||||
"networkStatusIndicator": "Network Status Indicator"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Get notified when approaching surveillance devices",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profile",
|
||||
"selectProfile": "Select a profile...",
|
||||
"profileRequired": "Please select a profile to continue.",
|
||||
"direction": "Direction {}°",
|
||||
"profileNoDirectionInfo": "This profile does not require a direction.",
|
||||
"mustBeLoggedIn": "You must be logged in to submit new nodes. Please log in via Settings.",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "Edit Node #{}",
|
||||
"profile": "Profile",
|
||||
"selectProfile": "Select a profile...",
|
||||
"profileRequired": "Please select a profile to continue.",
|
||||
"direction": "Direction {}°",
|
||||
"profileNoDirectionInfo": "This profile does not require a direction.",
|
||||
"temporarilyDisabled": "Edits have been temporarily disabled while we sort out a bug - apologies - check back soon.",
|
||||
"mustBeLoggedIn": "You must be logged in to edit nodes. Please log in via Settings.",
|
||||
"sandboxModeWarning": "Cannot submit edits on production nodes to sandbox. Switch to Production mode in Settings to edit nodes.",
|
||||
"enableSubmittableProfile": "Enable a submittable profile in Settings to edit nodes.",
|
||||
"profileViewOnlyWarning": "This profile is for map viewing only. Please select a submittable profile to edit nodes.",
|
||||
"cannotMoveConstrainedNode": "Cannot move this camera - it's connected to another map element (OSM way/relation). You can still edit its tags and direction.",
|
||||
"zoomInRequiredMessage": "Zoom in to at least level {} to add or edit surveillance nodes. This ensures precise positioning for accurate mapping.",
|
||||
"extractFromWay": "Extract node from way/relation",
|
||||
"extractFromWaySubtitle": "Create new node with same tags, allow moving to new location",
|
||||
"refineTags": "Refine Tags",
|
||||
"refineTagsWithProfile": "Refine Tags ({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "Within {} tile limit",
|
||||
"exceedsTileLimit": "Current selection exceeds {} tile limit",
|
||||
"offlineModeWarning": "Downloads disabled while in offline mode. Disable offline mode to download new areas.",
|
||||
"areaTooBigMessage": "Zoom in to at least level {} to download offline areas. Large area downloads can cause the app to become unresponsive.",
|
||||
"downloadStarted": "Download started! Fetching tiles and nodes...",
|
||||
"downloadFailed": "Failed to start download: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Started",
|
||||
"message": "Download started! Fetching tiles and nodes...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "View Progress in Settings"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Upload Destination",
|
||||
"subtitle": "Choose where cameras are uploaded",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "Simulate",
|
||||
"productionDescription": "Upload to the live OSM database (visible to all users)",
|
||||
"sandboxDescription": "Uploads go to the OSM Sandbox (safe for testing, resets regularly).",
|
||||
"simulateDescription": "Simulate uploads (does not contact OSM servers)"
|
||||
"simulateDescription": "Simulate uploads (does not contact OSM servers)",
|
||||
"cannotChangeWithQueue": "Cannot change upload destination while {} items are in queue. Clear queue first."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "OpenStreetMap Account",
|
||||
"osmAccountSubtitle": "Manage your OSM login and view your contributions",
|
||||
"loggedInAs": "Logged in as {}",
|
||||
"loginToOSM": "Log in to OpenStreetMap",
|
||||
"tapToLogout": "Tap to logout",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "Test Connection",
|
||||
"testConnectionSubtitle": "Verify OSM credentials are working",
|
||||
"connectionOK": "Connection OK - credentials are valid",
|
||||
"connectionFailed": "Connection failed - please re-login"
|
||||
"connectionFailed": "Connection failed - please re-login",
|
||||
"viewMyEdits": "View My Edits on OSM",
|
||||
"viewMyEditsSubtitle": "See your edit history on OpenStreetMap",
|
||||
"aboutOSM": "About OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap is a collaborative, open-source mapping project where contributors create and maintain a free, editable map of the world. Your surveillance device contributions help make this infrastructure visible and searchable.",
|
||||
"visitOSM": "Visit OpenStreetMap",
|
||||
"deleteAccount": "Delete OSM Account",
|
||||
"deleteAccountSubtitle": "Manage your OpenStreetMap account",
|
||||
"deleteAccountExplanation": "To delete your OpenStreetMap account, you'll need to visit the OpenStreetMap website. This will permanently remove your OSM account and all associated data.",
|
||||
"deleteAccountWarning": "Warning: This action cannot be undone and will permanently delete your OSM account.",
|
||||
"goToOSM": "Go to OpenStreetMap",
|
||||
"accountManagement": "Account Management",
|
||||
"accountManagementDescription": "To delete your OpenStreetMap account, you'll need to visit the appropriate OpenStreetMap website. This will permanently remove your account and all associated data.",
|
||||
"currentDestinationProduction": "Currently connected to: Production OpenStreetMap",
|
||||
"currentDestinationSandbox": "Currently connected to: Sandbox OpenStreetMap",
|
||||
"currentDestinationSimulate": "Currently in: Simulate mode (no real account)",
|
||||
"viewMessages": "View Messages on OSM",
|
||||
"unreadMessagesCount": "You have {} unread messages",
|
||||
"noUnreadMessages": "No unread messages",
|
||||
"reauthRequired": "Refresh Authentication",
|
||||
"reauthExplanation": "You must refresh your authentication to receive OSM message notifications through the app.",
|
||||
"reauthBenefit": "This will enable notification dots when you have unread messages on OpenStreetMap.",
|
||||
"reauthNow": "Do That Now",
|
||||
"reauthLater": "Later"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Upload Queue",
|
||||
"subtitle": "Manage pending surveillance device uploads",
|
||||
"pendingUploads": "Pending uploads: {}",
|
||||
"pendingItemsCount": "Pending Items: {}",
|
||||
"nothingInQueue": "Nothing in queue",
|
||||
"simulateModeEnabled": "Simulate mode enabled – uploads simulated",
|
||||
"sandboxMode": "Sandbox mode – uploads go to OSM Sandbox",
|
||||
"tapToViewQueue": "Tap to view queue",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "Queue cleared",
|
||||
"uploadQueueTitle": "Upload Queue ({} items)",
|
||||
"queueIsEmpty": "Queue is empty",
|
||||
"cameraWithIndex": "Camera {}",
|
||||
"itemWithIndex": "Item {}",
|
||||
"error": " (Error)",
|
||||
"completing": " (Completing...)",
|
||||
"destination": "Dest: {}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "Attempts: {}",
|
||||
"uploadFailedRetry": "Upload failed. Tap retry to try again.",
|
||||
"retryUpload": "Retry upload",
|
||||
"clearAll": "Clear All"
|
||||
"clearAll": "Clear All",
|
||||
"errorDetails": "Error Details",
|
||||
"creatingChangeset": " (Creating changeset...)",
|
||||
"uploading": " (Uploading...)",
|
||||
"closingChangeset": " (Closing changeset...)",
|
||||
"processingPaused": "Queue Processing Paused",
|
||||
"pausedDueToOffline": "Upload processing is paused because offline mode is enabled.",
|
||||
"pausedByUser": "Upload processing is manually paused."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Tile Providers",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "URL Template",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "URL template is required",
|
||||
"urlTemplatePlaceholders": "URL must contain {z}, {x}, and {y} placeholders",
|
||||
"urlTemplatePlaceholders": "URL must contain either {quadkey} or {z}, {x}, and {y} placeholders",
|
||||
"attribution": "Attribution",
|
||||
"attributionHint": "© Map Provider",
|
||||
"attributionRequired": "Attribution is required",
|
||||
"maxZoom": "Max Zoom Level",
|
||||
"maxZoomHint": "Maximum zoom level (1-23)",
|
||||
"maxZoomRequired": "Max zoom is required",
|
||||
"maxZoomInvalid": "Max zoom must be a number",
|
||||
"maxZoomRange": "Max zoom must be between {} and {}",
|
||||
"fetchPreview": "Fetch Preview",
|
||||
"previewTileLoaded": "Preview tile loaded successfully",
|
||||
"previewTileFailed": "Failed to fetch preview: {}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Map Tiles",
|
||||
"manageProviders": "Manage Providers"
|
||||
"manageProviders": "Manage Providers",
|
||||
"attribution": "Map Attribution"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "View Profile",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "Profile name is required",
|
||||
"requiresDirection": "Requires Direction",
|
||||
"requiresDirectionSubtitle": "Whether cameras of this type need a direction tag",
|
||||
"fov": "Field of View",
|
||||
"fovHint": "FOV in degrees (leave empty for default)",
|
||||
"fovSubtitle": "Camera field of view - used for cone width and range submission format",
|
||||
"fovInvalid": "FOV must be between 1 and 360 degrees",
|
||||
"submittable": "Submittable",
|
||||
"submittableSubtitle": "Whether this profile can be used for camera submissions",
|
||||
"osmTags": "OSM Tags",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "Cannot change tile types while downloading offline areas",
|
||||
"selectMapLayer": "Select Map Layer",
|
||||
"noTileProvidersAvailable": "No tile providers available"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Advanced Editing Options",
|
||||
"subtitle": "These editors offer more advanced features for complex edits.",
|
||||
"webEditors": "Web Editors",
|
||||
"mobileEditors": "Mobile Editors",
|
||||
"iDEditor": "iD Editor",
|
||||
"iDEditorSubtitle": "Full-featured web editor - always works",
|
||||
"rapidEditor": "RapiD Editor",
|
||||
"rapidEditorSubtitle": "AI-assisted editing with Facebook data",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Advanced Android OSM editor",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Survey-based mapping app",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Fast POI editing",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "iOS OSM editor",
|
||||
"couldNotOpenEditor": "Could not open editor - app may not be installed",
|
||||
"couldNotOpenURL": "Could not open URL",
|
||||
"couldNotOpenOSMWebsite": "Could not open OSM website"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Show network status indicator",
|
||||
"showIndicatorSubtitle": "Display surveillance data loading and error status",
|
||||
"loading": "Loading surveillance data...",
|
||||
"timedOut": "Request timed out",
|
||||
"noData": "No offline data",
|
||||
"success": "Surveillance data loaded",
|
||||
"nodeDataSlow": "Surveillance data slow"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Showing {rendered} of {total} devices",
|
||||
"editingDisabledMessage": "Too many devices shown to safely edit. Zoom in further to reduce the number of visible devices, then try again."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Search Location",
|
||||
"searchPlaceholder": "Search places or coordinates...",
|
||||
"routeTo": "Route To",
|
||||
"routeFrom": "Route From",
|
||||
"selectLocation": "Select Location",
|
||||
"calculatingRoute": "Calculating route...",
|
||||
"routeCalculationFailed": "Route calculation failed",
|
||||
"start": "Start",
|
||||
"resume": "Resume",
|
||||
"endRoute": "End Route",
|
||||
"routeOverview": "Route Overview",
|
||||
"retry": "Retry",
|
||||
"cancelSearch": "Cancel search",
|
||||
"noResultsFound": "No results found",
|
||||
"searching": "Searching...",
|
||||
"location": "Location",
|
||||
"startPoint": "Start",
|
||||
"endPoint": "End",
|
||||
"startSelect": "Start (select)",
|
||||
"endSelect": "End (select)",
|
||||
"distance": "Distance: {} km",
|
||||
"routeActive": "Route active",
|
||||
"locationsTooClose": "Start and end locations are too close together",
|
||||
"navigationSettings": "Navigation",
|
||||
"navigationSettingsSubtitle": "Route planning and avoidance settings",
|
||||
"avoidanceDistance": "Avoidance Distance",
|
||||
"avoidanceDistanceSubtitle": "Minimum distance to stay away from surveillance devices",
|
||||
"searchHistory": "Max Search History",
|
||||
"searchHistorySubtitle": "Maximum number of recent searches to remember",
|
||||
"units": "Units",
|
||||
"unitsSubtitle": "Display units for distances and measurements",
|
||||
"metric": "Metric (km, m)",
|
||||
"imperial": "Imperial (mi, ft)",
|
||||
"meters": "meters",
|
||||
"feet": "feet"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Suspected Locations",
|
||||
"showSuspectedLocations": "Show Suspected Locations",
|
||||
"showSuspectedLocationsSubtitle": "Show question mark markers for suspected surveillance sites from utility permit data",
|
||||
"lastUpdated": "Last Updated",
|
||||
"refreshNow": "Refresh now",
|
||||
"dataSource": "Data Source",
|
||||
"dataSourceDescription": "Utility permit data indicating potential surveillance infrastructure installation sites",
|
||||
"dataSourceCredit": "Data collection and hosting provided by alprwatch.org",
|
||||
"minimumDistance": "Minimum Distance from Real Nodes",
|
||||
"minimumDistanceSubtitle": "Hide suspected locations within {}m of existing surveillance devices",
|
||||
"updating": "Updating Suspected Locations",
|
||||
"downloadingAndProcessing": "Downloading and processing data...",
|
||||
"updateSuccess": "Suspected locations updated successfully",
|
||||
"updateFailed": "Failed to update suspected locations",
|
||||
"neverFetched": "Never fetched",
|
||||
"daysAgo": "{} days ago",
|
||||
"hoursAgo": "{} hours ago",
|
||||
"minutesAgo": "{} minutes ago",
|
||||
"justNow": "Just now"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Suspected Location #{}",
|
||||
"ticketNo": "Ticket No",
|
||||
"address": "Address",
|
||||
"street": "Street",
|
||||
"city": "City",
|
||||
"state": "State",
|
||||
"intersectingStreet": "Intersecting Street",
|
||||
"workDoneFor": "Work Done For",
|
||||
"remarks": "Remarks",
|
||||
"url": "URL",
|
||||
"coordinates": "Coordinates",
|
||||
"noAddressAvailable": "No address available"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Transparencia en Vigilancia",
|
||||
"description": "DeFlock es una aplicación móvil enfocada en la privacidad para mapear infraestructura de vigilancia pública usando OpenStreetMap. Documenta cámaras, ALPRs, detectores de disparos y otros dispositivos de vigilancia en tu comunidad para hacer visible y consultable esta infraestructura.",
|
||||
"features": "• Mapeo con capacidad offline con áreas descargables\n• Subida directa a OpenStreetMap con OAuth2\n• Perfiles integrados para fabricantes principales\n• Respeta la privacidad - no se recopilan datos del usuario\n• Múltiples proveedores de mapas (OSM, imágenes satelitales)",
|
||||
"initiative": "Parte de la iniciativa más amplia DeFlock para promover la transparencia en vigilancia.",
|
||||
"footer": "Visita: deflock.me\nConstruido con Flutter • Código Abierto",
|
||||
"showWelcome": "Mostrar Mensaje de Bienvenida",
|
||||
"showSubmissionGuide": "Mostrar Guía de Envío",
|
||||
"viewReleaseNotes": "Ver Notas de Lanzamiento"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Bienvenido a DeFlock",
|
||||
"description": "DeFlock fue fundado sobre la idea de que las herramientas de vigilancia pública deben ser transparentes. Dentro de esta aplicación móvil, como en el sitio web, podrás ver la ubicación de ALPRs y otra infraestructura de vigilancia en tu área local y en el extranjero.",
|
||||
"mission": "Sin embargo, este proyecto no es automatizado; todos nosotros somos necesarios para mejorarlo. Al ver el mapa, puedes tocar \"Nuevo Nodo\" para agregar una instalación previamente desconocida. Con tu ayuda, podemos lograr nuestro objetivo de mayor transparencia y conciencia pública sobre la infraestructura de vigilancia.",
|
||||
"firsthandKnowledge": "IMPORTANTE: Solo contribuye con dispositivos de vigilancia que hayas observado personalmente de primera mano. Las políticas de OpenStreetMap y Google prohíben el uso de fuentes como imágenes de Street View para las contribuciones. Tus contribuciones deben basarse en tus propias observaciones directas y en persona.",
|
||||
"privacy": "Nota de Privacidad: Esta aplicación funciona completamente de forma local en tu dispositivo y utiliza la API de terceros de OpenStreetMap solo para almacenamiento y envío de datos. DeFlock no recopila ni almacena ningún tipo de datos de usuario, y no es responsable de la gestión de cuentas.",
|
||||
"tileNote": "NOTA: Los mosaicos gratuitos de mapa de OpenStreetMap pueden tardar mucho en cargar. Se pueden configurar proveedores alternativos de mosaicos en Configuración > Avanzado.",
|
||||
"moreInfo": "Puedes encontrar más enlaces en Configuración > Acerca de.",
|
||||
"dontShowAgain": "No mostrar este mensaje de bienvenida otra vez",
|
||||
"getStarted": "¡Comencemos con DeFlock!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Mejores Prácticas de Envío",
|
||||
"description": "Antes de enviar su primer dispositivo de vigilancia, tómese un momento para revisar estas pautas importantes para contribuciones de alta calidad a OpenStreetMap.",
|
||||
"bestPractices": "• Solo mapee dispositivos que haya observado personalmente\n• Tómese tiempo para identificar con precisión el tipo y fabricante\n• Use posicionamiento preciso - acerque antes de colocar el marcador\n• Incluya información de dirección cuando sea aplicable\n• Verifique sus selecciones de etiquetas antes de enviar",
|
||||
"placementNote": "Recuerde: Los datos precisos y de primera mano son esenciales para la comunidad DeFlock y el proyecto OpenStreetMap.",
|
||||
"moreInfo": "Para orientación detallada sobre identificación de dispositivos y mejores prácticas de mapeo:",
|
||||
"identificationGuide": "Guía de Identificación",
|
||||
"osmWiki": "Wiki de OpenStreetMap",
|
||||
"dontShowAgain": "No mostrar esta guía otra vez",
|
||||
"gotIt": "¡Entendido!"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Nuevo Nodo",
|
||||
"download": "Descargar",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "Cerrar",
|
||||
"submit": "Enviar",
|
||||
"saveEdit": "Guardar Edición",
|
||||
"clear": "Limpiar"
|
||||
"clear": "Limpiar",
|
||||
"viewOnOSM": "Ver en OSM",
|
||||
"advanced": "Avanzado",
|
||||
"useAdvancedEditor": "Usar Editor Avanzado"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Nodo Muy Cerca de Dispositivo Existente",
|
||||
"message": "Este nodo está a solo {} metros de un dispositivo de vigilancia existente.",
|
||||
"suggestion": "Si hay múltiples dispositivos en el mismo poste, use múltiples direcciones en un solo nodo en lugar de crear nodos separados.",
|
||||
"nearbyNodes": "Dispositivo(s) cercano(s) encontrado(s) ({}):",
|
||||
"nodeInfo": "Nodo #{} - {}",
|
||||
"andMore": "...y {} más",
|
||||
"goBack": "Volver",
|
||||
"submitAnyway": "Enviar de Todas Formas",
|
||||
"nodeType": {
|
||||
"alpr": "Cámara ALPR/ANPR",
|
||||
"publicCamera": "Cámara de Vigilancia Pública",
|
||||
"camera": "Cámara de Vigilancia",
|
||||
"amenity": "{}",
|
||||
"device": "Dispositivo {}",
|
||||
"unknown": "Dispositivo Desconocido"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Activar seguimiento (norte arriba)",
|
||||
"northUp": "Activar seguimiento (rotación)",
|
||||
"off": "Activar seguimiento",
|
||||
"follow": "Activar seguimiento (rotación)",
|
||||
"rotating": "Desactivar seguimiento"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "Probablemente no quieras hacer eso a menos que estés absolutamente seguro de que tienes una buena razón para ello.",
|
||||
"offlineMode": "Modo Sin Conexión",
|
||||
"offlineModeSubtitle": "Deshabilitar todas las solicitudes de red excepto para áreas locales/sin conexión.",
|
||||
"pauseQueueProcessing": "Pausar Cola de Subida",
|
||||
"pauseQueueProcessingSubtitle": "Detener la subida de cambios en cola manteniendo acceso a datos en vivo.",
|
||||
"offlineModeWarningTitle": "Descargas Activas",
|
||||
"offlineModeWarningMessage": "Habilitar el modo sin conexión cancelará cualquier descarga de área activa. ¿Desea continuar?",
|
||||
"enableOfflineMode": "Habilitar Modo Sin Conexión",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "Gestionar modo sin conexión y áreas descargadas",
|
||||
"advancedSettings": "Configuración Avanzada",
|
||||
"advancedSettingsSubtitle": "Configuración de rendimiento, alertas y proveedores de teselas",
|
||||
"proximityAlerts": "Alertas de Proximidad"
|
||||
"proximityAlerts": "Alertas de Proximidad",
|
||||
"networkStatusIndicator": "Indicador de Estado de Red"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Recibe notificaciones al acercarte a dispositivos de vigilancia",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Perfil",
|
||||
"selectProfile": "Seleccionar un perfil...",
|
||||
"profileRequired": "Por favor, seleccione un perfil para continuar.",
|
||||
"direction": "Dirección {}°",
|
||||
"profileNoDirectionInfo": "Este perfil no requiere una dirección.",
|
||||
"mustBeLoggedIn": "Debe estar conectado para enviar nuevos nodos. Por favor, inicie sesión a través de Configuración.",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "Editar Nodo #{}",
|
||||
"profile": "Perfil",
|
||||
"selectProfile": "Seleccionar un perfil...",
|
||||
"profileRequired": "Por favor, seleccione un perfil para continuar.",
|
||||
"direction": "Dirección {}°",
|
||||
"profileNoDirectionInfo": "Este perfil no requiere una dirección.",
|
||||
"temporarilyDisabled": "Las ediciones han sido temporalmente deshabilitadas mientras solucionamos un error - disculpas - regrese pronto.",
|
||||
"mustBeLoggedIn": "Debe estar conectado para editar nodos. Por favor, inicie sesión a través de Configuración.",
|
||||
"sandboxModeWarning": "No se pueden enviar ediciones de nodos de producción al sandbox. Cambie al modo Producción en Configuración para editar nodos.",
|
||||
"enableSubmittableProfile": "Habilite un perfil envíable en Configuración para editar nodos.",
|
||||
"profileViewOnlyWarning": "Este perfil es solo para visualización del mapa. Por favor, seleccione un perfil envíable para editar nodos.",
|
||||
"cannotMoveConstrainedNode": "No se puede mover esta cámara - está conectada a otro elemento del mapa (OSM way/relation). Aún puede editar sus etiquetas y dirección.",
|
||||
"zoomInRequiredMessage": "Amplíe al menos al nivel {} para agregar o editar nodos de vigilancia. Esto garantiza un posicionamiento preciso para un mapeo exacto.",
|
||||
"extractFromWay": "Extraer nodo de way/relation",
|
||||
"extractFromWaySubtitle": "Crear nuevo nodo con las mismas etiquetas, permitir mover a nueva ubicación",
|
||||
"refineTags": "Refinar Etiquetas",
|
||||
"refineTagsWithProfile": "Refinar Etiquetas ({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "Dentro del límite de {} mosaicos",
|
||||
"exceedsTileLimit": "La selección actual excede el límite de {} mosaicos",
|
||||
"offlineModeWarning": "Descargas deshabilitadas en modo sin conexión. Deshabilite el modo sin conexión para descargar nuevas áreas.",
|
||||
"areaTooBigMessage": "Amplíe al menos al nivel {} para descargar áreas sin conexión. Las descargas de áreas grandes pueden hacer que la aplicación deje de responder.",
|
||||
"downloadStarted": "¡Descarga iniciada! Obteniendo mosaicos y nodos...",
|
||||
"downloadFailed": "Error al iniciar la descarga: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Descarga Iniciada",
|
||||
"message": "¡Descarga iniciada! Obteniendo mosaicos y nodos...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Ver Progreso en Configuración"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Destino de Subida",
|
||||
"subtitle": "Elige dónde se suben las cámaras",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "Simular",
|
||||
"productionDescription": "Subir a la base de datos OSM en vivo (visible para todos los usuarios)",
|
||||
"sandboxDescription": "Las subidas van al Sandbox de OSM (seguro para pruebas, se reinicia regularmente).",
|
||||
"simulateDescription": "Simular subidas (no contacta servidores OSM)"
|
||||
"simulateDescription": "Simular subidas (no contacta servidores OSM)",
|
||||
"cannotChangeWithQueue": "No se puede cambiar el destino de subida mientras hay {} elementos en cola. Limpie la cola primero."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Cuenta de OpenStreetMap",
|
||||
"osmAccountSubtitle": "Gestionar tu login de OSM y ver tus contribuciones",
|
||||
"loggedInAs": "Conectado como {}",
|
||||
"loginToOSM": "Iniciar sesión en OpenStreetMap",
|
||||
"tapToLogout": "Toque para cerrar sesión",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "Probar Conexión",
|
||||
"testConnectionSubtitle": "Verificar que las credenciales de OSM funcionen",
|
||||
"connectionOK": "Conexión OK - las credenciales son válidas",
|
||||
"connectionFailed": "Conexión falló - por favor, inicie sesión nuevamente"
|
||||
"connectionFailed": "Conexión falló - por favor, inicie sesión nuevamente",
|
||||
"viewMyEdits": "Ver Mis Ediciones en OSM",
|
||||
"viewMyEditsSubtitle": "Ver tu historial de ediciones en OpenStreetMap",
|
||||
"aboutOSM": "Acerca de OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap es un proyecto de mapeo colaborativo de código abierto donde los contribuyentes crean y mantienen un mapa gratuito y editable del mundo. Tus contribuciones de dispositivos de vigilancia ayudan a hacer visible y buscable esta infraestructura.",
|
||||
"visitOSM": "Visitar OpenStreetMap",
|
||||
"deleteAccount": "Eliminar Cuenta OSM",
|
||||
"deleteAccountSubtitle": "Gestiona tu cuenta de OpenStreetMap",
|
||||
"deleteAccountExplanation": "Para eliminar tu cuenta de OpenStreetMap, necesitarás visitar el sitio web de OpenStreetMap. Esto eliminará permanentemente tu cuenta OSM y todos los datos asociados.",
|
||||
"deleteAccountWarning": "Advertencia: Esta acción no se puede deshacer y eliminará permanentemente tu cuenta OSM.",
|
||||
"goToOSM": "Ir a OpenStreetMap",
|
||||
"accountManagement": "Gestión de Cuenta",
|
||||
"accountManagementDescription": "Para eliminar su cuenta de OpenStreetMap, debe visitar el sitio web de OpenStreetMap correspondiente. Esto eliminará permanentemente su cuenta y todos los datos asociados.",
|
||||
"currentDestinationProduction": "Actualmente conectado a: OpenStreetMap de Producción",
|
||||
"currentDestinationSandbox": "Actualmente conectado a: OpenStreetMap Sandbox",
|
||||
"currentDestinationSimulate": "Actualmente en: Modo de simulación (sin cuenta real)",
|
||||
"viewMessages": "Ver Mensajes en OSM",
|
||||
"unreadMessagesCount": "Tienes {} mensajes sin leer",
|
||||
"noUnreadMessages": "No hay mensajes sin leer",
|
||||
"reauthRequired": "Actualizar Autenticación",
|
||||
"reauthExplanation": "Debes actualizar tu autenticación para recibir notificaciones de mensajes OSM a través de la aplicación.",
|
||||
"reauthBenefit": "Esto habilitará puntos de notificación cuando tengas mensajes sin leer en OpenStreetMap.",
|
||||
"reauthNow": "Hazlo Ahora",
|
||||
"reauthLater": "Más Tarde"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Cola de Subida",
|
||||
"subtitle": "Gestionar subidas pendientes de dispositivos de vigilancia",
|
||||
"pendingUploads": "Subidas pendientes: {}",
|
||||
"pendingItemsCount": "Elementos Pendientes: {}",
|
||||
"nothingInQueue": "No hay nada en la cola",
|
||||
"simulateModeEnabled": "Modo simulación activado – subidas simuladas",
|
||||
"sandboxMode": "Modo sandbox – subidas van al Sandbox OSM",
|
||||
"tapToViewQueue": "Toque para ver cola",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "Cola limpiada",
|
||||
"uploadQueueTitle": "Cola de Subida ({} elementos)",
|
||||
"queueIsEmpty": "La cola está vacía",
|
||||
"cameraWithIndex": "Cámara {}",
|
||||
"itemWithIndex": "Elemento {}",
|
||||
"error": " (Error)",
|
||||
"completing": " (Completando...)",
|
||||
"destination": "Dest: {}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "Intentos: {}",
|
||||
"uploadFailedRetry": "Subida falló. Toque reintentar para intentar de nuevo.",
|
||||
"retryUpload": "Reintentar subida",
|
||||
"clearAll": "Limpiar Todo"
|
||||
"clearAll": "Limpiar Todo",
|
||||
"errorDetails": "Detalles del Error",
|
||||
"creatingChangeset": " (Creando changeset...)",
|
||||
"uploading": " (Subiendo...)",
|
||||
"closingChangeset": " (Cerrando changeset...)",
|
||||
"processingPaused": "Procesamiento de Cola Pausado",
|
||||
"pausedDueToOffline": "El procesamiento de subida está pausado porque el modo sin conexión está habilitado.",
|
||||
"pausedByUser": "El procesamiento de subida está pausado manualmente."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Proveedores de Tiles",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "Plantilla de URL",
|
||||
"urlTemplateHint": "https://ejemplo.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "La plantilla de URL es requerida",
|
||||
"urlTemplatePlaceholders": "La URL debe contener marcadores {z}, {x} y {y}",
|
||||
"urlTemplatePlaceholders": "La URL debe contener marcadores {quadkey} o {z}, {x} y {y}",
|
||||
"attribution": "Atribución",
|
||||
"attributionHint": "© Proveedor de Mapas",
|
||||
"attributionRequired": "La atribución es requerida",
|
||||
"maxZoom": "Nivel de Zoom Máximo",
|
||||
"maxZoomHint": "Nivel de zoom máximo (1-23)",
|
||||
"maxZoomRequired": "El zoom máximo es requerido",
|
||||
"maxZoomInvalid": "El zoom máximo debe ser un número",
|
||||
"maxZoomRange": "El zoom máximo debe estar entre {} y {}",
|
||||
"fetchPreview": "Obtener Vista Previa",
|
||||
"previewTileLoaded": "Tile de vista previa cargado exitosamente",
|
||||
"previewTileFailed": "Falló al obtener vista previa: {}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tiles de Mapa",
|
||||
"manageProviders": "Gestionar Proveedores"
|
||||
"manageProviders": "Gestionar Proveedores",
|
||||
"attribution": "Atribución del Mapa"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Ver Perfil",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "El nombre del perfil es requerido",
|
||||
"requiresDirection": "Requiere Dirección",
|
||||
"requiresDirectionSubtitle": "Si las cámaras de este tipo necesitan una etiqueta de dirección",
|
||||
"fov": "Campo de Visión",
|
||||
"fovHint": "Campo de visión en grados (dejar vacío para el predeterminado)",
|
||||
"fovSubtitle": "Campo de visión de la cámara - usado para el ancho del cono y formato de envío por rango",
|
||||
"fovInvalid": "El campo de visión debe estar entre 1 y 360 grados",
|
||||
"submittable": "Envíable",
|
||||
"submittableSubtitle": "Si este perfil puede usarse para envíos de cámaras",
|
||||
"osmTags": "Etiquetas OSM",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "No se pueden cambiar los tipos de teselas mientras se descargan áreas sin conexión",
|
||||
"selectMapLayer": "Seleccionar Capa del Mapa",
|
||||
"noTileProvidersAvailable": "No hay proveedores de teselas disponibles"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Opciones de Edición Avanzada",
|
||||
"subtitle": "Estos editores ofrecen funciones más avanzadas para ediciones complejas.",
|
||||
"webEditors": "Editores Web",
|
||||
"mobileEditors": "Editores Móviles",
|
||||
"iDEditor": "Editor iD",
|
||||
"iDEditorSubtitle": "Editor web completo - siempre funciona",
|
||||
"rapidEditor": "Editor RapiD",
|
||||
"rapidEditorSubtitle": "Edición asistida por IA con datos de Facebook",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Editor OSM avanzado para Android",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Aplicación de mapeo basada en encuestas",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Edición rápida de POI",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "Editor OSM para iOS",
|
||||
"couldNotOpenEditor": "No se pudo abrir el editor - la aplicación puede no estar instalada",
|
||||
"couldNotOpenURL": "No se pudo abrir la URL",
|
||||
"couldNotOpenOSMWebsite": "No se pudo abrir el sitio web de OSM"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Mostrar indicador de estado de red",
|
||||
"showIndicatorSubtitle": "Mostrar estado de carga y errores de datos de vigilancia",
|
||||
"loading": "Cargando datos de vigilancia...",
|
||||
"timedOut": "Solicitud agotada",
|
||||
"noData": "Sin datos sin conexión",
|
||||
"success": "Datos de vigilancia cargados",
|
||||
"nodeDataSlow": "Datos de vigilancia lentos"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Mostrando {rendered} de {total} dispositivos",
|
||||
"editingDisabledMessage": "Demasiados dispositivos visibles para editar con seguridad. Acerque más para reducir el número de dispositivos visibles, luego inténtelo de nuevo."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Buscar ubicación",
|
||||
"searchPlaceholder": "Buscar lugares o coordenadas...",
|
||||
"routeTo": "Ruta a",
|
||||
"routeFrom": "Ruta desde",
|
||||
"selectLocation": "Seleccionar ubicación",
|
||||
"calculatingRoute": "Calculando ruta...",
|
||||
"routeCalculationFailed": "Falló el cálculo de ruta",
|
||||
"start": "Iniciar",
|
||||
"resume": "Continuar",
|
||||
"endRoute": "Finalizar ruta",
|
||||
"routeOverview": "Vista de ruta",
|
||||
"retry": "Reintentar",
|
||||
"cancelSearch": "Cancelar búsqueda",
|
||||
"noResultsFound": "No se encontraron resultados",
|
||||
"searching": "Buscando...",
|
||||
"location": "Ubicación",
|
||||
"startPoint": "Inicio",
|
||||
"endPoint": "Fin",
|
||||
"startSelect": "Inicio (seleccionar)",
|
||||
"endSelect": "Fin (seleccionar)",
|
||||
"distance": "Distancia: {} km",
|
||||
"routeActive": "Ruta activa",
|
||||
"locationsTooClose": "Las ubicaciones de inicio y fin están demasiado cerca",
|
||||
"navigationSettings": "Navegación",
|
||||
"navigationSettingsSubtitle": "Configuración de planificación de rutas y evitación",
|
||||
"avoidanceDistance": "Distancia de evitación",
|
||||
"avoidanceDistanceSubtitle": "Distancia mínima para mantenerse alejado de dispositivos de vigilancia",
|
||||
"searchHistory": "Historial máximo de búsqueda",
|
||||
"searchHistorySubtitle": "Número máximo de búsquedas recientes para recordar",
|
||||
"units": "Unidades",
|
||||
"unitsSubtitle": "Unidades de visualización para distancias y medidas",
|
||||
"metric": "Métrico (km, m)",
|
||||
"imperial": "Imperial (mi, ft)",
|
||||
"meters": "metros",
|
||||
"feet": "pies"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Ubicaciones Sospechosas",
|
||||
"showSuspectedLocations": "Mostrar Ubicaciones Sospechosas",
|
||||
"showSuspectedLocationsSubtitle": "Mostrar marcadores de interrogación para sitios de vigilancia sospechosos de datos de permisos de servicios públicos",
|
||||
"lastUpdated": "Última Actualización",
|
||||
"refreshNow": "Actualizar ahora",
|
||||
"dataSource": "Fuente de Datos",
|
||||
"dataSourceDescription": "Datos de permisos de servicios públicos que indican posibles sitios de instalación de infraestructura de vigilancia",
|
||||
"dataSourceCredit": "Recopilación y alojamiento de datos proporcionado por alprwatch.org",
|
||||
"minimumDistance": "Distancia Mínima de Nodos Reales",
|
||||
"minimumDistanceSubtitle": "Ocultar ubicaciones sospechosas dentro de {}m de dispositivos de vigilancia existentes",
|
||||
"updating": "Actualizando Ubicaciones Sospechosas",
|
||||
"downloadingAndProcessing": "Descargando y procesando datos...",
|
||||
"updateSuccess": "Ubicaciones sospechosas actualizadas exitosamente",
|
||||
"updateFailed": "Error al actualizar ubicaciones sospechosas",
|
||||
"neverFetched": "Nunca obtenido",
|
||||
"daysAgo": "hace {} días",
|
||||
"hoursAgo": "hace {} horas",
|
||||
"minutesAgo": "hace {} minutos",
|
||||
"justNow": "Ahora mismo"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Ubicación Sospechosa #{}",
|
||||
"ticketNo": "No. de Ticket",
|
||||
"address": "Dirección",
|
||||
"street": "Calle",
|
||||
"city": "Ciudad",
|
||||
"state": "Estado",
|
||||
"intersectingStreet": "Calle que Intersecta",
|
||||
"workDoneFor": "Trabajo Realizado Para",
|
||||
"remarks": "Observaciones",
|
||||
"url": "URL",
|
||||
"coordinates": "Coordenadas",
|
||||
"noAddressAvailable": "No hay dirección disponible"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Transparence de la Surveillance",
|
||||
"description": "DeFlock est une application mobile axée sur la confidentialité pour cartographier l'infrastructure de surveillance publique en utilisant OpenStreetMap. Documentez les caméras, ALPRs, détecteurs de coups de feu et autres dispositifs de surveillance dans votre communauté pour rendre cette infrastructure visible et consultable.",
|
||||
"features": "• Cartographie hors ligne avec zones téléchargeables\n• Upload direct vers OpenStreetMap avec OAuth2\n• Profils intégrés pour les principaux fabricants\n• Respectueux de la confidentialité - aucune donnée utilisateur collectée\n• Multiples fournisseurs de cartes (OSM, imagerie satellite)",
|
||||
"initiative": "Partie de l'initiative plus large DeFlock pour promouvoir la transparence de la surveillance.",
|
||||
"footer": "Visitez : deflock.me\nConstruit avec Flutter • Source Ouverte",
|
||||
"showWelcome": "Afficher le Message de Bienvenue",
|
||||
"showSubmissionGuide": "Afficher le Guide de Soumission",
|
||||
"viewReleaseNotes": "Voir les Notes de Version"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Bienvenue dans DeFlock",
|
||||
"description": "DeFlock a été fondé sur l'idée que les outils de surveillance publique devraient être transparents. Dans cette application mobile, comme sur le site web, vous pourrez voir l'emplacement des ALPRs et autres infrastructures de surveillance dans votre région et à l'étranger.",
|
||||
"mission": "Cependant, ce projet n'est pas automatisé ; il nous faut tous pour améliorer ce projet. En visualisant la carte, vous pouvez appuyer sur \"Nouveau Nœud\" pour ajouter une installation précédemment inconnue. Avec votre aide, nous pouvons atteindre notre objectif d'augmenter la transparence et la sensibilisation du public à l'infrastructure de surveillance.",
|
||||
"firsthandKnowledge": "IMPORTANT : Ne contribuez qu'aux dispositifs de surveillance que vous avez personnellement observés de première main. Les politiques d'OpenStreetMap et de Google interdisent l'utilisation de sources comme les images Street View pour les contributions. Vos contributions doivent être basées sur vos propres observations directes et en personne.",
|
||||
"privacy": "Note de Confidentialité : Cette application fonctionne entièrement localement sur votre appareil et utilise l'API tierce OpenStreetMap uniquement pour le stockage et la soumission de données. DeFlock ne collecte ni ne stocke aucune donnée utilisateur de quelque nature que ce soit, et n'est pas responsable de la gestion des comptes.",
|
||||
"tileNote": "NOTE : Les tuiles de carte gratuites d'OpenStreetMap peuvent être très lentes à charger. Des fournisseurs de tuiles alternatifs peuvent être configurés dans Paramètres > Avancé.",
|
||||
"moreInfo": "Vous pouvez trouver plus de liens sous Paramètres > À propos.",
|
||||
"dontShowAgain": "Ne plus afficher ce message de bienvenue",
|
||||
"getStarted": "Commençons le DeFlock !"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Meilleures Pratiques de Soumission",
|
||||
"description": "Avant de soumettre votre premier dispositif de surveillance, prenez un moment pour examiner ces directives importantes pour des contributions de haute qualité à OpenStreetMap.",
|
||||
"bestPractices": "• Ne cartographiez que les dispositifs que vous avez observés personnellement\n• Prenez le temps d'identifier avec précision le type et le fabricant\n• Utilisez un positionnement précis - zoomez avant de placer le marqueur\n• Incluez les informations de direction quand c'est applicable\n• Vérifiez vos sélections d'étiquettes avant de soumettre",
|
||||
"placementNote": "Rappelez-vous : Des données précises et de première main sont essentielles pour la communauté DeFlock et le projet OpenStreetMap.",
|
||||
"moreInfo": "Pour des conseils détaillés sur l'identification des dispositifs et les meilleures pratiques de cartographie :",
|
||||
"identificationGuide": "Guide d'Identification",
|
||||
"osmWiki": "Wiki OpenStreetMap",
|
||||
"dontShowAgain": "Ne plus afficher ce guide",
|
||||
"gotIt": "Compris !"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Nouveau Nœud",
|
||||
"download": "Télécharger",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "Fermer",
|
||||
"submit": "Soumettre",
|
||||
"saveEdit": "Sauvegarder Modification",
|
||||
"clear": "Effacer"
|
||||
"clear": "Effacer",
|
||||
"viewOnOSM": "Voir sur OSM",
|
||||
"advanced": "Avancé",
|
||||
"useAdvancedEditor": "Utiliser l'Éditeur Avancé"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Nœud Très Proche d'un Dispositif Existant",
|
||||
"message": "Ce nœud n'est qu'à {} mètres d'un dispositif de surveillance existant.",
|
||||
"suggestion": "Si plusieurs dispositifs se trouvent sur le même poteau, veuillez utiliser plusieurs directions sur un seul nœud au lieu de créer des nœuds séparés.",
|
||||
"nearbyNodes": "Dispositif(s) proche(s) trouvé(s) ({}) :",
|
||||
"nodeInfo": "Nœud #{} - {}",
|
||||
"andMore": "...et {} de plus",
|
||||
"goBack": "Retour",
|
||||
"submitAnyway": "Soumettre Quand Même",
|
||||
"nodeType": {
|
||||
"alpr": "Caméra ALPR/ANPR",
|
||||
"publicCamera": "Caméra de Surveillance Publique",
|
||||
"camera": "Caméra de Surveillance",
|
||||
"amenity": "{}",
|
||||
"device": "Dispositif {}",
|
||||
"unknown": "Dispositif Inconnu"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Activer le suivi (nord en haut)",
|
||||
"northUp": "Activer le suivi (rotation)",
|
||||
"off": "Activer le suivi",
|
||||
"follow": "Activer le suivi (rotation)",
|
||||
"rotating": "Désactiver le suivi"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "Vous ne voulez probablement pas faire cela à moins d'être absolument sûr d'avoir une bonne raison de le faire.",
|
||||
"offlineMode": "Mode Hors Ligne",
|
||||
"offlineModeSubtitle": "Désactiver toutes les requêtes réseau sauf pour les zones locales/hors ligne.",
|
||||
"pauseQueueProcessing": "Suspendre la File d'Upload",
|
||||
"pauseQueueProcessingSubtitle": "Arrêter l'upload des modifications en attente tout en gardant l'accès aux données en direct.",
|
||||
"offlineModeWarningTitle": "Téléchargements Actifs",
|
||||
"offlineModeWarningMessage": "L'activation du mode hors ligne annulera tous les téléchargements de zone actifs. Voulez-vous continuer?",
|
||||
"enableOfflineMode": "Activer le Mode Hors Ligne",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "Gérer le mode hors ligne et les zones téléchargées",
|
||||
"advancedSettings": "Paramètres Avancés",
|
||||
"advancedSettingsSubtitle": "Paramètres de performance, alertes et fournisseurs de tuiles",
|
||||
"proximityAlerts": "Alertes de Proximité"
|
||||
"proximityAlerts": "Alertes de Proximité",
|
||||
"networkStatusIndicator": "Indicateur de Statut Réseau"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Recevoir des notifications en s'approchant de dispositifs de surveillance",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Sélectionner un profil...",
|
||||
"profileRequired": "Veuillez sélectionner un profil pour continuer.",
|
||||
"direction": "Direction {}°",
|
||||
"profileNoDirectionInfo": "Ce profil ne nécessite pas de direction.",
|
||||
"mustBeLoggedIn": "Vous devez être connecté pour soumettre de nouveaux nœuds. Veuillez vous connecter via les Paramètres.",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "Modifier Nœud #{}",
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Sélectionner un profil...",
|
||||
"profileRequired": "Veuillez sélectionner un profil pour continuer.",
|
||||
"direction": "Direction {}°",
|
||||
"profileNoDirectionInfo": "Ce profil ne nécessite pas de direction.",
|
||||
"temporarilyDisabled": "Les modifications ont été temporairement désactivées pendant que nous résolvons un bug - désolés - revenez bientôt.",
|
||||
"mustBeLoggedIn": "Vous devez être connecté pour modifier les nœuds. Veuillez vous connecter via les Paramètres.",
|
||||
"sandboxModeWarning": "Impossible de soumettre des modifications de nœuds de production au sandbox. Passez au mode Production dans les Paramètres pour modifier les nœuds.",
|
||||
"enableSubmittableProfile": "Activez un profil soumissible dans les Paramètres pour modifier les nœuds.",
|
||||
"profileViewOnlyWarning": "Ce profil est uniquement pour la visualisation de la carte. Veuillez sélectionner un profil soumissible pour modifier les nœuds.",
|
||||
"cannotMoveConstrainedNode": "Impossible de déplacer cette caméra - elle est connectée à un autre élément de carte (OSM way/relation). Vous pouvez toujours modifier ses balises et sa direction.",
|
||||
"zoomInRequiredMessage": "Zoomez au moins au niveau {} pour ajouter ou modifier des nœuds de surveillance. Cela garantit un positionnement précis pour une cartographie exacte.",
|
||||
"extractFromWay": "Extraire le nœud du way/relation",
|
||||
"extractFromWaySubtitle": "Créer un nouveau nœud avec les mêmes balises, permettre le déplacement vers un nouvel emplacement",
|
||||
"refineTags": "Affiner Balises",
|
||||
"refineTagsWithProfile": "Affiner Balises ({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "Dans la limite de {} tuiles",
|
||||
"exceedsTileLimit": "La sélection actuelle dépasse la limite de {} tuiles",
|
||||
"offlineModeWarning": "Téléchargements désactivés en mode hors ligne. Désactivez le mode hors ligne pour télécharger de nouvelles zones.",
|
||||
"downloadStarted": "Téléchargement démarré! Récupération des tuiles et nœuds...",
|
||||
"areaTooBigMessage": "Zoomez au moins au niveau {} pour télécharger des zones hors ligne. Les téléchargements de grandes zones peuvent rendre l'application non réactive.",
|
||||
"downloadStarted": "Téléchargement démarré ! Récupération des tuiles et nœuds...",
|
||||
"downloadFailed": "Échec du démarrage du téléchargement: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Téléchargement Démarré",
|
||||
"message": "Téléchargement démarré! Récupération des tuiles et nœuds...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Voir le Progrès dans Paramètres"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Destination de Téléchargement",
|
||||
"subtitle": "Choisir où les caméras sont téléchargées",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "Simuler",
|
||||
"productionDescription": "Télécharger vers la base de données OSM en direct (visible pour tous les utilisateurs)",
|
||||
"sandboxDescription": "Les téléchargements vont vers le Sandbox OSM (sûr pour les tests, réinitialisé régulièrement).",
|
||||
"simulateDescription": "Simuler les téléchargements (ne contacte pas les serveurs OSM)"
|
||||
"simulateDescription": "Simuler les téléchargements (ne contacte pas les serveurs OSM)",
|
||||
"cannotChangeWithQueue": "Impossible de changer la destination de téléversement tant que {} éléments sont en file d'attente. Videz d'abord la file d'attente."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Compte OpenStreetMap",
|
||||
"osmAccountSubtitle": "Gérer votre connexion OSM et voir vos contributions",
|
||||
"loggedInAs": "Connecté en tant que {}",
|
||||
"loginToOSM": "Se connecter à OpenStreetMap",
|
||||
"tapToLogout": "Appuyer pour se déconnecter",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "Tester Connexion",
|
||||
"testConnectionSubtitle": "Vérifier que les identifiants OSM fonctionnent",
|
||||
"connectionOK": "Connexion OK - les identifiants sont valides",
|
||||
"connectionFailed": "Connexion échouée - veuillez vous reconnecter"
|
||||
"connectionFailed": "Connexion échouée - veuillez vous reconnecter",
|
||||
"viewMyEdits": "Voir Mes Modifications sur OSM",
|
||||
"viewMyEditsSubtitle": "Voir votre historique de modifications sur OpenStreetMap",
|
||||
"aboutOSM": "À Propos d'OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap est un projet cartographique collaboratif open source où les contributeurs créent et maintiennent une carte gratuite et modifiable du monde. Vos contributions de dispositifs de surveillance aident à rendre cette infrastructure visible et consultable.",
|
||||
"visitOSM": "Visiter OpenStreetMap",
|
||||
"deleteAccount": "Supprimer Compte OSM",
|
||||
"deleteAccountSubtitle": "Gérez votre compte OpenStreetMap",
|
||||
"deleteAccountExplanation": "Pour supprimer votre compte OpenStreetMap, vous devrez visiter le site web OpenStreetMap. Cela supprimera définitivement votre compte OSM et toutes les données associées.",
|
||||
"deleteAccountWarning": "Attention : Cette action ne peut pas être annulée et supprimera définitivement votre compte OSM.",
|
||||
"goToOSM": "Aller à OpenStreetMap",
|
||||
"accountManagement": "Gestion de Compte",
|
||||
"accountManagementDescription": "Pour supprimer votre compte OpenStreetMap, vous devez visiter le site Web OpenStreetMap approprié. Cela supprimera définitivement votre compte et toutes les données associées.",
|
||||
"currentDestinationProduction": "Actuellement connecté à : OpenStreetMap de Production",
|
||||
"currentDestinationSandbox": "Actuellement connecté à : OpenStreetMap Sandbox",
|
||||
"currentDestinationSimulate": "Actuellement en : Mode simulation (pas de compte réel)",
|
||||
"viewMessages": "Voir les Messages sur OSM",
|
||||
"unreadMessagesCount": "Vous avez {} messages non lus",
|
||||
"noUnreadMessages": "Aucun message non lu",
|
||||
"reauthRequired": "Actualiser l'Authentification",
|
||||
"reauthExplanation": "Vous devez actualiser votre authentification pour recevoir des notifications de messages OSM via l'application.",
|
||||
"reauthBenefit": "Cela activera les points de notification lorsque vous avez des messages non lus sur OpenStreetMap.",
|
||||
"reauthNow": "Le Faire Maintenant",
|
||||
"reauthLater": "Plus Tard"
|
||||
},
|
||||
"queue": {
|
||||
"title": "File de Téléchargement",
|
||||
"subtitle": "Gérer les téléchargements de dispositifs de surveillance en attente",
|
||||
"pendingUploads": "Téléchargements en attente: {}",
|
||||
"pendingItemsCount": "Éléments en Attente: {}",
|
||||
"nothingInQueue": "Rien dans la file",
|
||||
"simulateModeEnabled": "Mode simulation activé – téléchargements simulés",
|
||||
"sandboxMode": "Mode sandbox – téléchargements vont vers OSM Sandbox",
|
||||
"tapToViewQueue": "Appuyer pour voir la file",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "File vidée",
|
||||
"uploadQueueTitle": "File de Téléchargement ({} éléments)",
|
||||
"queueIsEmpty": "La file est vide",
|
||||
"cameraWithIndex": "Caméra {}",
|
||||
"itemWithIndex": "Élément {}",
|
||||
"error": " (Erreur)",
|
||||
"completing": " (Finalisation...)",
|
||||
"destination": "Dest: {}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "Tentatives: {}",
|
||||
"uploadFailedRetry": "Téléchargement échoué. Appuyer pour réessayer.",
|
||||
"retryUpload": "Réessayer téléchargement",
|
||||
"clearAll": "Tout Vider"
|
||||
"clearAll": "Tout Vider",
|
||||
"errorDetails": "Détails de l'Erreur",
|
||||
"creatingChangeset": " (Création du changeset...)",
|
||||
"uploading": " (Téléchargement...)",
|
||||
"closingChangeset": " (Fermeture du changeset...)",
|
||||
"processingPaused": "Traitement de la File d'Attente Interrompu",
|
||||
"pausedDueToOffline": "Le traitement des téléversements est interrompu car le mode hors ligne est activé.",
|
||||
"pausedByUser": "Le traitement des téléversements est interrompu manuellement."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Fournisseurs de Tuiles",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "Modèle d'URL",
|
||||
"urlTemplateHint": "https://exemple.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "Le modèle d'URL est requis",
|
||||
"urlTemplatePlaceholders": "L'URL doit contenir les marqueurs {z}, {x} et {y}",
|
||||
"urlTemplatePlaceholders": "L'URL doit contenir soit {quadkey} soit les marqueurs {z}, {x} et {y}",
|
||||
"attribution": "Attribution",
|
||||
"attributionHint": "© Fournisseur de Cartes",
|
||||
"attributionRequired": "L'attribution est requise",
|
||||
"maxZoom": "Niveau de Zoom Maximum",
|
||||
"maxZoomHint": "Niveau de zoom maximum (1-23)",
|
||||
"maxZoomRequired": "Le zoom maximum est requis",
|
||||
"maxZoomInvalid": "Le zoom maximum doit être un nombre",
|
||||
"maxZoomRange": "Le zoom maximum doit être entre {} et {}",
|
||||
"fetchPreview": "Récupérer Aperçu",
|
||||
"previewTileLoaded": "Tuile d'aperçu chargée avec succès",
|
||||
"previewTileFailed": "Échec de récupération de l'aperçu: {}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tuiles de Carte",
|
||||
"manageProviders": "Gérer Fournisseurs"
|
||||
"manageProviders": "Gérer Fournisseurs",
|
||||
"attribution": "Attribution de Carte"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Voir Profil",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "Le nom du profil est requis",
|
||||
"requiresDirection": "Nécessite Direction",
|
||||
"requiresDirectionSubtitle": "Si les caméras de ce type ont besoin d'une balise de direction",
|
||||
"fov": "Champ de Vision",
|
||||
"fovHint": "Champ de vision en degrés (laisser vide pour la valeur par défaut)",
|
||||
"fovSubtitle": "Champ de vision de la caméra - utilisé pour la largeur du cône et le format de soumission par plage",
|
||||
"fovInvalid": "Le champ de vision doit être entre 1 et 360 degrés",
|
||||
"submittable": "Soumissible",
|
||||
"submittableSubtitle": "Si ce profil peut être utilisé pour les soumissions de caméras",
|
||||
"osmTags": "Balises OSM",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "Impossible de changer les types de tuiles pendant le téléchargement des zones hors ligne",
|
||||
"selectMapLayer": "Sélectionner la Couche de Carte",
|
||||
"noTileProvidersAvailable": "Aucun fournisseur de tuiles disponible"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Options d'Édition Avancées",
|
||||
"subtitle": "Ces éditeurs offrent des fonctionnalités plus avancées pour les modifications complexes.",
|
||||
"webEditors": "Éditeurs Web",
|
||||
"mobileEditors": "Éditeurs Mobiles",
|
||||
"iDEditor": "Éditeur iD",
|
||||
"iDEditorSubtitle": "Éditeur web complet - fonctionne toujours",
|
||||
"rapidEditor": "Éditeur RapiD",
|
||||
"rapidEditorSubtitle": "Édition assistée par IA avec des données Facebook",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Éditeur OSM avancé Android",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Application de cartographie basée sur des enquêtes",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Édition rapide de POI",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "Éditeur OSM iOS",
|
||||
"couldNotOpenEditor": "Impossible d'ouvrir l'éditeur - l'application peut ne pas être installée",
|
||||
"couldNotOpenURL": "Impossible d'ouvrir l'URL",
|
||||
"couldNotOpenOSMWebsite": "Impossible d'ouvrir le site web OSM"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Afficher l'indicateur de statut réseau",
|
||||
"showIndicatorSubtitle": "Afficher l'état de chargement et d'erreur des données de surveillance",
|
||||
"loading": "Chargement des données de surveillance...",
|
||||
"timedOut": "Demande expirée",
|
||||
"noData": "Aucune donnée hors ligne",
|
||||
"success": "Données de surveillance chargées",
|
||||
"nodeDataSlow": "Données de surveillance lentes"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Affichage de {rendered} sur {total} appareils",
|
||||
"editingDisabledMessage": "Trop d'appareils visibles pour éditer en toute sécurité. Zoomez davantage pour réduire le nombre d'appareils visibles, puis réessayez."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Rechercher lieu",
|
||||
"searchPlaceholder": "Rechercher lieux ou coordonnées...",
|
||||
"routeTo": "Itinéraire vers",
|
||||
"routeFrom": "Itinéraire depuis",
|
||||
"selectLocation": "Sélectionner lieu",
|
||||
"calculatingRoute": "Calcul de l'itinéraire...",
|
||||
"routeCalculationFailed": "Échec du calcul d'itinéraire",
|
||||
"start": "Démarrer",
|
||||
"resume": "Reprendre",
|
||||
"endRoute": "Terminer l'itinéraire",
|
||||
"routeOverview": "Vue d'ensemble",
|
||||
"retry": "Réessayer",
|
||||
"cancelSearch": "Annuler recherche",
|
||||
"noResultsFound": "Aucun résultat trouvé",
|
||||
"searching": "Recherche...",
|
||||
"location": "Lieu",
|
||||
"startPoint": "Début",
|
||||
"endPoint": "Fin",
|
||||
"startSelect": "Début (sélectionner)",
|
||||
"endSelect": "Fin (sélectionner)",
|
||||
"distance": "Distance: {} km",
|
||||
"routeActive": "Itinéraire actif",
|
||||
"locationsTooClose": "Les emplacements de départ et d'arrivée sont trop proches",
|
||||
"navigationSettings": "Navigation",
|
||||
"navigationSettingsSubtitle": "Paramètres de planification d'itinéraire et d'évitement",
|
||||
"avoidanceDistance": "Distance d'évitement",
|
||||
"avoidanceDistanceSubtitle": "Distance minimale pour éviter les dispositifs de surveillance",
|
||||
"searchHistory": "Historique de recherche max",
|
||||
"searchHistorySubtitle": "Nombre maximum de recherches récentes à retenir",
|
||||
"units": "Unités",
|
||||
"unitsSubtitle": "Unités d'affichage pour distances et mesures",
|
||||
"metric": "Métrique (km, m)",
|
||||
"imperial": "Impérial (mi, ft)",
|
||||
"meters": "mètres",
|
||||
"feet": "pieds"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Emplacements Suspects",
|
||||
"showSuspectedLocations": "Afficher les Emplacements Suspects",
|
||||
"showSuspectedLocationsSubtitle": "Afficher des marqueurs en point d'interrogation pour les sites de surveillance suspectés à partir des données de permis de services publics",
|
||||
"lastUpdated": "Dernière Mise à Jour",
|
||||
"refreshNow": "Actualiser maintenant",
|
||||
"dataSource": "Source de Données",
|
||||
"dataSourceDescription": "Données de permis de services publics indiquant des sites d'installation potentiels d'infrastructure de surveillance",
|
||||
"dataSourceCredit": "Collecte et hébergement des données fournis par alprwatch.org",
|
||||
"minimumDistance": "Distance Minimale des Nœuds Réels",
|
||||
"minimumDistanceSubtitle": "Masquer les emplacements suspects dans un rayon de {}m des dispositifs de surveillance existants",
|
||||
"updating": "Mise à Jour des Emplacements Suspects",
|
||||
"downloadingAndProcessing": "Téléchargement et traitement des données...",
|
||||
"updateSuccess": "Emplacements suspects mis à jour avec succès",
|
||||
"updateFailed": "Échec de la mise à jour des emplacements suspects",
|
||||
"neverFetched": "Jamais récupéré",
|
||||
"daysAgo": "il y a {} jours",
|
||||
"hoursAgo": "il y a {} heures",
|
||||
"minutesAgo": "il y a {} minutes",
|
||||
"justNow": "À l'instant"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Emplacement Suspect #{}",
|
||||
"ticketNo": "N° de Ticket",
|
||||
"address": "Adresse",
|
||||
"street": "Rue",
|
||||
"city": "Ville",
|
||||
"state": "État",
|
||||
"intersectingStreet": "Rue Transversale",
|
||||
"workDoneFor": "Travail Effectué Pour",
|
||||
"remarks": "Remarques",
|
||||
"url": "URL",
|
||||
"coordinates": "Coordonnées",
|
||||
"noAddressAvailable": "Aucune adresse disponible"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Trasparenza della Sorveglianza",
|
||||
"description": "DeFlock è un'app mobile orientata alla privacy per mappare l'infrastruttura di sorveglianza pubblica utilizzando OpenStreetMap. Documenta telecamere, ALPR, rilevatori di spari e altri dispositivi di sorveglianza nella tua comunità per rendere questa infrastruttura visibile e ricercabile.",
|
||||
"features": "• Mappatura con capacità offline con aree scaricabili\n• Upload diretto su OpenStreetMap con OAuth2\n• Profili integrati per i principali produttori\n• Rispettoso della privacy - nessun dato utente raccolto\n• Multipli fornitori di mappe (OSM, immagini satellitari)",
|
||||
"initiative": "Parte della più ampia iniziativa DeFlock per promuovere la trasparenza della sorveglianza.",
|
||||
"footer": "Visita: deflock.me\nCostruito con Flutter • Open Source",
|
||||
"showWelcome": "Mostra Messaggio di Benvenuto",
|
||||
"showSubmissionGuide": "Mostra Guida di Invio",
|
||||
"viewReleaseNotes": "Visualizza Note di Rilascio"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Benvenuto in DeFlock",
|
||||
"description": "DeFlock è stato fondato sull'idea che gli strumenti di sorveglianza pubblica dovrebbero essere trasparenti. All'interno di questa app mobile, come sul sito web, sarai in grado di visualizzare la posizione di ALPR e altre infrastrutture di sorveglianza nella tua zona locale e all'estero.",
|
||||
"mission": "Tuttavia, questo progetto non è automatizzato; servono tutti noi per migliorare questo progetto. Durante la visualizzazione della mappa, puoi toccare \"Nuovo Nodo\" per aggiungere un'installazione precedentemente sconosciuta. Con il tuo aiuto, possiamo raggiungere il nostro obiettivo di maggiore trasparenza e consapevolezza pubblica dell'infrastruttura di sorveglianza.",
|
||||
"firsthandKnowledge": "IMPORTANTE: Contribuisci solo con dispositivi di sorveglianza che hai osservato personalmente di prima mano. Le politiche di OpenStreetMap e Google vietano l'uso di fonti come le immagini di Street View per i contributi. I tuoi contributi dovrebbero essere basati sulle tue osservazioni dirette e di persona.",
|
||||
"privacy": "Nota sulla Privacy: Questa app funziona interamente localmente sul tuo dispositivo e utilizza l'API di terze parti OpenStreetMap solo per l'archiviazione e l'invio dei dati. DeFlock non raccoglie né memorizza alcun tipo di dati utente e non è responsabile della gestione degli account.",
|
||||
"tileNote": "NOTA: Le tessere mappa gratuite di OpenStreetMap possono essere molto lente a caricare. Fornitori di tessere alternativi possono essere configurati in Impostazioni > Avanzate.",
|
||||
"moreInfo": "Puoi trovare altri collegamenti in Impostazioni > Informazioni.",
|
||||
"dontShowAgain": "Non mostrare più questo messaggio di benvenuto",
|
||||
"getStarted": "Iniziamo con DeFlock!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Migliori Pratiche di Invio",
|
||||
"description": "Prima di inviare il tuo primo dispositivo di sorveglianza, prenditi un momento per rivedere queste linee guida importanti per contributi di alta qualità a OpenStreetMap.",
|
||||
"bestPractices": "• Mappa solo dispositivi che hai osservato personalmente\n• Prenditi tempo per identificare accuratamente tipo e produttore\n• Usa posizionamento preciso - ingrandisci prima di piazzare il marcatore\n• Includi informazioni sulla direzione quando applicabile\n• Controlla le tue selezioni di tag prima di inviare",
|
||||
"placementNote": "Ricorda: Dati accurati e di prima mano sono essenziali per la comunità DeFlock e il progetto OpenStreetMap.",
|
||||
"moreInfo": "Per una guida dettagliata sull'identificazione dei dispositivi e le migliori pratiche di mappatura:",
|
||||
"identificationGuide": "Guida di Identificazione",
|
||||
"osmWiki": "Wiki OpenStreetMap",
|
||||
"dontShowAgain": "Non mostrare più questa guida",
|
||||
"gotIt": "Capito!"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Nuovo Nodo",
|
||||
"download": "Scarica",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "Chiudi",
|
||||
"submit": "Invia",
|
||||
"saveEdit": "Salva Modifica",
|
||||
"clear": "Pulisci"
|
||||
"clear": "Pulisci",
|
||||
"viewOnOSM": "Visualizza su OSM",
|
||||
"advanced": "Avanzato",
|
||||
"useAdvancedEditor": "Usa Editor Avanzato"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Nodo Molto Vicino a Dispositivo Esistente",
|
||||
"message": "Questo nodo è a soli {} metri da un dispositivo di sorveglianza esistente.",
|
||||
"suggestion": "Se ci sono più dispositivi sullo stesso palo, utilizzare più direzioni su un singolo nodo invece di creare nodi separati.",
|
||||
"nearbyNodes": "Dispositivo/i vicino/i trovato/i ({}):",
|
||||
"nodeInfo": "Nodo #{} - {}",
|
||||
"andMore": "...e altri {}",
|
||||
"goBack": "Torna Indietro",
|
||||
"submitAnyway": "Invia Comunque",
|
||||
"nodeType": {
|
||||
"alpr": "Telecamera ALPR/ANPR",
|
||||
"publicCamera": "Telecamera di Sorveglianza Pubblica",
|
||||
"camera": "Telecamera di Sorveglianza",
|
||||
"amenity": "{}",
|
||||
"device": "Dispositivo {}",
|
||||
"unknown": "Dispositivo Sconosciuto"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Attiva seguimi (nord in alto)",
|
||||
"northUp": "Attiva seguimi (rotazione)",
|
||||
"off": "Attiva seguimi",
|
||||
"follow": "Attiva seguimi (rotazione)",
|
||||
"rotating": "Disattiva seguimi"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "Probabilmente non vuoi farlo a meno che non sei assolutamente sicuro di avere una buona ragione per farlo.",
|
||||
"offlineMode": "Modalità Offline",
|
||||
"offlineModeSubtitle": "Disabilita tutte le richieste di rete tranne per aree locali/offline.",
|
||||
"pauseQueueProcessing": "Pausa Coda Upload",
|
||||
"pauseQueueProcessingSubtitle": "Ferma l'upload delle modifiche in coda mantenendo l'accesso ai dati dal vivo.",
|
||||
"offlineModeWarningTitle": "Download Attivi",
|
||||
"offlineModeWarningMessage": "L'attivazione della modalità offline cancellerà qualsiasi download di area attivo. Vuoi continuare?",
|
||||
"enableOfflineMode": "Attiva Modalità Offline",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "Gestisci modalità offline e aree scaricate",
|
||||
"advancedSettings": "Impostazioni Avanzate",
|
||||
"advancedSettingsSubtitle": "Impostazioni di prestazioni, avvisi e fornitori di tessere",
|
||||
"proximityAlerts": "Avvisi di Prossimità"
|
||||
"proximityAlerts": "Avvisi di Prossimità",
|
||||
"networkStatusIndicator": "Indicatore di Stato di Rete"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Ricevi notifiche quando ti avvicini a dispositivi di sorveglianza",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profilo",
|
||||
"selectProfile": "Seleziona un profilo...",
|
||||
"profileRequired": "Per favore seleziona un profilo per continuare.",
|
||||
"direction": "Direzione {}°",
|
||||
"profileNoDirectionInfo": "Questo profilo non richiede una direzione.",
|
||||
"mustBeLoggedIn": "Devi essere loggato per inviare nuovi nodi. Per favore accedi tramite Impostazioni.",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "Modifica Nodo #{}",
|
||||
"profile": "Profilo",
|
||||
"selectProfile": "Seleziona un profilo...",
|
||||
"profileRequired": "Per favore seleziona un profilo per continuare.",
|
||||
"direction": "Direzione {}°",
|
||||
"profileNoDirectionInfo": "Questo profilo non richiede una direzione.",
|
||||
"temporarilyDisabled": "Le modifiche sono state temporaneamente disabilitate mentre risolviamo un bug - scuse - torna presto.",
|
||||
"mustBeLoggedIn": "Devi essere loggato per modificare i nodi. Per favore accedi tramite Impostazioni.",
|
||||
"sandboxModeWarning": "Impossibile inviare modifiche di nodi di produzione alla sandbox. Passa alla modalità Produzione nelle Impostazioni per modificare i nodi.",
|
||||
"enableSubmittableProfile": "Abilita un profilo inviabile nelle Impostazioni per modificare i nodi.",
|
||||
"profileViewOnlyWarning": "Questo profilo è solo per la visualizzazione della mappa. Per favore seleziona un profilo inviabile per modificare i nodi.",
|
||||
"cannotMoveConstrainedNode": "Impossibile spostare questa telecamera - è collegata a un altro elemento della mappa (OSM way/relation). Puoi ancora modificare i suoi tag e direzione.",
|
||||
"zoomInRequiredMessage": "Ingrandisci almeno al livello {} per aggiungere o modificare nodi di sorveglianza. Questo garantisce un posizionamento preciso per una mappatura accurata.",
|
||||
"extractFromWay": "Estrai nodo da way/relation",
|
||||
"extractFromWaySubtitle": "Crea nuovo nodo con gli stessi tag, consenti spostamento in nuova posizione",
|
||||
"refineTags": "Affina Tag",
|
||||
"refineTagsWithProfile": "Affina Tag ({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "Entro il limite di {} tile",
|
||||
"exceedsTileLimit": "La selezione corrente supera il limite di {} tile",
|
||||
"offlineModeWarning": "Download disabilitati in modalità offline. Disabilita la modalità offline per scaricare nuove aree.",
|
||||
"areaTooBigMessage": "Ingrandisci almeno al livello {} per scaricare aree offline. I download di aree grandi possono rendere l'app non reattiva.",
|
||||
"downloadStarted": "Download avviato! Recupero tile e nodi...",
|
||||
"downloadFailed": "Impossibile avviare il download: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Avviato",
|
||||
"message": "Download avviato! Recupero tile e nodi...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Visualizza Progresso in Impostazioni"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Destinazione Upload",
|
||||
"subtitle": "Scegli dove vengono caricate le telecamere",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "Simula",
|
||||
"productionDescription": "Carica nel database OSM dal vivo (visibile a tutti gli utenti)",
|
||||
"sandboxDescription": "Gli upload vanno alla Sandbox OSM (sicuro per i test, si resetta regolarmente).",
|
||||
"simulateDescription": "Simula upload (non contatta i server OSM)"
|
||||
"simulateDescription": "Simula upload (non contatta i server OSM)",
|
||||
"cannotChangeWithQueue": "Impossibile cambiare la destinazione di upload mentre ci sono {} elementi in coda. Svuota prima la coda."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Account OpenStreetMap",
|
||||
"osmAccountSubtitle": "Gestisci il tuo login OSM e visualizza i tuoi contributi",
|
||||
"loggedInAs": "Loggato come {}",
|
||||
"loginToOSM": "Accedi a OpenStreetMap",
|
||||
"tapToLogout": "Tocca per disconnetterti",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "Testa Connessione",
|
||||
"testConnectionSubtitle": "Verifica che le credenziali OSM funzionino",
|
||||
"connectionOK": "Connessione OK - le credenziali sono valide",
|
||||
"connectionFailed": "Connessione fallita - per favore accedi di nuovo"
|
||||
"connectionFailed": "Connessione fallita - per favore accedi di nuovo",
|
||||
"viewMyEdits": "Visualizza le Mie Modifiche su OSM",
|
||||
"viewMyEditsSubtitle": "Visualizza la cronologia delle tue modifiche su OpenStreetMap",
|
||||
"aboutOSM": "Informazioni su OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap è un progetto cartografico collaborativo open source dove i contributori creano e mantengono una mappa gratuita e modificabile del mondo. I tuoi contributi sui dispositivi di sorveglianza aiutano a rendere visibile e ricercabile questa infrastruttura.",
|
||||
"visitOSM": "Visita OpenStreetMap",
|
||||
"deleteAccount": "Elimina Account OSM",
|
||||
"deleteAccountSubtitle": "Gestisci il tuo account OpenStreetMap",
|
||||
"deleteAccountExplanation": "Per eliminare il tuo account OpenStreetMap, dovrai visitare il sito web di OpenStreetMap. Questo rimuoverà permanentemente il tuo account OSM e tutti i dati associati.",
|
||||
"deleteAccountWarning": "Attenzione: Questa azione non può essere annullata e eliminerà permanentemente il tuo account OSM.",
|
||||
"goToOSM": "Vai a OpenStreetMap",
|
||||
"accountManagement": "Gestione Account",
|
||||
"accountManagementDescription": "Per eliminare il tuo account OpenStreetMap, devi visitare il sito web OpenStreetMap appropriato. Questo rimuoverà permanentemente il tuo account e tutti i dati associati.",
|
||||
"currentDestinationProduction": "Attualmente connesso a: OpenStreetMap di Produzione",
|
||||
"currentDestinationSandbox": "Attualmente connesso a: OpenStreetMap Sandbox",
|
||||
"currentDestinationSimulate": "Attualmente in: Modalità simulazione (nessun account reale)",
|
||||
"viewMessages": "Visualizza Messaggi su OSM",
|
||||
"unreadMessagesCount": "Hai {} messaggi non letti",
|
||||
"noUnreadMessages": "Nessun messaggio non letto",
|
||||
"reauthRequired": "Aggiorna Autenticazione",
|
||||
"reauthExplanation": "Devi aggiornare la tua autenticazione per ricevere notifiche di messaggi OSM tramite l'app.",
|
||||
"reauthBenefit": "Questo abiliterà i punti di notifica quando hai messaggi non letti su OpenStreetMap.",
|
||||
"reauthNow": "Fallo Ora",
|
||||
"reauthLater": "Più Tardi"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Coda di Upload",
|
||||
"subtitle": "Gestisci gli upload di dispositivi di sorveglianza in sospeso",
|
||||
"pendingUploads": "Upload in sospeso: {}",
|
||||
"pendingItemsCount": "Elementi in Sospeso: {}",
|
||||
"nothingInQueue": "Niente in coda",
|
||||
"simulateModeEnabled": "Modalità simulazione abilitata – upload simulati",
|
||||
"sandboxMode": "Modalità sandbox – upload vanno alla Sandbox OSM",
|
||||
"tapToViewQueue": "Tocca per vedere la coda",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "Coda pulita",
|
||||
"uploadQueueTitle": "Coda Upload ({} elementi)",
|
||||
"queueIsEmpty": "La coda è vuota",
|
||||
"cameraWithIndex": "Telecamera {}",
|
||||
"itemWithIndex": "Elemento {}",
|
||||
"error": " (Errore)",
|
||||
"completing": " (Completamento...)",
|
||||
"destination": "Dest: {}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "Tentativi: {}",
|
||||
"uploadFailedRetry": "Upload fallito. Tocca riprova per tentare di nuovo.",
|
||||
"retryUpload": "Riprova upload",
|
||||
"clearAll": "Pulisci Tutto"
|
||||
"clearAll": "Pulisci Tutto",
|
||||
"errorDetails": "Dettagli dell'Errore",
|
||||
"creatingChangeset": " (Creazione changeset...)",
|
||||
"uploading": " (Caricamento...)",
|
||||
"closingChangeset": " (Chiusura changeset...)",
|
||||
"processingPaused": "Elaborazione Coda Sospesa",
|
||||
"pausedDueToOffline": "L'elaborazione dei caricamenti è sospesa perché la modalità offline è abilitata.",
|
||||
"pausedByUser": "L'elaborazione dei caricamenti è sospesa manualmente."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Fornitori di Tile",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "Template URL",
|
||||
"urlTemplateHint": "https://esempio.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "Il template URL è obbligatorio",
|
||||
"urlTemplatePlaceholders": "L'URL deve contenere i segnaposto {z}, {x} e {y}",
|
||||
"urlTemplatePlaceholders": "L'URL deve contenere o {quadkey} o i segnaposto {z}, {x} e {y}",
|
||||
"attribution": "Attribuzione",
|
||||
"attributionHint": "© Fornitore Mappe",
|
||||
"attributionRequired": "L'attribuzione è obbligatoria",
|
||||
"maxZoom": "Livello Zoom Massimo",
|
||||
"maxZoomHint": "Livello di zoom massimo (1-23)",
|
||||
"maxZoomRequired": "Il zoom massimo è obbligatorio",
|
||||
"maxZoomInvalid": "Il zoom massimo deve essere un numero",
|
||||
"maxZoomRange": "Il zoom massimo deve essere tra {} e {}",
|
||||
"fetchPreview": "Ottieni Anteprima",
|
||||
"previewTileLoaded": "Tile di anteprima caricato con successo",
|
||||
"previewTileFailed": "Impossibile ottenere l'anteprima: {}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tile Mappa",
|
||||
"manageProviders": "Gestisci Fornitori"
|
||||
"manageProviders": "Gestisci Fornitori",
|
||||
"attribution": "Attribuzione Mappa"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Visualizza Profilo",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "Il nome del profilo è obbligatorio",
|
||||
"requiresDirection": "Richiede Direzione",
|
||||
"requiresDirectionSubtitle": "Se le telecamere di questo tipo necessitano di un tag direzione",
|
||||
"fov": "Campo Visivo",
|
||||
"fovHint": "Campo visivo in gradi (lasciare vuoto per il valore predefinito)",
|
||||
"fovSubtitle": "Campo visivo della telecamera - utilizzato per la larghezza del cono e il formato di invio per intervallo",
|
||||
"fovInvalid": "Il campo visivo deve essere tra 1 e 360 gradi",
|
||||
"submittable": "Inviabile",
|
||||
"submittableSubtitle": "Se questo profilo può essere usato per invii di telecamere",
|
||||
"osmTags": "Tag OSM",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "Impossibile cambiare tipi di tile durante il download di aree offline",
|
||||
"selectMapLayer": "Seleziona Livello Mappa",
|
||||
"noTileProvidersAvailable": "Nessun fornitore di tile disponibile"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Opzioni di Modifica Avanzate",
|
||||
"subtitle": "Questi editor offrono funzionalità più avanzate per modifiche complesse.",
|
||||
"webEditors": "Editor Web",
|
||||
"mobileEditors": "Editor Mobili",
|
||||
"iDEditor": "Editor iD",
|
||||
"iDEditorSubtitle": "Editor web completo - funziona sempre",
|
||||
"rapidEditor": "Editor RapiD",
|
||||
"rapidEditorSubtitle": "Modifica assistita da IA con dati Facebook",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Editor OSM avanzato Android",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "App di mappatura basata su sondaggi",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Modifica rapida POI",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "Editor OSM iOS",
|
||||
"couldNotOpenEditor": "Impossibile aprire l'editor - l'app potrebbe non essere installata",
|
||||
"couldNotOpenURL": "Impossibile aprire l'URL",
|
||||
"couldNotOpenOSMWebsite": "Impossibile aprire il sito web OSM"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Mostra indicatore di stato di rete",
|
||||
"showIndicatorSubtitle": "Visualizza lo stato di caricamento e errori dei dati di sorveglianza",
|
||||
"loading": "Caricamento dati di sorveglianza...",
|
||||
"timedOut": "Richiesta scaduta",
|
||||
"noData": "Nessun dato offline",
|
||||
"success": "Dati di sorveglianza caricati",
|
||||
"nodeDataSlow": "Dati di sorveglianza lenti"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Mostra {rendered} di {total} dispositivi",
|
||||
"editingDisabledMessage": "Troppi dispositivi visibili per modificare in sicurezza. Ingrandisci per ridurre il numero di dispositivi visibili, poi riprova."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Cerca posizione",
|
||||
"searchPlaceholder": "Cerca luoghi o coordinate...",
|
||||
"routeTo": "Percorso verso",
|
||||
"routeFrom": "Percorso da",
|
||||
"selectLocation": "Seleziona posizione",
|
||||
"calculatingRoute": "Calcolo percorso...",
|
||||
"routeCalculationFailed": "Calcolo percorso fallito",
|
||||
"start": "Inizia",
|
||||
"resume": "Riprendi",
|
||||
"endRoute": "Termina percorso",
|
||||
"routeOverview": "Panoramica percorso",
|
||||
"retry": "Riprova",
|
||||
"cancelSearch": "Annulla ricerca",
|
||||
"noResultsFound": "Nessun risultato trovato",
|
||||
"searching": "Ricerca in corso...",
|
||||
"location": "Posizione",
|
||||
"startPoint": "Inizio",
|
||||
"endPoint": "Fine",
|
||||
"startSelect": "Inizio (seleziona)",
|
||||
"endSelect": "Fine (seleziona)",
|
||||
"distance": "Distanza: {} km",
|
||||
"routeActive": "Percorso attivo",
|
||||
"locationsTooClose": "Le posizioni di partenza e arrivo sono troppo vicine",
|
||||
"navigationSettings": "Navigazione",
|
||||
"navigationSettingsSubtitle": "Impostazioni pianificazione percorso ed evitamento",
|
||||
"avoidanceDistance": "Distanza di evitamento",
|
||||
"avoidanceDistanceSubtitle": "Distanza minima da mantenere dai dispositivi di sorveglianza",
|
||||
"searchHistory": "Cronologia ricerca max",
|
||||
"searchHistorySubtitle": "Numero massimo di ricerche recenti da ricordare",
|
||||
"units": "Unità",
|
||||
"unitsSubtitle": "Unità di visualizzazione per distanze e misure",
|
||||
"metric": "Metrico (km, m)",
|
||||
"imperial": "Imperiale (mi, ft)",
|
||||
"meters": "metri",
|
||||
"feet": "piedi"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Posizioni Sospette",
|
||||
"showSuspectedLocations": "Mostra Posizioni Sospette",
|
||||
"showSuspectedLocationsSubtitle": "Mostra marcatori punto interrogativo per siti di sorveglianza sospetti dai dati dei permessi dei servizi pubblici",
|
||||
"lastUpdated": "Ultimo Aggiornamento",
|
||||
"refreshNow": "Aggiorna ora",
|
||||
"dataSource": "Fonte Dati",
|
||||
"dataSourceDescription": "Dati dei permessi dei servizi pubblici che indicano potenziali siti di installazione di infrastrutture di sorveglianza",
|
||||
"dataSourceCredit": "Raccolta e hosting dei dati forniti da alprwatch.org",
|
||||
"minimumDistance": "Distanza Minima dai Nodi Reali",
|
||||
"minimumDistanceSubtitle": "Nascondi posizioni sospette entro {}m dai dispositivi di sorveglianza esistenti",
|
||||
"updating": "Aggiornamento Posizioni Sospette",
|
||||
"downloadingAndProcessing": "Scaricamento e elaborazione dati...",
|
||||
"updateSuccess": "Posizioni sospette aggiornate con successo",
|
||||
"updateFailed": "Aggiornamento posizioni sospette fallito",
|
||||
"neverFetched": "Mai recuperato",
|
||||
"daysAgo": "{} giorni fa",
|
||||
"hoursAgo": "{} ore fa",
|
||||
"minutesAgo": "{} minuti fa",
|
||||
"justNow": "Proprio ora"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Posizione Sospetta #{}",
|
||||
"ticketNo": "N. Ticket",
|
||||
"address": "Indirizzo",
|
||||
"street": "Via",
|
||||
"city": "Città",
|
||||
"state": "Stato",
|
||||
"intersectingStreet": "Via che Interseca",
|
||||
"workDoneFor": "Lavoro Svolto Per",
|
||||
"remarks": "Osservazioni",
|
||||
"url": "URL",
|
||||
"coordinates": "Coordinate",
|
||||
"noAddressAvailable": "Nessun indirizzo disponibile"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Transparência da Vigilância",
|
||||
"description": "DeFlock é um aplicativo móvel focado na privacidade para mapear infraestrutura de vigilância pública usando OpenStreetMap. Documente câmeras, ALPRs, detectores de tiros e outros dispositivos de vigilância em sua comunidade para tornar essa infraestrutura visível e pesquisável.",
|
||||
"features": "• Mapeamento com capacidade offline com áreas para download\n• Upload direto para OpenStreetMap com OAuth2\n• Perfis integrados para principais fabricantes\n• Respeitoso à privacidade - nenhum dado do usuário coletado\n• Múltiplos provedores de mapas (OSM, imagens de satélite)",
|
||||
"initiative": "Parte da iniciativa mais ampla DeFlock para promover transparência na vigilância.",
|
||||
"footer": "Visite: deflock.me\nConstruído com Flutter • Código Aberto",
|
||||
"showWelcome": "Mostrar Mensagem de Boas-vindas",
|
||||
"showSubmissionGuide": "Mostrar Guia de Submissão",
|
||||
"viewReleaseNotes": "Ver Notas de Lançamento"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Bem-vindo ao DeFlock",
|
||||
"description": "DeFlock foi fundado na ideia de que ferramentas de vigilância pública devem ser transparentes. Dentro deste aplicativo móvel, como no site, você poderá ver a localização de ALPRs e outras infraestruturas de vigilância em sua área local e no exterior.",
|
||||
"mission": "No entanto, este projeto não é automatizado; precisamos de todos nós para tornar este projeto melhor. Ao visualizar o mapa, você pode tocar em \"Novo Nó\" para adicionar uma instalação anteriormente desconhecida. Com sua ajuda, podemos alcançar nosso objetivo de maior transparência e conscientização pública sobre infraestrutura de vigilância.",
|
||||
"firsthandKnowledge": "IMPORTANTE: Contribua apenas com dispositivos de vigilância que você observou pessoalmente em primeira mão. As políticas do OpenStreetMap e Google proíbem o uso de fontes como imagens do Street View para contribuições. Suas contribuições devem ser baseadas em suas próprias observações diretas e presenciais.",
|
||||
"privacy": "Nota de Privacidade: Este aplicativo funciona inteiramente localmente em seu dispositivo e usa a API de terceiros OpenStreetMap apenas para armazenamento e envio de dados. DeFlock não coleta nem armazena qualquer tipo de dados do usuário e não é responsável pelo gerenciamento de contas.",
|
||||
"tileNote": "NOTA: Os tiles gratuitos de mapa do OpenStreetMap podem ser muito lentos para carregar. Provedores alternativos de tiles podem ser configurados em Configurações > Avançado.",
|
||||
"moreInfo": "Você pode encontrar mais links em Configurações > Sobre.",
|
||||
"dontShowAgain": "Não mostrar esta mensagem de boas-vindas novamente",
|
||||
"getStarted": "Vamos começar com o DeFlock!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Melhores Práticas de Submissão",
|
||||
"description": "Antes de submeter seu primeiro dispositivo de vigilância, dedique um momento para revisar estas diretrizes importantes para contribuições de alta qualidade ao OpenStreetMap.",
|
||||
"bestPractices": "• Mapear apenas dispositivos que você observou pessoalmente\n• Dedicar tempo para identificar com precisão tipo e fabricante\n• Usar posicionamento preciso - aproximar antes de colocar o marcador\n• Incluir informações de direção quando aplicável\n• Verificar suas seleções de tags antes de submeter",
|
||||
"placementNote": "Lembre-se: Dados precisos e de primeira mão são essenciais para a comunidade DeFlock e o projeto OpenStreetMap.",
|
||||
"moreInfo": "Para orientação detalhada sobre identificação de dispositivos e melhores práticas de mapeamento:",
|
||||
"identificationGuide": "Guia de Identificação",
|
||||
"osmWiki": "Wiki OpenStreetMap",
|
||||
"dontShowAgain": "Não mostrar este guia novamente",
|
||||
"gotIt": "Entendi!"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Novo Nó",
|
||||
"download": "Baixar",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "Fechar",
|
||||
"submit": "Enviar",
|
||||
"saveEdit": "Salvar Edição",
|
||||
"clear": "Limpar"
|
||||
"clear": "Limpar",
|
||||
"viewOnOSM": "Ver no OSM",
|
||||
"advanced": "Avançado",
|
||||
"useAdvancedEditor": "Usar Editor Avançado"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Nó Muito Próximo de Dispositivo Existente",
|
||||
"message": "Este nó está a apenas {} metros de um dispositivo de vigilância existente.",
|
||||
"suggestion": "Se vários dispositivos estão no mesmo poste, use várias direções em um único nó em vez de criar nós separados.",
|
||||
"nearbyNodes": "Dispositivo(s) próximo(s) encontrado(s) ({}):",
|
||||
"nodeInfo": "Nó #{} - {}",
|
||||
"andMore": "...e mais {}",
|
||||
"goBack": "Voltar",
|
||||
"submitAnyway": "Enviar Mesmo Assim",
|
||||
"nodeType": {
|
||||
"alpr": "Câmera ALPR/ANPR",
|
||||
"publicCamera": "Câmera de Vigilância Pública",
|
||||
"camera": "Câmera de Vigilância",
|
||||
"amenity": "{}",
|
||||
"device": "Dispositivo {}",
|
||||
"unknown": "Dispositivo Desconhecido"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Ativar seguir-me (norte para cima)",
|
||||
"northUp": "Ativar seguir-me (rotação)",
|
||||
"off": "Ativar seguir-me",
|
||||
"follow": "Ativar seguir-me (rotação)",
|
||||
"rotating": "Desativar seguir-me"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "Você provavelmente não quer fazer isso a menos que tenha certeza absoluta de que tem uma boa razão para isso.",
|
||||
"offlineMode": "Modo Offline",
|
||||
"offlineModeSubtitle": "Desabilitar todas as requisições de rede exceto para áreas locais/offline.",
|
||||
"pauseQueueProcessing": "Pausar Fila de Upload",
|
||||
"pauseQueueProcessingSubtitle": "Parar upload de alterações na fila mantendo acesso a dados ao vivo.",
|
||||
"offlineModeWarningTitle": "Downloads Ativos",
|
||||
"offlineModeWarningMessage": "Ativar o modo offline cancelará qualquer download de área ativo. Deseja continuar?",
|
||||
"enableOfflineMode": "Ativar Modo Offline",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "Gerenciar modo offline e áreas baixadas",
|
||||
"advancedSettings": "Configurações Avançadas",
|
||||
"advancedSettingsSubtitle": "Configurações de desempenho, alertas e provedores de mapas",
|
||||
"proximityAlerts": "Alertas de Proximidade"
|
||||
"proximityAlerts": "Alertas de Proximidade",
|
||||
"networkStatusIndicator": "Indicador de Status de Rede"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Receba notificações ao se aproximar de dispositivos de vigilância",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Perfil",
|
||||
"selectProfile": "Selecionar um perfil...",
|
||||
"profileRequired": "Por favor, selecione um perfil para continuar.",
|
||||
"direction": "Direção {}°",
|
||||
"profileNoDirectionInfo": "Este perfil não requer uma direção.",
|
||||
"mustBeLoggedIn": "Você deve estar logado para enviar novos nós. Por favor, faça login via Configurações.",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "Editar Nó #{}",
|
||||
"profile": "Perfil",
|
||||
"selectProfile": "Selecionar um perfil...",
|
||||
"profileRequired": "Por favor, selecione um perfil para continuar.",
|
||||
"direction": "Direção {}°",
|
||||
"profileNoDirectionInfo": "Este perfil não requer uma direção.",
|
||||
"temporarilyDisabled": "As edições foram temporariamente desabilitadas enquanto resolvemos um bug - desculpe - volte em breve.",
|
||||
"mustBeLoggedIn": "Você deve estar logado para editar nós. Por favor, faça login via Configurações.",
|
||||
"sandboxModeWarning": "Não é possível enviar edições de nós de produção para o sandbox. Mude para o modo Produção nas Configurações para editar nós.",
|
||||
"enableSubmittableProfile": "Ative um perfil enviável nas Configurações para editar nós.",
|
||||
"profileViewOnlyWarning": "Este perfil é apenas para visualização do mapa. Por favor, selecione um perfil enviável para editar nós.",
|
||||
"cannotMoveConstrainedNode": "Não é possível mover esta câmera - ela está conectada a outro elemento do mapa (OSM way/relation). Você ainda pode editar suas tags e direção.",
|
||||
"zoomInRequiredMessage": "Amplie para pelo menos o nível {} para adicionar ou editar nós de vigilância. Isto garante um posicionamento preciso para mapeamento exato.",
|
||||
"extractFromWay": "Extrair nó do way/relation",
|
||||
"extractFromWaySubtitle": "Criar novo nó com as mesmas tags, permitir mover para nova localização",
|
||||
"refineTags": "Refinar Tags",
|
||||
"refineTagsWithProfile": "Refinar Tags ({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "Dentro do limite de {} tiles",
|
||||
"exceedsTileLimit": "A seleção atual excede o limite de {} tiles",
|
||||
"offlineModeWarning": "Downloads desabilitados no modo offline. Desative o modo offline para baixar novas áreas.",
|
||||
"areaTooBigMessage": "Amplie para pelo menos o nível {} para baixar áreas offline. Downloads de áreas grandes podem tornar o aplicativo não responsivo.",
|
||||
"downloadStarted": "Download iniciado! Buscando tiles e nós...",
|
||||
"downloadFailed": "Falha ao iniciar o download: {}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Iniciado",
|
||||
"message": "Download iniciado! Buscando tiles e nós...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Ver Progresso nas Configurações"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Destino do Upload",
|
||||
"subtitle": "Escolha onde as câmeras são enviadas",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "Simular",
|
||||
"productionDescription": "Enviar para o banco de dados OSM ao vivo (visível para todos os usuários)",
|
||||
"sandboxDescription": "Uploads vão para o Sandbox OSM (seguro para testes, redefine regularmente).",
|
||||
"simulateDescription": "Simular uploads (não contacta servidores OSM)"
|
||||
"simulateDescription": "Simular uploads (não contacta servidores OSM)",
|
||||
"cannotChangeWithQueue": "Não é possível alterar o destino de upload enquanto {} itens estão na fila. Limpe a fila primeiro."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Conta OpenStreetMap",
|
||||
"osmAccountSubtitle": "Gerencie seu login OSM e visualize suas contribuições",
|
||||
"loggedInAs": "Logado como {}",
|
||||
"loginToOSM": "Fazer login no OpenStreetMap",
|
||||
"tapToLogout": "Toque para sair",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "Testar Conexão",
|
||||
"testConnectionSubtitle": "Verificar se as credenciais OSM estão funcionando",
|
||||
"connectionOK": "Conexão OK - credenciais são válidas",
|
||||
"connectionFailed": "Conexão falhou - por favor, faça login novamente"
|
||||
"connectionFailed": "Conexão falhou - por favor, faça login novamente",
|
||||
"viewMyEdits": "Ver Minhas Edições no OSM",
|
||||
"viewMyEditsSubtitle": "Ver seu histórico de edições no OpenStreetMap",
|
||||
"aboutOSM": "Sobre OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap é um projeto de mapeamento colaborativo de código aberto onde os contribuintes criam e mantêm um mapa gratuito e editável do mundo. Suas contribuições de dispositivos de vigilância ajudam a tornar esta infraestrutura visível e pesquisável.",
|
||||
"visitOSM": "Visitar OpenStreetMap",
|
||||
"deleteAccount": "Excluir Conta OSM",
|
||||
"deleteAccountSubtitle": "Gerencie sua conta OpenStreetMap",
|
||||
"deleteAccountExplanation": "Para excluir sua conta OpenStreetMap, você precisará visitar o site do OpenStreetMap. Isso removerá permanentemente sua conta OSM e todos os dados associados.",
|
||||
"deleteAccountWarning": "Aviso: Esta ação não pode ser desfeita e excluirá permanentemente sua conta OSM.",
|
||||
"goToOSM": "Ir para OpenStreetMap",
|
||||
"accountManagement": "Gerenciamento de Conta",
|
||||
"accountManagementDescription": "Para excluir sua conta do OpenStreetMap, você deve visitar o site do OpenStreetMap apropriado. Isso removerá permanentemente sua conta e todos os dados associados.",
|
||||
"currentDestinationProduction": "Atualmente conectado a: OpenStreetMap de Produção",
|
||||
"currentDestinationSandbox": "Atualmente conectado a: OpenStreetMap Sandbox",
|
||||
"currentDestinationSimulate": "Atualmente em: Modo de simulação (sem conta real)",
|
||||
"viewMessages": "Ver Mensagens no OSM",
|
||||
"unreadMessagesCount": "Você tem {} mensagens não lidas",
|
||||
"noUnreadMessages": "Nenhuma mensagem não lida",
|
||||
"reauthRequired": "Atualizar Autenticação",
|
||||
"reauthExplanation": "Você deve atualizar sua autenticação para receber notificações de mensagens OSM através do aplicativo.",
|
||||
"reauthBenefit": "Isso habilitará pontos de notificação quando você tiver mensagens não lidas no OpenStreetMap.",
|
||||
"reauthNow": "Fazer Agora",
|
||||
"reauthLater": "Mais Tarde"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Fila de Upload",
|
||||
"subtitle": "Gerenciar uploads pendentes de dispositivos de vigilância",
|
||||
"pendingUploads": "Uploads pendentes: {}",
|
||||
"pendingItemsCount": "Itens Pendentes: {}",
|
||||
"nothingInQueue": "Nada na fila",
|
||||
"simulateModeEnabled": "Modo simulação ativado – uploads simulados",
|
||||
"sandboxMode": "Modo sandbox – uploads vão para o Sandbox OSM",
|
||||
"tapToViewQueue": "Toque para ver a fila",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "Fila limpa",
|
||||
"uploadQueueTitle": "Fila de Upload ({} itens)",
|
||||
"queueIsEmpty": "A fila está vazia",
|
||||
"cameraWithIndex": "Câmera {}",
|
||||
"itemWithIndex": "Item {}",
|
||||
"error": " (Erro)",
|
||||
"completing": " (Completando...)",
|
||||
"destination": "Dest: {}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "Tentativas: {}",
|
||||
"uploadFailedRetry": "Upload falhou. Toque em tentar novamente para tentar novamente.",
|
||||
"retryUpload": "Tentar upload novamente",
|
||||
"clearAll": "Limpar Tudo"
|
||||
"clearAll": "Limpar Tudo",
|
||||
"errorDetails": "Detalhes do Erro",
|
||||
"creatingChangeset": " (Criando changeset...)",
|
||||
"uploading": " (Enviando...)",
|
||||
"closingChangeset": " (Fechando changeset...)",
|
||||
"processingPaused": "Processamento da Fila Pausado",
|
||||
"pausedDueToOffline": "O processamento de upload está pausado porque o modo offline está habilitado.",
|
||||
"pausedByUser": "O processamento de upload está pausado manualmente."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Provedores de Tiles",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "Modelo de URL",
|
||||
"urlTemplateHint": "https://exemplo.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "Modelo de URL é obrigatório",
|
||||
"urlTemplatePlaceholders": "URL deve conter os marcadores {z}, {x} e {y}",
|
||||
"urlTemplatePlaceholders": "URL deve conter {quadkey} ou os marcadores {z}, {x} e {y}",
|
||||
"attribution": "Atribuição",
|
||||
"attributionHint": "© Provedor de Mapas",
|
||||
"attributionRequired": "Atribuição é obrigatória",
|
||||
"maxZoom": "Nível de Zoom Máximo",
|
||||
"maxZoomHint": "Nível de zoom máximo (1-23)",
|
||||
"maxZoomRequired": "Zoom máximo é obrigatório",
|
||||
"maxZoomInvalid": "Zoom máximo deve ser um número",
|
||||
"maxZoomRange": "Zoom máximo deve estar entre {} e {}",
|
||||
"fetchPreview": "Buscar Preview",
|
||||
"previewTileLoaded": "Tile de preview carregado com sucesso",
|
||||
"previewTileFailed": "Falha ao buscar preview: {}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tiles do Mapa",
|
||||
"manageProviders": "Gerenciar Provedores"
|
||||
"manageProviders": "Gerenciar Provedores",
|
||||
"attribution": "Atribuição do Mapa"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Ver Perfil",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "Nome do perfil é obrigatório",
|
||||
"requiresDirection": "Requer Direção",
|
||||
"requiresDirectionSubtitle": "Se câmeras deste tipo precisam de uma tag de direção",
|
||||
"fov": "Campo de Visão",
|
||||
"fovHint": "Campo de visão em graus (deixar vazio para o padrão)",
|
||||
"fovSubtitle": "Campo de visão da câmera - usado para largura do cone e formato de envio por intervalo",
|
||||
"fovInvalid": "Campo de visão deve estar entre 1 e 360 graus",
|
||||
"submittable": "Enviável",
|
||||
"submittableSubtitle": "Se este perfil pode ser usado para envios de câmeras",
|
||||
"osmTags": "Tags OSM",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "Não é possível alterar tipos de tiles durante o download de áreas offline",
|
||||
"selectMapLayer": "Selecionar Camada do Mapa",
|
||||
"noTileProvidersAvailable": "Nenhum provedor de tiles disponível"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Opções de Edição Avançada",
|
||||
"subtitle": "Estes editores oferecem recursos mais avançados para edições complexas.",
|
||||
"webEditors": "Editores Web",
|
||||
"mobileEditors": "Editores Móveis",
|
||||
"iDEditor": "Editor iD",
|
||||
"iDEditorSubtitle": "Editor web completo - sempre funciona",
|
||||
"rapidEditor": "Editor RapiD",
|
||||
"rapidEditorSubtitle": "Edição assistida por IA com dados do Facebook",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Editor OSM avançado para Android",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Aplicativo de mapeamento baseado em pesquisas",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Edição rápida de POI",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "Editor OSM iOS",
|
||||
"couldNotOpenEditor": "Não foi possível abrir o editor - aplicativo pode não estar instalado",
|
||||
"couldNotOpenURL": "Não foi possível abrir a URL",
|
||||
"couldNotOpenOSMWebsite": "Não foi possível abrir o site do OSM"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Exibir indicador de status de rede",
|
||||
"showIndicatorSubtitle": "Mostrar status de carregamento e erro de dados de vigilância",
|
||||
"loading": "Carregando dados de vigilância...",
|
||||
"timedOut": "Solicitação expirada",
|
||||
"noData": "Nenhum dado offline",
|
||||
"success": "Dados de vigilância carregados",
|
||||
"nodeDataSlow": "Dados de vigilância lentos"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Mostrando {rendered} de {total} dispositivos",
|
||||
"editingDisabledMessage": "Muitos dispositivos visíveis para editar com segurança. Aproxime mais para reduzir o número de dispositivos visíveis, e tente novamente."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Buscar localização",
|
||||
"searchPlaceholder": "Buscar locais ou coordenadas...",
|
||||
"routeTo": "Rota para",
|
||||
"routeFrom": "Rota de",
|
||||
"selectLocation": "Selecionar localização",
|
||||
"calculatingRoute": "Calculando rota...",
|
||||
"routeCalculationFailed": "Falha no cálculo da rota",
|
||||
"start": "Iniciar",
|
||||
"resume": "Continuar",
|
||||
"endRoute": "Terminar rota",
|
||||
"routeOverview": "Visão geral da rota",
|
||||
"retry": "Tentar novamente",
|
||||
"cancelSearch": "Cancelar busca",
|
||||
"noResultsFound": "Nenhum resultado encontrado",
|
||||
"searching": "Buscando...",
|
||||
"location": "Localização",
|
||||
"startPoint": "Início",
|
||||
"endPoint": "Fim",
|
||||
"startSelect": "Início (selecionar)",
|
||||
"endSelect": "Fim (selecionar)",
|
||||
"distance": "Distância: {} km",
|
||||
"routeActive": "Rota ativa",
|
||||
"locationsTooClose": "Os locais de início e fim estão muito próximos",
|
||||
"navigationSettings": "Navegação",
|
||||
"navigationSettingsSubtitle": "Configurações de planejamento de rota e evasão",
|
||||
"avoidanceDistance": "Distância de evasão",
|
||||
"avoidanceDistanceSubtitle": "Distância mínima para ficar longe de dispositivos de vigilância",
|
||||
"searchHistory": "Histórico máximo de busca",
|
||||
"searchHistorySubtitle": "Número máximo de buscas recentes para lembrar",
|
||||
"units": "Unidades",
|
||||
"unitsSubtitle": "Unidades de exibição para distâncias e medidas",
|
||||
"metric": "Métrico (km, m)",
|
||||
"imperial": "Imperial (mi, ft)",
|
||||
"meters": "metros",
|
||||
"feet": "pés"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Localizações Suspeitas",
|
||||
"showSuspectedLocations": "Mostrar Localizações Suspeitas",
|
||||
"showSuspectedLocationsSubtitle": "Mostrar marcadores de ponto de interrogação para sites de vigilância suspeitos de dados de licenças de serviços públicos",
|
||||
"lastUpdated": "Última Atualização",
|
||||
"refreshNow": "Atualizar agora",
|
||||
"dataSource": "Fonte de Dados",
|
||||
"dataSourceDescription": "Dados de licenças de serviços públicos indicando possíveis locais de instalação de infraestrutura de vigilância",
|
||||
"dataSourceCredit": "Coleta e hospedagem de dados fornecidas por alprwatch.org",
|
||||
"minimumDistance": "Distância Mínima de Nós Reais",
|
||||
"minimumDistanceSubtitle": "Ocultar localizações suspeitas dentro de {}m de dispositivos de vigilância existentes",
|
||||
"updating": "Atualizando Localizações Suspeitas",
|
||||
"downloadingAndProcessing": "Baixando e processando dados...",
|
||||
"updateSuccess": "Localizações suspeitas atualizadas com sucesso",
|
||||
"updateFailed": "Falha ao atualizar localizações suspeitas",
|
||||
"neverFetched": "Nunca buscado",
|
||||
"daysAgo": "{} dias atrás",
|
||||
"hoursAgo": "{} horas atrás",
|
||||
"minutesAgo": "{} minutos atrás",
|
||||
"justNow": "Agora mesmo"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Localização Suspeita #{}",
|
||||
"ticketNo": "N° do Ticket",
|
||||
"address": "Endereço",
|
||||
"street": "Rua",
|
||||
"city": "Cidade",
|
||||
"state": "Estado",
|
||||
"intersectingStreet": "Rua que Cruza",
|
||||
"workDoneFor": "Trabalho Feito Para",
|
||||
"remarks": "Observações",
|
||||
"url": "URL",
|
||||
"coordinates": "Coordenadas",
|
||||
"noAddressAvailable": "Nenhum endereço disponível"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,38 @@
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - 监控透明化",
|
||||
"description": "DeFlock 是一款注重隐私的移动应用,使用 OpenStreetMap 绘制公共监控基础设施。记录您社区中的摄像头、车牌识别系统、枪击探测器和其他监控设备,使这些基础设施可见且可搜索。",
|
||||
"features": "• 具有可下载区域的离线映射功能\n• 使用 OAuth2 直接上传到 OpenStreetMap\n• 主要制造商的内置配置文件\n• 尊重隐私 - 不收集用户数据\n• 多个地图提供商(OSM、卫星图像)",
|
||||
"initiative": "DeFlock 更广泛倡议的一部分,旨在促进监控透明化。",
|
||||
"footer": "访问:deflock.me\n使用 Flutter 构建 • 开源",
|
||||
"showWelcome": "显示欢迎消息",
|
||||
"showSubmissionGuide": "显示提交指南",
|
||||
"viewReleaseNotes": "查看发布说明"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "欢迎使用 DeFlock",
|
||||
"description": "DeFlock 的创立基于公共监控工具应该透明的理念。在这个移动应用程序中,就像在网站上一样,您将能够查看您当地和国外的车牌识别系统和其他监控基础设施的位置。",
|
||||
"mission": "然而,这个项目不是自动化的;需要我们所有人来改善这个项目。在查看地图时,您可以点击\"新建节点\"来添加一个之前未知的装置。在您的帮助下,我们可以实现增强监控基础设施透明度和公众意识的目标。",
|
||||
"firsthandKnowledge": "重要提醒:只贡献您亲自第一手观察到的监控设备。OpenStreetMap 和 Google 的政策禁止使用街景图像等来源进行贡献。您的贡献应该基于您自己的直接、亲身观察。",
|
||||
"privacy": "隐私说明:此应用程序完全在您的设备上本地运行,仅使用第三方 OpenStreetMap API 进行数据存储和提交。DeFlock 不收集或存储任何类型的用户数据,也不负责账户管理。",
|
||||
"tileNote": "注意:来自 OpenStreetMap 的免费地图图块可能加载很慢。可以在设置 > 高级中配置替代图块提供商。",
|
||||
"moreInfo": "您可以在设置 > 关于中找到更多链接。",
|
||||
"dontShowAgain": "不再显示此欢迎消息",
|
||||
"getStarted": "开始使用 DeFlock!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "提交最佳实践",
|
||||
"description": "在提交您的第一个监控设备之前,请花点时间查看这些重要指南,以确保对 OpenStreetMap 的高质量贡献。",
|
||||
"bestPractices": "• 只映射您亲自观察到的设备\n• 花时间准确识别设备类型和制造商\n• 使用精确定位 - 放置标记前请放大\n• 在适用时包含方向信息\n• 提交前请检查您的标签选择",
|
||||
"placementNote": "请记住:准确的第一手数据对 DeFlock 社区和 OpenStreetMap 项目至关重要。",
|
||||
"moreInfo": "有关设备识别和映射最佳实践的详细指导:",
|
||||
"identificationGuide": "识别指南",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "不再显示此指南",
|
||||
"gotIt": "明白了!"
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "新建节点",
|
||||
"download": "下载",
|
||||
@@ -16,11 +48,32 @@
|
||||
"close": "关闭",
|
||||
"submit": "提交",
|
||||
"saveEdit": "保存编辑",
|
||||
"clear": "清空"
|
||||
"clear": "清空",
|
||||
"viewOnOSM": "在OSM上查看",
|
||||
"advanced": "高级",
|
||||
"useAdvancedEditor": "使用高级编辑器"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "节点过于靠近现有设备",
|
||||
"message": "此节点距离现有监控设备仅 {} 米。",
|
||||
"suggestion": "如果同一根杆上有多个设备,请在单个节点上使用多个方向,而不是创建单独的节点。",
|
||||
"nearbyNodes": "发现附近设备 ({}):",
|
||||
"nodeInfo": "节点 #{} - {}",
|
||||
"andMore": "...还有 {} 个",
|
||||
"goBack": "返回",
|
||||
"submitAnyway": "仍然提交",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR 摄像头",
|
||||
"publicCamera": "公共监控摄像头",
|
||||
"camera": "监控摄像头",
|
||||
"amenity": "{}",
|
||||
"device": "{} 设备",
|
||||
"unknown": "未知设备"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "启用跟随模式(北向上)",
|
||||
"northUp": "启用跟随模式(旋转)",
|
||||
"off": "启用跟随模式",
|
||||
"follow": "启用跟随模式(旋转)",
|
||||
"rotating": "禁用跟随模式"
|
||||
},
|
||||
"settings": {
|
||||
@@ -36,6 +89,8 @@
|
||||
"maxNodesWarning": "除非您确定有充分的理由,否则您可能不想这样做。",
|
||||
"offlineMode": "离线模式",
|
||||
"offlineModeSubtitle": "禁用除本地/离线区域外的所有网络请求。",
|
||||
"pauseQueueProcessing": "暂停上传队列",
|
||||
"pauseQueueProcessingSubtitle": "停止上传排队的更改,同时保持实时数据访问。",
|
||||
"offlineModeWarningTitle": "活动下载",
|
||||
"offlineModeWarningMessage": "启用离线模式将取消任何活动的区域下载。您要继续吗?",
|
||||
"enableOfflineMode": "启用离线模式",
|
||||
@@ -45,7 +100,8 @@
|
||||
"offlineSettingsSubtitle": "管理离线模式和已下载区域",
|
||||
"advancedSettings": "高级设置",
|
||||
"advancedSettingsSubtitle": "性能、警报和地图提供商设置",
|
||||
"proximityAlerts": "邻近警报"
|
||||
"proximityAlerts": "邻近警报",
|
||||
"networkStatusIndicator": "网络状态指示器"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "接近监控设备时接收通知",
|
||||
@@ -71,6 +127,8 @@
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "配置文件",
|
||||
"selectProfile": "选择配置文件...",
|
||||
"profileRequired": "请选择配置文件以继续。",
|
||||
"direction": "方向 {}°",
|
||||
"profileNoDirectionInfo": "此配置文件不需要方向。",
|
||||
"mustBeLoggedIn": "您必须登录才能提交新节点。请通过设置登录。",
|
||||
@@ -82,12 +140,19 @@
|
||||
"editNode": {
|
||||
"title": "编辑节点 #{}",
|
||||
"profile": "配置文件",
|
||||
"selectProfile": "选择配置文件...",
|
||||
"profileRequired": "请选择配置文件以继续。",
|
||||
"direction": "方向 {}°",
|
||||
"profileNoDirectionInfo": "此配置文件不需要方向。",
|
||||
"temporarilyDisabled": "编辑功能已暂时禁用,我们正在修复一个错误 - 抱歉 - 请稍后再试。",
|
||||
"mustBeLoggedIn": "您必须登录才能编辑节点。请通过设置登录。",
|
||||
"sandboxModeWarning": "无法将生产节点的编辑提交到沙盒。在设置中切换到生产模式以编辑节点。",
|
||||
"enableSubmittableProfile": "在设置中启用可提交的配置文件以编辑节点。",
|
||||
"profileViewOnlyWarning": "此配置文件仅用于地图查看。请选择可提交的配置文件来编辑节点。",
|
||||
"cannotMoveConstrainedNode": "无法移动此相机 - 它连接到另一个地图元素(OSM way/relation)。您仍可以编辑其标签和方向。",
|
||||
"zoomInRequiredMessage": "请放大至至少第{}级来添加或编辑监控节点。这确保精确定位以便准确制图。",
|
||||
"extractFromWay": "从way/relation中提取节点",
|
||||
"extractFromWaySubtitle": "创建具有相同标签的新节点,允许移动到新位置",
|
||||
"refineTags": "细化标签",
|
||||
"refineTagsWithProfile": "细化标签({})"
|
||||
},
|
||||
@@ -101,9 +166,16 @@
|
||||
"withinTileLimit": "在 {} 瓦片限制内",
|
||||
"exceedsTileLimit": "当前选择超出 {} 瓦片限制",
|
||||
"offlineModeWarning": "离线模式下禁用下载。禁用离线模式以下载新区域。",
|
||||
"areaTooBigMessage": "请放大至至少第{}级来下载离线区域。下载大区域可能导致应用程序无响应。",
|
||||
"downloadStarted": "下载已开始!正在获取瓦片和节点...",
|
||||
"downloadFailed": "启动下载失败:{}"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "下载已开始",
|
||||
"message": "下载已开始!正在获取瓦片和节点...",
|
||||
"ok": "确定",
|
||||
"viewProgress": "在设置中查看进度"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "上传目标",
|
||||
"subtitle": "选择摄像头上传位置",
|
||||
@@ -112,9 +184,12 @@
|
||||
"simulate": "模拟",
|
||||
"productionDescription": "上传到实时 OSM 数据库(对所有用户可见)",
|
||||
"sandboxDescription": "上传到 OSM 沙盒(测试安全,定期重置)。",
|
||||
"simulateDescription": "模拟上传(不联系 OSM 服务器)"
|
||||
"simulateDescription": "模拟上传(不联系 OSM 服务器)",
|
||||
"cannotChangeWithQueue": "队列中有 {} 个项目时无法更改上传目标。请先清空队列。"
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "OpenStreetMap 账户",
|
||||
"osmAccountSubtitle": "管理您的 OSM 登录并查看您的贡献",
|
||||
"loggedInAs": "已登录为 {}",
|
||||
"loginToOSM": "登录 OpenStreetMap",
|
||||
"tapToLogout": "点击登出",
|
||||
@@ -123,10 +198,37 @@
|
||||
"testConnection": "测试连接",
|
||||
"testConnectionSubtitle": "验证 OSM 凭据是否有效",
|
||||
"connectionOK": "连接正常 - 凭据有效",
|
||||
"connectionFailed": "连接失败 - 请重新登录"
|
||||
"connectionFailed": "连接失败 - 请重新登录",
|
||||
"viewMyEdits": "在 OSM 上查看我的编辑",
|
||||
"viewMyEditsSubtitle": "查看您在 OpenStreetMap 上的编辑历史",
|
||||
"aboutOSM": "关于 OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap 是一个协作的开源地图项目,贡献者创建和维护一个免费的、可编辑的世界地图。您的监控设备贡献有助于使这种基础设施可见和可搜索。",
|
||||
"visitOSM": "访问 OpenStreetMap",
|
||||
"deleteAccount": "删除 OSM 账户",
|
||||
"deleteAccountSubtitle": "管理您的 OpenStreetMap 账户",
|
||||
"deleteAccountExplanation": "要删除您的 OpenStreetMap 账户,您需要访问 OpenStreetMap 网站。这将永久删除您的 OSM 账户和所有相关数据。",
|
||||
"deleteAccountWarning": "警告:此操作无法撤销,将永久删除您的 OSM 账户。",
|
||||
"goToOSM": "前往 OpenStreetMap",
|
||||
"accountManagement": "账户管理",
|
||||
"accountManagementDescription": "要删除您的 OpenStreetMap 账户,您需要访问相应的 OpenStreetMap 网站。这将永久删除您的账户和所有相关数据。",
|
||||
"currentDestinationProduction": "当前连接到:生产环境 OpenStreetMap",
|
||||
"currentDestinationSandbox": "当前连接到:沙盒环境 OpenStreetMap",
|
||||
"currentDestinationSimulate": "当前处于:模拟模式(无真实账户)",
|
||||
"viewMessages": "在 OSM 上查看消息",
|
||||
"unreadMessagesCount": "您有 {} 条未读消息",
|
||||
"noUnreadMessages": "没有未读消息",
|
||||
"reauthRequired": "刷新身份验证",
|
||||
"reauthExplanation": "您必须刷新身份验证才能通过应用接收 OSM 消息通知。",
|
||||
"reauthBenefit": "这将在您在 OpenStreetMap 上有未读消息时启用通知点。",
|
||||
"reauthNow": "现在执行",
|
||||
"reauthLater": "稍后"
|
||||
},
|
||||
"queue": {
|
||||
"title": "上传队列",
|
||||
"subtitle": "管理待上传的监控设备",
|
||||
"pendingUploads": "待上传:{}",
|
||||
"pendingItemsCount": "待处理项目:{}",
|
||||
"nothingInQueue": "队列中没有内容",
|
||||
"simulateModeEnabled": "模拟模式已启用 – 上传已模拟",
|
||||
"sandboxMode": "沙盒模式 – 上传到 OSM 沙盒",
|
||||
"tapToViewQueue": "点击查看队列",
|
||||
@@ -137,7 +239,7 @@
|
||||
"queueCleared": "队列已清空",
|
||||
"uploadQueueTitle": "上传队列({} 项)",
|
||||
"queueIsEmpty": "队列为空",
|
||||
"cameraWithIndex": "摄像头 {}",
|
||||
"itemWithIndex": "项目 {}",
|
||||
"error": "(错误)",
|
||||
"completing": "(完成中...)",
|
||||
"destination": "目标:{}",
|
||||
@@ -147,7 +249,14 @@
|
||||
"attempts": "尝试次数:{}",
|
||||
"uploadFailedRetry": "上传失败。点击重试再次尝试。",
|
||||
"retryUpload": "重试上传",
|
||||
"clearAll": "全部清空"
|
||||
"clearAll": "全部清空",
|
||||
"errorDetails": "错误详情",
|
||||
"creatingChangeset": " (创建变更集...)",
|
||||
"uploading": " (上传中...)",
|
||||
"closingChangeset": " (关闭变更集...)",
|
||||
"processingPaused": "队列处理已暂停",
|
||||
"pausedDueToOffline": "因为离线模式已启用,上传处理已暂停。",
|
||||
"pausedByUser": "上传处理已手动暂停。"
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "瓦片提供商",
|
||||
@@ -179,10 +288,15 @@
|
||||
"urlTemplate": "URL 模板",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "URL 模板为必填项",
|
||||
"urlTemplatePlaceholders": "URL 必须包含 {z}、{x} 和 {y} 占位符",
|
||||
"urlTemplatePlaceholders": "URL 必须包含 {quadkey} 或 {z}、{x} 和 {y} 占位符",
|
||||
"attribution": "归属",
|
||||
"attributionHint": "© 地图提供商",
|
||||
"attributionRequired": "归属为必填项",
|
||||
"maxZoom": "最大缩放级别",
|
||||
"maxZoomHint": "最大缩放级别 (1-23)",
|
||||
"maxZoomRequired": "最大缩放为必填项",
|
||||
"maxZoomInvalid": "最大缩放必须为数字",
|
||||
"maxZoomRange": "最大缩放必须在 {} 和 {} 之间",
|
||||
"fetchPreview": "获取预览",
|
||||
"previewTileLoaded": "预览瓦片加载成功",
|
||||
"previewTileFailed": "获取预览失败:{}",
|
||||
@@ -200,7 +314,8 @@
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "地图瓦片",
|
||||
"manageProviders": "管理提供商"
|
||||
"manageProviders": "管理提供商",
|
||||
"attribution": "地图归属"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "查看配置文件",
|
||||
@@ -211,6 +326,10 @@
|
||||
"profileNameRequired": "配置文件名称为必填项",
|
||||
"requiresDirection": "需要方向",
|
||||
"requiresDirectionSubtitle": "此类型的摄像头是否需要方向标签",
|
||||
"fov": "视场角",
|
||||
"fovHint": "视场角度数(留空使用默认值)",
|
||||
"fovSubtitle": "摄像头视场角 - 用于锥体宽度和范围提交格式",
|
||||
"fovInvalid": "视场角必须在1到360度之间",
|
||||
"submittable": "可提交",
|
||||
"submittableSubtitle": "此配置文件是否可用于摄像头提交",
|
||||
"osmTags": "OSM 标签",
|
||||
@@ -287,5 +406,111 @@
|
||||
"cannotChangeTileTypes": "在下载离线区域时无法更改瓦片类型",
|
||||
"selectMapLayer": "选择地图图层",
|
||||
"noTileProvidersAvailable": "无可用瓦片提供商"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "高级编辑选项",
|
||||
"subtitle": "这些编辑器为复杂编辑提供更高级的功能。",
|
||||
"webEditors": "网页编辑器",
|
||||
"mobileEditors": "移动编辑器",
|
||||
"iDEditor": "iD 编辑器",
|
||||
"iDEditorSubtitle": "功能完整的网页编辑器 - 始终有效",
|
||||
"rapidEditor": "RapiD 编辑器",
|
||||
"rapidEditorSubtitle": "使用Facebook数据的AI辅助编辑",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "高级Android OSM编辑器",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "基于调查的地图应用",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "快速POI编辑",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "iOS OSM编辑器",
|
||||
"couldNotOpenEditor": "无法打开编辑器 - 应用可能未安装",
|
||||
"couldNotOpenURL": "无法打开URL",
|
||||
"couldNotOpenOSMWebsite": "无法打开OSM网站"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "显示网络状态指示器",
|
||||
"showIndicatorSubtitle": "显示监控数据加载和错误状态",
|
||||
"loading": "加载监控数据...",
|
||||
"timedOut": "请求超时",
|
||||
"noData": "无离线数据",
|
||||
"success": "监控数据已加载",
|
||||
"nodeDataSlow": "监控数据缓慢"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "显示 {rendered} / {total} 设备",
|
||||
"editingDisabledMessage": "可见设备过多,无法安全编辑。请放大地图以减少可见设备数量,然后重试。"
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "搜索位置",
|
||||
"searchPlaceholder": "搜索地点或坐标...",
|
||||
"routeTo": "路线至",
|
||||
"routeFrom": "路线从",
|
||||
"selectLocation": "选择位置",
|
||||
"calculatingRoute": "计算路线中...",
|
||||
"routeCalculationFailed": "路线计算失败",
|
||||
"start": "开始",
|
||||
"resume": "继续",
|
||||
"endRoute": "结束路线",
|
||||
"routeOverview": "路线概览",
|
||||
"retry": "重试",
|
||||
"cancelSearch": "取消搜索",
|
||||
"noResultsFound": "未找到结果",
|
||||
"searching": "搜索中...",
|
||||
"location": "位置",
|
||||
"startPoint": "起点",
|
||||
"endPoint": "终点",
|
||||
"startSelect": "起点(选择)",
|
||||
"endSelect": "终点(选择)",
|
||||
"distance": "距离:{} 公里",
|
||||
"routeActive": "路线活跃",
|
||||
"locationsTooClose": "起点和终点位置过于接近",
|
||||
"navigationSettings": "导航",
|
||||
"navigationSettingsSubtitle": "路线规划和回避设置",
|
||||
"avoidanceDistance": "回避距离",
|
||||
"avoidanceDistanceSubtitle": "与监控设备保持的最小距离",
|
||||
"searchHistory": "最大搜索历史",
|
||||
"searchHistorySubtitle": "要记住的最近搜索次数",
|
||||
"units": "单位",
|
||||
"unitsSubtitle": "距离和测量的显示单位",
|
||||
"metric": "公制(公里,米)",
|
||||
"imperial": "英制(英里,英尺)",
|
||||
"meters": "米",
|
||||
"feet": "英尺"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "疑似位置",
|
||||
"showSuspectedLocations": "显示疑似位置",
|
||||
"showSuspectedLocationsSubtitle": "根据公用事业许可数据显示疑似监控站点的问号标记",
|
||||
"lastUpdated": "最后更新",
|
||||
"refreshNow": "立即刷新",
|
||||
"dataSource": "数据源",
|
||||
"dataSourceDescription": "公用事业许可数据,表明潜在的监控基础设施安装站点",
|
||||
"dataSourceCredit": "数据收集和托管由 alprwatch.org 提供",
|
||||
"minimumDistance": "与真实节点的最小距离",
|
||||
"minimumDistanceSubtitle": "隐藏现有监控设备{}米范围内的疑似位置",
|
||||
"updating": "正在更新疑似位置",
|
||||
"downloadingAndProcessing": "正在下载和处理数据...",
|
||||
"updateSuccess": "疑似位置更新成功",
|
||||
"updateFailed": "疑似位置更新失败",
|
||||
"neverFetched": "从未获取",
|
||||
"daysAgo": "{}天前",
|
||||
"hoursAgo": "{}小时前",
|
||||
"minutesAgo": "{}分钟前",
|
||||
"justNow": "刚刚"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "疑似位置 #{}",
|
||||
"ticketNo": "工单号",
|
||||
"address": "地址",
|
||||
"street": "街道",
|
||||
"city": "城市",
|
||||
"state": "州/省",
|
||||
"intersectingStreet": "交叉街道",
|
||||
"workDoneFor": "工作完成方",
|
||||
"remarks": "备注",
|
||||
"url": "网址",
|
||||
"coordinates": "坐标",
|
||||
"noAddressAvailable": "无可用地址"
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,25 @@ import 'app_state.dart';
|
||||
import 'screens/home_screen.dart';
|
||||
import 'screens/settings_screen.dart';
|
||||
import 'screens/profiles_settings_screen.dart';
|
||||
import 'screens/navigation_settings_screen.dart';
|
||||
import 'screens/offline_settings_screen.dart';
|
||||
import 'screens/advanced_settings_screen.dart';
|
||||
import 'screens/language_settings_screen.dart';
|
||||
import 'screens/about_screen.dart';
|
||||
import 'screens/release_notes_screen.dart';
|
||||
import 'screens/osm_account_screen.dart';
|
||||
import 'screens/upload_queue_screen.dart';
|
||||
import 'services/localization_service.dart';
|
||||
import 'services/version_service.dart';
|
||||
|
||||
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// Initialize version service
|
||||
await VersionService().init();
|
||||
|
||||
// Initialize localization service
|
||||
await LocalizationService.instance.init();
|
||||
|
||||
@@ -63,11 +71,15 @@ class DeFlockApp extends StatelessWidget {
|
||||
routes: {
|
||||
'/': (context) => const HomeScreen(),
|
||||
'/settings': (context) => const SettingsScreen(),
|
||||
'/settings/osm-account': (context) => const OSMAccountScreen(),
|
||||
'/settings/queue': (context) => const UploadQueueScreen(),
|
||||
'/settings/profiles': (context) => const ProfilesSettingsScreen(),
|
||||
'/settings/navigation': (context) => const NavigationSettingsScreen(),
|
||||
'/settings/offline': (context) => const OfflineSettingsScreen(),
|
||||
'/settings/advanced': (context) => const AdvancedSettingsScreen(),
|
||||
'/settings/language': (context) => const LanguageSettingsScreen(),
|
||||
'/settings/about': (context) => const AboutScreen(),
|
||||
'/settings/release-notes': (context) => const ReleaseNotesScreen(),
|
||||
},
|
||||
initialRoute: '/',
|
||||
);
|
||||
|
||||
24
lib/models/direction_fov.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
/// Represents a direction with its associated field-of-view (FOV) cone.
|
||||
class DirectionFov {
|
||||
/// The center direction in degrees (0-359, where 0 is north)
|
||||
final double centerDegrees;
|
||||
|
||||
/// The field-of-view width in degrees (e.g., 35, 90, 180, 360)
|
||||
final double fovDegrees;
|
||||
|
||||
DirectionFov(this.centerDegrees, this.fovDegrees);
|
||||
|
||||
@override
|
||||
String toString() => 'DirectionFov(center: ${centerDegrees}°, fov: ${fovDegrees}°)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is DirectionFov &&
|
||||
runtimeType == other.runtimeType &&
|
||||
centerDegrees == other.centerDegrees &&
|
||||
fovDegrees == other.fovDegrees;
|
||||
|
||||
@override
|
||||
int get hashCode => centerDegrees.hashCode ^ fovDegrees.hashCode;
|
||||
}
|
||||
@@ -9,6 +9,7 @@ class NodeProfile {
|
||||
final bool requiresDirection;
|
||||
final bool submittable;
|
||||
final bool editable;
|
||||
final double? fov; // Field-of-view in degrees (null means use dev_config default)
|
||||
|
||||
NodeProfile({
|
||||
required this.id,
|
||||
@@ -18,163 +19,185 @@ class NodeProfile {
|
||||
this.requiresDirection = true,
|
||||
this.submittable = true,
|
||||
this.editable = true,
|
||||
this.fov,
|
||||
});
|
||||
|
||||
/// Built‑in default: Generic ALPR camera (customizable template, not submittable)
|
||||
factory NodeProfile.genericAlpr() => NodeProfile(
|
||||
id: 'builtin-generic-alpr',
|
||||
name: 'Generic ALPR',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance:type': 'ALPR',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: false,
|
||||
editable: false,
|
||||
);
|
||||
/// Get all built-in default node profiles
|
||||
static List<NodeProfile> getDefaults() => [
|
||||
NodeProfile(
|
||||
id: 'builtin-generic-alpr',
|
||||
name: 'Generic ALPR',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance:type': 'ALPR',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: false,
|
||||
editable: false,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-flock',
|
||||
name: 'Flock',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Flock Safety',
|
||||
'manufacturer:wikidata': 'Q108485435',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-motorola',
|
||||
name: 'Motorola/Vigilant',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Motorola Solutions',
|
||||
'manufacturer:wikidata': 'Q634815',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-genetec',
|
||||
name: 'Genetec',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Genetec',
|
||||
'manufacturer:wikidata': 'Q30295174',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-leonardo',
|
||||
name: 'Leonardo/ELSAG',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Leonardo',
|
||||
'manufacturer:wikidata': 'Q910379',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-neology',
|
||||
name: 'Neology',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Neology, Inc.',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-rekor',
|
||||
name: 'Rekor',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Rekor',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-axis',
|
||||
name: 'Axis Communications',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Axis Communications',
|
||||
'manufacturer:wikidata': 'Q2347731',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-generic-gunshot',
|
||||
name: 'Generic Gunshot Detector',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: false,
|
||||
editable: false,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-shotspotter',
|
||||
name: 'ShotSpotter',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
'surveillance:brand': 'ShotSpotter',
|
||||
'surveillance:brand:wikidata': 'Q107740188',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
NodeProfile(
|
||||
id: 'builtin-flock-raven',
|
||||
name: 'Flock Raven',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
'brand': 'Flock Safety',
|
||||
'brand:wikidata': 'Q108485435',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
),
|
||||
];
|
||||
|
||||
/// Built‑in: Flock Safety ALPR camera
|
||||
factory NodeProfile.flock() => NodeProfile(
|
||||
id: 'builtin-flock',
|
||||
name: 'Flock',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Flock Safety',
|
||||
'manufacturer:wikidata': 'Q108485435',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Motorola Solutions/Vigilant ALPR camera
|
||||
factory NodeProfile.motorola() => NodeProfile(
|
||||
id: 'builtin-motorola',
|
||||
name: 'Motorola/Vigilant',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Motorola Solutions',
|
||||
'manufacturer:wikidata': 'Q634815',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Genetec ALPR camera
|
||||
factory NodeProfile.genetec() => NodeProfile(
|
||||
id: 'builtin-genetec',
|
||||
name: 'Genetec',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Genetec',
|
||||
'manufacturer:wikidata': 'Q30295174',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Leonardo/ELSAG ALPR camera
|
||||
factory NodeProfile.leonardo() => NodeProfile(
|
||||
id: 'builtin-leonardo',
|
||||
name: 'Leonardo/ELSAG',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Leonardo',
|
||||
'manufacturer:wikidata': 'Q910379',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Neology ALPR camera
|
||||
factory NodeProfile.neology() => NodeProfile(
|
||||
id: 'builtin-neology',
|
||||
name: 'Neology',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'ALPR',
|
||||
'surveillance:zone': 'traffic',
|
||||
'camera:type': 'fixed',
|
||||
'manufacturer': 'Neology, Inc.',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Generic gunshot detector (customizable template, not submittable)
|
||||
factory NodeProfile.genericGunshotDetector() => NodeProfile(
|
||||
id: 'builtin-generic-gunshot',
|
||||
name: 'Generic Gunshot Detector',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: false,
|
||||
editable: false,
|
||||
);
|
||||
|
||||
/// Built‑in: ShotSpotter gunshot detector
|
||||
factory NodeProfile.shotspotter() => NodeProfile(
|
||||
id: 'builtin-shotspotter',
|
||||
name: 'ShotSpotter',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
'surveillance:brand': 'ShotSpotter',
|
||||
'surveillance:brand:wikidata': 'Q107740188',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Built‑in: Flock Raven gunshot detector
|
||||
factory NodeProfile.flockRaven() => NodeProfile(
|
||||
id: 'builtin-flock-raven',
|
||||
name: 'Flock Raven',
|
||||
tags: const {
|
||||
'man_made': 'surveillance',
|
||||
'surveillance': 'public',
|
||||
'surveillance:type': 'gunshot_detector',
|
||||
'brand': 'Flock Safety',
|
||||
'brand:wikidata': 'Q108485435',
|
||||
},
|
||||
builtin: true,
|
||||
requiresDirection: false,
|
||||
submittable: true,
|
||||
editable: true,
|
||||
);
|
||||
|
||||
/// Returns true if this profile can be used for submissions
|
||||
bool get isSubmittable => submittable;
|
||||
@@ -187,6 +210,7 @@ class NodeProfile {
|
||||
bool? requiresDirection,
|
||||
bool? submittable,
|
||||
bool? editable,
|
||||
double? fov,
|
||||
}) =>
|
||||
NodeProfile(
|
||||
id: id ?? this.id,
|
||||
@@ -196,6 +220,7 @@ class NodeProfile {
|
||||
requiresDirection: requiresDirection ?? this.requiresDirection,
|
||||
submittable: submittable ?? this.submittable,
|
||||
editable: editable ?? this.editable,
|
||||
fov: fov ?? this.fov,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@@ -206,6 +231,7 @@ class NodeProfile {
|
||||
'requiresDirection': requiresDirection,
|
||||
'submittable': submittable,
|
||||
'editable': editable,
|
||||
'fov': fov,
|
||||
};
|
||||
|
||||
factory NodeProfile.fromJson(Map<String, dynamic> j) => NodeProfile(
|
||||
@@ -216,6 +242,7 @@ class NodeProfile {
|
||||
requiresDirection: j['requiresDirection'] ?? true, // Default to true for backward compatibility
|
||||
submittable: j['submittable'] ?? true, // Default to true for backward compatibility
|
||||
editable: j['editable'] ?? true, // Default to true for backward compatibility
|
||||
fov: j['fov']?.toDouble(), // Can be null for backward compatibility
|
||||
);
|
||||
|
||||
@override
|
||||
|
||||
@@ -13,6 +13,37 @@ class OperatorProfile {
|
||||
required this.tags,
|
||||
});
|
||||
|
||||
/// Get all built-in default operator profiles
|
||||
static List<OperatorProfile> getDefaults() => [
|
||||
OperatorProfile(
|
||||
id: 'builtin-lowes',
|
||||
name: "Lowe's",
|
||||
tags: const {
|
||||
'operator': "Lowe's",
|
||||
'operator:wikidata': 'Q1373493',
|
||||
'operator:type': 'private',
|
||||
},
|
||||
),
|
||||
OperatorProfile(
|
||||
id: 'builtin-home-depot',
|
||||
name: 'The Home Depot',
|
||||
tags: const {
|
||||
'operator': 'The Home Depot',
|
||||
'operator:wikidata': 'Q864407',
|
||||
'operator:type': 'private',
|
||||
},
|
||||
),
|
||||
OperatorProfile(
|
||||
id: 'builtin-simon-property-group',
|
||||
name: 'Simon Property Group',
|
||||
tags: const {
|
||||
'operator': 'Simon Property Group',
|
||||
'operator:wikidata': 'Q2287759',
|
||||
'operator:type': 'private',
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
OperatorProfile copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'direction_fov.dart';
|
||||
import '../dev_config.dart';
|
||||
|
||||
class OsmNode {
|
||||
final int id;
|
||||
final LatLng coord;
|
||||
final Map<String, String> tags;
|
||||
final bool isConstrained; // true if part of any way/relation
|
||||
|
||||
OsmNode({
|
||||
required this.id,
|
||||
required this.coord,
|
||||
required this.tags,
|
||||
this.isConstrained = false, // Default to unconstrained for backward compatibility
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@@ -16,6 +20,7 @@ class OsmNode {
|
||||
'lat': coord.latitude,
|
||||
'lon': coord.longitude,
|
||||
'tags': tags,
|
||||
'isConstrained': isConstrained,
|
||||
};
|
||||
|
||||
factory OsmNode.fromJson(Map<String, dynamic> json) {
|
||||
@@ -29,26 +34,96 @@ class OsmNode {
|
||||
id: json['id'] is int ? json['id'] as int : int.tryParse(json['id'].toString()) ?? 0,
|
||||
coord: LatLng((json['lat'] as num).toDouble(), (json['lon'] as num).toDouble()),
|
||||
tags: tags,
|
||||
isConstrained: json['isConstrained'] as bool? ?? false, // Default to false for backward compatibility
|
||||
);
|
||||
}
|
||||
|
||||
bool get hasDirection =>
|
||||
tags.containsKey('direction') || tags.containsKey('camera:direction');
|
||||
bool get hasDirection => directionFovPairs.isNotEmpty;
|
||||
|
||||
double? get directionDeg {
|
||||
/// Get direction and FOV pairs, supporting range notation like "90-270" or "10-45;90-125;290"
|
||||
List<DirectionFov> get directionFovPairs {
|
||||
final raw = tags['direction'] ?? tags['camera:direction'];
|
||||
if (raw == null) return null;
|
||||
if (raw == null) return [];
|
||||
|
||||
// Keep digits, optional dot, optional leading sign.
|
||||
final match = RegExp(r'[-+]?\d*\.?\d+').firstMatch(raw);
|
||||
if (match == null) return null;
|
||||
// Compass direction to degree mapping
|
||||
const compassDirections = {
|
||||
'N': 0.0, 'NNE': 22.5, 'NE': 45.0, 'ENE': 67.5,
|
||||
'E': 90.0, 'ESE': 112.5, 'SE': 135.0, 'SSE': 157.5,
|
||||
'S': 180.0, 'SSW': 202.5, 'SW': 225.0, 'WSW': 247.5,
|
||||
'W': 270.0, 'WNW': 292.5, 'NW': 315.0, 'NNW': 337.5,
|
||||
};
|
||||
|
||||
final numStr = match.group(0);
|
||||
final val = double.tryParse(numStr ?? '');
|
||||
if (val == null) return null;
|
||||
final directionFovList = <DirectionFov>[];
|
||||
final parts = raw.split(';');
|
||||
|
||||
for (final part in parts) {
|
||||
final trimmed = part.trim();
|
||||
if (trimmed.isEmpty) continue;
|
||||
|
||||
// Check if this part contains a range (e.g., "90-270")
|
||||
if (trimmed.contains('-') && RegExp(r'^\d+\.?\d*-\d+\.?\d*$').hasMatch(trimmed)) {
|
||||
final rangeParts = trimmed.split('-');
|
||||
if (rangeParts.length == 2) {
|
||||
final start = double.tryParse(rangeParts[0]);
|
||||
final end = double.tryParse(rangeParts[1]);
|
||||
|
||||
if (start != null && end != null) {
|
||||
final normalized = _calculateRangeCenter(start, end);
|
||||
directionFovList.add(normalized);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Not a range, handle as single direction
|
||||
final trimmedUpper = trimmed.toUpperCase();
|
||||
|
||||
// First try compass direction lookup
|
||||
if (compassDirections.containsKey(trimmedUpper)) {
|
||||
final degrees = compassDirections[trimmedUpper]!;
|
||||
directionFovList.add(DirectionFov(degrees, kDirectionConeHalfAngle * 2));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Then try numeric parsing
|
||||
final match = RegExp(r'[-+]?\d*\.?\d+').firstMatch(trimmed);
|
||||
if (match == null) continue;
|
||||
|
||||
// Normalize: wrap negative or >360 into 0‑359 range.
|
||||
final normalized = ((val % 360) + 360) % 360;
|
||||
return normalized;
|
||||
final numStr = match.group(0);
|
||||
final val = double.tryParse(numStr ?? '');
|
||||
if (val == null) continue;
|
||||
|
||||
// Normalize: wrap negative or >360 into 0‑359 range
|
||||
final normalized = ((val % 360) + 360) % 360;
|
||||
directionFovList.add(DirectionFov(normalized, kDirectionConeHalfAngle * 2));
|
||||
}
|
||||
|
||||
return directionFovList;
|
||||
}
|
||||
|
||||
/// Calculate center and width for a range like "90-270" or "270-90"
|
||||
DirectionFov _calculateRangeCenter(double start, double end) {
|
||||
// Normalize start and end to 0-359 range
|
||||
start = ((start % 360) + 360) % 360;
|
||||
end = ((end % 360) + 360) % 360;
|
||||
|
||||
double width, center;
|
||||
|
||||
if (start > end) {
|
||||
// Wrapping case: 270-90
|
||||
width = (end + 360) - start;
|
||||
center = ((start + end + 360) / 2) % 360;
|
||||
} else {
|
||||
// Normal case: 90-270
|
||||
width = end - start;
|
||||
center = (start + end) / 2;
|
||||
}
|
||||
|
||||
return DirectionFov(center, width);
|
||||
}
|
||||
|
||||
/// Legacy getter for backward compatibility - returns just center directions
|
||||
List<double> get directionDeg {
|
||||
return directionFovPairs.map((df) => df.centerDegrees).toList();
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,72 @@
|
||||
import 'dart:math' as math;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'node_profile.dart';
|
||||
import 'operator_profile.dart';
|
||||
import '../state/settings_state.dart';
|
||||
import '../dev_config.dart';
|
||||
|
||||
enum UploadOperation { create, modify, delete }
|
||||
enum UploadOperation { create, modify, delete, extract }
|
||||
|
||||
enum UploadState {
|
||||
pending, // Not started yet
|
||||
creatingChangeset, // Creating changeset
|
||||
uploading, // Node operation (create/modify/delete)
|
||||
closingChangeset, // Closing changeset
|
||||
error, // Upload failed (needs user retry) OR changeset not found
|
||||
complete // Everything done
|
||||
}
|
||||
|
||||
class PendingUpload {
|
||||
final LatLng coord;
|
||||
final double direction;
|
||||
final NodeProfile profile;
|
||||
final dynamic direction; // Can be double or String for multiple directions
|
||||
final NodeProfile? profile;
|
||||
final OperatorProfile? operatorProfile;
|
||||
final UploadMode uploadMode; // Capture upload destination when queued
|
||||
final UploadOperation operation; // Type of operation: create, modify, or delete
|
||||
final int? originalNodeId; // If this is modify/delete, the ID of the original OSM node
|
||||
int? submittedNodeId; // The actual node ID returned by OSM after successful submission
|
||||
int? tempNodeId; // ID of temporary node created in cache (for specific cleanup)
|
||||
int attempts;
|
||||
bool error;
|
||||
bool completing; // True when upload succeeded but item is showing checkmark briefly
|
||||
bool error; // DEPRECATED: Use uploadState instead
|
||||
String? errorMessage; // Detailed error message for debugging
|
||||
bool completing; // DEPRECATED: Use uploadState instead
|
||||
UploadState uploadState; // Current state in the upload pipeline
|
||||
String? changesetId; // ID of changeset that needs closing
|
||||
DateTime? nodeOperationCompletedAt; // When node operation completed (start of 59-minute countdown)
|
||||
int changesetCloseAttempts; // Number of changeset close attempts
|
||||
DateTime? lastChangesetCloseAttemptAt; // When we last tried to close changeset (for retry timing)
|
||||
int nodeSubmissionAttempts; // Number of node submission attempts (separate from overall attempts)
|
||||
DateTime? lastNodeSubmissionAttemptAt; // When we last tried to submit node (for retry timing)
|
||||
|
||||
PendingUpload({
|
||||
required this.coord,
|
||||
required this.direction,
|
||||
required this.profile,
|
||||
this.profile,
|
||||
this.operatorProfile,
|
||||
required this.uploadMode,
|
||||
required this.operation,
|
||||
this.originalNodeId,
|
||||
this.submittedNodeId,
|
||||
this.tempNodeId,
|
||||
this.attempts = 0,
|
||||
this.error = false,
|
||||
this.errorMessage,
|
||||
this.completing = false,
|
||||
this.uploadState = UploadState.pending,
|
||||
this.changesetId,
|
||||
this.nodeOperationCompletedAt,
|
||||
this.changesetCloseAttempts = 0,
|
||||
this.lastChangesetCloseAttemptAt,
|
||||
this.nodeSubmissionAttempts = 0,
|
||||
this.lastNodeSubmissionAttemptAt,
|
||||
}) : assert(
|
||||
(operation == UploadOperation.create && originalNodeId == null) ||
|
||||
(operation != UploadOperation.create && originalNodeId != null),
|
||||
'originalNodeId must be null for create operations and non-null for modify/delete operations'
|
||||
(operation == UploadOperation.create) || (originalNodeId != null),
|
||||
'originalNodeId must be null for create operations and non-null for modify/delete/extract operations'
|
||||
),
|
||||
assert(
|
||||
(operation == UploadOperation.delete) || (profile != null),
|
||||
'profile is required for create, modify, and extract operations'
|
||||
);
|
||||
|
||||
// True if this is an edit of an existing node, false if it's a new node
|
||||
@@ -41,6 +74,56 @@ class PendingUpload {
|
||||
|
||||
// True if this is a deletion of an existing node
|
||||
bool get isDeletion => operation == UploadOperation.delete;
|
||||
|
||||
// True if this is an extract operation (new node with tags from constrained node)
|
||||
bool get isExtraction => operation == UploadOperation.extract;
|
||||
|
||||
// New state-based helpers
|
||||
bool get needsUserRetry => uploadState == UploadState.error;
|
||||
bool get isActivelyProcessing => uploadState == UploadState.creatingChangeset || uploadState == UploadState.uploading || uploadState == UploadState.closingChangeset;
|
||||
bool get isComplete => uploadState == UploadState.complete;
|
||||
bool get isPending => uploadState == UploadState.pending;
|
||||
bool get isCreatingChangeset => uploadState == UploadState.creatingChangeset;
|
||||
bool get isUploading => uploadState == UploadState.uploading;
|
||||
bool get isClosingChangeset => uploadState == UploadState.closingChangeset;
|
||||
|
||||
// Calculate time until OSM auto-closes changeset (for UI display)
|
||||
// This uses nodeOperationCompletedAt (when changeset was created) as the reference
|
||||
Duration? get timeUntilAutoClose {
|
||||
if (nodeOperationCompletedAt == null) return null;
|
||||
final elapsed = DateTime.now().difference(nodeOperationCompletedAt!);
|
||||
final remaining = kChangesetAutoCloseTimeout - elapsed;
|
||||
return remaining.isNegative ? Duration.zero : remaining;
|
||||
}
|
||||
|
||||
// Check if the 59-minute window has expired (for phases 2 & 3)
|
||||
// This uses nodeOperationCompletedAt (when changeset was created) as the reference
|
||||
bool get hasChangesetExpired {
|
||||
if (nodeOperationCompletedAt == null) return false;
|
||||
return DateTime.now().difference(nodeOperationCompletedAt!) >= kChangesetAutoCloseTimeout;
|
||||
}
|
||||
|
||||
// Legacy method name for backward compatibility
|
||||
bool get shouldGiveUpOnChangeset => hasChangesetExpired;
|
||||
|
||||
// Calculate next retry delay for changeset close using exponential backoff
|
||||
Duration get nextChangesetCloseRetryDelay {
|
||||
final delay = Duration(
|
||||
milliseconds: (kChangesetCloseInitialRetryDelay.inMilliseconds *
|
||||
math.pow(kChangesetCloseBackoffMultiplier, changesetCloseAttempts)).round()
|
||||
);
|
||||
return delay > kChangesetCloseMaxRetryDelay
|
||||
? kChangesetCloseMaxRetryDelay
|
||||
: delay;
|
||||
}
|
||||
|
||||
// Check if it's time to retry changeset close
|
||||
bool get isReadyForChangesetCloseRetry {
|
||||
if (lastChangesetCloseAttemptAt == null) return true; // First attempt
|
||||
|
||||
final nextRetryTime = lastChangesetCloseAttemptAt!.add(nextChangesetCloseRetryDelay);
|
||||
return DateTime.now().isAfter(nextRetryTime);
|
||||
}
|
||||
|
||||
// Get display name for the upload destination
|
||||
String get uploadModeDisplayName {
|
||||
@@ -54,9 +137,96 @@ class PendingUpload {
|
||||
}
|
||||
}
|
||||
|
||||
// Set error state with detailed message
|
||||
void setError(String message) {
|
||||
error = true; // Keep for backward compatibility
|
||||
uploadState = UploadState.error;
|
||||
errorMessage = message;
|
||||
}
|
||||
|
||||
// Clear error state
|
||||
void clearError() {
|
||||
error = false; // Keep for backward compatibility
|
||||
uploadState = UploadState.pending;
|
||||
errorMessage = null;
|
||||
attempts = 0;
|
||||
changesetCloseAttempts = 0;
|
||||
changesetId = null;
|
||||
nodeOperationCompletedAt = null;
|
||||
lastChangesetCloseAttemptAt = null;
|
||||
nodeSubmissionAttempts = 0;
|
||||
lastNodeSubmissionAttemptAt = null;
|
||||
}
|
||||
|
||||
// Mark as creating changeset
|
||||
void markAsCreatingChangeset() {
|
||||
uploadState = UploadState.creatingChangeset;
|
||||
error = false;
|
||||
completing = false;
|
||||
errorMessage = null;
|
||||
}
|
||||
|
||||
// Mark changeset created, start node operation
|
||||
void markChangesetCreated(String csId) {
|
||||
uploadState = UploadState.uploading;
|
||||
changesetId = csId;
|
||||
nodeOperationCompletedAt = DateTime.now(); // Track when changeset was created for 59-minute timeout
|
||||
}
|
||||
|
||||
// Mark node operation as complete, start changeset close phase
|
||||
void markNodeOperationComplete() {
|
||||
uploadState = UploadState.closingChangeset;
|
||||
changesetCloseAttempts = 0;
|
||||
// Note: nodeSubmissionAttempts preserved for debugging/stats
|
||||
}
|
||||
|
||||
// Mark entire upload as complete
|
||||
void markAsComplete() {
|
||||
uploadState = UploadState.complete;
|
||||
completing = true; // Keep for UI compatibility
|
||||
error = false;
|
||||
errorMessage = null;
|
||||
}
|
||||
|
||||
// Increment changeset close attempt counter and record attempt time
|
||||
void incrementChangesetCloseAttempts() {
|
||||
changesetCloseAttempts++;
|
||||
lastChangesetCloseAttemptAt = DateTime.now();
|
||||
}
|
||||
|
||||
// Increment node submission attempt counter and record attempt time
|
||||
void incrementNodeSubmissionAttempts() {
|
||||
nodeSubmissionAttempts++;
|
||||
lastNodeSubmissionAttemptAt = DateTime.now();
|
||||
}
|
||||
|
||||
// Calculate next retry delay for node submission using exponential backoff
|
||||
Duration get nextNodeSubmissionRetryDelay {
|
||||
final delay = Duration(
|
||||
milliseconds: (kChangesetCloseInitialRetryDelay.inMilliseconds *
|
||||
math.pow(kChangesetCloseBackoffMultiplier, nodeSubmissionAttempts)).round()
|
||||
);
|
||||
return delay > kChangesetCloseMaxRetryDelay
|
||||
? kChangesetCloseMaxRetryDelay
|
||||
: delay;
|
||||
}
|
||||
|
||||
// Check if it's time to retry node submission
|
||||
bool get isReadyForNodeSubmissionRetry {
|
||||
if (lastNodeSubmissionAttemptAt == null) return true; // First attempt
|
||||
|
||||
final nextRetryTime = lastNodeSubmissionAttemptAt!.add(nextNodeSubmissionRetryDelay);
|
||||
return DateTime.now().isAfter(nextRetryTime);
|
||||
}
|
||||
|
||||
// Get combined tags from node profile and operator profile
|
||||
Map<String, String> getCombinedTags() {
|
||||
final tags = Map<String, String>.from(profile.tags);
|
||||
// Deletions don't need tags
|
||||
if (operation == UploadOperation.delete || profile == null) {
|
||||
return {};
|
||||
}
|
||||
|
||||
final tags = Map<String, String>.from(profile!.tags);
|
||||
|
||||
// Add operator profile tags (they override node profile tags if there are conflicts)
|
||||
if (operatorProfile != null) {
|
||||
@@ -64,8 +234,14 @@ class PendingUpload {
|
||||
}
|
||||
|
||||
// Add direction if required
|
||||
if (profile.requiresDirection) {
|
||||
tags['direction'] = direction.toStringAsFixed(0);
|
||||
if (profile!.requiresDirection) {
|
||||
if (direction is String) {
|
||||
tags['direction'] = direction;
|
||||
} else if (direction is double) {
|
||||
tags['direction'] = direction.toStringAsFixed(0);
|
||||
} else {
|
||||
tags['direction'] = '0';
|
||||
}
|
||||
}
|
||||
|
||||
return tags;
|
||||
@@ -75,15 +251,24 @@ class PendingUpload {
|
||||
'lat': coord.latitude,
|
||||
'lon': coord.longitude,
|
||||
'dir': direction,
|
||||
'profile': profile.toJson(),
|
||||
'profile': profile?.toJson(),
|
||||
'operatorProfile': operatorProfile?.toJson(),
|
||||
'uploadMode': uploadMode.index,
|
||||
'operation': operation.index,
|
||||
'originalNodeId': originalNodeId,
|
||||
'submittedNodeId': submittedNodeId,
|
||||
'tempNodeId': tempNodeId,
|
||||
'attempts': attempts,
|
||||
'error': error,
|
||||
'errorMessage': errorMessage,
|
||||
'completing': completing,
|
||||
'uploadState': uploadState.index,
|
||||
'changesetId': changesetId,
|
||||
'nodeOperationCompletedAt': nodeOperationCompletedAt?.millisecondsSinceEpoch,
|
||||
'changesetCloseAttempts': changesetCloseAttempts,
|
||||
'lastChangesetCloseAttemptAt': lastChangesetCloseAttemptAt?.millisecondsSinceEpoch,
|
||||
'nodeSubmissionAttempts': nodeSubmissionAttempts,
|
||||
'lastNodeSubmissionAttemptAt': lastNodeSubmissionAttemptAt?.millisecondsSinceEpoch,
|
||||
};
|
||||
|
||||
factory PendingUpload.fromJson(Map<String, dynamic> j) => PendingUpload(
|
||||
@@ -91,7 +276,7 @@ class PendingUpload {
|
||||
direction: j['dir'],
|
||||
profile: j['profile'] is Map<String, dynamic>
|
||||
? NodeProfile.fromJson(j['profile'])
|
||||
: NodeProfile.genericAlpr(),
|
||||
: null, // Profile is optional for deletions
|
||||
operatorProfile: j['operatorProfile'] != null
|
||||
? OperatorProfile.fromJson(j['operatorProfile'])
|
||||
: null,
|
||||
@@ -103,9 +288,36 @@ class PendingUpload {
|
||||
: (j['originalNodeId'] != null ? UploadOperation.modify : UploadOperation.create), // Legacy compatibility
|
||||
originalNodeId: j['originalNodeId'],
|
||||
submittedNodeId: j['submittedNodeId'],
|
||||
tempNodeId: j['tempNodeId'],
|
||||
attempts: j['attempts'] ?? 0,
|
||||
error: j['error'] ?? false,
|
||||
errorMessage: j['errorMessage'], // Can be null for legacy entries
|
||||
completing: j['completing'] ?? false, // Default to false for legacy entries
|
||||
uploadState: j['uploadState'] != null
|
||||
? UploadState.values[j['uploadState']]
|
||||
: _migrateFromLegacyFields(j), // Migrate from legacy error/completing fields
|
||||
changesetId: j['changesetId'],
|
||||
nodeOperationCompletedAt: j['nodeOperationCompletedAt'] != null
|
||||
? DateTime.fromMillisecondsSinceEpoch(j['nodeOperationCompletedAt'])
|
||||
: null,
|
||||
changesetCloseAttempts: j['changesetCloseAttempts'] ?? 0,
|
||||
lastChangesetCloseAttemptAt: j['lastChangesetCloseAttemptAt'] != null
|
||||
? DateTime.fromMillisecondsSinceEpoch(j['lastChangesetCloseAttemptAt'])
|
||||
: null,
|
||||
nodeSubmissionAttempts: j['nodeSubmissionAttempts'] ?? 0,
|
||||
lastNodeSubmissionAttemptAt: j['lastNodeSubmissionAttemptAt'] != null
|
||||
? DateTime.fromMillisecondsSinceEpoch(j['lastNodeSubmissionAttemptAt'])
|
||||
: null,
|
||||
);
|
||||
|
||||
// Helper to migrate legacy queue items to new state system
|
||||
static UploadState _migrateFromLegacyFields(Map<String, dynamic> j) {
|
||||
final error = j['error'] ?? false;
|
||||
final completing = j['completing'] ?? false;
|
||||
|
||||
if (completing) return UploadState.complete;
|
||||
if (error) return UploadState.error;
|
||||
return UploadState.pending;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
47
lib/models/search_result.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
/// Represents a search result from a geocoding service
|
||||
class SearchResult {
|
||||
final String displayName;
|
||||
final LatLng coordinates;
|
||||
final String? category;
|
||||
final String? type;
|
||||
|
||||
const SearchResult({
|
||||
required this.displayName,
|
||||
required this.coordinates,
|
||||
this.category,
|
||||
this.type,
|
||||
});
|
||||
|
||||
/// Create SearchResult from Nominatim JSON response
|
||||
factory SearchResult.fromNominatim(Map<String, dynamic> json) {
|
||||
final lat = double.parse(json['lat'] as String);
|
||||
final lon = double.parse(json['lon'] as String);
|
||||
|
||||
return SearchResult(
|
||||
displayName: json['display_name'] as String,
|
||||
coordinates: LatLng(lat, lon),
|
||||
category: json['category'] as String?,
|
||||
type: json['type'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SearchResult(displayName: $displayName, coordinates: $coordinates)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
return other is SearchResult &&
|
||||
other.displayName == displayName &&
|
||||
other.coordinates == coordinates;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return displayName.hashCode ^ coordinates.hashCode;
|
||||
}
|
||||
}
|
||||
189
lib/models/suspected_location.dart
Normal file
@@ -0,0 +1,189 @@
|
||||
import 'dart:convert';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
/// A suspected surveillance location from the CSV data
|
||||
class SuspectedLocation {
|
||||
final String ticketNo;
|
||||
final LatLng centroid;
|
||||
final List<LatLng> bounds;
|
||||
final Map<String, dynamic>? geoJson;
|
||||
final Map<String, dynamic> allFields; // All CSV fields except location and ticket_no
|
||||
|
||||
SuspectedLocation({
|
||||
required this.ticketNo,
|
||||
required this.centroid,
|
||||
required this.bounds,
|
||||
this.geoJson,
|
||||
required this.allFields,
|
||||
});
|
||||
|
||||
/// Create from CSV row data
|
||||
factory SuspectedLocation.fromCsvRow(Map<String, dynamic> row) {
|
||||
final locationString = row['location'] as String?;
|
||||
final ticketNo = row['ticket_no']?.toString() ?? '';
|
||||
|
||||
LatLng centroid = const LatLng(0, 0);
|
||||
List<LatLng> bounds = [];
|
||||
Map<String, dynamic>? geoJson;
|
||||
|
||||
// Parse GeoJSON if available
|
||||
if (locationString != null && locationString.isNotEmpty) {
|
||||
try {
|
||||
geoJson = jsonDecode(locationString) as Map<String, dynamic>;
|
||||
final coordinates = _extractCoordinatesFromGeoJson(geoJson);
|
||||
centroid = coordinates.centroid;
|
||||
bounds = coordinates.bounds;
|
||||
} catch (e) {
|
||||
// If GeoJSON parsing fails, use default coordinates
|
||||
print('[SuspectedLocation] Failed to parse GeoJSON for ticket $ticketNo: $e');
|
||||
print('[SuspectedLocation] Location string: $locationString');
|
||||
}
|
||||
}
|
||||
|
||||
// Store all fields except location and ticket_no
|
||||
final allFields = Map<String, dynamic>.from(row);
|
||||
allFields.remove('location');
|
||||
allFields.remove('ticket_no');
|
||||
|
||||
return SuspectedLocation(
|
||||
ticketNo: ticketNo,
|
||||
centroid: centroid,
|
||||
bounds: bounds,
|
||||
geoJson: geoJson,
|
||||
allFields: allFields,
|
||||
);
|
||||
}
|
||||
|
||||
/// Extract coordinates from GeoJSON
|
||||
static ({LatLng centroid, List<LatLng> bounds}) _extractCoordinatesFromGeoJson(Map<String, dynamic> geoJson) {
|
||||
try {
|
||||
// The geoJson IS the geometry object (not wrapped in a 'geometry' property)
|
||||
final coordinates = geoJson['coordinates'] as List?;
|
||||
if (coordinates == null || coordinates.isEmpty) {
|
||||
print('[SuspectedLocation] No coordinates found in GeoJSON');
|
||||
return (centroid: const LatLng(0, 0), bounds: <LatLng>[]);
|
||||
}
|
||||
|
||||
final List<LatLng> points = [];
|
||||
|
||||
// Handle different geometry types
|
||||
final type = geoJson['type'] as String?;
|
||||
switch (type) {
|
||||
case 'Point':
|
||||
if (coordinates.length >= 2) {
|
||||
final point = LatLng(
|
||||
(coordinates[1] as num).toDouble(),
|
||||
(coordinates[0] as num).toDouble(),
|
||||
);
|
||||
points.add(point);
|
||||
}
|
||||
break;
|
||||
case 'Polygon':
|
||||
// Polygon coordinates are [[[lng, lat], ...]]
|
||||
if (coordinates.isNotEmpty) {
|
||||
final ring = coordinates[0] as List;
|
||||
for (final coord in ring) {
|
||||
if (coord is List && coord.length >= 2) {
|
||||
points.add(LatLng(
|
||||
(coord[1] as num).toDouble(),
|
||||
(coord[0] as num).toDouble(),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'MultiPolygon':
|
||||
// MultiPolygon coordinates are [[[[lng, lat], ...], ...], ...]
|
||||
for (final polygon in coordinates) {
|
||||
if (polygon is List && polygon.isNotEmpty) {
|
||||
final ring = polygon[0] as List;
|
||||
for (final coord in ring) {
|
||||
if (coord is List && coord.length >= 2) {
|
||||
points.add(LatLng(
|
||||
(coord[1] as num).toDouble(),
|
||||
(coord[0] as num).toDouble(),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
print('Unsupported geometry type: $type');
|
||||
}
|
||||
|
||||
if (points.isEmpty) {
|
||||
return (centroid: const LatLng(0, 0), bounds: <LatLng>[]);
|
||||
}
|
||||
|
||||
// Calculate centroid
|
||||
double sumLat = 0;
|
||||
double sumLng = 0;
|
||||
for (final point in points) {
|
||||
sumLat += point.latitude;
|
||||
sumLng += point.longitude;
|
||||
}
|
||||
final centroid = LatLng(sumLat / points.length, sumLng / points.length);
|
||||
|
||||
return (centroid: centroid, bounds: points);
|
||||
} catch (e) {
|
||||
print('Error extracting coordinates from GeoJSON: $e');
|
||||
return (centroid: const LatLng(0, 0), bounds: <LatLng>[]);
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert to JSON for storage
|
||||
Map<String, dynamic> toJson() => {
|
||||
'ticket_no': ticketNo,
|
||||
'geo_json': geoJson,
|
||||
'centroid_lat': centroid.latitude,
|
||||
'centroid_lng': centroid.longitude,
|
||||
'bounds': bounds.map((p) => [p.latitude, p.longitude]).toList(),
|
||||
'all_fields': allFields,
|
||||
};
|
||||
|
||||
/// Create from stored JSON
|
||||
factory SuspectedLocation.fromJson(Map<String, dynamic> json) {
|
||||
final boundsData = json['bounds'] as List?;
|
||||
final bounds = boundsData?.map((b) => LatLng(
|
||||
(b[0] as num).toDouble(),
|
||||
(b[1] as num).toDouble(),
|
||||
)).toList() ?? <LatLng>[];
|
||||
|
||||
return SuspectedLocation(
|
||||
ticketNo: json['ticket_no'] ?? '',
|
||||
geoJson: json['geo_json'],
|
||||
centroid: LatLng(
|
||||
(json['centroid_lat'] as num).toDouble(),
|
||||
(json['centroid_lng'] as num).toDouble(),
|
||||
),
|
||||
bounds: bounds,
|
||||
allFields: Map<String, dynamic>.from(json['all_fields'] ?? {}),
|
||||
);
|
||||
}
|
||||
|
||||
/// Get a formatted display address
|
||||
String get displayAddress {
|
||||
final parts = <String>[];
|
||||
final addr = allFields['addr']?.toString();
|
||||
final street = allFields['street']?.toString();
|
||||
final city = allFields['city']?.toString();
|
||||
final state = allFields['state']?.toString();
|
||||
|
||||
if (addr?.isNotEmpty == true) parts.add(addr!);
|
||||
if (street?.isNotEmpty == true) parts.add(street!);
|
||||
if (city?.isNotEmpty == true) parts.add(city!);
|
||||
if (state?.isNotEmpty == true) parts.add(state!);
|
||||
return parts.isNotEmpty ? parts.join(', ') : 'No address available';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is SuspectedLocation &&
|
||||
runtimeType == other.runtimeType &&
|
||||
ticketNo == other.ticketNo;
|
||||
|
||||
@override
|
||||
int get hashCode => ticketNo.hashCode;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ class TileType {
|
||||
final String urlTemplate;
|
||||
final String attribution;
|
||||
final Uint8List? previewTile; // Single tile image data for preview
|
||||
final int maxZoom; // Maximum zoom level for this tile type
|
||||
|
||||
const TileType({
|
||||
required this.id,
|
||||
@@ -15,11 +16,39 @@ class TileType {
|
||||
required this.urlTemplate,
|
||||
required this.attribution,
|
||||
this.previewTile,
|
||||
this.maxZoom = 18, // Default max zoom level
|
||||
});
|
||||
|
||||
/// Create URL for a specific tile, replacing template variables
|
||||
///
|
||||
/// Supported placeholders:
|
||||
/// - {x}, {y}, {z}: Standard tile coordinates
|
||||
/// - {quadkey}: Bing Maps quadkey format (alternative to x/y/z)
|
||||
/// - {0_3}: Subdomain 0-3 for load balancing
|
||||
/// - {1_4}: Subdomain 1-4 for providers that use 1-based indexing
|
||||
/// - {api_key}: API key placeholder (optional)
|
||||
String getTileUrl(int z, int x, int y, {String? apiKey}) {
|
||||
String url = urlTemplate
|
||||
String url = urlTemplate;
|
||||
|
||||
// Handle Bing Maps quadkey conversion
|
||||
if (url.contains('{quadkey}')) {
|
||||
final quadkey = _convertToQuadkey(x, y, z);
|
||||
url = url.replaceAll('{quadkey}', quadkey);
|
||||
}
|
||||
|
||||
// Handle subdomains for load balancing
|
||||
if (url.contains('{0_3}')) {
|
||||
final subdomain = (x + y) % 4; // 0, 1, 2, 3
|
||||
url = url.replaceAll('{0_3}', subdomain.toString());
|
||||
}
|
||||
|
||||
if (url.contains('{1_4}')) {
|
||||
final subdomain = ((x + y) % 4) + 1; // 1, 2, 3, 4
|
||||
url = url.replaceAll('{1_4}', subdomain.toString());
|
||||
}
|
||||
|
||||
// Standard x/y/z replacement
|
||||
url = url
|
||||
.replaceAll('{z}', z.toString())
|
||||
.replaceAll('{x}', x.toString())
|
||||
.replaceAll('{y}', y.toString());
|
||||
@@ -31,6 +60,19 @@ class TileType {
|
||||
return url;
|
||||
}
|
||||
|
||||
/// Convert x, y, z to Bing Maps quadkey format
|
||||
String _convertToQuadkey(int x, int y, int z) {
|
||||
final quadkey = StringBuffer();
|
||||
for (int i = z; i > 0; i--) {
|
||||
int digit = 0;
|
||||
final mask = 1 << (i - 1);
|
||||
if ((x & mask) != 0) digit++;
|
||||
if ((y & mask) != 0) digit += 2;
|
||||
quadkey.write(digit);
|
||||
}
|
||||
return quadkey.toString();
|
||||
}
|
||||
|
||||
/// Check if this tile type needs an API key
|
||||
bool get requiresApiKey => urlTemplate.contains('{api_key}');
|
||||
|
||||
@@ -40,6 +82,7 @@ class TileType {
|
||||
'urlTemplate': urlTemplate,
|
||||
'attribution': attribution,
|
||||
'previewTile': previewTile != null ? base64Encode(previewTile!) : null,
|
||||
'maxZoom': maxZoom,
|
||||
};
|
||||
|
||||
static TileType fromJson(Map<String, dynamic> json) => TileType(
|
||||
@@ -50,6 +93,7 @@ class TileType {
|
||||
previewTile: json['previewTile'] != null
|
||||
? base64Decode(json['previewTile'])
|
||||
: null,
|
||||
maxZoom: json['maxZoom'] ?? 18, // Default to 18 if not specified
|
||||
);
|
||||
|
||||
TileType copyWith({
|
||||
@@ -58,12 +102,14 @@ class TileType {
|
||||
String? urlTemplate,
|
||||
String? attribution,
|
||||
Uint8List? previewTile,
|
||||
int? maxZoom,
|
||||
}) => TileType(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
urlTemplate: urlTemplate ?? this.urlTemplate,
|
||||
attribution: attribution ?? this.attribution,
|
||||
previewTile: previewTile ?? this.previewTile,
|
||||
maxZoom: maxZoom ?? this.maxZoom,
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -151,42 +197,20 @@ class DefaultTileProviders {
|
||||
name: 'Street Map',
|
||||
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
attribution: '© OpenStreetMap contributors',
|
||||
maxZoom: 19,
|
||||
),
|
||||
],
|
||||
),
|
||||
TileProvider(
|
||||
id: 'google',
|
||||
name: 'Google',
|
||||
id: 'bing',
|
||||
name: 'Bing Maps',
|
||||
tileTypes: [
|
||||
TileType(
|
||||
id: 'google_hybrid',
|
||||
name: 'Satellite + Roads',
|
||||
urlTemplate: 'https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}',
|
||||
attribution: '© Google',
|
||||
),
|
||||
TileType(
|
||||
id: 'google_satellite',
|
||||
name: 'Satellite Only',
|
||||
urlTemplate: 'https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',
|
||||
attribution: '© Google',
|
||||
),
|
||||
TileType(
|
||||
id: 'google_roadmap',
|
||||
name: 'Road Map',
|
||||
urlTemplate: 'https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',
|
||||
attribution: '© Google',
|
||||
),
|
||||
],
|
||||
),
|
||||
TileProvider(
|
||||
id: 'esri',
|
||||
name: 'Esri',
|
||||
tileTypes: [
|
||||
TileType(
|
||||
id: 'esri_satellite',
|
||||
name: 'Satellite Imagery',
|
||||
urlTemplate: 'https://services.arcgisonline.com/ArcGis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png',
|
||||
attribution: '© Esri © Maxar',
|
||||
id: 'bing_satellite',
|
||||
name: 'Satellite',
|
||||
urlTemplate: 'https://ecn.t{0_3}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=1&n=z',
|
||||
attribution: '© Microsoft Corporation',
|
||||
maxZoom: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -208,6 +232,19 @@ class DefaultTileProviders {
|
||||
),
|
||||
],
|
||||
),
|
||||
TileProvider(
|
||||
id: 'opentopomap_memomaps',
|
||||
name: 'OpenTopoMap/Memomaps',
|
||||
tileTypes: [
|
||||
TileType(
|
||||
id: 'opentopomap_topo',
|
||||
name: 'Topographic',
|
||||
urlTemplate: 'https://tile.memomaps.de/tilegen/{z}/{x}/{y}.png',
|
||||
attribution: 'Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)',
|
||||
maxZoom: 18,
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../widgets/welcome_dialog.dart';
|
||||
import '../widgets/submission_guide_dialog.dart';
|
||||
|
||||
class AboutScreen extends StatelessWidget {
|
||||
const AboutScreen({super.key});
|
||||
|
||||
Future<void> _launchUrl(String url, BuildContext context) async {
|
||||
final uri = Uri.parse(url);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Could not open URL: $url'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final locService = LocalizationService.instance;
|
||||
@@ -14,38 +32,138 @@ class AboutScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(locService.t('settings.aboutThisApp')),
|
||||
),
|
||||
body: FutureBuilder<String>(
|
||||
future: DefaultAssetBundle.of(context).loadString('assets/info.txt'),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Error loading info: ${snapshot.error}',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
locService.t('about.title'),
|
||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
snapshot.data ?? 'No info available.',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
);
|
||||
},
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
locService.t('about.description'),
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
locService.t('about.features'),
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
locService.t('about.initiative'),
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
locService.t('about.footer'),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
// Information dialogs section
|
||||
_buildDialogButtons(context),
|
||||
const SizedBox(height: 24),
|
||||
_buildHelpLinks(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHelpLinks(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
_buildLinkText(context, 'About DeFlock', 'https://deflock.me/about'),
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'Privacy Policy', 'https://deflock.me/privacy'),
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'DeFlock Discord', 'https://discord.gg/aV7v4R3sKT'),
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'Source Code', 'https://github.com/FoggedLens/deflock-app'),
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'Contact', 'https://deflock.me/contact'),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Widget _buildLinkText(BuildContext context, String text, String url) {
|
||||
return GestureDetector(
|
||||
onTap: () => _launchUrl(url, context),
|
||||
child: Text(
|
||||
text,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDialogButtons(BuildContext context) {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Welcome Message button
|
||||
OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => const WelcomeDialog(showDontShowAgain: false),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.waving_hand_outlined),
|
||||
label: Text(locService.t('about.showWelcome')),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
// Submission Guide button
|
||||
OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => const SubmissionGuideDialog(showDontShowAgain: false),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.info_outline),
|
||||
label: Text(locService.t('about.showSubmissionGuide')),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
// Release Notes button
|
||||
OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, '/settings/release-notes');
|
||||
},
|
||||
icon: const Icon(Icons.article_outlined),
|
||||
label: Text(locService.t('about.viewReleaseNotes')),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'settings/sections/max_nodes_section.dart';
|
||||
import 'settings/sections/proximity_alerts_section.dart';
|
||||
import 'settings/sections/suspected_locations_section.dart';
|
||||
import 'settings/sections/tile_provider_section.dart';
|
||||
import 'settings/sections/network_status_section.dart';
|
||||
import '../services/localization_service.dart';
|
||||
|
||||
class AdvancedSettingsScreen extends StatelessWidget {
|
||||
@@ -18,12 +20,21 @@ class AdvancedSettingsScreen extends StatelessWidget {
|
||||
title: Text(locService.t('settings.advancedSettings')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: const [
|
||||
MaxNodesSection(),
|
||||
Divider(),
|
||||
ProximityAlertsSection(),
|
||||
Divider(),
|
||||
SuspectedLocationsSection(),
|
||||
Divider(),
|
||||
// NetworkStatusSection(), // Commented out - network status indicator now defaults to enabled
|
||||
// Divider(),
|
||||
TileProviderSection(),
|
||||
],
|
||||
),
|
||||
|
||||
129
lib/screens/coordinators/map_interaction_handler.dart
Normal file
@@ -0,0 +1,129 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map_animations/flutter_map_animations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../app_state.dart';
|
||||
import '../../models/osm_node.dart';
|
||||
import '../../models/suspected_location.dart';
|
||||
import '../../models/search_result.dart';
|
||||
|
||||
/// Handles map interaction events including node taps, suspected location taps,
|
||||
/// and search result selection with appropriate map animations and state updates.
|
||||
class MapInteractionHandler {
|
||||
|
||||
/// Handle node tap with highlighting and map centering
|
||||
void handleNodeTap({
|
||||
required BuildContext context,
|
||||
required OsmNode node,
|
||||
required AnimatedMapController mapController,
|
||||
required Function(int?) onSelectedNodeChanged,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Disable follow-me when user taps a node
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
// Set the selected node for highlighting
|
||||
onSelectedNodeChanged(node.id);
|
||||
|
||||
// Center the map on the selected node with smooth animation
|
||||
try {
|
||||
mapController.animateTo(
|
||||
dest: node.coord,
|
||||
zoom: mapController.mapController.camera.zoom,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[MapInteractionHandler] Could not center map on node: $e');
|
||||
}
|
||||
|
||||
// Start edit session for the node
|
||||
appState.startEditSession(node);
|
||||
}
|
||||
|
||||
/// Handle suspected location tap with selection and highlighting
|
||||
void handleSuspectedLocationTap({
|
||||
required BuildContext context,
|
||||
required SuspectedLocation location,
|
||||
required AnimatedMapController mapController,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
debugPrint('[MapInteractionHandler] Suspected location tapped: ${location.ticketNo}');
|
||||
|
||||
// Disable follow-me when user taps a suspected location
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
// Select the suspected location for highlighting
|
||||
appState.selectSuspectedLocation(location);
|
||||
|
||||
// Center the map on the suspected location
|
||||
try {
|
||||
mapController.animateTo(
|
||||
dest: location.centroid,
|
||||
zoom: mapController.mapController.camera.zoom.clamp(16.0, 18.0), // Zoom in if needed
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[MapInteractionHandler] Could not center map on suspected location: $e');
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle search result selection with map animation and routing setup
|
||||
void handleSearchResultSelection({
|
||||
required BuildContext context,
|
||||
required SearchResult result,
|
||||
required AnimatedMapController mapController,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
debugPrint('[MapInteractionHandler] Search result selected: ${result.displayName}');
|
||||
|
||||
// Disable follow-me to prevent interference with selection
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
// Update app state with the selection
|
||||
appState.selectSearchResult(result);
|
||||
|
||||
// Animate to the selected location
|
||||
try {
|
||||
mapController.animateTo(
|
||||
dest: result.coordinates,
|
||||
zoom: 16.0, // Good zoom level for search results
|
||||
duration: const Duration(milliseconds: 600),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[MapInteractionHandler] Could not animate to search result: $e');
|
||||
// Fallback to immediate positioning
|
||||
try {
|
||||
mapController.mapController.move(result.coordinates, 16.0);
|
||||
} catch (_) {
|
||||
debugPrint('[MapInteractionHandler] Could not move to search result');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear selected node highlighting
|
||||
void clearSelectedNode({
|
||||
required Function(int?) onSelectedNodeChanged,
|
||||
}) {
|
||||
onSelectedNodeChanged(null);
|
||||
}
|
||||
|
||||
/// Handle user gesture on map (clears selections)
|
||||
void handleUserGesture({
|
||||
required BuildContext context,
|
||||
required Function(int?) onSelectedNodeChanged,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Clear selected node highlighting
|
||||
onSelectedNodeChanged(null);
|
||||
|
||||
// Clear suspected location selection
|
||||
appState.clearSuspectedLocationSelection();
|
||||
}
|
||||
}
|
||||
183
lib/screens/coordinators/navigation_coordinator.dart
Normal file
@@ -0,0 +1,183 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map_animations/flutter_map_animations.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../app_state.dart';
|
||||
import '../../widgets/map_view.dart';
|
||||
|
||||
/// Coordinates all navigation and routing functionality including route planning,
|
||||
/// map centering, zoom management, and route visualization.
|
||||
class NavigationCoordinator {
|
||||
|
||||
/// Start a route with automatic follow-me detection and appropriate centering
|
||||
void startRoute({
|
||||
required BuildContext context,
|
||||
required AnimatedMapController mapController,
|
||||
required GlobalKey<MapViewState>? mapViewKey,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Get user location and check if we should auto-enable follow-me
|
||||
LatLng? userLocation;
|
||||
bool enableFollowMe = false;
|
||||
|
||||
try {
|
||||
userLocation = mapViewKey?.currentState?.getUserLocation();
|
||||
if (userLocation != null && appState.shouldAutoEnableFollowMe(userLocation)) {
|
||||
debugPrint('[NavigationCoordinator] Auto-enabling follow-me mode - user within 1km of start');
|
||||
appState.setFollowMeMode(FollowMeMode.follow);
|
||||
enableFollowMe = true;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('[NavigationCoordinator] Could not get user location for auto follow-me: $e');
|
||||
}
|
||||
|
||||
// Start the route
|
||||
appState.startRoute();
|
||||
|
||||
// Zoom to level 14 and center appropriately
|
||||
_zoomAndCenterForRoute(
|
||||
mapController: mapController,
|
||||
followMeEnabled: enableFollowMe,
|
||||
userLocation: userLocation,
|
||||
routeStart: appState.routeStart,
|
||||
);
|
||||
}
|
||||
|
||||
/// Resume a route with appropriate centering
|
||||
void resumeRoute({
|
||||
required BuildContext context,
|
||||
required AnimatedMapController mapController,
|
||||
required GlobalKey<MapViewState>? mapViewKey,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Hide the overview
|
||||
appState.hideRouteOverview();
|
||||
|
||||
// Zoom and center for resumed route
|
||||
// For resume, we always center on user if GPS is available, otherwise start pin
|
||||
LatLng? userLocation;
|
||||
try {
|
||||
userLocation = mapViewKey?.currentState?.getUserLocation();
|
||||
} catch (e) {
|
||||
debugPrint('[NavigationCoordinator] Could not get user location for route resume: $e');
|
||||
}
|
||||
|
||||
_zoomAndCenterForRoute(
|
||||
mapController: mapController,
|
||||
followMeEnabled: appState.followMeMode != FollowMeMode.off, // Use current follow-me state
|
||||
userLocation: userLocation,
|
||||
routeStart: appState.routeStart,
|
||||
);
|
||||
}
|
||||
|
||||
/// Handle navigation button press with route overview logic
|
||||
void handleNavigationButtonPress({
|
||||
required BuildContext context,
|
||||
required AnimatedMapController mapController,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
if (appState.isInRouteMode) {
|
||||
// Show route overview (zoom out to show full route)
|
||||
appState.showRouteOverview();
|
||||
zoomToShowFullRoute(appState: appState, mapController: mapController);
|
||||
} else {
|
||||
// Not in route - handle based on current state
|
||||
if (appState.isInSearchMode) {
|
||||
// Exit search mode
|
||||
appState.clearSearchResults();
|
||||
} else {
|
||||
// Enter search mode
|
||||
try {
|
||||
final center = mapController.mapController.camera.center;
|
||||
appState.enterSearchMode(center);
|
||||
} catch (e) {
|
||||
debugPrint('[NavigationCoordinator] Could not get map center for search: $e');
|
||||
// Fallback to default location
|
||||
appState.enterSearchMode(LatLng(37.7749, -122.4194));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Zoom to show the full route between start and end points
|
||||
void zoomToShowFullRoute({
|
||||
required AppState appState,
|
||||
required AnimatedMapController mapController,
|
||||
}) {
|
||||
if (appState.routeStart == null || appState.routeEnd == null) return;
|
||||
|
||||
try {
|
||||
// Calculate the bounds of the route
|
||||
final start = appState.routeStart!;
|
||||
final end = appState.routeEnd!;
|
||||
|
||||
// Find the center point between start and end
|
||||
final centerLat = (start.latitude + end.latitude) / 2;
|
||||
final centerLng = (start.longitude + end.longitude) / 2;
|
||||
final center = LatLng(centerLat, centerLng);
|
||||
|
||||
// Calculate distance between points to determine appropriate zoom
|
||||
final distance = const Distance().as(LengthUnit.Meter, start, end);
|
||||
double zoom;
|
||||
if (distance < 500) {
|
||||
zoom = 16.0;
|
||||
} else if (distance < 2000) {
|
||||
zoom = 14.0;
|
||||
} else if (distance < 10000) {
|
||||
zoom = 12.0;
|
||||
} else {
|
||||
zoom = 10.0;
|
||||
}
|
||||
|
||||
debugPrint('[NavigationCoordinator] Zooming to show full route: ${distance.toInt()}m, zoom $zoom');
|
||||
|
||||
mapController.animateTo(
|
||||
dest: center,
|
||||
zoom: zoom,
|
||||
duration: const Duration(milliseconds: 800),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[NavigationCoordinator] Could not zoom to show full route: $e');
|
||||
}
|
||||
}
|
||||
|
||||
/// Internal method to zoom and center for route start/resume
|
||||
void _zoomAndCenterForRoute({
|
||||
required AnimatedMapController mapController,
|
||||
required bool followMeEnabled,
|
||||
required LatLng? userLocation,
|
||||
required LatLng? routeStart,
|
||||
}) {
|
||||
try {
|
||||
LatLng centerLocation;
|
||||
|
||||
if (followMeEnabled && userLocation != null) {
|
||||
// Center on user if follow-me is enabled
|
||||
centerLocation = userLocation;
|
||||
debugPrint('[NavigationCoordinator] Centering on user location for route start');
|
||||
} else if (routeStart != null) {
|
||||
// Center on start pin if user is far away or no GPS
|
||||
centerLocation = routeStart;
|
||||
debugPrint('[NavigationCoordinator] Centering on route start pin');
|
||||
} else {
|
||||
debugPrint('[NavigationCoordinator] No valid location to center on');
|
||||
return;
|
||||
}
|
||||
|
||||
// Animate to zoom 14 and center location
|
||||
mapController.animateTo(
|
||||
dest: centerLocation,
|
||||
zoom: 14.0,
|
||||
duration: const Duration(milliseconds: 800),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[NavigationCoordinator] Could not zoom/center for route: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
251
lib/screens/coordinators/sheet_coordinator.dart
Normal file
@@ -0,0 +1,251 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map_animations/flutter_map_animations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../app_state.dart';
|
||||
import '../../dev_config.dart';
|
||||
import '../../services/localization_service.dart';
|
||||
import '../../widgets/add_node_sheet.dart';
|
||||
import '../../widgets/edit_node_sheet.dart';
|
||||
import '../../widgets/navigation_sheet.dart';
|
||||
import '../../widgets/measured_sheet.dart';
|
||||
|
||||
/// Coordinates all bottom sheet operations including opening, closing, height tracking,
|
||||
/// and sheet-related validation logic.
|
||||
class SheetCoordinator {
|
||||
// Track sheet heights for map positioning
|
||||
double _addSheetHeight = 0.0;
|
||||
double _editSheetHeight = 0.0;
|
||||
double _tagSheetHeight = 0.0;
|
||||
double _navigationSheetHeight = 0.0;
|
||||
|
||||
// Track sheet state for auto-open logic
|
||||
bool _editSheetShown = false;
|
||||
bool _navigationSheetShown = false;
|
||||
|
||||
// Flag to prevent map bounce when transitioning from tag sheet to edit sheet
|
||||
bool _transitioningToEdit = false;
|
||||
|
||||
// Getters for accessing heights
|
||||
double get addSheetHeight => _addSheetHeight;
|
||||
double get editSheetHeight => _editSheetHeight;
|
||||
double get tagSheetHeight => _tagSheetHeight;
|
||||
double get navigationSheetHeight => _navigationSheetHeight;
|
||||
bool get editSheetShown => _editSheetShown;
|
||||
bool get navigationSheetShown => _navigationSheetShown;
|
||||
bool get transitioningToEdit => _transitioningToEdit;
|
||||
|
||||
/// Get the currently active sheet height for map positioning
|
||||
double get activeSheetHeight {
|
||||
if (_addSheetHeight > 0) return _addSheetHeight;
|
||||
if (_editSheetHeight > 0) return _editSheetHeight;
|
||||
if (_navigationSheetHeight > 0) return _navigationSheetHeight;
|
||||
return _tagSheetHeight;
|
||||
}
|
||||
|
||||
/// Update sheet state tracking
|
||||
void setEditSheetShown(bool shown) => _editSheetShown = shown;
|
||||
void setNavigationSheetShown(bool shown) => _navigationSheetShown = shown;
|
||||
void setTransitioningToEdit(bool transitioning) => _transitioningToEdit = transitioning;
|
||||
|
||||
/// Open the add node sheet with validation and setup
|
||||
void openAddNodeSheet({
|
||||
required BuildContext context,
|
||||
required GlobalKey<ScaffoldState> scaffoldKey,
|
||||
required AnimatedMapController mapController,
|
||||
required bool isNodeLimitActive,
|
||||
required VoidCallback onStateChanged,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Check minimum zoom level before opening sheet
|
||||
final currentZoom = mapController.mapController.camera.zoom;
|
||||
if (currentZoom < kMinZoomForNodeEditingSheets) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
LocalizationService.instance.t('editNode.zoomInRequiredMessage',
|
||||
params: [kMinZoomForNodeEditingSheets.toString()])
|
||||
),
|
||||
duration: const Duration(seconds: 4),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if node limit is active and warn user
|
||||
if (isNodeLimitActive) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
LocalizationService.instance.t('nodeLimitIndicator.editingDisabledMessage')
|
||||
),
|
||||
duration: const Duration(seconds: 4),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable follow-me when adding a node so the map doesn't jump around
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
appState.startAddSession();
|
||||
final session = appState.session!; // guaranteed non‑null now
|
||||
|
||||
final controller = scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||
),
|
||||
child: MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
_addSheetHeight = height + MediaQuery.of(context).padding.bottom;
|
||||
onStateChanged();
|
||||
},
|
||||
child: AddNodeSheet(session: session),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Reset height when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
_addSheetHeight = 0.0;
|
||||
onStateChanged();
|
||||
|
||||
// Handle dismissal by canceling session if still active
|
||||
final appState = context.read<AppState>();
|
||||
if (appState.session != null) {
|
||||
debugPrint('[SheetCoordinator] AddNodeSheet dismissed - canceling session');
|
||||
appState.cancelSession();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// Open the edit node sheet with map centering
|
||||
void openEditNodeSheet({
|
||||
required BuildContext context,
|
||||
required GlobalKey<ScaffoldState> scaffoldKey,
|
||||
required AnimatedMapController mapController,
|
||||
required VoidCallback onStateChanged,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Disable follow-me when editing a node so the map doesn't jump around
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
final session = appState.editSession!; // should be non-null when this is called
|
||||
|
||||
// Center map on the node being edited
|
||||
try {
|
||||
mapController.animateTo(
|
||||
dest: session.originalNode.coord,
|
||||
zoom: mapController.mapController.camera.zoom,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (_) {
|
||||
// Map controller not ready, fallback to immediate move
|
||||
try {
|
||||
mapController.mapController.move(session.originalNode.coord, mapController.mapController.camera.zoom);
|
||||
} catch (_) {
|
||||
// Controller really not ready, skip centering
|
||||
}
|
||||
}
|
||||
|
||||
// Set transition flag to prevent map bounce
|
||||
_transitioningToEdit = true;
|
||||
|
||||
final controller = scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
child: MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
final fullHeight = height + MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom;
|
||||
_editSheetHeight = fullHeight;
|
||||
onStateChanged();
|
||||
},
|
||||
child: EditNodeSheet(session: session),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Reset height and transition flag when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
_editSheetHeight = 0.0;
|
||||
_transitioningToEdit = false;
|
||||
onStateChanged();
|
||||
|
||||
// Handle dismissal by canceling session if still active
|
||||
final appState = context.read<AppState>();
|
||||
if (appState.editSession != null) {
|
||||
debugPrint('[SheetCoordinator] EditNodeSheet dismissed - canceling edit session');
|
||||
appState.cancelEditSession();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// Open the navigation sheet for search/routing
|
||||
void openNavigationSheet({
|
||||
required BuildContext context,
|
||||
required GlobalKey<ScaffoldState> scaffoldKey,
|
||||
required VoidCallback onStateChanged,
|
||||
required VoidCallback onStartRoute,
|
||||
required VoidCallback onResumeRoute,
|
||||
}) {
|
||||
final controller = scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
child: MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
final fullHeight = height + MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom;
|
||||
_navigationSheetHeight = fullHeight;
|
||||
onStateChanged();
|
||||
},
|
||||
child: NavigationSheet(
|
||||
onStartRoute: onStartRoute,
|
||||
onResumeRoute: onResumeRoute,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Reset height when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
_navigationSheetHeight = 0.0;
|
||||
onStateChanged();
|
||||
|
||||
// Handle different dismissal scenarios (from original HomeScreen logic)
|
||||
if (context.mounted) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
if (appState.isSettingSecondPoint) {
|
||||
// If user dismisses sheet while setting second point, cancel everything
|
||||
debugPrint('[SheetCoordinator] Sheet dismissed during second point selection - canceling navigation');
|
||||
appState.cancelNavigation();
|
||||
} else if (appState.isInRouteMode && appState.showingOverview) {
|
||||
// If we're in route active mode and showing overview, just hide the overview
|
||||
debugPrint('[SheetCoordinator] Sheet dismissed during route overview - hiding overview');
|
||||
appState.hideRouteOverview();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// Update tag sheet height (called externally)
|
||||
void updateTagSheetHeight(double height, VoidCallback onStateChanged) {
|
||||
_tagSheetHeight = height;
|
||||
onStateChanged();
|
||||
}
|
||||
|
||||
/// Reset tag sheet height
|
||||
void resetTagSheetHeight(VoidCallback onStateChanged) {
|
||||
_tagSheetHeight = 0.0;
|
||||
onStateChanged();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:flutter_map_animations/flutter_map_animations.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../app_state.dart';
|
||||
@@ -12,10 +13,20 @@ import '../services/localization_service.dart';
|
||||
import '../widgets/add_node_sheet.dart';
|
||||
import '../widgets/edit_node_sheet.dart';
|
||||
import '../widgets/node_tag_sheet.dart';
|
||||
import '../widgets/camera_provider_with_cache.dart';
|
||||
import '../widgets/download_area_dialog.dart';
|
||||
import '../widgets/measured_sheet.dart';
|
||||
import '../widgets/navigation_sheet.dart';
|
||||
import '../widgets/search_bar.dart';
|
||||
import '../widgets/suspected_location_sheet.dart';
|
||||
import '../widgets/welcome_dialog.dart';
|
||||
import '../widgets/changelog_dialog.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import '../models/suspected_location.dart';
|
||||
import '../models/search_result.dart';
|
||||
import '../services/changelog_service.dart';
|
||||
import 'coordinators/sheet_coordinator.dart';
|
||||
import 'coordinators/navigation_coordinator.dart';
|
||||
import 'coordinators/map_interaction_handler.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
const HomeScreen({super.key});
|
||||
@@ -28,23 +39,28 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
final GlobalKey<MapViewState> _mapViewKey = GlobalKey<MapViewState>();
|
||||
late final AnimatedMapController _mapController;
|
||||
bool _editSheetShown = false;
|
||||
|
||||
// Track sheet heights for map positioning
|
||||
double _addSheetHeight = 0.0;
|
||||
double _editSheetHeight = 0.0;
|
||||
double _tagSheetHeight = 0.0;
|
||||
// Coordinators for managing different aspects of the home screen
|
||||
late final SheetCoordinator _sheetCoordinator;
|
||||
late final NavigationCoordinator _navigationCoordinator;
|
||||
late final MapInteractionHandler _mapInteractionHandler;
|
||||
|
||||
// Flag to prevent map bounce when transitioning from tag sheet to edit sheet
|
||||
bool _transitioningToEdit = false;
|
||||
// Track node limit state for button disabling
|
||||
bool _isNodeLimitActive = false;
|
||||
|
||||
// Track selected node for highlighting
|
||||
int? _selectedNodeId;
|
||||
|
||||
// Track popup display to avoid showing multiple times
|
||||
bool _hasCheckedForPopup = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_mapController = AnimatedMapController(vsync: this);
|
||||
_sheetCoordinator = SheetCoordinator();
|
||||
_navigationCoordinator = NavigationCoordinator();
|
||||
_mapInteractionHandler = MapInteractionHandler();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -58,8 +74,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
switch (mode) {
|
||||
case FollowMeMode.off:
|
||||
return locService.t('followMe.off');
|
||||
case FollowMeMode.northUp:
|
||||
return locService.t('followMe.northUp');
|
||||
case FollowMeMode.follow:
|
||||
return locService.t('followMe.follow');
|
||||
case FollowMeMode.rotating:
|
||||
return locService.t('followMe.rotating');
|
||||
}
|
||||
@@ -69,7 +85,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
switch (mode) {
|
||||
case FollowMeMode.off:
|
||||
return Icons.gps_off;
|
||||
case FollowMeMode.northUp:
|
||||
case FollowMeMode.follow:
|
||||
return Icons.gps_fixed;
|
||||
case FollowMeMode.rotating:
|
||||
return Icons.navigation;
|
||||
@@ -79,8 +95,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
FollowMeMode _getNextFollowMeMode(FollowMeMode mode) {
|
||||
switch (mode) {
|
||||
case FollowMeMode.off:
|
||||
return FollowMeMode.northUp;
|
||||
case FollowMeMode.northUp:
|
||||
return FollowMeMode.follow;
|
||||
case FollowMeMode.follow:
|
||||
return FollowMeMode.rotating;
|
||||
case FollowMeMode.rotating:
|
||||
return FollowMeMode.off;
|
||||
@@ -88,157 +104,317 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
}
|
||||
|
||||
void _openAddNodeSheet() {
|
||||
final appState = context.read<AppState>();
|
||||
// Disable follow-me when adding a camera so the map doesn't jump around
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
appState.startAddSession();
|
||||
final session = appState.session!; // guaranteed non‑null now
|
||||
|
||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
setState(() {
|
||||
_addSheetHeight = height;
|
||||
});
|
||||
},
|
||||
child: AddNodeSheet(session: session),
|
||||
),
|
||||
_sheetCoordinator.openAddNodeSheet(
|
||||
context: context,
|
||||
scaffoldKey: _scaffoldKey,
|
||||
mapController: _mapController,
|
||||
isNodeLimitActive: _isNodeLimitActive,
|
||||
onStateChanged: () => setState(() {}),
|
||||
);
|
||||
|
||||
// Reset height when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
setState(() {
|
||||
_addSheetHeight = 0.0;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void _openEditNodeSheet() {
|
||||
final appState = context.read<AppState>();
|
||||
// Disable follow-me when editing a camera so the map doesn't jump around
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
// Set transition flag to prevent map bounce
|
||||
_transitioningToEdit = true;
|
||||
|
||||
// Close any existing tag sheet first
|
||||
if (_tagSheetHeight > 0) {
|
||||
if (_sheetCoordinator.tagSheetHeight > 0) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
final session = appState.editSession!; // should be non-null when this is called
|
||||
|
||||
// Small delay to let tag sheet close smoothly
|
||||
Future.delayed(const Duration(milliseconds: 150), () {
|
||||
if (!mounted) return;
|
||||
|
||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
setState(() {
|
||||
_editSheetHeight = height;
|
||||
// Clear transition flag and reset tag sheet height once edit sheet starts sizing
|
||||
if (height > 0 && _transitioningToEdit) {
|
||||
_transitioningToEdit = false;
|
||||
_tagSheetHeight = 0.0; // Now safe to reset
|
||||
_selectedNodeId = null; // Clear selection when moving to edit
|
||||
}
|
||||
});
|
||||
},
|
||||
child: EditNodeSheet(session: session),
|
||||
),
|
||||
_sheetCoordinator.openEditNodeSheet(
|
||||
context: context,
|
||||
scaffoldKey: _scaffoldKey,
|
||||
mapController: _mapController,
|
||||
onStateChanged: () {
|
||||
setState(() {
|
||||
// Clear tag sheet height and selected node when transitioning
|
||||
if (_sheetCoordinator.editSheetHeight > 0 && _sheetCoordinator.transitioningToEdit) {
|
||||
_sheetCoordinator.resetTagSheetHeight(() {});
|
||||
_selectedNodeId = null; // Clear selection when moving to edit
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
// Reset height when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
setState(() {
|
||||
_editSheetHeight = 0.0;
|
||||
_transitioningToEdit = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void openNodeTagSheet(OsmNode node) {
|
||||
setState(() {
|
||||
_selectedNodeId = node.id; // Track selected node for highlighting
|
||||
});
|
||||
void _openNavigationSheet() {
|
||||
_sheetCoordinator.openNavigationSheet(
|
||||
context: context,
|
||||
scaffoldKey: _scaffoldKey,
|
||||
onStateChanged: () => setState(() {}),
|
||||
onStartRoute: _onStartRoute,
|
||||
onResumeRoute: _onResumeRoute,
|
||||
);
|
||||
}
|
||||
|
||||
// Check for and display welcome/changelog popup
|
||||
Future<void> _checkForPopup() async {
|
||||
if (!mounted) return;
|
||||
|
||||
// Start smooth centering animation simultaneously with sheet opening
|
||||
// Use the same duration as SheetAwareMap (300ms) for coordinated animation
|
||||
try {
|
||||
_mapController.animateTo(
|
||||
dest: node.coord,
|
||||
zoom: _mapController.mapController.camera.zoom,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (_) {
|
||||
// Map controller not ready, fallback to immediate move
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
// Run any needed migrations first
|
||||
final versionsNeedingMigration = await ChangelogService().getVersionsNeedingMigration();
|
||||
for (final version in versionsNeedingMigration) {
|
||||
await ChangelogService().runMigration(version, appState);
|
||||
}
|
||||
|
||||
// Determine what popup to show
|
||||
final popupType = await ChangelogService().getPopupType();
|
||||
|
||||
if (!mounted) return; // Check again after async operation
|
||||
|
||||
switch (popupType) {
|
||||
case PopupType.welcome:
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => const WelcomeDialog(),
|
||||
);
|
||||
break;
|
||||
|
||||
case PopupType.changelog:
|
||||
final changelogContent = await ChangelogService().getChangelogContentForDisplay();
|
||||
if (changelogContent != null) {
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => ChangelogDialog(changelogContent: changelogContent),
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case PopupType.none:
|
||||
// No popup needed
|
||||
break;
|
||||
}
|
||||
|
||||
// Complete the version change workflow (updates last seen version)
|
||||
await ChangelogService().completeVersionChange();
|
||||
|
||||
} catch (e) {
|
||||
// Silently handle errors to avoid breaking the app launch
|
||||
debugPrint('[HomeScreen] Error checking for popup: $e');
|
||||
|
||||
// Still complete version change to avoid getting stuck
|
||||
try {
|
||||
_mapController.mapController.move(node.coord, _mapController.mapController.camera.zoom);
|
||||
} catch (_) {
|
||||
// Controller really not ready, skip centering
|
||||
await ChangelogService().completeVersionChange();
|
||||
} catch (e2) {
|
||||
debugPrint('[HomeScreen] Error completing version change: $e2');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onStartRoute() {
|
||||
_navigationCoordinator.startRoute(
|
||||
context: context,
|
||||
mapController: _mapController,
|
||||
mapViewKey: _mapViewKey,
|
||||
);
|
||||
}
|
||||
|
||||
void _zoomAndCenterForRoute(bool followMeEnabled, LatLng? userLocation, LatLng? routeStart) {
|
||||
try {
|
||||
LatLng centerLocation;
|
||||
|
||||
if (followMeEnabled && userLocation != null) {
|
||||
// Center on user if follow-me is enabled
|
||||
centerLocation = userLocation;
|
||||
debugPrint('[HomeScreen] Centering on user location for route start');
|
||||
} else if (routeStart != null) {
|
||||
// Center on start pin if user is far away or no GPS
|
||||
centerLocation = routeStart;
|
||||
debugPrint('[HomeScreen] Centering on route start pin');
|
||||
} else {
|
||||
debugPrint('[HomeScreen] No valid location to center on');
|
||||
return;
|
||||
}
|
||||
|
||||
// Animate to zoom 14 and center location
|
||||
_mapController.animateTo(
|
||||
dest: centerLocation,
|
||||
zoom: 14.0,
|
||||
duration: const Duration(milliseconds: 800),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[HomeScreen] Could not zoom/center for route: $e');
|
||||
}
|
||||
}
|
||||
|
||||
void _onResumeRoute() {
|
||||
_navigationCoordinator.resumeRoute(
|
||||
context: context,
|
||||
mapController: _mapController,
|
||||
mapViewKey: _mapViewKey,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _onNavigationButtonPressed() {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
if (appState.showRouteButton) {
|
||||
// Route button - show route overview and zoom to show route
|
||||
appState.showRouteOverview();
|
||||
_navigationCoordinator.zoomToShowFullRoute(
|
||||
appState: appState,
|
||||
mapController: _mapController,
|
||||
);
|
||||
} else {
|
||||
// Search/navigation button - delegate to coordinator
|
||||
_navigationCoordinator.handleNavigationButtonPress(
|
||||
context: context,
|
||||
mapController: _mapController,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _onSearchResultSelected(SearchResult result) {
|
||||
_mapInteractionHandler.handleSearchResultSelection(
|
||||
context: context,
|
||||
result: result,
|
||||
mapController: _mapController,
|
||||
);
|
||||
}
|
||||
|
||||
void openNodeTagSheet(OsmNode node) {
|
||||
// Handle the map interaction (centering and follow-me disable)
|
||||
_mapInteractionHandler.handleNodeTap(
|
||||
context: context,
|
||||
node: node,
|
||||
mapController: _mapController,
|
||||
onSelectedNodeChanged: (id) => setState(() => _selectedNodeId = id),
|
||||
);
|
||||
|
||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
setState(() {
|
||||
_tagSheetHeight = height;
|
||||
});
|
||||
},
|
||||
child: NodeTagSheet(
|
||||
node: node,
|
||||
onEditPressed: () {
|
||||
final appState = context.read<AppState>();
|
||||
appState.startEditSession(node);
|
||||
// This will trigger _openEditNodeSheet via the existing auto-show logic
|
||||
(ctx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||
),
|
||||
child: MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
_sheetCoordinator.updateTagSheetHeight(
|
||||
height + MediaQuery.of(context).padding.bottom,
|
||||
() => setState(() {}),
|
||||
);
|
||||
},
|
||||
child: NodeTagSheet(
|
||||
node: node,
|
||||
isNodeLimitActive: _isNodeLimitActive,
|
||||
onEditPressed: () {
|
||||
// Check minimum zoom level before starting edit session
|
||||
final currentZoom = _mapController.mapController.camera.zoom;
|
||||
if (currentZoom < kMinZoomForNodeEditingSheets) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
LocalizationService.instance.t('editNode.zoomInRequiredMessage',
|
||||
params: [kMinZoomForNodeEditingSheets.toString()])
|
||||
),
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
final appState = context.read<AppState>();
|
||||
appState.startEditSession(node);
|
||||
// This will trigger _openEditNodeSheet via the existing auto-show logic
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Reset height and selection when sheet is dismissed (unless transitioning to edit)
|
||||
controller.closed.then((_) {
|
||||
if (!_transitioningToEdit) {
|
||||
setState(() {
|
||||
_tagSheetHeight = 0.0;
|
||||
_selectedNodeId = null; // Clear selection
|
||||
});
|
||||
if (!_sheetCoordinator.transitioningToEdit) {
|
||||
_sheetCoordinator.resetTagSheetHeight(() => setState(() {}));
|
||||
setState(() => _selectedNodeId = null);
|
||||
}
|
||||
// If transitioning to edit, keep the height until edit sheet takes over
|
||||
});
|
||||
}
|
||||
|
||||
void openSuspectedLocationSheet(SuspectedLocation location) {
|
||||
// Handle the map interaction (centering and selection)
|
||||
_mapInteractionHandler.handleSuspectedLocationTap(
|
||||
context: context,
|
||||
location: location,
|
||||
mapController: _mapController,
|
||||
);
|
||||
|
||||
final controller = _scaffoldKey.currentState!.showBottomSheet(
|
||||
(ctx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom, // Only safe area, no keyboard
|
||||
),
|
||||
child: MeasuredSheet(
|
||||
onHeightChanged: (height) {
|
||||
_sheetCoordinator.updateTagSheetHeight(
|
||||
height + MediaQuery.of(context).padding.bottom,
|
||||
() => setState(() {}),
|
||||
);
|
||||
},
|
||||
child: SuspectedLocationSheet(location: location),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Reset height and clear selection when sheet is dismissed
|
||||
controller.closed.then((_) {
|
||||
_sheetCoordinator.resetTagSheetHeight(() => setState(() {}));
|
||||
context.read<AppState>().clearSuspectedLocationSelection();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
// Auto-open edit sheet when edit session starts
|
||||
if (appState.editSession != null && !_editSheetShown) {
|
||||
_editSheetShown = true;
|
||||
if (appState.editSession != null && !_sheetCoordinator.editSheetShown) {
|
||||
_sheetCoordinator.setEditSheetShown(true);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _openEditNodeSheet());
|
||||
} else if (appState.editSession == null) {
|
||||
_editSheetShown = false;
|
||||
_sheetCoordinator.setEditSheetShown(false);
|
||||
}
|
||||
|
||||
// Auto-open navigation sheet when needed - simplified logic (only in dev mode)
|
||||
if (kEnableNavigationFeatures) {
|
||||
final shouldShowNavSheet = appState.isInSearchMode || appState.showingOverview;
|
||||
if (shouldShowNavSheet && !_sheetCoordinator.navigationSheetShown) {
|
||||
_sheetCoordinator.setNavigationSheetShown(true);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _openNavigationSheet());
|
||||
} else if (!shouldShowNavSheet) {
|
||||
_sheetCoordinator.setNavigationSheetShown(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for welcome/changelog popup after app is fully initialized
|
||||
if (appState.isInitialized && !_hasCheckedForPopup) {
|
||||
_hasCheckedForPopup = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_checkForPopup();
|
||||
// Check if re-authentication is needed for message notifications
|
||||
appState.checkAndPromptReauthForMessages(context);
|
||||
});
|
||||
}
|
||||
|
||||
// Pass the active sheet height directly to the map
|
||||
final activeSheetHeight = _addSheetHeight > 0
|
||||
? _addSheetHeight
|
||||
: (_editSheetHeight > 0
|
||||
? _editSheetHeight
|
||||
: _tagSheetHeight);
|
||||
final activeSheetHeight = _sheetCoordinator.activeSheetHeight;
|
||||
|
||||
return MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProvider<CameraProviderWithCache>(create: (_) => CameraProviderWithCache()),
|
||||
],
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(viewInsets: EdgeInsets.zero),
|
||||
child: Scaffold(
|
||||
key: _scaffoldKey,
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false, // Disable automatic back button
|
||||
title: SvgPicture.asset(
|
||||
'assets/deflock-logo.svg',
|
||||
height: 28,
|
||||
@@ -261,11 +437,31 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
),
|
||||
AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => IconButton(
|
||||
tooltip: LocalizationService.instance.settings,
|
||||
icon: const Icon(Icons.settings),
|
||||
onPressed: () => Navigator.pushNamed(context, '/settings'),
|
||||
),
|
||||
builder: (context, child) {
|
||||
final appState = context.watch<AppState>();
|
||||
return IconButton(
|
||||
tooltip: LocalizationService.instance.settings,
|
||||
icon: Stack(
|
||||
children: [
|
||||
const Icon(Icons.settings),
|
||||
if (appState.hasUnreadMessages)
|
||||
Positioned(
|
||||
right: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () => Navigator.pushNamed(context, '/settings'),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -278,74 +474,123 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
sheetHeight: activeSheetHeight,
|
||||
selectedNodeId: _selectedNodeId,
|
||||
onNodeTap: openNodeTagSheet,
|
||||
onSuspectedLocationTap: openSuspectedLocationSheet,
|
||||
onSearchPressed: _onNavigationButtonPressed,
|
||||
onNodeLimitChanged: (isLimited) {
|
||||
setState(() {
|
||||
_isNodeLimitActive = isLimited;
|
||||
});
|
||||
},
|
||||
onUserGesture: () {
|
||||
_mapInteractionHandler.handleUserGesture(
|
||||
context: context,
|
||||
onSelectedNodeChanged: (id) => setState(() => _selectedNodeId = id),
|
||||
);
|
||||
if (appState.followMeMode != FollowMeMode.off) {
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
}
|
||||
},
|
||||
),
|
||||
// Search bar (slides in when in search mode) - only online since search doesn't work offline
|
||||
if (!appState.offlineMode && appState.isInSearchMode)
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: LocationSearchBar(
|
||||
onResultSelected: _onSearchResultSelected,
|
||||
onCancel: () => appState.cancelNavigation(),
|
||||
),
|
||||
),
|
||||
// Bottom button bar (restored to original)
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom + kBottomButtonBarOffset,
|
||||
left: 8,
|
||||
right: 8,
|
||||
),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 600), // Match typical sheet width
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Theme.of(context).shadowColor.withOpacity(0.3),
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, -2),
|
||||
)
|
||||
],
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final safeArea = MediaQuery.of(context).padding;
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: safeArea.bottom + kBottomButtonBarOffset,
|
||||
left: leftPositionWithSafeArea(8, safeArea),
|
||||
right: rightPositionWithSafeArea(8, safeArea),
|
||||
),
|
||||
margin: EdgeInsets.only(bottom: kBottomButtonBarOffset),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => ElevatedButton.icon(
|
||||
icon: Icon(Icons.add_location_alt),
|
||||
label: Text(LocalizationService.instance.tagNode),
|
||||
onPressed: _openAddNodeSheet,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 600), // Match typical sheet width
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Theme.of(context).shadowColor.withOpacity(0.3),
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, -2),
|
||||
)
|
||||
],
|
||||
),
|
||||
margin: EdgeInsets.only(bottom: kBottomButtonBarOffset),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 7, // 70% for primary action
|
||||
child: AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => ElevatedButton.icon(
|
||||
icon: Icon(Icons.add_location_alt),
|
||||
label: Text(LocalizationService.instance.tagNode),
|
||||
onPressed: _openAddNodeSheet,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
flex: 3, // 30% for secondary action
|
||||
child: AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: ElevatedButton.icon(
|
||||
icon: Icon(Icons.download_for_offline),
|
||||
label: Text(LocalizationService.instance.download),
|
||||
onPressed: () {
|
||||
// Check minimum zoom level before opening download dialog
|
||||
final currentZoom = _mapController.mapController.camera.zoom;
|
||||
if (currentZoom < kMinZoomForOfflineDownload) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
LocalizationService.instance.t('download.areaTooBigMessage',
|
||||
params: [kMinZoomForOfflineDownload.toString()])
|
||||
),
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => DownloadAreaDialog(controller: _mapController.mapController),
|
||||
);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => ElevatedButton.icon(
|
||||
icon: Icon(Icons.download_for_offline),
|
||||
label: Text(LocalizationService.instance.download),
|
||||
onPressed: () => showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => DownloadAreaDialog(controller: _mapController.mapController),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -15,9 +15,14 @@ class LanguageSettingsScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(locService.t('settings.language')),
|
||||
),
|
||||
body: const Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: LanguageSection(),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
child: const LanguageSection(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
110
lib/screens/navigation_settings_screen.dart
Normal file
@@ -0,0 +1,110 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../app_state.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class NavigationSettingsScreen extends StatelessWidget {
|
||||
const NavigationSettingsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appState = context.watch<AppState>();
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
return AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) => Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(locService.t('navigation.navigationSettings')),
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.social_distance),
|
||||
title: Text(locService.t('navigation.avoidanceDistance')),
|
||||
subtitle: Text(locService.t('navigation.avoidanceDistanceSubtitle')),
|
||||
trailing: SizedBox(
|
||||
width: 80,
|
||||
child: TextFormField(
|
||||
initialValue: appState.navigationAvoidanceDistance.toString(),
|
||||
keyboardType: const TextInputType.numberWithOptions(signed: false, decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
decoration: const InputDecoration(
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 6, horizontal: 8),
|
||||
border: OutlineInputBorder(),
|
||||
suffixText: 'm',
|
||||
),
|
||||
onFieldSubmitted: (value) {
|
||||
final distance = int.tryParse(value) ?? 250;
|
||||
appState.setNavigationAvoidanceDistance(distance.clamp(0, 2000));
|
||||
}
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
const Divider(),
|
||||
|
||||
_buildDisabledSetting(
|
||||
context,
|
||||
icon: Icons.history,
|
||||
title: locService.t('navigation.searchHistory'),
|
||||
subtitle: locService.t('navigation.searchHistorySubtitle'),
|
||||
value: '10 searches',
|
||||
),
|
||||
|
||||
const Divider(),
|
||||
|
||||
_buildDisabledSetting(
|
||||
context,
|
||||
icon: Icons.straighten,
|
||||
title: locService.t('navigation.units'),
|
||||
subtitle: locService.t('navigation.unitsSubtitle'),
|
||||
value: locService.t('navigation.metric'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDisabledSetting(
|
||||
BuildContext context, {
|
||||
required IconData icon,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required String value,
|
||||
}) {
|
||||
return Opacity(
|
||||
opacity: 0.5,
|
||||
child: ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(title),
|
||||
subtitle: Text(subtitle),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const Icon(Icons.chevron_right, size: 16),
|
||||
],
|
||||
),
|
||||
enabled: false,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,12 @@ class OfflineSettingsScreen extends StatelessWidget {
|
||||
title: Text(locService.t('settings.offlineSettings')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: const [
|
||||
OfflineModeSection(),
|
||||
Divider(),
|
||||
|
||||
@@ -56,7 +56,12 @@ class _OperatorProfileEditorState extends State<OperatorProfileEditor> {
|
||||
title: Text(widget.profile.name.isEmpty ? locService.t('operatorProfileEditor.newOperatorProfile') : locService.t('operatorProfileEditor.editOperatorProfile')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: [
|
||||
TextField(
|
||||
controller: _nameCtrl,
|
||||
|
||||
418
lib/screens/osm_account_screen.dart
Normal file
@@ -0,0 +1,418 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../app_state.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../dev_config.dart';
|
||||
import '../screens/settings/sections/upload_mode_section.dart';
|
||||
|
||||
class OSMAccountScreen extends StatefulWidget {
|
||||
const OSMAccountScreen({super.key});
|
||||
|
||||
@override
|
||||
State<OSMAccountScreen> createState() => _OSMAccountScreenState();
|
||||
}
|
||||
|
||||
class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Check for messages when screen loads
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
final appState = context.read<AppState>();
|
||||
if (appState.isLoggedIn) {
|
||||
appState.checkMessages();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final locService = LocalizationService.instance;
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(locService.t('auth.osmAccountTitle')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: [
|
||||
// Login/Account Status Section
|
||||
Card(
|
||||
child: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Icon(
|
||||
appState.isLoggedIn ? Icons.person : Icons.login,
|
||||
color: appState.isLoggedIn ? Colors.green : null,
|
||||
),
|
||||
title: Text(appState.isLoggedIn
|
||||
? locService.t('auth.loggedInAs', params: [appState.username])
|
||||
: locService.t('auth.loginToOSM')),
|
||||
subtitle: appState.isLoggedIn
|
||||
? Text(locService.t('auth.tapToLogout'))
|
||||
: Text(locService.t('auth.requiredToSubmit')),
|
||||
onTap: () async {
|
||||
if (appState.isLoggedIn) {
|
||||
await appState.logout();
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(locService.t('auth.loggedOut')),
|
||||
backgroundColor: Colors.grey,
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Start login flow - the user will be redirected to browser
|
||||
await appState.forceLogin();
|
||||
|
||||
// Don't show immediate feedback - the UI will update automatically
|
||||
// when the OAuth callback completes and notifyListeners() is called
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
if (appState.isLoggedIn) ...[
|
||||
const Divider(),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.wifi_protected_setup),
|
||||
title: Text(locService.t('auth.testConnection')),
|
||||
subtitle: Text(locService.t('auth.testConnectionSubtitle')),
|
||||
onTap: () async {
|
||||
final isValid = await appState.validateToken();
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(isValid
|
||||
? locService.t('auth.connectionOK')
|
||||
: locService.t('auth.connectionFailed')),
|
||||
backgroundColor: isValid ? Colors.green : Colors.red,
|
||||
),
|
||||
);
|
||||
}
|
||||
if (!isValid) {
|
||||
await appState.logout();
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
// Only show OSM website buttons when not in simulate mode
|
||||
if (appState.uploadMode != UploadMode.simulate) ...[
|
||||
const Divider(),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.history),
|
||||
title: Text(locService.t('auth.viewMyEdits')),
|
||||
subtitle: Text(locService.t('auth.viewMyEditsSubtitle')),
|
||||
trailing: const Icon(Icons.open_in_new),
|
||||
onTap: () async {
|
||||
final url = Uri.parse('https://openstreetmap.org/user/${Uri.encodeComponent(appState.username)}/history');
|
||||
if (await canLaunchUrl(url)) {
|
||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite'))),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
// Messages button - only show when not in simulate mode
|
||||
const Divider(),
|
||||
ListTile(
|
||||
leading: Stack(
|
||||
children: [
|
||||
const Icon(Icons.message),
|
||||
if (appState.hasUnreadMessages)
|
||||
Positioned(
|
||||
right: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(2),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 12,
|
||||
minHeight: 12,
|
||||
),
|
||||
child: Text(
|
||||
'${appState.unreadMessageCount}',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onError,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
title: Text(locService.t('auth.viewMessages')),
|
||||
subtitle: Text(appState.hasUnreadMessages
|
||||
? locService.t('auth.unreadMessagesCount', params: [appState.unreadMessageCount.toString()])
|
||||
: locService.t('auth.noUnreadMessages')),
|
||||
trailing: const Icon(Icons.open_in_new),
|
||||
onTap: () async {
|
||||
final url = Uri.parse(appState.getMessagesUrl());
|
||||
if (await canLaunchUrl(url)) {
|
||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite'))),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Upload Mode Section (only show in development builds)
|
||||
if (kEnableDevelopmentModes) ...[
|
||||
Card(
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: UploadModeSection(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
|
||||
// Information Section
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
locService.t('auth.aboutOSM'),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
locService.t('auth.aboutOSMDescription'),
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () async {
|
||||
final url = Uri.parse('https://openstreetmap.org');
|
||||
if (await canLaunchUrl(url)) {
|
||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite'))),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.open_in_new),
|
||||
label: Text(locService.t('auth.visitOSM')),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Account deletion section - only show when logged in and not in simulate mode
|
||||
if (appState.isLoggedIn && appState.uploadMode != UploadMode.simulate) ...[
|
||||
const SizedBox(height: 16),
|
||||
_buildAccountDeletionSection(context, appState),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAccountDeletionSection(BuildContext context, AppState appState) {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
locService.t('auth.accountManagement'),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
locService.t('auth.accountManagementDescription'),
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Show current upload destination
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
size: 16,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
_getCurrentDestinationText(locService, appState.uploadMode),
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Delete account button
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () => _showDeleteAccountDialog(context, locService, appState.uploadMode),
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
label: Text(locService.t('auth.deleteAccount')),
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.error,
|
||||
side: BorderSide(color: Theme.of(context).colorScheme.error.withOpacity(0.5)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getCurrentDestinationText(LocalizationService locService, UploadMode uploadMode) {
|
||||
switch (uploadMode) {
|
||||
case UploadMode.production:
|
||||
return locService.t('auth.currentDestinationProduction');
|
||||
case UploadMode.sandbox:
|
||||
return locService.t('auth.currentDestinationSandbox');
|
||||
case UploadMode.simulate:
|
||||
return locService.t('auth.currentDestinationSimulate');
|
||||
}
|
||||
}
|
||||
|
||||
void _showDeleteAccountDialog(BuildContext context, LocalizationService locService, UploadMode uploadMode) {
|
||||
final deleteUrl = _getDeleteAccountUrl(uploadMode);
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(locService.t('auth.deleteAccount')),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(locService.t('auth.deleteAccountExplanation')),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
locService.t('auth.deleteAccountWarning'),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// Show which account will be deleted
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.errorContainer.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.error.withOpacity(0.3),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
_getCurrentDestinationText(locService, uploadMode),
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(locService.t('actions.cancel')),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_launchDeleteAccountUrl(deleteUrl, context, locService);
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
child: Text(locService.t('auth.goToOSM')),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getDeleteAccountUrl(UploadMode uploadMode) {
|
||||
switch (uploadMode) {
|
||||
case UploadMode.production:
|
||||
return 'https://www.openstreetmap.org/account/deletion';
|
||||
case UploadMode.sandbox:
|
||||
return 'https://master.apis.dev.openstreetmap.org/account/deletion';
|
||||
case UploadMode.simulate:
|
||||
// For simulate mode, just go to production since it's not a real account
|
||||
return 'https://www.openstreetmap.org/account/deletion';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _launchDeleteAccountUrl(String url, BuildContext context, LocalizationService locService) async {
|
||||
final uri = Uri.parse(url);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
late List<MapEntry<String, String>> _tags;
|
||||
late bool _requiresDirection;
|
||||
late bool _submittable;
|
||||
late TextEditingController _fovCtrl;
|
||||
|
||||
static const _defaultTags = [
|
||||
MapEntry('man_made', 'surveillance'),
|
||||
@@ -38,6 +39,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
_nameCtrl = TextEditingController(text: widget.profile.name);
|
||||
_requiresDirection = widget.profile.requiresDirection;
|
||||
_submittable = widget.profile.submittable;
|
||||
_fovCtrl = TextEditingController(text: widget.profile.fov?.toString() ?? '');
|
||||
|
||||
if (widget.profile.tags.isEmpty) {
|
||||
// New profile → start with sensible defaults
|
||||
@@ -50,6 +52,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
@override
|
||||
void dispose() {
|
||||
_nameCtrl.dispose();
|
||||
_fovCtrl.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -67,7 +70,12 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
: (widget.profile.name.isEmpty ? locService.t('profileEditor.newProfile') : locService.t('profileEditor.editProfile'))),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: [
|
||||
TextField(
|
||||
controller: _nameCtrl,
|
||||
@@ -86,6 +94,21 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
onChanged: (value) => setState(() => _requiresDirection = value ?? true),
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
),
|
||||
if (_requiresDirection) Padding(
|
||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 8),
|
||||
child: TextField(
|
||||
controller: _fovCtrl,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
labelText: locService.t('profileEditor.fov'),
|
||||
hintText: locService.t('profileEditor.fovHint'),
|
||||
helperText: locService.t('profileEditor.fovSubtitle'),
|
||||
errorText: _validateFov(),
|
||||
suffixText: '°',
|
||||
),
|
||||
onChanged: (value) => setState(() {}), // Trigger validation
|
||||
),
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.submittable')),
|
||||
subtitle: Text(locService.t('profileEditor.submittableSubtitle')),
|
||||
@@ -176,6 +199,17 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
});
|
||||
}
|
||||
|
||||
String? _validateFov() {
|
||||
final text = _fovCtrl.text.trim();
|
||||
if (text.isEmpty) return null; // Optional field
|
||||
|
||||
final fov = double.tryParse(text);
|
||||
if (fov == null || fov <= 0 || fov > 360) {
|
||||
return LocalizationService.instance.t('profileEditor.fovInvalid');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void _save() {
|
||||
final locService = LocalizationService.instance;
|
||||
final name = _nameCtrl.text.trim();
|
||||
@@ -185,6 +219,15 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
.showSnackBar(SnackBar(content: Text(locService.t('profileEditor.profileNameRequired'))));
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate FOV if provided
|
||||
if (_validateFov() != null) {
|
||||
return; // Don't save if FOV validation fails
|
||||
}
|
||||
|
||||
// Parse FOV
|
||||
final fovText = _fovCtrl.text.trim();
|
||||
final fov = fovText.isEmpty ? null : double.tryParse(fovText);
|
||||
|
||||
final tagMap = <String, String>{};
|
||||
for (final e in _tags) {
|
||||
@@ -206,6 +249,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
requiresDirection: _requiresDirection,
|
||||
submittable: _submittable,
|
||||
editable: true, // All custom profiles are editable by definition
|
||||
fov: fov,
|
||||
);
|
||||
|
||||
context.read<AppState>().addOrUpdateProfile(newProfile);
|
||||
|
||||
@@ -17,7 +17,12 @@ class ProfilesSettingsScreen extends StatelessWidget {
|
||||
title: Text(locService.t('settings.profiles')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: const [
|
||||
NodeProfilesSection(),
|
||||
Divider(),
|
||||
|
||||