mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-10-22 07:18:22 +02:00
Compare commits
174
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00b9348b8f | ||
|
|
142389771e | ||
|
|
8439d9bbb6 | ||
|
|
3f118a77c4 | ||
|
|
51037f3710 | ||
|
|
2c64fe610e | ||
|
|
af2ff1e940 | ||
|
|
7722dcaabe | ||
|
|
0e359f2aa9 | ||
|
|
60e7e59ae9 | ||
|
|
bdc5399c9f | ||
|
|
eb6a409b92 | ||
|
|
1909a3b5f1 | ||
|
|
7c5d066362 | ||
|
|
b231b48ac1 | ||
|
|
0e1e9cb2ff | ||
|
|
a808a4f37e | ||
|
|
0887d1ef44 | ||
|
|
0c6cf467fe | ||
|
|
c787589205 | ||
|
|
837f59bfde | ||
|
|
8148ad55c2 | ||
|
|
dfcc64e96e | ||
|
|
6f017fd6c1 | ||
|
|
78f1ef58de | ||
|
|
3e2c9c5b9e | ||
|
|
dd93ac64b6 | ||
|
|
096fb5868b | ||
|
|
974204bd91 | ||
|
|
6a0d4cd8f7 | ||
|
|
af2a08bf3d | ||
|
|
dd8c9b88cc | ||
|
|
1cfca663a6 | ||
|
|
b9110c1670 | ||
|
|
36675508e8 | ||
|
|
9a0928d22d | ||
|
|
b3001927c6 | ||
|
|
b9d82d6de7 | ||
|
|
38eee8d125 | ||
|
|
f8632b6a06 | ||
|
|
be2fe84db5 | ||
|
|
2cddcbef7d | ||
|
|
60c17c41bf | ||
|
|
ee8ead6695 | ||
|
|
4d6bea8cfe | ||
|
|
25c1611fd3 | ||
|
|
7ed1d7386d | ||
|
|
9268ef2eb2 | ||
|
|
1e2eba53a9 | ||
|
|
d009803215 | ||
|
|
2dc5b6efa1 | ||
|
|
0800f1ed45 | ||
|
|
c844cff67b | ||
|
|
3ff9ff2352 | ||
|
|
12ffe92df8 | ||
|
|
0b812bdaea | ||
|
|
d87a112c0a | ||
|
|
41479e7ee4 | ||
|
|
036ac8c5e6 | ||
|
|
191b5ccae0 | ||
|
|
480f99b360 | ||
|
|
74d8214dda | ||
|
|
8aab359f22 | ||
|
|
b00e44e3bb | ||
|
|
f438c21166 | ||
|
|
e0b2a6a19c | ||
|
|
329974a8f0 | ||
|
|
5b55171080 | ||
|
|
2ba0667a76 | ||
|
|
8a3ece630c | ||
|
|
c2b0f6f9fd | ||
|
|
273bccc5eb | ||
|
|
d7be022a11 | ||
|
|
157e72011f | ||
|
|
bd71f88452 | ||
|
|
6e2fa3a04c | ||
|
|
843d377b87 | ||
|
|
3857023d43 | ||
|
|
ddf7f543ff | ||
|
|
9f72ec9a76 | ||
|
|
16e34b614f | ||
|
|
2d00d7a8fb | ||
|
|
f85db3ca11 | ||
|
|
447f358727 | ||
|
|
08b395214b | ||
|
|
256dd1a43c | ||
|
|
ca7192d3ec | ||
|
|
2833906c68 | ||
|
|
4d1032e56d | ||
|
|
834861bcaf | ||
|
|
ba80b88595 | ||
|
|
ebb7fd090f | ||
|
|
fe401cc04b | ||
|
|
de65cecc6a | ||
|
|
122b303378 | ||
|
|
91e5177056 | ||
|
|
f3f40f36ef | ||
|
|
2d92214bed | ||
|
|
be446fbcbc | ||
|
|
5728b4f70f | ||
|
|
aeb1903bbc | ||
|
|
57df8e83a7 | ||
|
|
bc671c4efe | ||
|
|
4941c2726d | ||
|
|
b56e9325b3 | ||
|
|
30f546be29 | ||
|
|
dc817e5eb7 | ||
|
|
e1cca2f503 | ||
|
|
abd8682b49 | ||
|
|
90a806a10d | ||
|
|
b6bcd23667 | ||
|
|
dba375c63d | ||
|
|
6c52541361 | ||
|
|
fcf7ff7a98 | ||
|
|
206b3afe9d | ||
|
|
e72d557d2a | ||
|
|
25a34aab0b | ||
|
|
610c5c71b1 | ||
|
|
8983939b05 | ||
|
|
9448305738 | ||
|
|
775148cfb7 | ||
|
|
0137fd66aa | ||
|
|
fe20356734 | ||
|
|
14d7c10ca6 | ||
|
|
348256270d | ||
|
|
8a759e88e9 | ||
|
|
e168b6e19c | ||
|
|
f78ea1a300 | ||
|
|
2dca311d2a | ||
|
|
7470b14e38 | ||
|
|
5df0170344 | ||
|
|
1429f1d02b | ||
|
|
f0f23489b5 | ||
|
|
9ae7d9c894 | ||
|
|
c8e396a6eb | ||
|
|
97675f9f48 | ||
|
|
75014be485 | ||
|
|
af42e18f6e | ||
|
|
c7cfdc471c | ||
|
|
19b3ca236e | ||
|
|
2e0dcb1b2b | ||
|
|
59afd75887 | ||
|
|
83370fba7e | ||
|
|
ba6c7cdbda | ||
|
|
311125e1f5 | ||
|
|
5abcc58a78 | ||
|
|
71776ee8f0 | ||
|
|
6607e30038 | ||
|
|
ef4205f4bd | ||
|
|
ef6fc1c9c8 | ||
|
|
26c85df7e8 | ||
|
|
20c1b9b108 | ||
|
|
0207f999ee | ||
|
|
4a342aee9d | ||
|
|
3827a6fa1d | ||
|
|
ed38e9467c | ||
|
|
d124cee9b3 | ||
|
|
c13dd8e58a | ||
|
|
037165653c | ||
|
|
98b73fe019 | ||
|
|
86e0d656d3 | ||
|
|
a149562001 | ||
|
|
e4b36719d7 | ||
|
|
3570104800 | ||
|
|
4fddd8e807 | ||
|
|
3dada20ec2 | ||
|
|
c712aba724 | ||
|
|
498e36f69d | ||
|
|
e2d0d1b790 | ||
|
|
61a2a99bbc | ||
|
|
7e67859b2f | ||
|
|
e559b86400 | ||
|
|
73160c32de | ||
|
|
d6f7e99941 |
No files matched your search
@@ -0,0 +1,167 @@
|
||||
name: Validate PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Analyze & Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
cache: true
|
||||
|
||||
- run: flutter pub get
|
||||
|
||||
- name: Analyze
|
||||
run: flutter analyze
|
||||
|
||||
- name: Test
|
||||
run: flutter test
|
||||
|
||||
build-debug-apk:
|
||||
name: Build Debug APK
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
cache: true
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: gradle-${{ runner.os }}-
|
||||
|
||||
- run: flutter pub get
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
dart run flutter_launcher_icons
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
- name: Build debug APK
|
||||
run: flutter build apk --debug
|
||||
|
||||
- name: Upload debug APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-apk
|
||||
path: build/app/outputs/flutter-apk/app-debug.apk
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
build-ios-simulator:
|
||||
name: Build iOS Simulator
|
||||
runs-on: macos-26
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
cache: true
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ios/Pods
|
||||
key: pods-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: pods-${{ runner.os }}-
|
||||
|
||||
- run: flutter pub get
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
dart run flutter_launcher_icons
|
||||
dart run flutter_native_splash:create
|
||||
|
||||
- name: Build iOS simulator app
|
||||
run: flutter build ios --debug --simulator
|
||||
|
||||
- name: Zip Runner.app
|
||||
run: cd build/ios/iphonesimulator && zip -r "$GITHUB_WORKSPACE/Runner.app.zip" Runner.app
|
||||
|
||||
- name: Upload simulator build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ios-simulator
|
||||
path: Runner.app.zip
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
comment-artifacts:
|
||||
name: Post Artifact Links
|
||||
needs: [build-debug-apk, build-ios-simulator]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request' && !cancelled()
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
continue-on-error: true
|
||||
env:
|
||||
APK_RESULT: ${{ needs.build-debug-apk.result }}
|
||||
IOS_RESULT: ${{ needs.build-ios-simulator.result }}
|
||||
with:
|
||||
script: |
|
||||
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}#artifacts`;
|
||||
const apkOk = process.env.APK_RESULT === 'success';
|
||||
const iosOk = process.env.IOS_RESULT === 'success';
|
||||
|
||||
const lines = ['## Debug builds', ''];
|
||||
|
||||
if (apkOk || iosOk) {
|
||||
lines.push(`Download from the [artifacts page](${runUrl}):`);
|
||||
if (apkOk) lines.push('- **debug-apk** — install on Android device/emulator');
|
||||
if (iosOk) lines.push('- **ios-simulator** — unzip and install with `xcrun simctl install booted Runner.app`');
|
||||
}
|
||||
|
||||
if (!apkOk || !iosOk) {
|
||||
const failed = [];
|
||||
if (!apkOk) failed.push('Android APK');
|
||||
if (!iosOk) failed.push('iOS simulator');
|
||||
lines.push('', `**Failed:** ${failed.join(', ')} — check the [workflow run](${runUrl}) for details.`);
|
||||
}
|
||||
|
||||
const body = lines.join('\n');
|
||||
|
||||
const { data: comments } = await github.rest.issues.listComments({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
});
|
||||
const existing = comments.find(c => c.body.startsWith('## Debug builds'));
|
||||
if (existing) {
|
||||
await github.rest.issues.updateComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
comment_id: existing.id,
|
||||
body,
|
||||
});
|
||||
} else {
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
body,
|
||||
});
|
||||
}
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
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"
|
||||
@@ -58,8 +58,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
@@ -110,8 +110,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
build-ios:
|
||||
name: Build iOS
|
||||
needs: get-version
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-26
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
@@ -155,8 +155,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Validate localizations
|
||||
run: dart run scripts/validate_localizations.dart
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
|
||||
- name: Generate icons and splash screens
|
||||
run: |
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
# 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
|
||||
@@ -195,7 +195,7 @@ jobs:
|
||||
# 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
|
||||
@@ -290,7 +290,7 @@ jobs:
|
||||
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
|
||||
runs-on: macos-26 # Need macOS for iOS uploads
|
||||
if: needs.get-version.outputs.should_upload_to_stores == 'true'
|
||||
steps:
|
||||
- name: Download AAB artifact for Google Play
|
||||
@@ -329,7 +329,8 @@ jobs:
|
||||
--type ios \
|
||||
--file Runner.ipa \
|
||||
--apiKey $APP_STORE_CONNECT_API_KEY_ID \
|
||||
--apiIssuer $APP_STORE_CONNECT_ISSUER_ID
|
||||
--apiIssuer $APP_STORE_CONNECT_ISSUER_ID \
|
||||
--apple-id 6752760780
|
||||
|
||||
# Clean up sensitive files
|
||||
rm -rf ~/private_keys
|
||||
|
||||
+7
-5
@@ -38,13 +38,14 @@ ios/Flutter/Flutter.framework
|
||||
ios/Pods/
|
||||
ios/.generated/
|
||||
ios/.idea/
|
||||
ios/Runner.xcworkspace/
|
||||
ios/Runner.xcworkspace/xcuserdata/
|
||||
ios/Runner.xcworkspace/project.xcworkspace/xcuserdata/
|
||||
macos/Pods/
|
||||
macos/.generated/
|
||||
macos/Flutter/ephemeral/
|
||||
# CocoaPods – commit Podfile.lock if you need reproducible iOS builds
|
||||
Podfile.lock
|
||||
Pods/
|
||||
Podfile
|
||||
Podfile.lock
|
||||
|
||||
# Generated icons and splash screens
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/*
|
||||
@@ -73,12 +74,13 @@ fuchsia/build/
|
||||
web/build/
|
||||
|
||||
# ───────────────────────────────
|
||||
# IDE / Editor Settings
|
||||
# IDE / Editor / AI Tool Settings
|
||||
# ───────────────────────────────
|
||||
.idea/
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.vscode/
|
||||
.claude/settings.local.json
|
||||
# Swap files
|
||||
*.swp
|
||||
*.swo
|
||||
@@ -102,4 +104,4 @@ build_keys.conf
|
||||
linux/
|
||||
macos/
|
||||
web/
|
||||
windows/
|
||||
windows/
|
||||
+101
-26
@@ -297,26 +297,23 @@ These are internal app tags, not OSM tags. The underscore prefix makes this expl
|
||||
- **Sandbox (OSM API)**: Zoom ≥ 13 (stricter due to bbox limits)
|
||||
|
||||
**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
|
||||
- **50k node limit**: Automatically splits query into 4 quadrants, recursively up to 3 levels deep. This is a deterministic result-set size limit, so shrinking the queried area is the correct fix.
|
||||
- **Timeout errors**: Treated as a plain retryable network error — no splitting. Timeouts usually indicate server load or an expensive query, not "too much area", so firing off more sub-requests would only add load to an already-struggling server.
|
||||
- **Rate limiting (HTTP 429)**: Extended backoff (30s), no splitting (would make it worse). Still surfaces the same "slow" status indicator as the node-limit-splitting case, so the user sees consistent feedback either way.
|
||||
- **Surgical detection**: Only splits on the actual 50k node limit, not timeouts or other network issues.
|
||||
|
||||
**Query optimization & deduplication:**
|
||||
- **Pre-fetch limit**: 4x user's display limit (e.g., 1000 nodes for 250 display limit)
|
||||
- **Profile deduplication**: Automatically removes redundant profiles from queries using subsumption analysis
|
||||
- **User-initiated detection**: Only reports loading status for user-facing operations
|
||||
- **Background operations**: Pre-fetch runs silently, doesn't trigger loading states
|
||||
|
||||
**Profile subsumption optimization (v2.1.1+):**
|
||||
To reduce Overpass query complexity, profiles are deduplicated before query generation:
|
||||
**Query optimization & deduplication (in `OverpassService._buildQuery`):**
|
||||
Profiles are deduplicated before query generation via subsumption analysis:
|
||||
- **Subsumption rule**: Profile A subsumes profile B if all of A's non-empty tags exist in B with identical values
|
||||
- **Example**: `Generic ALPR` (tags: `man_made=surveillance, surveillance:type=ALPR`) subsumes `Flock` (same tags + `manufacturer=Flock Safety`)
|
||||
- **Result**: Default profile set reduces from ~11 to ~2 query clauses (Generic ALPR + Generic Gunshot)
|
||||
- **UI unchanged**: All enabled profiles still used for post-query filtering and display matching
|
||||
- **UI unchanged**: All enabled profiles still used for post-query filtering and display matching (see `NodeProviderWithCache._matchesAnyProfile`), independent of which clauses were sent to Overpass
|
||||
- **Safety fallback**: if dedup would remove every profile (e.g. all profiles have only empty tags), the original full list is used instead of sending an empty query
|
||||
|
||||
**Why this approach:**
|
||||
Dense urban areas (SF, NYC) with many profiles enabled can easily exceed both 50k node limits and 25s timeouts. Profile deduplication reduces query complexity by ~80% for default setups, while automatic splitting handles remaining edge cases. Surgical error detection avoids unnecessary API load from network issues.
|
||||
Dense urban areas (SF, NYC) with many profiles enabled can easily exceed both 50k node limits and 45s timeouts. Profile deduplication reduces query complexity by ~80% for default setups. Surgical error detection avoids unnecessary API load from network issues.
|
||||
|
||||
|
||||
### 6. Uploader Service Architecture (Refactored v1.5.3)
|
||||
|
||||
@@ -800,33 +797,111 @@ The app uses a **clean, release-triggered workflow** that rebuilds from scratch
|
||||
## Build & Development Setup
|
||||
|
||||
### Prerequisites
|
||||
- **Flutter SDK**: Latest stable version
|
||||
- **Xcode**: For iOS builds (macOS only)
|
||||
- **Android Studio**: For Android builds
|
||||
- **Git**: For version control
|
||||
|
||||
**macOS** (required for iOS builds; Android-only contributors can use macOS or Linux):
|
||||
|
||||
| Tool | Install | Notes |
|
||||
|------|---------|-------|
|
||||
| **Homebrew** | [brew.sh](https://brew.sh) | Package manager for macOS |
|
||||
| **Flutter SDK 3.35+** | `brew install --cask flutter` | Installs Flutter + Dart (3.35+ required for RadioGroup widget) |
|
||||
| **Xcode** | Mac App Store | Required for iOS builds |
|
||||
| **CocoaPods** | `brew install cocoapods` | Required for iOS plugin resolution |
|
||||
| **Android SDK** | See below | Required for Android builds |
|
||||
| **Java 17+** | `brew install --cask temurin` | Required by Android toolchain (skip if already installed) |
|
||||
|
||||
After installing, verify with:
|
||||
```bash
|
||||
flutter doctor # All checks should be green
|
||||
```
|
||||
|
||||
### Android SDK Setup (without Android Studio)
|
||||
|
||||
You don't need the full Android Studio IDE. Install the command-line tools and let Flutter's build system pull what it needs:
|
||||
|
||||
```bash
|
||||
# 1. Install command-line tools
|
||||
brew install --cask android-commandlinetools
|
||||
|
||||
# 2. Create the SDK directory and install required components
|
||||
mkdir -p ~/Library/Android/sdk/licenses
|
||||
# Write license acceptance hashes
|
||||
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > ~/Library/Android/sdk/licenses/android-sdk-license
|
||||
printf "\n84831b9409646a918e30573bab4c9c91346d8abd" > ~/Library/Android/sdk/licenses/android-sdk-preview-license
|
||||
|
||||
# 3. Install platform tools and the SDK platform Flutter needs
|
||||
"$(brew --prefix android-commandlinetools)/cmdline-tools/latest/bin/sdkmanager" \
|
||||
--sdk_root="$HOME/Library/Android/sdk" \
|
||||
"platform-tools" "platforms;android-36" "build-tools;35.0.0"
|
||||
|
||||
# 4. Copy cmdline-tools into the SDK root (Flutter expects them there)
|
||||
mkdir -p ~/Library/Android/sdk/cmdline-tools
|
||||
cp -R "$(brew --prefix android-commandlinetools)/cmdline-tools/latest" \
|
||||
~/Library/Android/sdk/cmdline-tools/latest
|
||||
|
||||
# 5. Point Flutter at the SDK and accept licenses
|
||||
flutter config --android-sdk ~/Library/Android/sdk
|
||||
yes | flutter doctor --android-licenses
|
||||
```
|
||||
|
||||
> **Note:** The first `flutter build apk` will auto-download additional components it needs (NDK, CMake, etc). This is normal and only happens once.
|
||||
|
||||
### OAuth2 Setup
|
||||
|
||||
**Required registrations:**
|
||||
To run the app with working OSM authentication, register OAuth2 applications:
|
||||
|
||||
1. **Production OSM**: https://www.openstreetmap.org/oauth2/applications
|
||||
2. **Sandbox OSM**: https://master.apis.dev.openstreetmap.org/oauth2/applications
|
||||
3. **OAuth2 Application Permissions**
|
||||
* Uncheck "Confidential application?"
|
||||
* Read user preferences (read_prefs)
|
||||
* Modify the map (write_api)
|
||||
* Read, update status and delete user messages (consume_messages)
|
||||
4. **Redirect URIs**
|
||||
* deflockapp://auth
|
||||
|
||||
**Configuration:**
|
||||
For local builds, create `build_keys.conf` (gitignored):
|
||||
```bash
|
||||
cp lib/keys.dart.example lib/keys.dart
|
||||
# Edit keys.dart with your OAuth2 client IDs
|
||||
cp build_keys.conf.example build_keys.conf
|
||||
# Edit build_keys.conf with your OAuth2 client IDs
|
||||
```
|
||||
|
||||
### iOS Setup
|
||||
You can also pass keys directly via `--dart-define`:
|
||||
```bash
|
||||
cd ios && pod install
|
||||
flutter run --dart-define=OSM_PROD_CLIENTID=your_id --dart-define=OSM_SANDBOX_CLIENTID=your_id
|
||||
```
|
||||
|
||||
### First Build
|
||||
|
||||
```bash
|
||||
# 1. Install dependencies
|
||||
flutter pub get
|
||||
|
||||
# 2. Generate icons and splash screens (gitignored, must be regenerated)
|
||||
./gen_icons_splashes.sh
|
||||
|
||||
# 3. Build Android
|
||||
flutter build apk --debug \
|
||||
--dart-define=OSM_PROD_CLIENTID=your_id \
|
||||
--dart-define=OSM_SANDBOX_CLIENTID=your_id
|
||||
|
||||
# 4. Build iOS (macOS only, no signing needed for testing)
|
||||
flutter build ios --no-codesign \
|
||||
--dart-define=OSM_PROD_CLIENTID=your_id \
|
||||
--dart-define=OSM_SANDBOX_CLIENTID=your_id
|
||||
```
|
||||
|
||||
> **Important:** You must run `./gen_icons_splashes.sh` before the first build. The generated icons and splash screen assets are gitignored, so the build will fail without this step.
|
||||
|
||||
### Running
|
||||
|
||||
```bash
|
||||
flutter pub get
|
||||
./gen_icons_splashes.sh
|
||||
flutter run --dart-define=OSM_PROD_CLIENT_ID=[your OAuth2 client ID]
|
||||
# Run on connected device or simulator
|
||||
flutter run --dart-define=OSM_PROD_CLIENTID=your_id --dart-define=OSM_SANDBOX_CLIENTID=your_id
|
||||
|
||||
# Or use the build script (reads keys from build_keys.conf)
|
||||
./do_builds.sh # Both platforms
|
||||
./do_builds.sh --android # Android only
|
||||
./do_builds.sh --ios # iOS only
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
@@ -90,12 +90,16 @@ A comprehensive Flutter app for mapping public surveillance infrastructure with
|
||||
- Code organization and contribution guidelines
|
||||
- Debugging tips and troubleshooting
|
||||
|
||||
**Quick setup:**
|
||||
**Quick setup (macOS with Homebrew):**
|
||||
```shell
|
||||
flutter pub get
|
||||
cp lib/keys.dart.example lib/keys.dart
|
||||
# Add OAuth2 client IDs, then: flutter run
|
||||
brew install --cask flutter # Install Flutter SDK
|
||||
brew install cocoapods # Required for iOS
|
||||
flutter pub get # Install dependencies
|
||||
./gen_icons_splashes.sh # Generate icons & splash screens (required before first build)
|
||||
cp build_keys.conf.example build_keys.conf # Add your OSM OAuth2 client IDs
|
||||
./do_builds.sh # Build both platforms
|
||||
```
|
||||
See [DEVELOPER.md](DEVELOPER.md) for cross-platform instructions and Android SDK setup.
|
||||
|
||||
**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.
|
||||
|
||||
@@ -103,43 +107,7 @@ cp lib/keys.dart.example lib/keys.dart
|
||||
|
||||
## Roadmap
|
||||
|
||||
### Needed Bugfixes
|
||||
- Make submission guide scarier
|
||||
- Tile cache trimming? Does fluttermap handle?
|
||||
- Filter NSI suggestions based on what has already been typed in
|
||||
- NSI sometimes doesn't populate a dropdown, maybe always on the second tag added during an edit session?
|
||||
- Clean cache when nodes have been deleted by others
|
||||
|
||||
### Current Development
|
||||
- Support check_date= tag, update on all edits, quick button to update that only
|
||||
- Support source= tag, default to survey, let user pick a different value
|
||||
- Add ability to downvote suspected locations which are old enough
|
||||
- Turn by turn navigation or at least swipe nav sheet up to see a list
|
||||
- Import/Export map providers
|
||||
- Update default profiles from the website on launch to capture changes
|
||||
|
||||
### Future Features & Wishlist
|
||||
- Tap direction slider to enter integer directly
|
||||
- Tap pending queue item to edit again before submitting
|
||||
- Optional reason message when deleting
|
||||
- Update offline area data while browsing?
|
||||
- Save named locations to more easily navigate to home or work
|
||||
- Offline navigation (pending vector map tiles)
|
||||
|
||||
### Maybes
|
||||
- Icons/glyphs for profiles
|
||||
- "Universal Links" for better handling of profile import when app is not installed
|
||||
- Yellow ring for devices missing specific tag details
|
||||
- Android Auto / CarPlay
|
||||
- "Cache accumulating" offline area? Most recent / most viewed?
|
||||
- Grab the full latest database for each profile just like for suspected locations (instead of overpass)?
|
||||
- Custom data providers? (OSM/Overpass alternatives)
|
||||
- Offer options for extracting nodes which are 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??
|
||||
See [GitHub Issues](https://github.com/FoggedLens/deflock-app/issues) for the full list of planned features, known bugs, and ideas.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -17,29 +17,28 @@ if (keystorePropertiesFile.exists()) {
|
||||
android {
|
||||
namespace = "me.deflock.deflockapp"
|
||||
|
||||
// Matches current stable Flutter (compileSdk 34 as of July 2025)
|
||||
compileSdk = 36
|
||||
|
||||
// NDK only needed if you build native plugins; keep your pinned version
|
||||
ndkVersion = "27.0.12077973"
|
||||
ndkVersion = "28.2.13676358"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// Application ID (package name)
|
||||
applicationId = "me.deflock.deflockapp"
|
||||
|
||||
// ────────────────────────────────────────────────────────────
|
||||
// oauth2_client 4.x & flutter_web_auth_2 5.x require minSdk 23
|
||||
// ────────────────────────────────────────────────────────────
|
||||
minSdk = 23
|
||||
// oauth2_client 4.x & flutter_web_auth_2 5.x require minSdk 23
|
||||
minSdk = maxOf(flutter.minSdkVersion, 23)
|
||||
targetSdk = 36
|
||||
|
||||
// Flutter tool injects these during `flutter build`
|
||||
@@ -76,6 +75,5 @@ flutter {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||
}
|
||||
|
||||
@@ -10,6 +10,26 @@
|
||||
<!-- Notification permission for proximity alerts -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<!-- Background location for proximity alerts. Android stops delivering
|
||||
location to a backgrounded app within a few minutes unless it is
|
||||
running a foreground service, so geolocator is given a
|
||||
ForegroundNotificationConfig while proximity alerts are enabled -
|
||||
that starts its GeolocatorLocationService (already declared by the
|
||||
geolocator_android plugin manifest) and keeps the stream alive.
|
||||
FOREGROUND_SERVICE_LOCATION is required from Android 14 onward.
|
||||
|
||||
Deliberately NOT declaring ACCESS_BACKGROUND_LOCATION: the foreground
|
||||
service covers our case without it, and merely listing it in the
|
||||
manifest makes geolocator append it to the very first permission
|
||||
request - which Android 11+ silently denies, because foreground and
|
||||
background location cannot be asked for in one prompt. That would
|
||||
degrade first-run permissions for every user, including those who
|
||||
never turn proximity alerts on. It also drags in the Play Store
|
||||
background-location declaration review. -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<application
|
||||
android:name="${applicationName}"
|
||||
android:label="DeFlock"
|
||||
@@ -30,6 +50,19 @@
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
<!-- Disable Flutter's implicit deep-link routing so that
|
||||
app_links/DeepLinkService is the sole handler of incoming
|
||||
deflockapp:// URIs. Without this, Flutter's engine also
|
||||
tries to auto-convert the URI into a Navigator route
|
||||
(e.g. "/add?p=...") which conflicts with the navigation
|
||||
DeepLinkService performs, causing screens pushed by
|
||||
DeepLinkService to be immediately buried by a duplicate
|
||||
HomeScreen route. -->
|
||||
<meta-data
|
||||
android:name="flutter_deeplinking_enabled"
|
||||
android:value="false" />
|
||||
|
||||
|
||||
<!-- Launcher intent -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
@@ -42,6 +75,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="deflockapp" android:host="profiles"/>
|
||||
<data android:scheme="deflockapp" android:host="node"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
@@ -18,8 +18,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.7.3" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||
id("com.android.application") version "8.11.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
+97
-2
@@ -1,9 +1,104 @@
|
||||
{
|
||||
"2.11.1": {
|
||||
"content": [
|
||||
"• Fix FOV-only edits not registering as a change",
|
||||
"• Notify on changeset comments and show a popup bubble on launch"
|
||||
]
|
||||
},
|
||||
"2.11.0": {
|
||||
"content": [
|
||||
"• Further improve node loading performance",
|
||||
"• Fix node constrainment when part of a way/relation",
|
||||
"• Show submission status in details sheet",
|
||||
"• Fix profile import links not opening"
|
||||
]
|
||||
},
|
||||
"2.10.5": {
|
||||
"content": [
|
||||
"• Make node tags selectable / copyable",
|
||||
"• Add status indicator to details sheet for pending nodes",
|
||||
"• Global toggle for offline features",
|
||||
"• Auto-open details sheet for new add/edit/deletes"
|
||||
]
|
||||
},
|
||||
"2.10.4": {
|
||||
"content": [
|
||||
"• Catch and correct a couple rare map bounds issues",
|
||||
"• Prevent queueing a deletion without being logged in",
|
||||
"• Require a reason for deletion, provide options in a dropdown",
|
||||
"• Add option to hide zoom controls in advanced settings"
|
||||
]
|
||||
},
|
||||
"2.10.3": {
|
||||
"content": [
|
||||
"• Data loading performance improvements",
|
||||
"• Node marker when submitting now green for visibility"
|
||||
]
|
||||
},
|
||||
"2.10.2": {
|
||||
"content": [
|
||||
"• Added tap and hold gesture on empty map area to add a node at that location",
|
||||
"• Added ability to accept direct links to a specific node for callbacks from e.g. FlockHopper",
|
||||
"• Fixed app hang during startup when suspected locations database needed updating - refresh now happens in background"
|
||||
]
|
||||
},
|
||||
"2.10.1": {
|
||||
"content": [
|
||||
"• Operator profiles are now reorderable",
|
||||
"• Support operator profile import via deflockapp:// links",
|
||||
"• Makes operator profile UI consistent with device profiles"
|
||||
]
|
||||
},
|
||||
"2.10.0": {
|
||||
"content": [
|
||||
"• Simplified profile FOVs; there is now only a checkbox for '360'"
|
||||
]
|
||||
},
|
||||
"2.9.2": {
|
||||
"content": [
|
||||
"• Moved 'About OpenStreetMap' section from OSM Account page to Settings > About for better organization",
|
||||
"• Added 'Clear Caches' option to tile provider menus - easily free up storage space by clearing cached tiles for specific providers",
|
||||
"• Enhanced node deletion workflow - users can now provide an informative reason when deleting surveillance devices",
|
||||
"• Added 'Report issue with OSM base map' link in About screen help section - easily report issues with the underlying OpenStreetMap data"
|
||||
]
|
||||
},
|
||||
"2.9.1": {
|
||||
"content": [
|
||||
"• When hitting node render limit, only render nodes closest to center of viewport.",
|
||||
"• Moved to our own infrastructure for Overpass and routing services, with automatic fallback to public servers."
|
||||
]
|
||||
},
|
||||
"2.9.0": {
|
||||
"content": [
|
||||
"• Caching, tile retries, offline areas, now working properly. Map imagery should load correctly."
|
||||
]
|
||||
},
|
||||
"2.8.1": {
|
||||
"content": [
|
||||
"• Fixed bug where the \"existing tags\" profile would incorrectly add default FOV ranges during submission",
|
||||
"• Added drag handles so profiles can be reordered to customize dropdown order when submitting"
|
||||
]
|
||||
},
|
||||
"2.8.0": {
|
||||
"content": [
|
||||
"• Update dependencies and build chain tools; no code changes"
|
||||
]
|
||||
},
|
||||
"2.7.2": {
|
||||
"content": [
|
||||
"• Now following OSM UserAgent guidelines"
|
||||
]
|
||||
},
|
||||
"2.7.1": {
|
||||
"content": [
|
||||
"• Fixed operator profile selection being lost when moving node position, adjusting direction, or changing profiles",
|
||||
"• Further improved node loading by only fetching what is needed to determine whether a node is attached to a way/relation"
|
||||
]
|
||||
},
|
||||
"2.6.4": {
|
||||
"content": [
|
||||
"• Added imperial units support (miles, feet) in addition to metric units (km, meters)",
|
||||
"• Moved units setting from Navigation to Language & Region settings page",
|
||||
"• Search text now automatically clears when route planning starts"
|
||||
"• Moved units setting from Navigation to Language & Region settings page"
|
||||
]
|
||||
},
|
||||
"2.6.3": {
|
||||
|
||||
+4
-4
@@ -28,7 +28,7 @@ read_from_file() {
|
||||
echo "$v"
|
||||
return 0
|
||||
fi
|
||||
done < "$file"
|
||||
done < <(cat "$file"; echo)
|
||||
|
||||
return 1
|
||||
}
|
||||
@@ -80,9 +80,9 @@ 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
|
||||
# Run tests before building
|
||||
echo "Running tests..."
|
||||
flutter test || exit 1
|
||||
echo
|
||||
|
||||
appver=$(grep "version:" pubspec.yaml | head -1 | cut -d ':' -f 2 | tr -d ' ' | cut -d '+' -f 1)
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,2 +1 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
@@ -1,2 +1 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '12.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
@@ -10,9 +10,8 @@
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
5B624583B69E961F78575427 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9D0FF4AAF30A10DCC7546BD /* Pods_RunnerTests.framework */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
80E9445C8798AC7271AAC8BA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 015ABBACED80649D4AFF850D /* Pods_Runner.framework */; };
|
||||
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
@@ -42,20 +41,15 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
015ABBACED80649D4AFF850D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
045F89E14FC4F02010A83367 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
570CEB9EF97E9EE9B3436119 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
731D4782D191731330541A7E /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7884B7AB945386E2395EFF39 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
8DDE785A4593E6CA5CA43172 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -63,8 +57,6 @@
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C9D0FF4AAF30A10DCC7546BD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F596A88B00A1B31C43A2B089 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -72,7 +64,6 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5B624583B69E961F78575427 /* Pods_RunnerTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -80,27 +71,13 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
80E9445C8798AC7271AAC8BA /* Pods_Runner.framework in Frameworks */,
|
||||
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2C653E01607E349213D63C91 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F596A88B00A1B31C43A2B089 /* Pods-Runner.debug.xcconfig */,
|
||||
7884B7AB945386E2395EFF39 /* Pods-Runner.release.xcconfig */,
|
||||
570CEB9EF97E9EE9B3436119 /* Pods-Runner.profile.xcconfig */,
|
||||
8DDE785A4593E6CA5CA43172 /* Pods-RunnerTests.debug.xcconfig */,
|
||||
045F89E14FC4F02010A83367 /* Pods-RunnerTests.release.xcconfig */,
|
||||
731D4782D191731330541A7E /* Pods-RunnerTests.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -109,18 +86,10 @@
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
968347D6C1E8FCB1D43AE8AF /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
015ABBACED80649D4AFF850D /* Pods_Runner.framework */,
|
||||
C9D0FF4AAF30A10DCC7546BD /* Pods_RunnerTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
@@ -136,8 +105,6 @@
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
2C653E01607E349213D63C91 /* Pods */,
|
||||
968347D6C1E8FCB1D43AE8AF /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -172,7 +139,6 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
4C9A553A911C8019A2A14C90 /* [CP] Check Pods Manifest.lock */,
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
1789E739C02C24F676C90644 /* Frameworks */,
|
||||
@@ -191,20 +157,21 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
EF132DD72459C72ECA32FCAD /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
1553428839027C2A5102CCB3 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
packageProductDependencies = (
|
||||
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
|
||||
);
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
@@ -238,6 +205,9 @@
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
packageReferences = (
|
||||
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
|
||||
);
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
@@ -270,23 +240,6 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
1553428839027C2A5102CCB3 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
@@ -303,28 +256,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
4C9A553A911C8019A2A14C90 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
@@ -340,28 +271,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
EF132DD72459C72ECA32FCAD /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -455,7 +364,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@@ -491,7 +400,6 @@
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 8DDE785A4593E6CA5CA43172 /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -509,7 +417,6 @@
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 045F89E14FC4F02010A83367 /* Pods-RunnerTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -525,7 +432,6 @@
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 731D4782D191731330541A7E /* Pods-RunnerTests.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -588,7 +494,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -639,7 +545,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@@ -735,6 +641,20 @@
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCLocalSwiftPackageReference section */
|
||||
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
|
||||
isa = XCLocalSwiftPackageReference;
|
||||
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
|
||||
};
|
||||
/* End XCLocalSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = FlutterGeneratedPluginSwiftPackage;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
@@ -5,6 +5,24 @@
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<PreActions>
|
||||
<ExecutionAction
|
||||
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
|
||||
<ActionContent
|
||||
title = "Run Prepare Flutter Framework Script"
|
||||
scriptText = "/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" prepare ">
|
||||
<EnvironmentBuildable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</EnvironmentBuildable>
|
||||
</ActionContent>
|
||||
</ExecutionAction>
|
||||
</PreActions>
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,13 +1,27 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import UserNotifications
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
// Required by flutter_local_notifications: the plugin implements
|
||||
// userNotificationCenter(_:willPresent:withCompletionHandler:), which is
|
||||
// what allows a notification to appear while the app is in the foreground.
|
||||
// iOS only calls it on the registered delegate, and the plugin does not
|
||||
// register itself — without this line, foreground notifications are
|
||||
// silently suppressed by the system.
|
||||
if #available(iOS 10.0, *) {
|
||||
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
|
||||
}
|
||||
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||
}
|
||||
}
|
||||
+107
-65
@@ -1,72 +1,114 @@
|
||||
<?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>
|
||||
<!-- Disable Flutter's implicit deep-link routing so that
|
||||
app_links/DeepLinkService is the sole handler of incoming
|
||||
deflockapp:// URIs. Without this, Flutter's engine also tries
|
||||
to auto-convert the URI into a Navigator route (e.g.
|
||||
"/add?p=...") which conflicts with the navigation
|
||||
DeepLinkService performs, causing screens pushed by
|
||||
DeepLinkService to be immediately buried by a duplicate
|
||||
HomeScreen route. -->
|
||||
<key>FlutterDeepLinkingEnabled</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>DeFlock</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>deflockapp</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>deflockapp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<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>NSLocationAlwaysUsageDescription</key>
|
||||
<string>This app optionally uses your location in the background so proximity alerts can warn you about nearby surveillance devices while the app is not on screen. This feature is entirely optional.</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string>This app optionally uses your location to show nearby cameras by centering the map on your location.</string>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>DeFlock</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>deflockapp</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<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>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<!-- OAuth2 redirect handler -->
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>None</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>deflockapp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<!-- (Optional) allow opening the system browser and returning -->
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>flutter</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>FlutterSceneDelegate</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<!-- Required for proximity alerts. Without the "location" background mode
|
||||
iOS suspends the app the moment it leaves the screen, the CoreLocation
|
||||
stream stops delivering, and no alert can ever fire while backgrounded.
|
||||
Only armed at runtime: GpsController sets
|
||||
allowBackgroundLocationUpdates on the stream solely while the user has
|
||||
proximity alerts turned on. -->
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>location</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
+119
-13
@@ -1,9 +1,8 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'services/http_client.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
@@ -23,7 +22,6 @@ import 'services/operator_profile_service.dart';
|
||||
import 'services/deep_link_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';
|
||||
@@ -66,6 +64,12 @@ class AppState extends ChangeNotifier {
|
||||
VoidCallback? _tutorialCompletionCallback; // Callback when tutorial is completed
|
||||
Timer? _messageCheckTimer;
|
||||
|
||||
// Node ID to auto-focus (open the details sheet for) after a submit/edit/delete
|
||||
// completes, when kAutoOpenNodeSheetAfterSubmit is enabled. Consumed (read once
|
||||
// and cleared) by HomeScreen after picking it up.
|
||||
int? _pendingFocusNodeId;
|
||||
|
||||
|
||||
AppState() {
|
||||
instance = this;
|
||||
_authState = AuthState();
|
||||
@@ -158,6 +162,11 @@ class AppState extends ChangeNotifier {
|
||||
int get maxNodes => _settingsState.maxNodes;
|
||||
UploadMode get uploadMode => _settingsState.uploadMode;
|
||||
FollowMeMode get followMeMode => _settingsState.followMeMode;
|
||||
bool get keepScreenAwake => _settingsState.keepScreenAwake;
|
||||
bool get hideZoomControls => _settingsState.hideZoomControls;
|
||||
bool get offlineFeaturesEnabled => _settingsState.offlineFeaturesEnabled;
|
||||
|
||||
|
||||
|
||||
bool get proximityAlertsEnabled => _settingsState.proximityAlertsEnabled;
|
||||
int get proximityAlertDistance => _settingsState.proximityAlertDistance;
|
||||
@@ -167,6 +176,8 @@ class AppState extends ChangeNotifier {
|
||||
// Messages state
|
||||
int? get unreadMessageCount => _messagesState.unreadCount;
|
||||
bool get hasUnreadMessages => _messagesState.hasUnreadMessages;
|
||||
bool get hasUnreadChangesetComments => _messagesState.hasUnreadChangesetComments;
|
||||
bool get hasUnreadNotifications => _messagesState.hasUnreadNotifications;
|
||||
bool get isCheckingMessages => _messagesState.isChecking;
|
||||
|
||||
// Tile provider state
|
||||
@@ -174,12 +185,18 @@ class AppState extends ChangeNotifier {
|
||||
TileType? get selectedTileType => _settingsState.selectedTileType;
|
||||
TileProvider? get selectedTileProvider => _settingsState.selectedTileProvider;
|
||||
|
||||
|
||||
|
||||
// Upload queue state
|
||||
int get pendingCount => _uploadQueueState.pendingCount;
|
||||
List<PendingUpload> get pendingUploads => _uploadQueueState.pendingUploads;
|
||||
|
||||
/// True if any queue item currently has an open changeset that hasn't
|
||||
/// been closed yet (creating changeset, uploading node, or closing
|
||||
/// changeset). Used to gate enabling offline mode / pausing the upload
|
||||
/// queue so in-flight submissions can finish first.
|
||||
bool get hasInFlightUploads => pendingUploads.any((u) => u.isActivelyProcessing);
|
||||
|
||||
|
||||
// Suspected location state
|
||||
SuspectedLocation? get selectedSuspectedLocation => _suspectedLocationState.selectedLocation;
|
||||
bool get suspectedLocationsEnabled => _suspectedLocationState.isEnabled;
|
||||
@@ -252,6 +269,9 @@ class AppState extends ChangeNotifier {
|
||||
|
||||
_isInitialized = true;
|
||||
|
||||
// Start background refresh of suspected locations if needed (non-blocking)
|
||||
_suspectedLocationState.initBackgroundRefresh(offlineMode: _settingsState.offlineMode);
|
||||
|
||||
// Check for initial deep link after a small delay to let navigation settle
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
DeepLinkService().checkInitialLink();
|
||||
@@ -313,6 +333,7 @@ class AppState extends ChangeNotifier {
|
||||
final accessToken = await _authState.getAccessToken();
|
||||
await _messagesState.checkMessages(
|
||||
accessToken: accessToken,
|
||||
username: isLoggedIn ? username : null,
|
||||
uploadMode: uploadMode,
|
||||
forceRefresh: forceRefresh,
|
||||
);
|
||||
@@ -322,10 +343,24 @@ class AppState extends ChangeNotifier {
|
||||
return _messagesState.getMessagesUrl(uploadMode);
|
||||
}
|
||||
|
||||
/// URL of the specific changeset with unread comments, on OSM's website,
|
||||
/// or null if there are no unread changeset comments.
|
||||
String? getUnreadChangesetUrl() {
|
||||
return _messagesState.getUnreadChangesetUrl(uploadMode);
|
||||
}
|
||||
|
||||
void clearMessages() {
|
||||
_messagesState.clearMessages();
|
||||
}
|
||||
|
||||
/// Mark changeset comments as read (called when user views the changeset on OSM)
|
||||
Future<void> markChangesetCommentsRead() async {
|
||||
await _messagesState.markChangesetCommentsRead(
|
||||
username: isLoggedIn ? username : null,
|
||||
uploadMode: uploadMode,
|
||||
);
|
||||
}
|
||||
|
||||
/// Check if the current OAuth token has required scopes for message notifications
|
||||
/// Returns true if re-authentication is needed
|
||||
Future<bool> needsReauthForMessages() async {
|
||||
@@ -337,35 +372,39 @@ class AppState extends ChangeNotifier {
|
||||
final accessToken = await _authState.getAccessToken();
|
||||
if (accessToken == null) return false;
|
||||
|
||||
final client = UserAgentClient();
|
||||
try {
|
||||
// Try to fetch user details - this should include message data if scope is correct
|
||||
final response = await http.get(
|
||||
final response = await client.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;
|
||||
} finally {
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
|
||||
/// Show re-authentication dialog if needed
|
||||
Future<void> checkAndPromptReauthForMessages(BuildContext context) async {
|
||||
if (await needsReauthForMessages()) {
|
||||
if (!context.mounted) return;
|
||||
_showReauthDialog(context);
|
||||
}
|
||||
}
|
||||
@@ -405,9 +444,18 @@ class AppState extends ChangeNotifier {
|
||||
_profileState.addOrUpdateProfile(p);
|
||||
}
|
||||
|
||||
void reorderProfiles(int oldIndex, int newIndex) {
|
||||
_profileState.reorderProfiles(oldIndex, newIndex);
|
||||
}
|
||||
|
||||
void deleteProfile(NodeProfile p) {
|
||||
_profileState.deleteProfile(p);
|
||||
}
|
||||
|
||||
/// Reload all profiles from storage (useful after migrations modify stored profiles)
|
||||
Future<void> reloadProfiles() async {
|
||||
await _profileState.reloadFromStorage();
|
||||
}
|
||||
|
||||
// Callback when a profile is deleted - clear any stale session references
|
||||
void _onProfileDeleted(NodeProfile deletedProfile) {
|
||||
@@ -431,6 +479,10 @@ class AppState extends ChangeNotifier {
|
||||
_operatorProfileState.deleteProfile(p);
|
||||
}
|
||||
|
||||
void reorderOperatorProfiles(int oldIndex, int newIndex) {
|
||||
_operatorProfileState.reorderProfiles(oldIndex, newIndex);
|
||||
}
|
||||
|
||||
// ---------- Session Methods ----------
|
||||
void startAddSession() {
|
||||
_sessionState.startAddSession(enabledProfiles);
|
||||
@@ -448,6 +500,7 @@ class AppState extends ChangeNotifier {
|
||||
Map<String, String>? refinedTags,
|
||||
Map<String, String>? additionalExistingTags,
|
||||
String? changesetComment,
|
||||
bool updateOperatorProfile = false,
|
||||
}) {
|
||||
_sessionState.updateSession(
|
||||
directionDeg: directionDeg,
|
||||
@@ -457,6 +510,7 @@ class AppState extends ChangeNotifier {
|
||||
refinedTags: refinedTags,
|
||||
additionalExistingTags: additionalExistingTags,
|
||||
changesetComment: changesetComment,
|
||||
updateOperatorProfile: updateOperatorProfile,
|
||||
);
|
||||
|
||||
// Check tutorial completion if position changed
|
||||
@@ -474,6 +528,7 @@ class AppState extends ChangeNotifier {
|
||||
Map<String, String>? refinedTags,
|
||||
Map<String, String>? additionalExistingTags,
|
||||
String? changesetComment,
|
||||
bool updateOperatorProfile = false,
|
||||
}) {
|
||||
_sessionState.updateEditSession(
|
||||
directionDeg: directionDeg,
|
||||
@@ -484,6 +539,7 @@ class AppState extends ChangeNotifier {
|
||||
refinedTags: refinedTags,
|
||||
additionalExistingTags: additionalExistingTags,
|
||||
changesetComment: changesetComment,
|
||||
updateOperatorProfile: updateOperatorProfile,
|
||||
);
|
||||
|
||||
// Check tutorial completion if position changed
|
||||
@@ -558,24 +614,44 @@ class AppState extends ChangeNotifier {
|
||||
void commitSession() {
|
||||
final session = _sessionState.commitSession();
|
||||
if (session != null) {
|
||||
_uploadQueueState.addFromSession(session, uploadMode: uploadMode);
|
||||
final upload = _uploadQueueState.addFromSession(session, uploadMode: uploadMode);
|
||||
_startUploader();
|
||||
if (kAutoOpenNodeSheetAfterSubmit && upload.tempNodeId != null) {
|
||||
_pendingFocusNodeId = upload.tempNodeId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void commitEditSession() {
|
||||
final session = _sessionState.commitEditSession();
|
||||
if (session != null) {
|
||||
_uploadQueueState.addFromEditSession(session, uploadMode: uploadMode);
|
||||
final upload = _uploadQueueState.addFromEditSession(session, uploadMode: uploadMode);
|
||||
_startUploader();
|
||||
if (kAutoOpenNodeSheetAfterSubmit && upload.tempNodeId != null) {
|
||||
_pendingFocusNodeId = upload.tempNodeId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void deleteNode(OsmNode node) {
|
||||
_uploadQueueState.addFromNodeDeletion(node, uploadMode: uploadMode);
|
||||
void deleteNode(OsmNode node, {String? changesetComment}) {
|
||||
_uploadQueueState.addFromNodeDeletion(node, uploadMode: uploadMode, changesetComment: changesetComment);
|
||||
_startUploader();
|
||||
if (kAutoOpenNodeSheetAfterSubmit) {
|
||||
_pendingFocusNodeId = node.id;
|
||||
}
|
||||
}
|
||||
|
||||
/// Consume (read once and clear) the node ID pending auto-focus, if any.
|
||||
/// Used by HomeScreen to reopen the node details sheet right after a
|
||||
/// submit/edit/delete completes, when [kAutoOpenNodeSheetAfterSubmit] is
|
||||
/// enabled. Returns null if no focus is pending.
|
||||
int? consumePendingFocusNodeId() {
|
||||
final id = _pendingFocusNodeId;
|
||||
_pendingFocusNodeId = null;
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
// ---------- Search Methods ----------
|
||||
Future<void> search(String query) async {
|
||||
await _searchState.search(query);
|
||||
@@ -659,6 +735,31 @@ class AppState extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setKeepScreenAwake(bool enabled) async {
|
||||
await _settingsState.setKeepScreenAwake(enabled);
|
||||
}
|
||||
|
||||
Future<void> setHideZoomControls(bool enabled) async {
|
||||
await _settingsState.setHideZoomControls(enabled);
|
||||
}
|
||||
|
||||
/// Set the master "offline features enabled" toggle. When disabling,
|
||||
/// also forces offlineMode off (if it was on) and cancels any active
|
||||
/// area downloads, so we never end up "in offline mode" with the
|
||||
/// feature disabled. Does NOT delete existing offline area data — that
|
||||
/// is a separate, explicit user choice handled by the UI.
|
||||
Future<void> setOfflineFeaturesEnabled(bool enabled) async {
|
||||
await _settingsState.setOfflineFeaturesEnabled(enabled);
|
||||
if (!enabled) {
|
||||
if (offlineMode) {
|
||||
await setOfflineMode(false);
|
||||
}
|
||||
await OfflineAreaService().cancelActiveDownloads();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Future<void> setPauseQueueProcessing(bool enabled) async {
|
||||
await _settingsState.setPauseQueueProcessing(enabled);
|
||||
if (!enabled) {
|
||||
@@ -707,6 +808,11 @@ class AppState extends ChangeNotifier {
|
||||
await _settingsState.deleteTileProvider(providerId);
|
||||
}
|
||||
|
||||
/// Clear all tile caches for a specific provider
|
||||
Future<void> clearTileProviderCaches(String providerId) async {
|
||||
await _settingsState.clearTileProviderCaches(providerId);
|
||||
}
|
||||
|
||||
/// Set follow-me mode
|
||||
Future<void> setFollowMeMode(FollowMeMode mode) async {
|
||||
await _settingsState.setFollowMeMode(mode);
|
||||
@@ -814,7 +920,7 @@ class AppState extends ChangeNotifier {
|
||||
// ---------- Utility Methods ----------
|
||||
|
||||
/// Generate a default changeset comment for a submission
|
||||
/// Handles special case of <Existing tags> profile by using "a" instead
|
||||
/// Handles special case of `<Existing tags>` profile by using "a" instead
|
||||
static String generateDefaultChangesetComment({
|
||||
required NodeProfile? profile,
|
||||
required UploadOperation operation,
|
||||
|
||||
+24
-22
@@ -52,6 +52,8 @@ double topPositionWithSafeArea(double baseTop, EdgeInsets safeArea) {
|
||||
// Client name for OSM uploads ("created_by" tag)
|
||||
const String kClientName = 'DeFlock';
|
||||
// Note: Version is now dynamically retrieved from VersionService
|
||||
const String kContactEmail = 'admin@stopflock.com';
|
||||
const String kHomepageUrl = 'https://deflock.org';
|
||||
|
||||
// Upload and changeset configuration
|
||||
const Duration kUploadHttpTimeout = Duration(seconds: 30); // HTTP request timeout for uploads
|
||||
@@ -62,8 +64,12 @@ const Duration kChangesetCloseMaxRetryDelay = Duration(minutes: 5); // Cap at 5
|
||||
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: 90); // HTTP timeout for routing requests
|
||||
// How long to keep the "Submission Complete" confirmation visible in the
|
||||
// in-flight upload wait dialog (shown when the user enables offline mode or
|
||||
// pauses the upload queue while a submission is actively in progress) before
|
||||
// automatically dismissing and applying the requested setting change.
|
||||
const Duration kInFlightUploadCompleteDisplayDuration = Duration(seconds: 2);
|
||||
|
||||
|
||||
// Overpass API configuration
|
||||
const Duration kOverpassQueryTimeout = Duration(seconds: 45); // Timeout for Overpass API queries (was 25s hardcoded)
|
||||
@@ -83,6 +89,12 @@ const bool kEnableNodeEdits = true; // Set to false to temporarily disable node
|
||||
// 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)
|
||||
|
||||
// Auto-open tags sheet after add/edit/delete, so the user can watch upload status update live.
|
||||
const bool kAutoOpenNodeSheetAfterSubmit = false; // Set to true to enable auto-focus behavior
|
||||
|
||||
// Profile FOV features - set to false to restrict profiles to 360° FOV only
|
||||
const bool kEnableNon360FOVs = false; // Set to true to allow custom FOV values in profiles
|
||||
|
||||
/// Navigation availability: only dev builds, and only when online
|
||||
bool enableNavigationFeatures({required bool offlineMode}) {
|
||||
return kEnableNavigationFeatures && !offlineMode;
|
||||
@@ -91,18 +103,16 @@ bool enableNavigationFeatures({required bool offlineMode}) {
|
||||
// Marker/node interaction
|
||||
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 kMinZoomForNodeEditingSheets = 16; // 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 kMapLongPressTimeout = Duration(milliseconds: 600); // Duration to trigger "add node here" on empty map area
|
||||
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 double kNodeRenderingBoundsExpansion = 1.3; // Expand visible bounds by this factor for node rendering to prevent edge blinking
|
||||
const double kRouteProximityThresholdMeters = 500.0; // Distance threshold for determining if user is near route when resuming navigation
|
||||
const double kResumeNavigationZoomLevel = 16.0; // Zoom level when resuming navigation
|
||||
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
|
||||
@@ -129,7 +139,7 @@ const int kProximityAlertMaxDistance = 1600; // meters
|
||||
const Duration kProximityAlertCooldown = Duration(minutes: 10); // Cooldown between alerts for same node
|
||||
|
||||
// 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
|
||||
const double kNodeProximityWarningDistance = 50.0; // meters - distance threshold to show warning
|
||||
|
||||
// Positioning tutorial configuration
|
||||
const double kPositioningTutorialBlurSigma = 3.0; // Blur strength for sheet overlay
|
||||
@@ -137,13 +147,14 @@ const double kPositioningTutorialMinMovementMeters = 1.0; // Minimum map movemen
|
||||
|
||||
// Navigation route planning configuration
|
||||
const double kNavigationMinRouteDistance = 100.0; // meters - minimum distance between start and end points
|
||||
const double kNavigationDistanceWarningThreshold = 20000.0; // meters - distance threshold for timeout warning (30km)
|
||||
const double kNavigationDistanceWarningThreshold = 300000.0; // meters - distance threshold for timeout warning (30km)
|
||||
|
||||
// Node display configuration
|
||||
const int kDefaultMaxNodes = 500; // Default maximum number of nodes to render on the map at once
|
||||
|
||||
// NSI (Name Suggestion Index) configuration
|
||||
const int kNSIMinimumHitCount = 500; // Minimum hit count for NSI suggestions to be considered useful
|
||||
const int kNSIMaxSuggestions = 10; // Maximum number of tag value suggestions to fetch and display
|
||||
|
||||
// Map interaction configuration
|
||||
const double kNodeDoubleTapZoomDelta = 1.0; // How much to zoom in when double-tapping nodes (was 1.0)
|
||||
@@ -152,15 +163,6 @@ const double kPinchZoomThreshold = 0.2; // How much pinch required to start zoom
|
||||
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;
|
||||
|
||||
@@ -170,11 +172,11 @@ const int kAbsoluteMaxTileCount = 50000;
|
||||
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 double kNodeIconDiameter = 17.0;
|
||||
const double _kNodeRingThicknessBase = 2.6;
|
||||
const double kNodeDotOpacity = 0.28; // 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 kNodeRingColorMock = Color(0xE044BB55); // 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
|
||||
|
||||
+10
-6
@@ -1,16 +1,20 @@
|
||||
// OpenStreetMap OAuth client IDs for this app.
|
||||
// These must be provided via --dart-define at build time.
|
||||
|
||||
/// Whether OSM OAuth secrets were provided at build time.
|
||||
/// When false, the app should force simulate mode.
|
||||
bool get kHasOsmSecrets {
|
||||
const prod = String.fromEnvironment('OSM_PROD_CLIENTID');
|
||||
const sandbox = String.fromEnvironment('OSM_SANDBOX_CLIENTID');
|
||||
return prod.isNotEmpty && sandbox.isNotEmpty;
|
||||
}
|
||||
|
||||
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');
|
||||
return fromBuild;
|
||||
}
|
||||
|
||||
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');
|
||||
return fromBuild;
|
||||
}
|
||||
+74
-14
@@ -74,7 +74,20 @@
|
||||
"advancedSettings": "Erweiterte Einstellungen",
|
||||
"advancedSettingsSubtitle": "Leistungs-, Warnungs- und Kachelanbieter-Einstellungen",
|
||||
"proximityAlerts": "Näherungswarnungen",
|
||||
"networkStatusIndicator": "Netzwerkstatus-Anzeige"
|
||||
"keepScreenAwake": "Bildschirm Aktiv Lassen",
|
||||
"networkStatusIndicator": "Netzwerkstatus-Anzeige",
|
||||
"hideZoomControls": "Zoom-Steuerung Ausblenden",
|
||||
"enableOfflineFeatures": "Offline-Funktionen Aktivieren",
|
||||
"enableOfflineFeaturesTitle": "Offline-Funktionen aktivieren",
|
||||
"enableOfflineFeaturesSubtitle": "Herunterladen und Nutzen von Offline-Kartenbereichen erlauben. Wenn deaktiviert, sind Offline-Modus und heruntergeladene Bereiche nicht verfügbar."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Bildschirm während der App-Nutzung aktiv lassen",
|
||||
"subtitle": "Verhindert, dass sich der Bildschirm während der Nutzung der App automatisch ausschaltet"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Zoom-Steuerung ausblenden",
|
||||
"subtitle": "Blendet die +/- Zoom-Schaltflächen und die Zoomstufen-Anzeige aus. Sie können weiterhin mit Fingergesten zoomen."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Benachrichtigung erhalten beim Annähern an Überwachungsgeräte",
|
||||
@@ -86,7 +99,13 @@
|
||||
"enableNotifications": "Benachrichtigungen Aktivieren",
|
||||
"checkingPermissions": "Berechtigungen prüfen...",
|
||||
"alertDistance": "Warnentfernung: ",
|
||||
"rangeInfo": "Bereich: {}-{} {} (Standard: {})"
|
||||
"rangeInfo": "Bereich: {}-{} {} (Standard: {})",
|
||||
"backgroundServiceTitle": "Näherungswarnungen aktiv",
|
||||
"backgroundServiceText": "Sucht nach Überwachungsgeräten in der Nähe",
|
||||
"backgroundServiceChannel": "Überwachung von Näherungswarnungen",
|
||||
"openSettings": "Einstellungen öffnen",
|
||||
"blockedTitle": "Benachrichtigungen sind blockiert",
|
||||
"blockedMessage": "Benachrichtigungen für DeFlock sind deaktiviert. Aktiviere sie in den Systemeinstellungen, um Näherungswarnungen zu erhalten."
|
||||
},
|
||||
"node": {
|
||||
"title": "Knoten #{}",
|
||||
@@ -95,7 +114,24 @@
|
||||
"editQueuedForUpload": "Knotenbearbeitung zum Upload eingereiht",
|
||||
"deleteQueuedForUpload": "Knoten-Löschung zum Upload eingereiht",
|
||||
"confirmDeleteTitle": "Knoten löschen",
|
||||
"confirmDeleteMessage": "Sind Sie sicher, dass Sie Knoten #{} löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden."
|
||||
"confirmDeleteMessage": "Sind Sie sicher, dass Sie Knoten #{} löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"deleteReasonLabel": "Grund für Löschung",
|
||||
"deleteReasonSelectHint": "Auswählen...",
|
||||
"deleteReasonDeviceRemoved": "Gerät entfernt",
|
||||
"deleteReasonDuplicateNode": "Doppelter Knoten",
|
||||
"deleteReasonMisidentifiedInfra": "Falsch identifizierte Infrastruktur",
|
||||
"deleteReasonSpamVandalism": "Spam/Vandalismus",
|
||||
"deleteReasonCustom": "Benutzerdefiniert..",
|
||||
"deleteReasonHint": "Bitte Grund beschreiben...",
|
||||
"mustBeLoggedInToDelete": "Sie müssen mit einem OpenStreetMap-Konto angemeldet sein, um Kartendaten beizutragen.",
|
||||
"uploadPending": "Ausstehender Upload",
|
||||
"uploadCreatingChangeset": "Changeset wird erstellt...",
|
||||
"uploadUploading": "Wird hochgeladen...",
|
||||
"uploadClosingChangeset": "Changeset wird geschlossen...",
|
||||
"uploadError": "Upload fehlgeschlagen",
|
||||
"uploadComplete": "Upload abgeschlossen",
|
||||
"viewInQueue": "In Warteschlange anzeigen",
|
||||
"deletedSuccessfully": "Dieser Knoten wurde erfolgreich von OpenStreetMap gelöscht."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
@@ -144,7 +180,10 @@
|
||||
"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: {}"
|
||||
"downloadFailed": "Download konnte nicht gestartet werden: {}",
|
||||
"offlineNotPermitted": "Der {}-Server erlaubt keine Offline-Downloads. Wechseln Sie zu einem Kachelanbieter, der Offline-Nutzung unterstützt (z. B. Bing Maps, Mapbox oder ein selbst gehosteter Kachelserver).",
|
||||
"currentTileProvider": "aktuelle Kachel",
|
||||
"noTileProviderSelected": "Kein Kachelanbieter ausgewählt. Bitte wählen Sie einen Kartenstil, bevor Sie einen Offlinebereich herunterladen."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download gestartet",
|
||||
@@ -197,7 +236,12 @@
|
||||
"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"
|
||||
"newChangesetComments": "Neuer Changeset-Kommentar",
|
||||
"newChangesetCommentsSubtitle": "Jemand hat einen oder mehrere Ihrer Changesets kommentiert",
|
||||
"reauthLater": "Später",
|
||||
"unreadNotificationsTitle": "Sie haben ungelesene Benachrichtigungen",
|
||||
"unreadNotificationsMessage": "Sie haben ungelesene OSM-Nachrichten und/oder neue Kommentare zu Ihren Changesets.",
|
||||
"unreadNotificationsView": "Jetzt ansehen"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Upload-Warteschlange",
|
||||
@@ -232,7 +276,11 @@
|
||||
"closingChangeset": " (Changeset schließen...)",
|
||||
"processingPaused": "Warteschlangenverarbeitung pausiert",
|
||||
"pausedDueToOffline": "Upload-Verarbeitung ist pausiert, da der Offline-Modus aktiviert ist.",
|
||||
"pausedByUser": "Upload-Verarbeitung ist manuell pausiert."
|
||||
"pausedByUser": "Upload-Verarbeitung ist manuell pausiert.",
|
||||
"inFlightWaitTitle": "Übermittlung wird abgeschlossen",
|
||||
"inFlightWaitMessage": "Eine Übermittlung läuft gerade und muss abgeschlossen werden, bevor diese Einstellung angewendet werden kann. Dies sollte nur einen Moment dauern.",
|
||||
"inFlightCompleteTitle": "Übermittlung Abgeschlossen",
|
||||
"inFlightCompleteMessage": "Ihre Übermittlung wurde erfolgreich abgeschlossen. Ihre Einstellung wird jetzt angewendet."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Kachel-Anbieter",
|
||||
@@ -244,6 +292,9 @@
|
||||
"addProvider": "Anbieter Hinzufügen",
|
||||
"deleteProvider": "Anbieter Löschen",
|
||||
"deleteProviderConfirm": "Sind Sie sicher, dass Sie \"{}\" löschen möchten?",
|
||||
"clearCaches": "Caches Leeren",
|
||||
"clearCachesConfirm": "Alle Kachel-Caches für \"{}\" löschen? Dies wird Speicherplatz freigeben, aber die Kacheln müssen beim Betrachten dieser Bereiche erneut heruntergeladen werden.",
|
||||
"cachesCleared": "Caches für \"{}\" geleert",
|
||||
"providerName": "Anbieter-Name",
|
||||
"providerNameHint": "z.B. Benutzerdefinierte Karten GmbH",
|
||||
"providerNameRequired": "Anbieter-Name ist erforderlich",
|
||||
@@ -292,13 +343,16 @@
|
||||
"addProfileChoiceMessage": "Wie möchten Sie ein Profil hinzufügen?",
|
||||
"createCustomProfile": "Benutzerdefiniertes Profil Erstellen",
|
||||
"createCustomProfileDescription": "Erstellen Sie ein Profil von Grund auf mit Ihren eigenen Tags",
|
||||
"importFromWebsite": "Von Webseite Importieren",
|
||||
"importFromWebsite": "Von Webseite Importieren",
|
||||
"importFromWebsiteDescription": "Profile von deflock.me/identify durchsuchen und importieren"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Karten-Kacheln",
|
||||
"manageProviders": "Anbieter Verwalten",
|
||||
"attribution": "Karten-Zuschreibung"
|
||||
"attribution": "Karten-Zuschreibung",
|
||||
"mapAttribution": "Kartenquelle: {}",
|
||||
"couldNotOpenLink": "Link konnte nicht geöffnet werden",
|
||||
"openLicense": "Lizenz öffnen: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Profil Anzeigen",
|
||||
@@ -313,6 +367,8 @@
|
||||
"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",
|
||||
"fov360": "360° Sichtfeld",
|
||||
"fov360Subtitle": "Kamera hat 360-Grad omnidirektionales Sichtfeld",
|
||||
"submittable": "Übertragbar",
|
||||
"submittableSubtitle": "Ob dieses Profil für Kamera-Übertragungen verwendet werden kann",
|
||||
"osmTags": "OSM-Tags",
|
||||
@@ -325,7 +381,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Neues Betreiber-Profil",
|
||||
"editOperatorProfile": "Betreiber-Profil Bearbeiten",
|
||||
"editOperatorProfile": "Betreiber-Profil Bearbeiten",
|
||||
"operatorName": "Betreiber-Name",
|
||||
"operatorNameHint": "z.B. Polizei Austin",
|
||||
"operatorNameRequired": "Betreiber-Name ist erforderlich",
|
||||
@@ -371,7 +427,11 @@
|
||||
"refreshNodesSubtitle": "Knotendaten für diesen Bereich erneut abrufen",
|
||||
"startRefresh": "Aktualisierung starten",
|
||||
"refreshStarted": "Aktualisierung gestartet!",
|
||||
"refreshFailed": "Aktualisierung fehlgeschlagen: {}"
|
||||
"refreshFailed": "Aktualisierung fehlgeschlagen: {}",
|
||||
"disableConfirmTitle": "Vorhandene Offline-Bereichsdaten löschen?",
|
||||
"disableConfirmMessage": "Sie haben bereits Offline-Bereichsdaten. Das Deaktivieren der Offline-Funktionen verhindert, dass die App diese verwendet. Möchten Sie diese Daten für den Fall behalten, dass Sie die Offline-Funktionen später wieder aktivieren, oder sie jetzt löschen, um Speicherplatz freizugeben?",
|
||||
"keepData": "Daten Behalten",
|
||||
"deleteData": "Daten Löschen"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Tags Verfeinern",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Verdächtige Standorte innerhalb von {} 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",
|
||||
"hoursAgo": "vor {} Stunden",
|
||||
"minutesAgo": "vor {} Minuten",
|
||||
"justNow": "Gerade eben"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Verdächtiger Standort #{}",
|
||||
"ticketNo": "Ticket-Nr.",
|
||||
"address": "Adresse",
|
||||
"street": "Straße",
|
||||
"street": "Straße",
|
||||
"city": "Stadt",
|
||||
"state": "Bundesland",
|
||||
"intersectingStreet": "Kreuzende Straße",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Metrisch (km, m)",
|
||||
"imperialDescription": "Imperial (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
+76
-16
@@ -70,7 +70,7 @@
|
||||
"submitAnyway": "Submit Anyway",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR Camera",
|
||||
"publicCamera": "Public Surveillance Camera",
|
||||
"publicCamera": "Public Surveillance Camera",
|
||||
"camera": "Surveillance Camera",
|
||||
"amenity": "{}",
|
||||
"device": "{} Device",
|
||||
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "Advanced Settings",
|
||||
"advancedSettingsSubtitle": "Performance, alerts, and tile provider settings",
|
||||
"proximityAlerts": "Proximity Alerts",
|
||||
"networkStatusIndicator": "Network Status Indicator"
|
||||
"networkStatusIndicator": "Network Status Indicator",
|
||||
"keepScreenAwake": "Keep Screen Awake",
|
||||
"hideZoomControls": "Hide Zoom Controls",
|
||||
"enableOfflineFeatures": "Enable Offline Features",
|
||||
"enableOfflineFeaturesTitle": "Enable offline features",
|
||||
"enableOfflineFeaturesSubtitle": "Allow downloading and using offline map areas. When disabled, offline mode and downloaded areas are unavailable."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Keep screen awake while using app",
|
||||
"subtitle": "Prevents the screen from turning off automatically while using the app"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Hide zoom controls",
|
||||
"subtitle": "Hide the +/- zoom buttons and zoom level indicator. You can still zoom with pinch gestures."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Get notified when approaching surveillance devices",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "Enable Notifications",
|
||||
"checkingPermissions": "Checking permissions...",
|
||||
"alertDistance": "Alert distance: ",
|
||||
"rangeInfo": "Range: {}-{} {} (default: {})"
|
||||
"rangeInfo": "Range: {}-{} {} (default: {})",
|
||||
"backgroundServiceTitle": "Proximity alerts active",
|
||||
"backgroundServiceText": "Watching for nearby surveillance devices",
|
||||
"backgroundServiceChannel": "Proximity Alert Monitoring",
|
||||
"openSettings": "Open Settings",
|
||||
"blockedTitle": "Notifications are blocked",
|
||||
"blockedMessage": "Notifications are turned off for DeFlock. Enable them in your system settings to receive proximity alerts."
|
||||
},
|
||||
"node": {
|
||||
"title": "Node #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "Node edit queued for upload",
|
||||
"deleteQueuedForUpload": "Node deletion queued for upload",
|
||||
"confirmDeleteTitle": "Delete Node",
|
||||
"confirmDeleteMessage": "Are you sure you want to delete node #{}? This action cannot be undone."
|
||||
"confirmDeleteMessage": "Are you sure you want to delete node #{}? This action cannot be undone.",
|
||||
"deleteReasonLabel": "Reason for Deletion",
|
||||
"deleteReasonSelectHint": "Select...",
|
||||
"deleteReasonDeviceRemoved": "Device removed",
|
||||
"deleteReasonDuplicateNode": "Duplicate node",
|
||||
"deleteReasonMisidentifiedInfra": "Misidentified infra",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalism",
|
||||
"deleteReasonCustom": "Custom..",
|
||||
"deleteReasonHint": "Please describe the reason...",
|
||||
"mustBeLoggedInToDelete": "You must be logged in with an OpenStreetMap account to contribute map data.",
|
||||
"uploadPending": "Pending upload",
|
||||
"uploadCreatingChangeset": "Creating changeset...",
|
||||
"uploadUploading": "Uploading...",
|
||||
"uploadClosingChangeset": "Closing changeset...",
|
||||
"uploadError": "Upload failed",
|
||||
"uploadComplete": "Upload complete",
|
||||
"viewInQueue": "View in Queue",
|
||||
"deletedSuccessfully": "This node was successfully deleted from OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profile",
|
||||
@@ -181,7 +217,10 @@
|
||||
"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: {}"
|
||||
"downloadFailed": "Failed to start download: {}",
|
||||
"offlineNotPermitted": "The {} server does not permit offline downloads. Switch to a tile provider that allows offline use (e.g., Bing Maps, Mapbox, or a self-hosted tile server).",
|
||||
"currentTileProvider": "current tile",
|
||||
"noTileProviderSelected": "No tile provider is selected. Please select a map style before downloading an offline area."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Started",
|
||||
@@ -230,11 +269,16 @@
|
||||
"viewMessages": "View Messages on OSM",
|
||||
"unreadMessagesCount": "You have {} unread messages",
|
||||
"noUnreadMessages": "No unread messages",
|
||||
"newChangesetComments": "New Changeset Comment",
|
||||
"newChangesetCommentsSubtitle": "Someone commented on one or more of your changesets",
|
||||
"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"
|
||||
"reauthLater": "Later",
|
||||
"unreadNotificationsTitle": "You Have Unread Notifications",
|
||||
"unreadNotificationsMessage": "You have unread OSM messages and/or new comments on your changesets.",
|
||||
"unreadNotificationsView": "View Now"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Upload Queue",
|
||||
@@ -269,7 +313,11 @@
|
||||
"closingChangeset": " (Closing changeset...)",
|
||||
"processingPaused": "Queue Processing Paused",
|
||||
"pausedDueToOffline": "Upload processing is paused because offline mode is enabled.",
|
||||
"pausedByUser": "Upload processing is manually paused."
|
||||
"pausedByUser": "Upload processing is manually paused.",
|
||||
"inFlightWaitTitle": "Finishing Submission",
|
||||
"inFlightWaitMessage": "A submission is currently in progress and needs to finish before this setting can be applied. This should only take a moment.",
|
||||
"inFlightCompleteTitle": "Submission Complete",
|
||||
"inFlightCompleteMessage": "Your submission finished successfully. Applying your setting now."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Tile Providers",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "Add Provider",
|
||||
"deleteProvider": "Delete Provider",
|
||||
"deleteProviderConfirm": "Are you sure you want to delete \"{}\"?",
|
||||
"clearCaches": "Clear Caches",
|
||||
"clearCachesConfirm": "Clear all tile caches for \"{}\"? This will free up storage space but tiles will need to be downloaded again when viewing those areas.",
|
||||
"cachesCleared": "Caches cleared for \"{}\"",
|
||||
"providerName": "Provider Name",
|
||||
"providerNameHint": "e.g., Custom Maps Inc.",
|
||||
"providerNameRequired": "Provider name is required",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "How would you like to add a profile?",
|
||||
"createCustomProfile": "Create Custom Profile",
|
||||
"createCustomProfileDescription": "Build a profile from scratch with your own tags",
|
||||
"importFromWebsite": "Import from Website",
|
||||
"importFromWebsite": "Import from Website",
|
||||
"importFromWebsiteDescription": "Browse and import profiles from deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Map Tiles",
|
||||
"manageProviders": "Manage Providers",
|
||||
"attribution": "Map Attribution"
|
||||
"attribution": "Map Attribution",
|
||||
"mapAttribution": "Map attribution: {}",
|
||||
"couldNotOpenLink": "Could not open link",
|
||||
"openLicense": "Open license: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "View Profile",
|
||||
@@ -350,6 +404,8 @@
|
||||
"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",
|
||||
"fov360": "360 FOV",
|
||||
"fov360Subtitle": "Camera has 360-degree omnidirectional field of view",
|
||||
"submittable": "Submittable",
|
||||
"submittableSubtitle": "Whether this profile can be used for camera submissions",
|
||||
"osmTags": "OSM Tags",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "New Operator Profile",
|
||||
"editOperatorProfile": "Edit Operator Profile",
|
||||
"editOperatorProfile": "Edit Operator Profile",
|
||||
"operatorName": "Operator name",
|
||||
"operatorNameHint": "e.g., Austin Police Department",
|
||||
"operatorNameRequired": "Operator name is required",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "Re-fetch node data for this area",
|
||||
"startRefresh": "Start Refresh",
|
||||
"refreshStarted": "Refresh started!",
|
||||
"refreshFailed": "Refresh failed: {}"
|
||||
"refreshFailed": "Refresh failed: {}",
|
||||
"disableConfirmTitle": "Delete Existing Offline Area Data?",
|
||||
"disableConfirmMessage": "You have existing offline area data. Disabling offline features will stop the app from using it. Would you like to keep this data on disk in case you re-enable offline features later, or delete it now to free up storage space?",
|
||||
"keepData": "Keep Data",
|
||||
"deleteData": "Delete Data"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Refine Tags",
|
||||
@@ -443,7 +503,7 @@
|
||||
"mobileEditors": "Mobile Editors",
|
||||
"iDEditor": "iD Editor",
|
||||
"iDEditorSubtitle": "Full-featured web editor - always works",
|
||||
"rapidEditor": "RapiD Editor",
|
||||
"rapidEditor": "RapiD Editor",
|
||||
"rapidEditorSubtitle": "AI-assisted editing with Facebook data",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Advanced Android OSM editor",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Hide suspected locations within {} 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",
|
||||
"hoursAgo": "{} hours ago",
|
||||
"minutesAgo": "{} minutes ago",
|
||||
"justNow": "Just now"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Suspected Location #{}",
|
||||
"ticketNo": "Ticket No",
|
||||
"address": "Address",
|
||||
"street": "Street",
|
||||
"street": "Street",
|
||||
"city": "City",
|
||||
"state": "State",
|
||||
"intersectingStreet": "Intersecting Street",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Metric (km, m)",
|
||||
"imperialDescription": "Imperial (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
-14
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "Configuración Avanzada",
|
||||
"advancedSettingsSubtitle": "Configuración de rendimiento, alertas y proveedores de teselas",
|
||||
"proximityAlerts": "Alertas de Proximidad",
|
||||
"networkStatusIndicator": "Indicador de Estado de Red"
|
||||
"keepScreenAwake": "Mantener la Pantalla Encendida",
|
||||
"networkStatusIndicator": "Indicador de Estado de Red",
|
||||
"hideZoomControls": "Ocultar Controles de Zoom",
|
||||
"enableOfflineFeatures": "Activar Funciones sin Conexión",
|
||||
"enableOfflineFeaturesTitle": "Activar funciones sin conexión",
|
||||
"enableOfflineFeaturesSubtitle": "Permitir descargar y usar áreas de mapa sin conexión. Si se desactiva, el modo sin conexión y las áreas descargadas no estarán disponibles."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Mantener la pantalla encendida mientras se usa la app",
|
||||
"subtitle": "Evita que la pantalla se apague automáticamente mientras se usa la app"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Ocultar controles de zoom",
|
||||
"subtitle": "Oculta los botones de zoom +/- y el indicador de nivel de zoom. Aún puedes hacer zoom con gestos de pellizco."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Recibe notificaciones al acercarte a dispositivos de vigilancia",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "Habilitar Notificaciones",
|
||||
"checkingPermissions": "Verificando permisos...",
|
||||
"alertDistance": "Distancia de alerta: ",
|
||||
"rangeInfo": "Rango: {}-{} {} (predeterminado: {})"
|
||||
"rangeInfo": "Rango: {}-{} {} (predeterminado: {})",
|
||||
"backgroundServiceTitle": "Alertas de proximidad activas",
|
||||
"backgroundServiceText": "Buscando dispositivos de vigilancia cercanos",
|
||||
"backgroundServiceChannel": "Monitoreo de alertas de proximidad",
|
||||
"openSettings": "Abrir ajustes",
|
||||
"blockedTitle": "Las notificaciones están bloqueadas",
|
||||
"blockedMessage": "Las notificaciones están desactivadas para DeFlock. Actívalas en los ajustes del sistema para recibir alertas de proximidad."
|
||||
},
|
||||
"node": {
|
||||
"title": "Nodo #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "Edición de nodo en cola para subir",
|
||||
"deleteQueuedForUpload": "Eliminación de nodo en cola para subir",
|
||||
"confirmDeleteTitle": "Eliminar Nodo",
|
||||
"confirmDeleteMessage": "¿Estás seguro de que quieres eliminar el nodo #{}? Esta acción no se puede deshacer."
|
||||
"confirmDeleteMessage": "¿Estás seguro de que quieres eliminar el nodo #{}? Esta acción no se puede deshacer.",
|
||||
"deleteReasonLabel": "Razón para Eliminación",
|
||||
"deleteReasonSelectHint": "Seleccionar...",
|
||||
"deleteReasonDeviceRemoved": "Dispositivo removido",
|
||||
"deleteReasonDuplicateNode": "Nodo duplicado",
|
||||
"deleteReasonMisidentifiedInfra": "Infraestructura mal identificada",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalismo",
|
||||
"deleteReasonCustom": "Personalizado..",
|
||||
"deleteReasonHint": "Por favor describa la razón...",
|
||||
"mustBeLoggedInToDelete": "Debes iniciar sesión con una cuenta de OpenStreetMap para contribuir con datos del mapa.",
|
||||
"uploadPending": "Subida pendiente",
|
||||
"uploadCreatingChangeset": "Creando changeset...",
|
||||
"uploadUploading": "Subiendo...",
|
||||
"uploadClosingChangeset": "Cerrando changeset...",
|
||||
"uploadError": "Error al subir",
|
||||
"uploadComplete": "Subida completada",
|
||||
"viewInQueue": "Ver en la Cola",
|
||||
"deletedSuccessfully": "Este nodo fue eliminado con éxito de OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Perfil",
|
||||
@@ -181,7 +217,10 @@
|
||||
"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: {}"
|
||||
"downloadFailed": "Error al iniciar la descarga: {}",
|
||||
"offlineNotPermitted": "El servidor {} no permite descargas sin conexión. Cambie a un proveedor de mosaicos que permita el uso sin conexión (p. ej., Bing Maps, Mapbox o un servidor de mosaicos propio).",
|
||||
"currentTileProvider": "mosaico actual",
|
||||
"noTileProviderSelected": "No hay proveedor de mosaicos seleccionado. Seleccione un estilo de mapa antes de descargar un área sin conexión."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Descarga Iniciada",
|
||||
@@ -234,7 +273,12 @@
|
||||
"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"
|
||||
"newChangesetComments": "Nuevo Comentario en Changeset",
|
||||
"newChangesetCommentsSubtitle": "Alguien comentó en uno o más de tus changesets",
|
||||
"reauthLater": "Más Tarde",
|
||||
"unreadNotificationsTitle": "Tienes Notificaciones Sin Leer",
|
||||
"unreadNotificationsMessage": "Tienes mensajes de OSM sin leer y/o nuevos comentarios en tus changesets.",
|
||||
"unreadNotificationsView": "Ver Ahora"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Cola de Subida",
|
||||
@@ -269,7 +313,11 @@
|
||||
"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."
|
||||
"pausedByUser": "El procesamiento de subida está pausado manualmente.",
|
||||
"inFlightWaitTitle": "Finalizando Envío",
|
||||
"inFlightWaitMessage": "Actualmente hay un envío en curso que debe finalizar antes de que se pueda aplicar esta configuración. Esto solo debería tomar un momento.",
|
||||
"inFlightCompleteTitle": "Envío Completado",
|
||||
"inFlightCompleteMessage": "Su envío finalizó exitosamente. Aplicando su configuración ahora."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Proveedores de Tiles",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "Agregar Proveedor",
|
||||
"deleteProvider": "Eliminar Proveedor",
|
||||
"deleteProviderConfirm": "¿Está seguro de que desea eliminar \"{}\"?",
|
||||
"clearCaches": "Limpiar Caché",
|
||||
"clearCachesConfirm": "¿Limpiar todo el caché de mosaicos para \"{}\"? Esto liberará espacio de almacenamiento pero los mosaicos deberán descargarse nuevamente al ver esas áreas.",
|
||||
"cachesCleared": "Caché limpiado para \"{}\"",
|
||||
"providerName": "Nombre del Proveedor",
|
||||
"providerNameHint": "ej., Mapas Personalizados Inc.",
|
||||
"providerNameRequired": "El nombre del proveedor es requerido",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "¿Cómo desea añadir un perfil?",
|
||||
"createCustomProfile": "Crear Perfil Personalizado",
|
||||
"createCustomProfileDescription": "Crear un perfil desde cero con sus propias etiquetas",
|
||||
"importFromWebsite": "Importar desde Sitio Web",
|
||||
"importFromWebsite": "Importar desde Sitio Web",
|
||||
"importFromWebsiteDescription": "Explorar e importar perfiles desde deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tiles de Mapa",
|
||||
"manageProviders": "Gestionar Proveedores",
|
||||
"attribution": "Atribución del Mapa"
|
||||
"attribution": "Atribución del Mapa",
|
||||
"mapAttribution": "Atribución del mapa: {}",
|
||||
"couldNotOpenLink": "No se pudo abrir el enlace",
|
||||
"openLicense": "Abrir licencia: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Ver Perfil",
|
||||
@@ -350,6 +404,8 @@
|
||||
"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",
|
||||
"fov360": "Campo de Visión 360°",
|
||||
"fov360Subtitle": "La cámara tiene un campo de visión omnidireccional de 360 grados",
|
||||
"submittable": "Envíable",
|
||||
"submittableSubtitle": "Si este perfil puede usarse para envíos de cámaras",
|
||||
"osmTags": "Etiquetas OSM",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Nuevo Perfil de Operador",
|
||||
"editOperatorProfile": "Editar Perfil de Operador",
|
||||
"editOperatorProfile": "Editar Perfil de Operador",
|
||||
"operatorName": "Nombre del operador",
|
||||
"operatorNameHint": "ej., Departamento de Policía de Austin",
|
||||
"operatorNameRequired": "El nombre del operador es requerido",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "Volver a obtener datos de nodos para esta área",
|
||||
"startRefresh": "Iniciar Actualización",
|
||||
"refreshStarted": "¡Actualización iniciada!",
|
||||
"refreshFailed": "Actualización falló: {}"
|
||||
"refreshFailed": "Actualización falló: {}",
|
||||
"disableConfirmTitle": "¿Eliminar Datos de Áreas sin Conexión Existentes?",
|
||||
"disableConfirmMessage": "Ya tiene datos de áreas sin conexión existentes. Desactivar las funciones sin conexión evitará que la app los use. ¿Desea conservar estos datos en el dispositivo por si reactiva las funciones sin conexión más tarde, o eliminarlos ahora para liberar espacio de almacenamiento?",
|
||||
"keepData": "Conservar Datos",
|
||||
"deleteData": "Eliminar Datos"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Refinar Etiquetas",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Ocultar ubicaciones sospechosas dentro de {} 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",
|
||||
"hoursAgo": "hace {} horas",
|
||||
"minutesAgo": "hace {} minutos",
|
||||
"justNow": "Ahora mismo"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Ubicación Sospechosa #{}",
|
||||
"ticketNo": "No. de Ticket",
|
||||
"address": "Dirección",
|
||||
"street": "Calle",
|
||||
"street": "Calle",
|
||||
"city": "Ciudad",
|
||||
"state": "Estado",
|
||||
"intersectingStreet": "Calle que Intersecta",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Métrico (km, m)",
|
||||
"imperialDescription": "Imperial (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
-14
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "Paramètres Avancés",
|
||||
"advancedSettingsSubtitle": "Paramètres de performance, alertes et fournisseurs de tuiles",
|
||||
"proximityAlerts": "Alertes de Proximité",
|
||||
"networkStatusIndicator": "Indicateur de Statut Réseau"
|
||||
"keepScreenAwake": "Maintenir l'écran Allumé",
|
||||
"networkStatusIndicator": "Indicateur de Statut Réseau",
|
||||
"hideZoomControls": "Masquer les Contrôles de Zoom",
|
||||
"enableOfflineFeatures": "Activer les Fonctionnalités Hors Ligne",
|
||||
"enableOfflineFeaturesTitle": "Activer les fonctionnalités hors ligne",
|
||||
"enableOfflineFeaturesSubtitle": "Autoriser le téléchargement et l'utilisation de zones de carte hors ligne. Si désactivé, le mode hors ligne et les zones téléchargées ne seront pas disponibles."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Maintenir l'écran allumé lors de l'utilisation de l'application",
|
||||
"subtitle": "Empêche l'écran de s'éteindre automatiquement pendant l'utilisation de l'application"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Masquer les contrôles de zoom",
|
||||
"subtitle": "Masque les boutons de zoom +/- et l'indicateur de niveau de zoom. Vous pouvez toujours zoomer avec des gestes de pincement."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Recevoir des notifications en s'approchant de dispositifs de surveillance",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "Activer les Notifications",
|
||||
"checkingPermissions": "Vérification des autorisations...",
|
||||
"alertDistance": "Distance d'alerte : ",
|
||||
"rangeInfo": "Plage : {}-{} {} (par défaut : {})"
|
||||
"rangeInfo": "Plage : {}-{} {} (par défaut : {})",
|
||||
"backgroundServiceTitle": "Alertes de proximité actives",
|
||||
"backgroundServiceText": "Recherche d'appareils de surveillance à proximité",
|
||||
"backgroundServiceChannel": "Surveillance des alertes de proximité",
|
||||
"openSettings": "Ouvrir les réglages",
|
||||
"blockedTitle": "Les notifications sont bloquées",
|
||||
"blockedMessage": "Les notifications sont désactivées pour DeFlock. Activez-les dans les réglages du système pour recevoir les alertes de proximité."
|
||||
},
|
||||
"node": {
|
||||
"title": "Nœud #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "Modification de nœud mise en file pour envoi",
|
||||
"deleteQueuedForUpload": "Suppression de nœud mise en file pour envoi",
|
||||
"confirmDeleteTitle": "Supprimer le Nœud",
|
||||
"confirmDeleteMessage": "Êtes-vous sûr de vouloir supprimer le nœud #{} ? Cette action ne peut pas être annulée."
|
||||
"confirmDeleteMessage": "Êtes-vous sûr de vouloir supprimer le nœud #{} ? Cette action ne peut pas être annulée.",
|
||||
"deleteReasonLabel": "Raison de Suppression",
|
||||
"deleteReasonSelectHint": "Sélectionner...",
|
||||
"deleteReasonDeviceRemoved": "Appareil retiré",
|
||||
"deleteReasonDuplicateNode": "Nœud dupliqué",
|
||||
"deleteReasonMisidentifiedInfra": "Infrastructure mal identifiée",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalisme",
|
||||
"deleteReasonCustom": "Personnalisé..",
|
||||
"deleteReasonHint": "Veuillez décrire la raison...",
|
||||
"mustBeLoggedInToDelete": "Vous devez être connecté avec un compte OpenStreetMap pour contribuer aux données cartographiques.",
|
||||
"uploadPending": "Téléchargement en attente",
|
||||
"uploadCreatingChangeset": "Création du changeset...",
|
||||
"uploadUploading": "Téléchargement en cours...",
|
||||
"uploadClosingChangeset": "Fermeture du changeset...",
|
||||
"uploadError": "Échec du téléchargement",
|
||||
"uploadComplete": "Téléchargement terminé",
|
||||
"viewInQueue": "Voir dans la File d'Attente",
|
||||
"deletedSuccessfully": "Ce nœud a été supprimé avec succès d'OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
@@ -181,7 +217,10 @@
|
||||
"offlineModeWarning": "Téléchargements désactivés en mode hors ligne. Désactivez le mode hors ligne pour télécharger de nouvelles zones.",
|
||||
"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: {}"
|
||||
"downloadFailed": "Échec du démarrage du téléchargement: {}",
|
||||
"offlineNotPermitted": "Le serveur {} ne permet pas les téléchargements hors ligne. Passez à un fournisseur de tuiles qui autorise l'utilisation hors ligne (par ex., Bing Maps, Mapbox ou un serveur de tuiles auto-hébergé).",
|
||||
"currentTileProvider": "tuile actuelle",
|
||||
"noTileProviderSelected": "Aucun fournisseur de tuiles sélectionné. Veuillez choisir un style de carte avant de télécharger une zone hors ligne."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Téléchargement Démarré",
|
||||
@@ -234,7 +273,12 @@
|
||||
"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"
|
||||
"newChangesetComments": "Nouveau Commentaire de Changeset",
|
||||
"newChangesetCommentsSubtitle": "Quelqu'un a commenté un ou plusieurs de vos changesets",
|
||||
"reauthLater": "Plus Tard",
|
||||
"unreadNotificationsTitle": "Vous Avez des Notifications Non Lues",
|
||||
"unreadNotificationsMessage": "Vous avez des messages OSM non lus et/ou de nouveaux commentaires sur vos changesets.",
|
||||
"unreadNotificationsView": "Voir Maintenant"
|
||||
},
|
||||
"queue": {
|
||||
"title": "File de Téléchargement",
|
||||
@@ -269,7 +313,11 @@
|
||||
"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."
|
||||
"pausedByUser": "Le traitement des téléversements est interrompu manuellement.",
|
||||
"inFlightWaitTitle": "Finalisation de la Soumission",
|
||||
"inFlightWaitMessage": "Une soumission est actuellement en cours et doit se terminer avant que ce paramètre puisse être appliqué. Cela ne devrait prendre qu'un instant.",
|
||||
"inFlightCompleteTitle": "Soumission Terminée",
|
||||
"inFlightCompleteMessage": "Votre soumission s'est terminée avec succès. Application de votre paramètre maintenant."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Fournisseurs de Tuiles",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "Ajouter Fournisseur",
|
||||
"deleteProvider": "Supprimer Fournisseur",
|
||||
"deleteProviderConfirm": "Êtes-vous sûr de vouloir supprimer \"{}\"?",
|
||||
"clearCaches": "Vider les Caches",
|
||||
"clearCachesConfirm": "Vider tous les caches de tuiles pour \"{}\"? Cela libérera de l'espace de stockage mais les tuiles devront être téléchargées à nouveau lors de la consultation de ces zones.",
|
||||
"cachesCleared": "Caches vidés pour \"{}\"",
|
||||
"providerName": "Nom du Fournisseur",
|
||||
"providerNameHint": "ex., Cartes Personnalisées Inc.",
|
||||
"providerNameRequired": "Le nom du fournisseur est requis",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "Comment souhaitez-vous ajouter un profil?",
|
||||
"createCustomProfile": "Créer Profil Personnalisé",
|
||||
"createCustomProfileDescription": "Créer un profil à partir de zéro avec vos propres balises",
|
||||
"importFromWebsite": "Importer depuis Site Web",
|
||||
"importFromWebsite": "Importer depuis Site Web",
|
||||
"importFromWebsiteDescription": "Parcourir et importer des profils depuis deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tuiles de Carte",
|
||||
"manageProviders": "Gérer Fournisseurs",
|
||||
"attribution": "Attribution de Carte"
|
||||
"attribution": "Attribution de Carte",
|
||||
"mapAttribution": "Attribution de la carte : {}",
|
||||
"couldNotOpenLink": "Impossible d'ouvrir le lien",
|
||||
"openLicense": "Ouvrir la licence : {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Voir Profil",
|
||||
@@ -350,6 +404,8 @@
|
||||
"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",
|
||||
"fov360": "Champ de Vision 360°",
|
||||
"fov360Subtitle": "La caméra a un champ de vision omnidirectionnel de 360 degrés",
|
||||
"submittable": "Soumissible",
|
||||
"submittableSubtitle": "Si ce profil peut être utilisé pour les soumissions de caméras",
|
||||
"osmTags": "Balises OSM",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Nouveau Profil d'Opérateur",
|
||||
"editOperatorProfile": "Modifier Profil d'Opérateur",
|
||||
"editOperatorProfile": "Modifier Profil d'Opérateur",
|
||||
"operatorName": "Nom de l'opérateur",
|
||||
"operatorNameHint": "ex., Département de Police d'Austin",
|
||||
"operatorNameRequired": "Le nom de l'opérateur est requis",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "Récupérer à nouveau les données de nœuds pour cette zone",
|
||||
"startRefresh": "Démarrer l'Actualisation",
|
||||
"refreshStarted": "Actualisation démarrée !",
|
||||
"refreshFailed": "Actualisation échouée : {}"
|
||||
"refreshFailed": "Actualisation échouée : {}",
|
||||
"disableConfirmTitle": "Supprimer les Données de Zones Hors Ligne Existantes ?",
|
||||
"disableConfirmMessage": "Vous avez déjà des données de zones hors ligne. Désactiver les fonctionnalités hors ligne empêchera l'application de les utiliser. Souhaitez-vous conserver ces données sur l'appareil au cas où vous réactiveriez les fonctionnalités hors ligne plus tard, ou les supprimer maintenant pour libérer de l'espace de stockage ?",
|
||||
"keepData": "Conserver les Données",
|
||||
"deleteData": "Supprimer les Données"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Affiner les Étiquettes",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Masquer les emplacements suspects dans un rayon de {} 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",
|
||||
"hoursAgo": "il y a {} heures",
|
||||
"minutesAgo": "il y a {} minutes",
|
||||
"justNow": "À l'instant"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Emplacement Suspect #{}",
|
||||
"ticketNo": "N° de Ticket",
|
||||
"address": "Adresse",
|
||||
"street": "Rue",
|
||||
"street": "Rue",
|
||||
"city": "Ville",
|
||||
"state": "État",
|
||||
"intersectingStreet": "Rue Transversale",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Métrique (km, m)",
|
||||
"imperialDescription": "Impérial (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
-14
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "Impostazioni Avanzate",
|
||||
"advancedSettingsSubtitle": "Impostazioni di prestazioni, avvisi e fornitori di tessere",
|
||||
"proximityAlerts": "Avvisi di Prossimità",
|
||||
"networkStatusIndicator": "Indicatore di Stato di Rete"
|
||||
"keepScreenAwake": "Mantieni lo Schermo Attivo",
|
||||
"networkStatusIndicator": "Indicatore di Stato di Rete",
|
||||
"hideZoomControls": "Nascondi Controlli Zoom",
|
||||
"enableOfflineFeatures": "Abilita Funzionalità Offline",
|
||||
"enableOfflineFeaturesTitle": "Abilita funzionalità offline",
|
||||
"enableOfflineFeaturesSubtitle": "Consenti il download e l'uso di aree mappa offline. Se disabilitato, la modalità offline e le aree scaricate non saranno disponibili."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Mantieni lo schermo attivo durante l'utilizzo dell'app",
|
||||
"subtitle": "Impedisce allo schermo di spegnersi automaticamente durante l'utilizzo dell'app"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Nascondi i controlli dello zoom",
|
||||
"subtitle": "Nasconde i pulsanti di zoom +/- e l'indicatore del livello di zoom. Puoi ancora usare i gesti di pizzico per lo zoom."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Ricevi notifiche quando ti avvicini a dispositivi di sorveglianza",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "Abilita Notifiche",
|
||||
"checkingPermissions": "Controllo autorizzazioni...",
|
||||
"alertDistance": "Distanza di avviso: ",
|
||||
"rangeInfo": "Intervallo: {}-{} {} (predefinito: {})"
|
||||
"rangeInfo": "Intervallo: {}-{} {} (predefinito: {})",
|
||||
"backgroundServiceTitle": "Avvisi di prossimità attivi",
|
||||
"backgroundServiceText": "Ricerca di dispositivi di sorveglianza nelle vicinanze",
|
||||
"backgroundServiceChannel": "Monitoraggio avvisi di prossimità",
|
||||
"openSettings": "Apri impostazioni",
|
||||
"blockedTitle": "Le notifiche sono bloccate",
|
||||
"blockedMessage": "Le notifiche sono disattivate per DeFlock. Attivale nelle impostazioni di sistema per ricevere gli avvisi di prossimità."
|
||||
},
|
||||
"node": {
|
||||
"title": "Nodo #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "Modifica nodo in coda per il caricamento",
|
||||
"deleteQueuedForUpload": "Eliminazione nodo in coda per il caricamento",
|
||||
"confirmDeleteTitle": "Elimina Nodo",
|
||||
"confirmDeleteMessage": "Sei sicuro di voler eliminare il nodo #{}? Questa azione non può essere annullata."
|
||||
"confirmDeleteMessage": "Sei sicuro di voler eliminare il nodo #{}? Questa azione non può essere annullata.",
|
||||
"deleteReasonLabel": "Motivo per Eliminazione",
|
||||
"deleteReasonSelectHint": "Seleziona...",
|
||||
"deleteReasonDeviceRemoved": "Dispositivo rimosso",
|
||||
"deleteReasonDuplicateNode": "Nodo duplicato",
|
||||
"deleteReasonMisidentifiedInfra": "Infrastruttura identificata erroneamente",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalismo",
|
||||
"deleteReasonCustom": "Personalizzato..",
|
||||
"deleteReasonHint": "Descrivi il motivo...",
|
||||
"mustBeLoggedInToDelete": "Devi aver effettuato l'accesso con un account OpenStreetMap per contribuire ai dati della mappa.",
|
||||
"uploadPending": "Caricamento in sospeso",
|
||||
"uploadCreatingChangeset": "Creazione changeset...",
|
||||
"uploadUploading": "Caricamento...",
|
||||
"uploadClosingChangeset": "Chiusura changeset...",
|
||||
"uploadError": "Caricamento fallito",
|
||||
"uploadComplete": "Caricamento completato",
|
||||
"viewInQueue": "Visualizza in Coda",
|
||||
"deletedSuccessfully": "Questo nodo è stato eliminato con successo da OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profilo",
|
||||
@@ -181,7 +217,10 @@
|
||||
"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: {}"
|
||||
"downloadFailed": "Impossibile avviare il download: {}",
|
||||
"offlineNotPermitted": "Il server {} non consente i download offline. Passa a un fornitore di tile che consenta l'uso offline (ad es., Bing Maps, Mapbox o un server di tile auto-ospitato).",
|
||||
"currentTileProvider": "tile attuale",
|
||||
"noTileProviderSelected": "Nessun provider di tile selezionato. Seleziona uno stile di mappa prima di scaricare un'area offline."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Avviato",
|
||||
@@ -234,7 +273,12 @@
|
||||
"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"
|
||||
"newChangesetComments": "Nuovo Commento al Changeset",
|
||||
"newChangesetCommentsSubtitle": "Qualcuno ha commentato uno o più dei tuoi changeset",
|
||||
"reauthLater": "Più Tardi",
|
||||
"unreadNotificationsTitle": "Hai Notifiche Non Lette",
|
||||
"unreadNotificationsMessage": "Hai messaggi OSM non letti e/o nuovi commenti sui tuoi changeset.",
|
||||
"unreadNotificationsView": "Visualizza Ora"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Coda di Upload",
|
||||
@@ -269,7 +313,11 @@
|
||||
"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."
|
||||
"pausedByUser": "L'elaborazione dei caricamenti è sospesa manualmente.",
|
||||
"inFlightWaitTitle": "Completamento Invio",
|
||||
"inFlightWaitMessage": "Un invio è attualmente in corso e deve terminare prima che questa impostazione possa essere applicata. Questo dovrebbe richiedere solo un momento.",
|
||||
"inFlightCompleteTitle": "Invio Completato",
|
||||
"inFlightCompleteMessage": "Il tuo invio è terminato con successo. Applicazione della tua impostazione in corso."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Fornitori di Tile",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "Aggiungi Fornitore",
|
||||
"deleteProvider": "Elimina Fornitore",
|
||||
"deleteProviderConfirm": "Sei sicuro di voler eliminare \"{}\"?",
|
||||
"clearCaches": "Svuota Cache",
|
||||
"clearCachesConfirm": "Svuotare tutte le cache delle tessere per \"{}\"? Questo libererà spazio di archiviazione ma le tessere dovranno essere scaricate nuovamente quando si visualizzano quelle aree.",
|
||||
"cachesCleared": "Cache svuotate per \"{}\"",
|
||||
"providerName": "Nome Fornitore",
|
||||
"providerNameHint": "es., Mappe Personalizzate Inc.",
|
||||
"providerNameRequired": "Il nome del fornitore è obbligatorio",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "Come desideri aggiungere un profilo?",
|
||||
"createCustomProfile": "Crea Profilo Personalizzato",
|
||||
"createCustomProfileDescription": "Crea un profilo da zero con i tuoi tag",
|
||||
"importFromWebsite": "Importa da Sito Web",
|
||||
"importFromWebsite": "Importa da Sito Web",
|
||||
"importFromWebsiteDescription": "Sfoglia e importa profili da deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tile Mappa",
|
||||
"manageProviders": "Gestisci Fornitori",
|
||||
"attribution": "Attribuzione Mappa"
|
||||
"attribution": "Attribuzione Mappa",
|
||||
"mapAttribution": "Attribuzione mappa: {}",
|
||||
"couldNotOpenLink": "Impossibile aprire il link",
|
||||
"openLicense": "Apri licenza: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Visualizza Profilo",
|
||||
@@ -350,6 +404,8 @@
|
||||
"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",
|
||||
"fov360": "Campo Visivo 360°",
|
||||
"fov360Subtitle": "La telecamera ha un campo visivo omnidirezionale di 360 gradi",
|
||||
"submittable": "Inviabile",
|
||||
"submittableSubtitle": "Se questo profilo può essere usato per invii di telecamere",
|
||||
"osmTags": "Tag OSM",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Nuovo Profilo Operatore",
|
||||
"editOperatorProfile": "Modifica Profilo Operatore",
|
||||
"editOperatorProfile": "Modifica Profilo Operatore",
|
||||
"operatorName": "Nome operatore",
|
||||
"operatorNameHint": "es., Dipartimento di Polizia di Austin",
|
||||
"operatorNameRequired": "Il nome dell'operatore è obbligatorio",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "Ricarica i dati dei nodi per quest'area",
|
||||
"startRefresh": "Avvia Aggiornamento",
|
||||
"refreshStarted": "Aggiornamento avviato!",
|
||||
"refreshFailed": "Aggiornamento fallito: {}"
|
||||
"refreshFailed": "Aggiornamento fallito: {}",
|
||||
"disableConfirmTitle": "Eliminare i Dati delle Aree Offline Esistenti?",
|
||||
"disableConfirmMessage": "Hai già dati di aree offline esistenti. Disabilitare le funzionalità offline impedirà all'app di usarli. Vuoi conservare questi dati sul dispositivo nel caso in cui riattivi le funzionalità offline in seguito, oppure eliminarli ora per liberare spazio di archiviazione?",
|
||||
"keepData": "Conserva Dati",
|
||||
"deleteData": "Elimina Dati"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Affina Tag",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Nascondi posizioni sospette entro {} 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",
|
||||
"hoursAgo": "{} ore fa",
|
||||
"minutesAgo": "{} minuti fa",
|
||||
"justNow": "Proprio ora"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Posizione Sospetta #{}",
|
||||
"ticketNo": "N. Ticket",
|
||||
"address": "Indirizzo",
|
||||
"street": "Via",
|
||||
"street": "Via",
|
||||
"city": "Città",
|
||||
"state": "Stato",
|
||||
"intersectingStreet": "Via che Interseca",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Metrico (km, m)",
|
||||
"imperialDescription": "Imperiale (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,615 @@
|
||||
{
|
||||
"language": {
|
||||
"name": "Nederlands"
|
||||
},
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Surveillance Transparantie",
|
||||
"description": "DeFlock is een privacy-gerichte mobiele app voor het in kaart brengen van openbare surveillance infrastructuur met behulp van OpenStreetMap. Documenteer camera's, ALPR's, schot detectoren en andere surveillance apparaten in uw gemeenschap om deze infrastructuur zichtbaar en doorzoekbaar te maken.",
|
||||
"features": "• Offline-capabel karteren met downloadbare gebieden\n• Direct uploaden naar OpenStreetMap met OAuth2\n• Ingebouwde profielen voor grote fabrikanten\n• Privacy-respecterend - geen gebruikersgegevens verzameld\n• Meerdere kaart tile providers (OSM, satellietbeelden)",
|
||||
"initiative": "Onderdeel van het bredere DeFlock initiatief om surveillance transparantie te bevorderen.",
|
||||
"footer": "Bezoek: deflock.me\nGebouwd met Flutter • Open Source",
|
||||
"showWelcome": "Toon Welkomstbericht",
|
||||
"showSubmissionGuide": "Toon Inzendingsgids",
|
||||
"viewReleaseNotes": "Bekijk Release Notes"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Welkom bij DeFlock",
|
||||
"description": "DeFlock werd opgericht op het idee dat openbare surveillance tools transparant zouden moeten zijn. Binnen deze mobiele app, net zoals op de website, zult u de locatie van ALPR's en andere surveillance infrastructuur in uw lokale gebied en in het buitenland kunnen bekijken.",
|
||||
"mission": "Echter, dit project is niet geautomatiseerd; het vraagt ons allemaal om dit project beter te maken. Bij het bekijken van de kaart kunt u op \"Nieuwe Node\" tikken om een voorheen onbekende installatie toe te voegen. Met uw hulp kunnen we ons doel van verhoogde transparantie en publiek bewustzijn van surveillance infrastructuur bereiken.",
|
||||
"firsthandKnowledge": "BELANGRIJK: Draag alleen surveillance apparaten bij die u persoonlijk uit de eerste hand heeft waargenomen. OpenStreetMap en Google beleid verbiedt het gebruik van bronnen zoals Street View beelden voor inzendingen. Uw bijdragen moeten gebaseerd zijn op uw eigen directe waarnemingen.",
|
||||
"privacy": "Privacy Opmerking: Deze app draait volledig lokaal op uw apparaat en gebruikt de derde partij OpenStreetMap API voor gegevensopslag en inzendingen. DeFlock verzamelt of slaat geen gebruikersgegevens op van welke aard dan ook, en is niet verantwoordelijk voor accountbeheer.",
|
||||
"tileNote": "OPMERKING: De gratis kaart tiles van OpenStreetMap kunnen erg traag laden. Alternatieve tile providers kunnen geconfigureerd worden in Instellingen > Geavanceerd.",
|
||||
"moreInfo": "U kunt meer links vinden onder Instellingen > Over.",
|
||||
"dontShowAgain": "Toon dit welkomstbericht niet opnieuw",
|
||||
"getStarted": "Laten we beginnen met DeFlocking!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Inzending Beste Praktijken",
|
||||
"description": "Voordat u uw eerste surveillance apparaat inzendt, neem even de tijd om deze belangrijke richtlijnen door te nemen om hoogwaardige bijdragen aan OpenStreetMap te garanderen.",
|
||||
"bestPractices": "• Breng alleen apparaten in kaart die u persoonlijk uit de eerste hand heeft waargenomen\n• Neem de tijd om het apparaattype en fabrikant nauwkeurig te identificeren\n• Gebruik precieze positionering - zoom dichtbij voordat u de marker plaatst\n• Neem richtingsinformatie mee wanneer van toepassing\n• Controleer uw tag selecties dubbel voordat u inzendt",
|
||||
"placementNote": "Onthoud: Nauwkeurige, eerste hands gegevens zijn essentieel voor de DeFlock gemeenschap en OpenStreetMap project.",
|
||||
"moreInfo": "Voor gedetailleerde begeleiding bij apparaat identificatie en kartering beste praktijken:",
|
||||
"identificationGuide": "Identificatie Gids",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Toon deze gids niet opnieuw",
|
||||
"gotIt": "Begrepen!"
|
||||
},
|
||||
"positioningTutorial": {
|
||||
"title": "Verfijn Uw Locatie",
|
||||
"instructions": "Sleep de kaart om de apparaat marker precies over de locatie van het surveillance apparaat te positioneren.",
|
||||
"hint": "U kunt inzoomen voor betere nauwkeurigheid voordat u positioneert."
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Nieuwe Node",
|
||||
"download": "Download",
|
||||
"settings": "Instellingen",
|
||||
"edit": "Bewerken",
|
||||
"delete": "Verwijderen",
|
||||
"cancel": "Annuleren",
|
||||
"ok": "OK",
|
||||
"close": "Sluiten",
|
||||
"submit": "Indienen",
|
||||
"logIn": "Inloggen",
|
||||
"saveEdit": "Bewerking Opslaan",
|
||||
"clear": "Wissen",
|
||||
"viewOnOSM": "Bekijk op OSM",
|
||||
"advanced": "Geavanceerd",
|
||||
"useAdvancedEditor": "Gebruik Geavanceerde Editor"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Node Zeer Dichtbij Bestaand Apparaat",
|
||||
"message": "Deze node is slechts {} meter van een bestaand surveillance apparaat.",
|
||||
"suggestion": "Als meerdere apparaten op dezelfde paal staan, gebruik dan meerdere richtingen op een enkele node in plaats van aparte nodes te creëren.",
|
||||
"nearbyNodes": "Nabijgelegen apparaat/apparaten gevonden ({}):",
|
||||
"nodeInfo": "Node #{} - {}",
|
||||
"andMore": "...en {} meer",
|
||||
"goBack": "Ga Terug",
|
||||
"submitAnyway": "Toch Indienen",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR Camera",
|
||||
"publicCamera": "Openbare Surveillance Camera",
|
||||
"camera": "Surveillance Camera",
|
||||
"amenity": "{}",
|
||||
"device": "{} Apparaat",
|
||||
"unknown": "Onbekend Apparaat"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Schakel volg-me in",
|
||||
"follow": "Schakel volg-me in (roterend)",
|
||||
"rotating": "Schakel volg-me uit"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Instellingen",
|
||||
"language": "Taal & Regio",
|
||||
"systemDefault": "Systeem Standaard",
|
||||
"aboutInfo": "Over / Info",
|
||||
"aboutThisApp": "Over Deze App",
|
||||
"aboutSubtitle": "App informatie en credits",
|
||||
"languageSubtitle": "Kies uw voorkeurtaal en eenheden",
|
||||
"distanceUnit": "Afstand Eenheden",
|
||||
"distanceUnitSubtitle": "Kies tussen metrische (km/m) of imperiale (mijl/voet) eenheden",
|
||||
"metricUnits": "Metrisch (km, m)",
|
||||
"imperialUnits": "Imperiaal (mijl, voet)",
|
||||
"maxNodes": "Max getekende nodes",
|
||||
"maxNodesSubtitle": "Stel een bovengrens in voor het aantal nodes op de kaart.",
|
||||
"maxNodesWarning": "U wilt dit waarschijnlijk niet doen tenzij u absoluut zeker weet dat u daar een goede reden voor heeft.",
|
||||
"offlineMode": "Offline Modus",
|
||||
"offlineModeSubtitle": "Schakel alle netwerk verzoeken uit behalve voor lokale/offline gebieden.",
|
||||
"pauseQueueProcessing": "Pauzeer Upload Wachtrij",
|
||||
"pauseQueueProcessingSubtitle": "Stop het uploaden van wachtrij veranderingen terwijl live data toegang behouden blijft.",
|
||||
"offlineModeWarningTitle": "Actieve Downloads",
|
||||
"offlineModeWarningMessage": "Het inschakelen van offline modus zal alle actieve gebied downloads annuleren. Wilt u doorgaan?",
|
||||
"enableOfflineMode": "Schakel Offline Modus In",
|
||||
"profiles": "Profielen",
|
||||
"profilesSubtitle": "Beheer node en operator profielen",
|
||||
"offlineSettings": "Offline Instellingen",
|
||||
"offlineSettingsSubtitle": "Beheer offline modus en gedownloade gebieden",
|
||||
"advancedSettings": "Geavanceerde Instellingen",
|
||||
"advancedSettingsSubtitle": "Prestaties, waarschuwingen en tile provider instellingen",
|
||||
"proximityAlerts": "Nabijheids Waarschuwingen",
|
||||
"keepScreenAwake": "Scherm Actief Houden",
|
||||
"networkStatusIndicator": "Netwerk Status Indicator",
|
||||
"hideZoomControls": "Zoomknoppen Verbergen",
|
||||
"enableOfflineFeatures": "Offline Functies Inschakelen",
|
||||
"enableOfflineFeaturesTitle": "Offline functies inschakelen",
|
||||
"enableOfflineFeaturesSubtitle": "Sta het downloaden en gebruiken van offline kaartgebieden toe. Indien uitgeschakeld, zijn offline modus en gedownloade gebieden niet beschikbaar."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Houd het scherm actief tijdens het gebruik van de app",
|
||||
"subtitle": "Voorkomt dat het scherm automatisch uitschakelt tijdens het gebruik van de app"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Zoomknoppen verbergen",
|
||||
"subtitle": "Verbergt de +/- zoomknoppen en de zoomniveau-indicator. U kunt nog steeds zoomen met knijpgebaren."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Krijg meldingen wanneer u surveillance apparaten nadert",
|
||||
"batteryUsage": "Gebruikt extra batterij voor continue locatie monitoring",
|
||||
"notificationsEnabled": "✓ Meldingen ingeschakeld",
|
||||
"notificationsDisabled": "⚠ Meldingen uitgeschakeld",
|
||||
"permissionRequired": "Melding toestemming vereist",
|
||||
"permissionExplanation": "Push meldingen zijn uitgeschakeld. U ziet alleen in-app waarschuwingen en wordt niet gewaarschuwd wanneer de app op de achtergrond draait.",
|
||||
"enableNotifications": "Schakel Meldingen In",
|
||||
"checkingPermissions": "Toestemmingen controleren...",
|
||||
"alertDistance": "Waarschuwingsafstand: ",
|
||||
"rangeInfo": "Bereik: {}-{} {} (standaard: {})",
|
||||
"backgroundServiceTitle": "Nabijheidswaarschuwingen actief",
|
||||
"backgroundServiceText": "Zoekt naar bewakingsapparatuur in de buurt",
|
||||
"backgroundServiceChannel": "Monitoring van nabijheidswaarschuwingen",
|
||||
"openSettings": "Instellingen openen",
|
||||
"blockedTitle": "Meldingen zijn geblokkeerd",
|
||||
"blockedMessage": "Meldingen zijn uitgeschakeld voor DeFlock. Schakel ze in via je systeeminstellingen om nabijheidswaarschuwingen te ontvangen."
|
||||
},
|
||||
"node": {
|
||||
"title": "Node #{}",
|
||||
"tagSheetTitle": "Surveillance Apparaat Tags",
|
||||
"queuedForUpload": "Node in wachtrij geplaatst voor upload",
|
||||
"editQueuedForUpload": "Node bewerking in wachtrij geplaatst voor upload",
|
||||
"deleteQueuedForUpload": "Node verwijdering in wachtrij geplaatst voor upload",
|
||||
"confirmDeleteTitle": "Verwijder Node",
|
||||
"confirmDeleteMessage": "Weet u zeker dat u node #{} wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",
|
||||
"deleteReasonLabel": "Reden voor Verwijdering",
|
||||
"deleteReasonSelectHint": "Selecteer...",
|
||||
"deleteReasonDeviceRemoved": "Apparaat verwijderd",
|
||||
"deleteReasonDuplicateNode": "Dubbele node",
|
||||
"deleteReasonMisidentifiedInfra": "Verkeerd geïdentificeerde infrastructuur",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalisme",
|
||||
"deleteReasonCustom": "Aangepast..",
|
||||
"deleteReasonHint": "Beschrijf de reden...",
|
||||
"mustBeLoggedInToDelete": "U moet ingelogd zijn met een OpenStreetMap-account om kaartgegevens bij te dragen.",
|
||||
"uploadPending": "Upload in behandeling",
|
||||
"uploadCreatingChangeset": "Changeset maken...",
|
||||
"uploadUploading": "Uploaden...",
|
||||
"uploadClosingChangeset": "Changeset sluiten...",
|
||||
"uploadError": "Upload mislukt",
|
||||
"uploadComplete": "Upload voltooid",
|
||||
"viewInQueue": "Bekijk in Wachtrij",
|
||||
"deletedSuccessfully": "Deze node is succesvol verwijderd van OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profiel",
|
||||
"selectProfile": "Selecteer een profiel...",
|
||||
"profileRequired": "Selecteer een profiel om door te gaan.",
|
||||
"direction": "Richting {}°",
|
||||
"profileNoDirectionInfo": "Dit profiel vereist geen richting.",
|
||||
"mustBeLoggedIn": "U moet ingelogd zijn om nieuwe nodes in te dienen. Log in via Instellingen.",
|
||||
"enableSubmittableProfile": "Schakel een indienbaar profiel in via Instellingen om nieuwe nodes in te dienen.",
|
||||
"profileViewOnlyWarning": "Dit profiel is alleen voor kaart weergave. Selecteer een indienbaar profiel om nieuwe nodes in te dienen.",
|
||||
"loadingAreaData": "Gebied gegevens laden... Wacht even voordat u indient.",
|
||||
"refineTags": "Tags Verfijnen"
|
||||
},
|
||||
"editNode": {
|
||||
"title": "Bewerk Node #{}",
|
||||
"profile": "Profiel",
|
||||
"selectProfile": "Selecteer een profiel...",
|
||||
"profileRequired": "Selecteer een profiel om door te gaan.",
|
||||
"direction": "Richting {}°",
|
||||
"profileNoDirectionInfo": "Dit profiel vereist geen richting.",
|
||||
"temporarilyDisabled": "Bewerkingen zijn tijdelijk uitgeschakeld terwijl we een bug oplossen - excuses - controleer binnenkort opnieuw.",
|
||||
"mustBeLoggedIn": "U moet ingelogd zijn om nodes te bewerken. Log in via Instellingen.",
|
||||
"sandboxModeWarning": "Kan geen bewerkingen op productie nodes naar sandbox versturen. Schakel naar Productie modus in Instellingen om nodes te bewerken.",
|
||||
"enableSubmittableProfile": "Schakel een indienbaar profiel in via Instellingen om nodes te bewerken.",
|
||||
"profileViewOnlyWarning": "Dit profiel is alleen voor kaart weergave. Selecteer een indienbaar profiel om nodes te bewerken.",
|
||||
"loadingAreaData": "Gebied gegevens laden... Wacht even voordat u indient.",
|
||||
"cannotMoveConstrainedNode": "Kan deze camera niet verplaatsen - het is verbonden met een ander kaart element (OSM weg/relatie). U kunt nog steeds de tags en richting bewerken.",
|
||||
"zoomInRequiredMessage": "Zoom in tot ten minste niveau {} om surveillance nodes toe te voegen of te bewerken. Dit zorgt voor precieze positionering voor nauwkeurige kartering.",
|
||||
"extractFromWay": "Haal node uit weg/relatie",
|
||||
"extractFromWaySubtitle": "Maak nieuwe node met dezelfde tags, sta verplaatsing naar nieuwe locatie toe",
|
||||
"refineTags": "Tags Verfijnen",
|
||||
"existingTags": "<Bestaande tags>",
|
||||
"noChangesDetected": "Geen wijzigingen gedetecteerd - niets om in te dienen",
|
||||
"noChangesTitle": "Geen Wijzigingen om In Te Dienen",
|
||||
"noChangesMessage": "U heeft geen wijzigingen gemaakt aan deze node. Om een bewerking in te dienen, moet u de locatie, profiel, richtingen of tags wijzigen."
|
||||
},
|
||||
"download": {
|
||||
"title": "Download Kaart Gebied",
|
||||
"maxZoomLevel": "Max zoom niveau",
|
||||
"storageEstimate": "Opslag schatting:",
|
||||
"tilesAndSize": "{} tiles, {} MB",
|
||||
"minZoom": "Min zoom:",
|
||||
"maxRecommendedZoom": "Max aanbevolen zoom: Z{}",
|
||||
"withinTileLimit": "Binnen {} tile limiet",
|
||||
"exceedsTileLimit": "Huidige selectie overschrijdt {} tile limiet",
|
||||
"offlineModeWarning": "Downloads uitgeschakeld in offline modus. Schakel offline modus uit om nieuwe gebieden te downloaden.",
|
||||
"areaTooBigMessage": "Zoom in tot ten minste niveau {} om offline gebieden te downloaden. Grote gebied downloads kunnen ervoor zorgen dat de app niet meer reageert.",
|
||||
"downloadStarted": "Download gestart! Tiles en nodes ophalen...",
|
||||
"downloadFailed": "Download starten mislukt: {}",
|
||||
"offlineNotPermitted": "De {}-server staat geen offline downloads toe. Schakel over naar een tegelserver die offline gebruik toestaat (bijv. Bing Maps, Mapbox of een zelf gehoste tegelserver).",
|
||||
"currentTileProvider": "huidige tegel",
|
||||
"noTileProviderSelected": "Geen tegelprovider geselecteerd. Selecteer een kaartstijl voordat u een offlinegebied downloadt."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Gestart",
|
||||
"message": "Download gestart! Tiles en nodes ophalen...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Bekijk Voortgang in Instellingen"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Upload Bestemming",
|
||||
"subtitle": "Kies waar camera's geüpload worden",
|
||||
"production": "Productie",
|
||||
"sandbox": "Sandbox",
|
||||
"simulate": "Simuleren",
|
||||
"productionDescription": "Upload naar de live OSM database (zichtbaar voor alle gebruikers)",
|
||||
"sandboxDescription": "Uploads gaan naar de OSM Sandbox (veilig voor testen, wordt regelmatig gereset).",
|
||||
"simulateDescription": "Simuleer uploads (neemt geen contact op met OSM servers)",
|
||||
"cannotChangeWithQueue": "Kan upload bestemming niet wijzigen terwijl {} items in wachtrij staan. Wis eerst de wachtrij."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "OpenStreetMap Account",
|
||||
"osmAccountSubtitle": "Beheer uw OSM login en bekijk uw bijdragen",
|
||||
"loggedInAs": "Ingelogd als {}",
|
||||
"loginToOSM": "Inloggen bij OpenStreetMap",
|
||||
"tapToLogout": "Tik om uit te loggen",
|
||||
"requiredToSubmit": "Vereist om camera gegevens in te dienen",
|
||||
"loggedOut": "Uitgelogd",
|
||||
"testConnection": "Test Verbinding",
|
||||
"testConnectionSubtitle": "Verifieer dat OSM credentials werken",
|
||||
"connectionOK": "Verbinding OK - credentials zijn geldig",
|
||||
"connectionFailed": "Verbinding mislukt - log alstublieft opnieuw in",
|
||||
"viewMyEdits": "Bekijk Mijn Bewerkingen op OSM",
|
||||
"viewMyEditsSubtitle": "Zie uw bewerkingsgeschiedenis op OpenStreetMap",
|
||||
"aboutOSM": "Over OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap is een collaboratief, open-source kaartproject waar bijdragers een gratis, bewerkbare kaart van de wereld maken en onderhouden. Uw surveillance apparaat bijdragen helpen deze infrastructuur zichtbaar en doorzoekbaar te maken.",
|
||||
"visitOSM": "Bezoek OpenStreetMap",
|
||||
"deleteAccount": "Verwijder OSM Account",
|
||||
"deleteAccountSubtitle": "Beheer uw OpenStreetMap account",
|
||||
"deleteAccountExplanation": "Om uw OpenStreetMap account te verwijderen, moet u de OpenStreetMap website bezoeken. Dit zal permanent uw OSM account en alle bijbehorende gegevens verwijderen.",
|
||||
"deleteAccountWarning": "Waarschuwing: Deze actie kan niet ongedaan worden gemaakt en zal permanent uw OSM account verwijderen.",
|
||||
"goToOSM": "Ga naar OpenStreetMap",
|
||||
"accountManagement": "Account Beheer",
|
||||
"accountManagementDescription": "Om uw OpenStreetMap account te verwijderen, moet u de juiste OpenStreetMap website bezoeken. Dit zal permanent uw account en alle bijbehorende gegevens verwijderen.",
|
||||
"currentDestinationProduction": "Momenteel verbonden met: Productie OpenStreetMap",
|
||||
"currentDestinationSandbox": "Momenteel verbonden met: Sandbox OpenStreetMap",
|
||||
"currentDestinationSimulate": "Momenteel in: Simuleer modus (geen echt account)",
|
||||
"viewMessages": "Bekijk Berichten op OSM",
|
||||
"unreadMessagesCount": "U heeft {} ongelezen berichten",
|
||||
"noUnreadMessages": "Geen ongelezen berichten",
|
||||
"reauthRequired": "Ververs Authenticatie",
|
||||
"reauthExplanation": "U moet uw authenticatie verversen om OSM bericht meldingen te ontvangen via de app.",
|
||||
"reauthBenefit": "Dit zal melding stippen inschakelen wanneer u ongelezen berichten heeft op OpenStreetMap.",
|
||||
"reauthNow": "Doe Dat Nu",
|
||||
"newChangesetComments": "Nieuwe Changeset-opmerking",
|
||||
"newChangesetCommentsSubtitle": "Iemand heeft commentaar gegeven op een of meer van uw changesets",
|
||||
"reauthLater": "Later",
|
||||
"unreadNotificationsTitle": "U Heeft Ongelezen Meldingen",
|
||||
"unreadNotificationsMessage": "U heeft ongelezen OSM-berichten en/of nieuwe opmerkingen op uw changesets.",
|
||||
"unreadNotificationsView": "Nu Bekijken"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Upload Wachtrij",
|
||||
"subtitle": "Beheer wachtende surveillance apparaat uploads",
|
||||
"pendingUploads": "Wachtende uploads: {}",
|
||||
"pendingItemsCount": "Wachtende Items: {}",
|
||||
"nothingInQueue": "Niets in wachtrij",
|
||||
"simulateModeEnabled": "Simuleer modus ingeschakeld – uploads gesimuleerd",
|
||||
"sandboxMode": "Sandbox modus – uploads gaan naar OSM Sandbox",
|
||||
"tapToViewQueue": "Tik om wachtrij te bekijken",
|
||||
"clearUploadQueue": "Wis Upload Wachtrij",
|
||||
"removeAllPending": "Verwijder alle {} wachtende uploads",
|
||||
"clearQueueTitle": "Wis Wachtrij",
|
||||
"clearQueueConfirm": "Alle {} wachtende uploads verwijderen?",
|
||||
"queueCleared": "Wachtrij gewist",
|
||||
"uploadQueueTitle": "Upload Wachtrij ({} items)",
|
||||
"queueIsEmpty": "Wachtrij is leeg",
|
||||
"itemWithIndex": "Item {}",
|
||||
"error": " (Fout)",
|
||||
"completing": " (Voltooien...)",
|
||||
"destination": "Bestemming: {}",
|
||||
"latitude": "Breedtegraad: {}",
|
||||
"longitude": "Lengtegraad: {}",
|
||||
"direction": "Richting: {}°",
|
||||
"attempts": "Pogingen: {}",
|
||||
"uploadFailedRetry": "Upload mislukt. Tik opnieuw proberen om nog eens te proberen.",
|
||||
"retryUpload": "Probeer upload opnieuw",
|
||||
"clearAll": "Wis Alles",
|
||||
"errorDetails": "Fout Details",
|
||||
"creatingChangeset": " (Changeset maken...)",
|
||||
"uploading": " (Uploaden...)",
|
||||
"closingChangeset": " (Changeset sluiten...)",
|
||||
"processingPaused": "Wachtrij Verwerking Gepauzeerd",
|
||||
"pausedDueToOffline": "Upload verwerking is gepauzeerd omdat offline modus is ingeschakeld.",
|
||||
"pausedByUser": "Upload verwerking is handmatig gepauzeerd.",
|
||||
"inFlightWaitTitle": "Indiening Wordt Afgerond",
|
||||
"inFlightWaitMessage": "Er is momenteel een indiening bezig die moet worden afgerond voordat deze instelling kan worden toegepast. Dit zou maar een moment moeten duren.",
|
||||
"inFlightCompleteTitle": "Indiening Voltooid",
|
||||
"inFlightCompleteMessage": "Uw indiening is succesvol afgerond. Uw instelling wordt nu toegepast."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Tile Providers",
|
||||
"noProvidersConfigured": "Geen tile providers geconfigureerd",
|
||||
"tileTypesCount": "{} tile types",
|
||||
"apiKeyConfigured": "API Key geconfigureerd",
|
||||
"needsApiKey": "Heeft API key nodig",
|
||||
"editProvider": "Bewerk Provider",
|
||||
"addProvider": "Voeg Provider Toe",
|
||||
"deleteProvider": "Verwijder Provider",
|
||||
"deleteProviderConfirm": "Weet u zeker dat u \"{}\" wilt verwijderen?",
|
||||
"clearCaches": "Cache Wissen",
|
||||
"clearCachesConfirm": "Alle tegelcaches wissen voor \"{}\"? Dit zal opslagruimte vrijmaken maar tegels moeten opnieuw worden gedownload bij het bekijken van die gebieden.",
|
||||
"cachesCleared": "Caches gewist voor \"{}\"",
|
||||
"providerName": "Provider Naam",
|
||||
"providerNameHint": "bijv., Aangepaste Kaarten B.V.",
|
||||
"providerNameRequired": "Provider naam is vereist",
|
||||
"apiKey": "API Key (Optioneel)",
|
||||
"apiKeyHint": "Voer API key in indien vereist door tile types",
|
||||
"tileTypes": "Tile Types",
|
||||
"addType": "Voeg Type Toe",
|
||||
"noTileTypesConfigured": "Geen tile types geconfigureerd",
|
||||
"atLeastOneTileTypeRequired": "Minstens één tile type is vereist",
|
||||
"manageTileProviders": "Beheer Providers"
|
||||
},
|
||||
"tileTypeEditor": {
|
||||
"editTileType": "Bewerk Tile Type",
|
||||
"addTileType": "Voeg Tile Type Toe",
|
||||
"name": "Naam",
|
||||
"nameHint": "bijv., Satelliet",
|
||||
"nameRequired": "Naam is vereist",
|
||||
"urlTemplate": "URL Template",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "URL template is vereist",
|
||||
"urlTemplatePlaceholders": "URL moet ofwel {quadkey} of {z}, {x}, en {y} placeholders bevatten",
|
||||
"attribution": "Attributie",
|
||||
"attributionHint": "© Kaart Provider",
|
||||
"attributionRequired": "Attributie is vereist",
|
||||
"maxZoom": "Max Zoom Niveau",
|
||||
"maxZoomHint": "Maximum zoom niveau (1-23)",
|
||||
"maxZoomRequired": "Max zoom is vereist",
|
||||
"maxZoomInvalid": "Max zoom moet een nummer zijn",
|
||||
"maxZoomRange": "Max zoom moet tussen {} en {} zijn",
|
||||
"fetchPreview": "Haal Voorbeeld Op",
|
||||
"previewTileLoaded": "Voorbeeld tile succesvol geladen",
|
||||
"previewTileFailed": "Kon voorbeeld niet ophalen: {}",
|
||||
"save": "Opslaan"
|
||||
},
|
||||
"profiles": {
|
||||
"nodeProfiles": "Node Profielen",
|
||||
"newProfile": "Nieuw Profiel",
|
||||
"builtIn": "Ingebouwd",
|
||||
"custom": "Aangepast",
|
||||
"view": "Bekijk",
|
||||
"deleteProfile": "Verwijder Profiel",
|
||||
"deleteProfileConfirm": "Weet u zeker dat u \"{}\" wilt verwijderen?",
|
||||
"profileDeleted": "Profiel verwijderd",
|
||||
"getMore": "Krijg meer...",
|
||||
"addProfileChoice": "Voeg Profiel Toe",
|
||||
"addProfileChoiceMessage": "Hoe wilt u een profiel toevoegen?",
|
||||
"createCustomProfile": "Maak Aangepast Profiel",
|
||||
"createCustomProfileDescription": "Bouw een profiel vanaf nul met uw eigen tags",
|
||||
"importFromWebsite": "Importeer van Website",
|
||||
"importFromWebsiteDescription": "Blader en importeer profielen van deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Kaart Tiles",
|
||||
"manageProviders": "Beheer Providers",
|
||||
"attribution": "Kaart Attributie",
|
||||
"mapAttribution": "Kaartbron: {}",
|
||||
"couldNotOpenLink": "Kon link niet openen",
|
||||
"openLicense": "Open licentie: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Bekijk Profiel",
|
||||
"newProfile": "Nieuw Profiel",
|
||||
"editProfile": "Bewerk Profiel",
|
||||
"profileName": "Profiel naam",
|
||||
"profileNameHint": "bijv., Aangepaste ALPR Camera",
|
||||
"profileNameRequired": "Profiel naam is vereist",
|
||||
"requiresDirection": "Vereist Richting",
|
||||
"requiresDirectionSubtitle": "Of camera's van dit type een richting tag nodig hebben",
|
||||
"fov": "Gezichtsveld",
|
||||
"fovHint": "FOV in graden (laat leeg voor standaard)",
|
||||
"fovSubtitle": "Camera gezichtsveld - gebruikt voor kegel breedte en bereik inzending formaat",
|
||||
"fovInvalid": "FOV moet tussen 1 en 360 graden zijn",
|
||||
"fov360": "360° Gezichtsveld",
|
||||
"fov360Subtitle": "Camera heeft een 360-graden omnidirectioneel gezichtsveld",
|
||||
"submittable": "Indienbaar",
|
||||
"submittableSubtitle": "Of dit profiel gebruikt kan worden voor camera inzendingen",
|
||||
"osmTags": "OSM Tags",
|
||||
"addTag": "Voeg tag toe",
|
||||
"saveProfile": "Sla Profiel Op",
|
||||
"keyHint": "sleutel",
|
||||
"valueHint": "waarde",
|
||||
"atLeastOneTagRequired": "Minstens één tag is vereist",
|
||||
"profileSaved": "Profiel \"{}\" opgeslagen"
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Nieuw Operator Profiel",
|
||||
"editOperatorProfile": "Bewerk Operator Profiel",
|
||||
"operatorName": "Operator naam",
|
||||
"operatorNameHint": "bijv., Amsterdam Politie",
|
||||
"operatorNameRequired": "Operator naam is vereist",
|
||||
"operatorProfileSaved": "Operator profiel \"{}\" opgeslagen"
|
||||
},
|
||||
"operatorProfiles": {
|
||||
"title": "Operator Profielen",
|
||||
"noProfilesMessage": "Geen operator profielen gedefinieerd. Maak er een om operator tags toe te passen op node inzendingen.",
|
||||
"tagsCount": "{} tags",
|
||||
"deleteOperatorProfile": "Verwijder Operator Profiel",
|
||||
"deleteOperatorProfileConfirm": "Weet u zeker dat u \"{}\" wilt verwijderen?",
|
||||
"operatorProfileDeleted": "Operator profiel verwijderd"
|
||||
},
|
||||
"offlineAreas": {
|
||||
"title": "Offline Gebieden",
|
||||
"noAreasTitle": "Geen offline gebieden",
|
||||
"noAreasSubtitle": "Download een kaart gebied voor offline gebruik.",
|
||||
"provider": "Provider",
|
||||
"maxZoom": "Max zoom",
|
||||
"zoomLevels": "Z{}-{}",
|
||||
"latitude": "Breedtegraad",
|
||||
"longitude": "Lengtegraad",
|
||||
"tiles": "Tiles",
|
||||
"size": "Grootte",
|
||||
"nodes": "Nodes",
|
||||
"areaIdFallback": "Gebied {}...",
|
||||
"renameArea": "Hernoem gebied",
|
||||
"refreshWorldTiles": "Ververs/herdownload wereld tiles",
|
||||
"deleteOfflineArea": "Verwijder offline gebied",
|
||||
"cancelDownload": "Annuleer download",
|
||||
"renameAreaDialogTitle": "Hernoem Offline Gebied",
|
||||
"areaNameLabel": "Gebied Naam",
|
||||
"renameButton": "Hernoem",
|
||||
"megabytes": "MB",
|
||||
"kilobytes": "KB",
|
||||
"progress": "{}%",
|
||||
"refreshArea": "Ververs gebied",
|
||||
"refreshAreaDialogTitle": "Ververs Offline Gebied",
|
||||
"refreshAreaDialogSubtitle": "Kies wat te verversen voor dit gebied:",
|
||||
"refreshTiles": "Ververs Kaart Tiles",
|
||||
"refreshTilesSubtitle": "Herdownload alle tiles voor bijgewerkte beelden",
|
||||
"refreshNodes": "Ververs Nodes",
|
||||
"refreshNodesSubtitle": "Haal node gegevens opnieuw op voor dit gebied",
|
||||
"startRefresh": "Start Verversen",
|
||||
"refreshStarted": "Verversen gestart!",
|
||||
"refreshFailed": "Verversen mislukt: {}",
|
||||
"disableConfirmTitle": "Bestaande Offline Gebiedsgegevens Verwijderen?",
|
||||
"disableConfirmMessage": "U heeft al bestaande offline gebiedsgegevens. Het uitschakelen van offline functies zal voorkomen dat de app deze gebruikt. Wilt u deze gegevens op het apparaat bewaren voor het geval u offline functies later weer inschakelt, of ze nu verwijderen om opslagruimte vrij te maken?",
|
||||
"keepData": "Gegevens Behouden",
|
||||
"deleteData": "Gegevens Verwijderen"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Verfijn Tags",
|
||||
"operatorProfile": "Operator Profiel",
|
||||
"done": "Klaar",
|
||||
"none": "Geen",
|
||||
"noAdditionalOperatorTags": "Geen aanvullende operator tags",
|
||||
"additionalTags": "aanvullende tags",
|
||||
"additionalTagsTitle": "Aanvullende Tags",
|
||||
"noTagsDefinedForProfile": "Geen tags gedefinieerd voor dit operator profiel.",
|
||||
"noOperatorProfiles": "Geen operator profielen gedefinieerd",
|
||||
"noOperatorProfilesMessage": "Maak operator profielen in Instellingen om aanvullende tags toe te passen op uw node inzendingen.",
|
||||
"profileTags": "Profiel Tags",
|
||||
"profileTagsDescription": "Vul deze optionele tag waarden in voor meer gedetailleerde inzendingen:",
|
||||
"selectValue": "Selecteer waarde...",
|
||||
"noValue": "(laat leeg)",
|
||||
"noSuggestions": "Geen suggesties beschikbaar",
|
||||
"existingTagsTitle": "Bestaande Tags",
|
||||
"existingTagsDescription": "Bewerk de bestaande tags op dit apparaat. Voeg toe, verwijder of wijzig elke tag:",
|
||||
"existingOperator": "<Bestaande operator>",
|
||||
"existingOperatorTags": "bestaande operator tags"
|
||||
},
|
||||
"layerSelector": {
|
||||
"cannotChangeTileTypes": "Kan tile types niet wijzigen tijdens het downloaden van offline gebieden",
|
||||
"selectMapLayer": "Selecteer Kaart Laag",
|
||||
"noTileProvidersAvailable": "Geen tile providers beschikbaar"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Geavanceerde Bewerkingsopties",
|
||||
"subtitle": "Deze editors bieden meer geavanceerde functies voor complexe bewerkingen.",
|
||||
"webEditors": "Web Editors",
|
||||
"mobileEditors": "Mobiele Editors",
|
||||
"iDEditor": "iD Editor",
|
||||
"iDEditorSubtitle": "Volledig uitgeruste web editor - werkt altijd",
|
||||
"rapidEditor": "RapiD Editor",
|
||||
"rapidEditorSubtitle": "AI-geassisteerde bewerking met Facebook data",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Geavanceerde Android OSM editor",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Enquête-gebaseerde mapping app",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Snelle POI bewerking",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "iOS OSM editor",
|
||||
"couldNotOpenEditor": "Kon editor niet openen - app is mogelijk niet geïnstalleerd",
|
||||
"couldNotOpenURL": "Kon URL niet openen",
|
||||
"couldNotOpenOSMWebsite": "Kon OSM website niet openen"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Toon netwerk status indicator",
|
||||
"showIndicatorSubtitle": "Toon surveillance data laden en fout status",
|
||||
"loading": "Surveillance data laden...",
|
||||
"timedOut": "Verzoek verlopen",
|
||||
"noData": "Geen offline data",
|
||||
"success": "Surveillance data geladen",
|
||||
"nodeDataSlow": "Surveillance data traag",
|
||||
"rateLimited": "Snelheid beperkt door server",
|
||||
"networkError": "Netwerk fout"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "{rendered} van {total} apparaten getoond",
|
||||
"editingDisabledMessage": "Te veel apparaten getoond om veilig te bewerken. Zoom verder in om het aantal zichtbare apparaten te verminderen, probeer dan opnieuw."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Zoek Locatie",
|
||||
"searchPlaceholder": "Zoek plaatsen of coördinaten...",
|
||||
"routeTo": "Route Naar",
|
||||
"routeFrom": "Route Vanaf",
|
||||
"selectLocation": "Selecteer Locatie",
|
||||
"calculatingRoute": "Route berekenen...",
|
||||
"routeCalculationFailed": "Route berekening mislukt",
|
||||
"start": "Start",
|
||||
"resume": "Hervatten",
|
||||
"endRoute": "Beëindig Route",
|
||||
"routeOverview": "Route Overzicht",
|
||||
"retry": "Opnieuw Proberen",
|
||||
"cancelSearch": "Annuleer zoeken",
|
||||
"noResultsFound": "Geen resultaten gevonden",
|
||||
"searching": "Zoeken...",
|
||||
"location": "Locatie",
|
||||
"startPoint": "Start",
|
||||
"endPoint": "Einde",
|
||||
"startSelect": "Start (selecteer)",
|
||||
"endSelect": "Einde (selecteer)",
|
||||
"distance": "Afstand: {} km",
|
||||
"routeActive": "Route actief",
|
||||
"locationsTooClose": "Start en eind locaties zijn te dicht bij elkaar",
|
||||
"navigationSettings": "Navigatie",
|
||||
"navigationSettingsSubtitle": "Route planning en vermijding instellingen",
|
||||
"avoidanceDistance": "Vermijding Afstand",
|
||||
"avoidanceDistanceSubtitle": "Minimum afstand om weg te blijven van surveillance apparaten",
|
||||
"searchHistory": "Max Zoekgeschiedenis",
|
||||
"searchHistorySubtitle": "Maximum aantal recente zoekopdrachten om te onthouden"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Verdachte Locaties",
|
||||
"showSuspectedLocations": "Toon Verdachte Locaties",
|
||||
"showSuspectedLocationsSubtitle": "Toon vraagteken markers voor verdachte surveillance sites van nutsbedrijf vergunning data",
|
||||
"lastUpdated": "Laatst Bijgewerkt",
|
||||
"refreshNow": "Ververs nu",
|
||||
"dataSource": "Gegevensbron",
|
||||
"dataSourceDescription": "Nutsbedrijf vergunning data die mogelijke surveillance infrastructuur installatie sites aangeeft",
|
||||
"dataSourceCredit": "Gegevens verzameling en hosting geleverd door alprwatch.org",
|
||||
"minimumDistance": "Minimum Afstand van Echte Nodes",
|
||||
"minimumDistanceSubtitle": "Verberg verdachte locaties binnen {} van bestaande surveillance apparaten",
|
||||
"updating": "Verdachte Locaties Bijwerken",
|
||||
"downloadingAndProcessing": "Data downloaden en verwerken...",
|
||||
"updateSuccess": "Verdachte locaties succesvol bijgewerkt",
|
||||
"updateFailed": "Kon verdachte locaties niet bijwerken",
|
||||
"neverFetched": "Nooit opgehaald",
|
||||
"daysAgo": "{} dagen geleden",
|
||||
"hoursAgo": "{} uur geleden",
|
||||
"minutesAgo": "{} minuten geleden",
|
||||
"justNow": "Zojuist"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Verdachte Locatie #{}",
|
||||
"ticketNo": "Ticket Nr",
|
||||
"address": "Adres",
|
||||
"street": "Straat",
|
||||
"city": "Stad",
|
||||
"state": "Provincie",
|
||||
"intersectingStreet": "Kruisende Straat",
|
||||
"workDoneFor": "Werk Gedaan Voor",
|
||||
"remarks": "Opmerkingen",
|
||||
"url": "URL",
|
||||
"coordinates": "Coördinaten",
|
||||
"noAddressAvailable": "Geen adres beschikbaar"
|
||||
},
|
||||
"units": {
|
||||
"meters": "m",
|
||||
"feet": "ft",
|
||||
"kilometers": "km",
|
||||
"miles": "mijl",
|
||||
"metersLong": "meters",
|
||||
"feetLong": "voet",
|
||||
"kilometersLong": "kilometers",
|
||||
"milesLong": "mijlen",
|
||||
"metric": "Metrisch",
|
||||
"imperial": "Imperiaal",
|
||||
"metricDescription": "Metrisch (km, m)",
|
||||
"imperialDescription": "Imperiaal (mijl, ft)"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,615 @@
|
||||
{
|
||||
"language": {
|
||||
"name": "Polski"
|
||||
},
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Przejrzystość Nadzoru",
|
||||
"description": "DeFlock to mobilna aplikacja skoncentrowana na prywatności do mapowania publicznej infrastruktury nadzoru przy użyciu OpenStreetMap. Dokumentuj kamery, ALPR, detektory wystrzałów i inne urządzenia nadzoru w swojej społeczności, aby uczynić tę infrastrukturę widoczną i możliwą do przeszukiwania.",
|
||||
"features": "• Mapowanie offline z obszarami do pobrania\n• Przesyłanie bezpośrednio do OpenStreetMap z OAuth2\n• Wbudowane profile dla głównych producentów\n• Szanujące prywatność - nie zbierane są dane użytkownika\n• Wielu dostawców kafelków map (OSM, zdjęcia satelitarne)",
|
||||
"initiative": "Część szerszej inicjatywy DeFlock promującej przejrzystość nadzoru.",
|
||||
"footer": "Odwiedź: deflock.me\nZbudowane z Flutter • Open Source",
|
||||
"showWelcome": "Pokaż Wiadomość Powitalną",
|
||||
"showSubmissionGuide": "Pokaż Przewodnik Zgłaszania",
|
||||
"viewReleaseNotes": "Zobacz Notatki Wydania"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Witamy w DeFlock",
|
||||
"description": "DeFlock został założony na idei, że narzędzia publicznego nadzoru powinny być przejrzyste. W tej aplikacji mobilnej, jak i na stronie internetowej, będziesz mógł przeglądać lokalizacje ALPR i innych infrastruktur nadzoru w Twoim lokalnym obszarze i za granicą.",
|
||||
"mission": "Jednak ten projekt nie jest zautomatyzowany; potrzeba nas wszystkich, aby ten projekt uczynić lepszym. Podczas przeglądania mapy możesz stuknąć \"Nowy Węzeł\", aby dodać wcześniej nieznaną instalację. Z Twoją pomocą możemy osiągnąć nasz cel zwiększonej przejrzystości i publicznej świadomości infrastruktury nadzoru.",
|
||||
"firsthandKnowledge": "WAŻNE: Dodawaj tylko urządzenia nadzoru, które osobiście obserwowałeś z pierwszej ręki. Polityki OpenStreetMap i Google zabraniają używania źródeł takich jak zdjęcia Street View do zgłoszeń. Twoje wkłady powinny być oparte na Twoich własnych bezpośrednich obserwacjach.",
|
||||
"privacy": "Uwaga o Prywatności: Ta aplikacja działa całkowicie lokalnie na Twoim urządzeniu i używa zewnętrznego API OpenStreetMap do przechowywania danych i zgłoszeń. DeFlock nie zbiera ani nie przechowuje żadnych danych użytkownika jakiegokolwiek rodzaju i nie jest odpowiedzialny za zarządzanie kontami.",
|
||||
"tileNote": "UWAGA: Darmowe kafelki map z OpenStreetMap mogą ładować się bardzo wolno. Alternatywni dostawcy kafelków mogą być skonfigurowani w Ustawieniach > Zaawansowane.",
|
||||
"moreInfo": "Więcej linków znajdziesz w Ustawieniach > O aplikacji.",
|
||||
"dontShowAgain": "Nie pokazuj ponownie tej wiadomości powitalnej",
|
||||
"getStarted": "Zacznijmy DeFlocking!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Najlepsze Praktyki Zgłaszania",
|
||||
"description": "Przed zgłoszeniem Twojego pierwszego urządzenia nadzoru, poświęć chwilę na przejrzenie tych ważnych wytycznych, aby zapewnić wysokiej jakości wkłady do OpenStreetMap.",
|
||||
"bestPractices": "• Mapuj tylko urządzenia, które osobiście obserwowałeś z pierwszej ręki\n• Poświęć czas na dokładną identyfikację typu urządzenia i producenta\n• Używaj precyzyjnego pozycjonowania - przybliż przed umieszczeniem znacznika\n• Dołączaj informacje o kierunku, gdy ma to zastosowanie\n• Sprawdź dwukrotnie swoje wybory tagów przed zgłoszeniem",
|
||||
"placementNote": "Pamiętaj: Dokładne dane z pierwszej ręki są kluczowe dla społeczności DeFlock i projektu OpenStreetMap.",
|
||||
"moreInfo": "Dla szczegółowego przewodnika po identyfikacji urządzeń i najlepszych praktykach mapowania:",
|
||||
"identificationGuide": "Przewodnik Identyfikacji",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Nie pokazuj ponownie tego przewodnika",
|
||||
"gotIt": "Rozumiem!"
|
||||
},
|
||||
"positioningTutorial": {
|
||||
"title": "Doprecyzuj Swoją Lokalizację",
|
||||
"instructions": "Przeciągnij mapę, aby precyzyjnie ustawić znacznik urządzenia nad lokalizacją urządzenia nadzoru.",
|
||||
"hint": "Możesz przybliżyć dla lepszej dokładności przed pozycjonowaniem."
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Nowy Węzeł",
|
||||
"download": "Pobierz",
|
||||
"settings": "Ustawienia",
|
||||
"edit": "Edytuj",
|
||||
"delete": "Usuń",
|
||||
"cancel": "Anuluj",
|
||||
"ok": "OK",
|
||||
"close": "Zamknij",
|
||||
"submit": "Zgłoś",
|
||||
"logIn": "Zaloguj",
|
||||
"saveEdit": "Zapisz Edycję",
|
||||
"clear": "Wyczyść",
|
||||
"viewOnOSM": "Zobacz w OSM",
|
||||
"advanced": "Zaawansowane",
|
||||
"useAdvancedEditor": "Użyj Zaawansowanego Edytora"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Węzeł Bardzo Blisko Istniejącego Urządzenia",
|
||||
"message": "Ten węzeł jest tylko {} metrów od istniejącego urządzenia nadzoru.",
|
||||
"suggestion": "Jeśli wiele urządzeń znajduje się na tym samym słupie, użyj wielu kierunków na jednym węźle zamiast tworzenia oddzielnych węzłów.",
|
||||
"nearbyNodes": "Znaleziono pobliskie urządzenie/urządzenia ({}):",
|
||||
"nodeInfo": "Węzeł #{} - {}",
|
||||
"andMore": "...i {} więcej",
|
||||
"goBack": "Wróć",
|
||||
"submitAnyway": "Zgłoś Mimo To",
|
||||
"nodeType": {
|
||||
"alpr": "Kamera ALPR/ANPR",
|
||||
"publicCamera": "Kamera Nadzoru Publicznego",
|
||||
"camera": "Kamera Nadzoru",
|
||||
"amenity": "{}",
|
||||
"device": "Urządzenie {}",
|
||||
"unknown": "Nieznane Urządzenie"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Włącz śledzenie",
|
||||
"follow": "Włącz śledzenie (obracające)",
|
||||
"rotating": "Wyłącz śledzenie"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Ustawienia",
|
||||
"language": "Język i Region",
|
||||
"systemDefault": "Domyślne Systemowe",
|
||||
"aboutInfo": "O / Informacje",
|
||||
"aboutThisApp": "O Tej Aplikacji",
|
||||
"aboutSubtitle": "Informacje o aplikacji i autorzy",
|
||||
"languageSubtitle": "Wybierz preferowany język i jednostki",
|
||||
"distanceUnit": "Jednostki Odległości",
|
||||
"distanceUnitSubtitle": "Wybierz między jednostkami metrycznymi (km/m) lub imperialnymi (mila/stopa)",
|
||||
"metricUnits": "Metryczne (km, m)",
|
||||
"imperialUnits": "Imperialne (mila, stopa)",
|
||||
"maxNodes": "Maksymalna liczba rysowanych węzłów",
|
||||
"maxNodesSubtitle": "Ustaw górny limit liczby węzłów na mapie.",
|
||||
"maxNodesWarning": "Prawdopodobnie nie chcesz tego robić, chyba że jesteś absolutnie pewien, że masz dobry powód.",
|
||||
"offlineMode": "Tryb Offline",
|
||||
"offlineModeSubtitle": "Wyłącz wszystkie żądania sieciowe z wyjątkiem lokalnych/offline obszarów.",
|
||||
"pauseQueueProcessing": "Wstrzymaj Przetwarzanie Kolejki Przesyłania",
|
||||
"pauseQueueProcessingSubtitle": "Zatrzymaj przesyłanie kolejkowanych zmian zachowując dostęp do danych na żywo.",
|
||||
"offlineModeWarningTitle": "Aktywne Pobierania",
|
||||
"offlineModeWarningMessage": "Włączenie trybu offline anuluje wszystkie aktywne pobierania obszarów. Czy chcesz kontynuować?",
|
||||
"enableOfflineMode": "Włącz Tryb Offline",
|
||||
"profiles": "Profile",
|
||||
"profilesSubtitle": "Zarządzaj profilami węzłów i operatorów",
|
||||
"offlineSettings": "Ustawienia Offline",
|
||||
"offlineSettingsSubtitle": "Zarządzaj trybem offline i pobranymi obszarami",
|
||||
"advancedSettings": "Ustawienia Zaawansowane",
|
||||
"advancedSettingsSubtitle": "Wydajność, alerty i ustawienia dostawców kafelków",
|
||||
"proximityAlerts": "Alerty Bliskości",
|
||||
"keepScreenAwake": "Nie Wygaszaj Ekranu",
|
||||
"networkStatusIndicator": "Wskaźnik Stanu Sieci",
|
||||
"hideZoomControls": "Ukryj Kontrolki Zoomu",
|
||||
"enableOfflineFeatures": "Włącz Funkcje Offline",
|
||||
"enableOfflineFeaturesTitle": "Włącz funkcje offline",
|
||||
"enableOfflineFeaturesSubtitle": "Zezwól na pobieranie i korzystanie z map offline. Jeśli wyłączone, tryb offline i pobrane obszary będą niedostępne."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Nie wygaszaj ekranu podczas korzystania z aplikacji",
|
||||
"subtitle": "Zapobiega automatycznemu wygaszaniu ekranu podczas korzystania z aplikacji"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Ukryj kontrolki zoomu",
|
||||
"subtitle": "Ukrywa przyciski zoomu +/- oraz wskaźnik poziomu powiększenia. Nadal możesz powiększać za pomocą gestów szczypania."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Otrzymuj powiadomienia przy zbliżaniu się do urządzeń nadzoru",
|
||||
"batteryUsage": "Używa dodatkowej baterii do ciągłego monitorowania lokalizacji",
|
||||
"notificationsEnabled": "✓ Powiadomienia włączone",
|
||||
"notificationsDisabled": "⚠ Powiadomienia wyłączone",
|
||||
"permissionRequired": "Wymagane uprawnienie do powiadomień",
|
||||
"permissionExplanation": "Powiadomienia push są wyłączone. Będziesz widzieć tylko alerty w aplikacji i nie będziesz powiadamiany, gdy aplikacja jest w tle.",
|
||||
"enableNotifications": "Włącz Powiadomienia",
|
||||
"checkingPermissions": "Sprawdzanie uprawnień...",
|
||||
"alertDistance": "Odległość alertu: ",
|
||||
"rangeInfo": "Zakres: {}-{} {} (domyślnie: {})",
|
||||
"backgroundServiceTitle": "Alerty o bliskości aktywne",
|
||||
"backgroundServiceText": "Wyszukiwanie pobliskich urządzeń monitorujących",
|
||||
"backgroundServiceChannel": "Monitorowanie alertów o bliskości",
|
||||
"openSettings": "Otwórz ustawienia",
|
||||
"blockedTitle": "Powiadomienia są zablokowane",
|
||||
"blockedMessage": "Powiadomienia dla DeFlock są wyłączone. Włącz je w ustawieniach systemowych, aby otrzymywać alerty o bliskości."
|
||||
},
|
||||
"node": {
|
||||
"title": "Węzeł #{}",
|
||||
"tagSheetTitle": "Tagi Urządzenia Nadzoru",
|
||||
"queuedForUpload": "Węzeł umieszczony w kolejce do przesłania",
|
||||
"editQueuedForUpload": "Edycja węzła umieszczona w kolejce do przesłania",
|
||||
"deleteQueuedForUpload": "Usuwanie węzła umieszczone w kolejce do przesłania",
|
||||
"confirmDeleteTitle": "Usuń Węzeł",
|
||||
"confirmDeleteMessage": "Czy na pewno chcesz usunąć węzeł #{}? Tej akcji nie można cofnąć.",
|
||||
"deleteReasonLabel": "Powód Usunięcia",
|
||||
"deleteReasonSelectHint": "Wybierz...",
|
||||
"deleteReasonDeviceRemoved": "Urządzenie usunięte",
|
||||
"deleteReasonDuplicateNode": "Zduplikowany węzeł",
|
||||
"deleteReasonMisidentifiedInfra": "Błędnie zidentyfikowana infrastruktura",
|
||||
"deleteReasonSpamVandalism": "Spam/wandalizm",
|
||||
"deleteReasonCustom": "Niestandardowy..",
|
||||
"deleteReasonHint": "Opisz powód...",
|
||||
"mustBeLoggedInToDelete": "Musisz być zalogowany na konto OpenStreetMap, aby dodawać dane do mapy.",
|
||||
"uploadPending": "Przesyłanie oczekujące",
|
||||
"uploadCreatingChangeset": "Tworzenie zestawu zmian...",
|
||||
"uploadUploading": "Przesyłanie...",
|
||||
"uploadClosingChangeset": "Zamykanie zestawu zmian...",
|
||||
"uploadError": "Przesyłanie nie powiodło się",
|
||||
"uploadComplete": "Przesyłanie zakończone",
|
||||
"viewInQueue": "Zobacz w Kolejce",
|
||||
"deletedSuccessfully": "Ten węzeł został pomyślnie usunięty z OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Wybierz profil...",
|
||||
"profileRequired": "Proszę wybrać profil, aby kontynuować.",
|
||||
"direction": "Kierunek {}°",
|
||||
"profileNoDirectionInfo": "Ten profil nie wymaga kierunku.",
|
||||
"mustBeLoggedIn": "Musisz być zalogowany, aby zgłaszać nowe węzły. Zaloguj się przez Ustawienia.",
|
||||
"enableSubmittableProfile": "Włącz profil możliwy do zgłoszenia w Ustawieniach, aby zgłaszać nowe węzły.",
|
||||
"profileViewOnlyWarning": "Ten profil służy tylko do przeglądania mapy. Proszę wybrać profil możliwy do zgłoszenia, aby zgłaszać nowe węzły.",
|
||||
"loadingAreaData": "Ładowanie danych obszaru... Poczekaj przed zgłoszeniem.",
|
||||
"refineTags": "Doprecyzuj Tagi"
|
||||
},
|
||||
"editNode": {
|
||||
"title": "Edytuj Węzeł #{}",
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Wybierz profil...",
|
||||
"profileRequired": "Proszę wybrać profil, aby kontynuować.",
|
||||
"direction": "Kierunek {}°",
|
||||
"profileNoDirectionInfo": "Ten profil nie wymaga kierunku.",
|
||||
"temporarilyDisabled": "Edycje zostały tymczasowo wyłączone, gdy rozwiązujemy błąd - przepraszamy - sprawdź wkrótce.",
|
||||
"mustBeLoggedIn": "Musisz być zalogowany, aby edytować węzły. Zaloguj się przez Ustawienia.",
|
||||
"sandboxModeWarning": "Nie można przesyłać edycji węzłów produkcyjnych do piaskownicy. Przełącz na tryb Produkcyjny w Ustawieniach, aby edytować węzły.",
|
||||
"enableSubmittableProfile": "Włącz profil możliwy do zgłoszenia w Ustawieniach, aby edytować węzły.",
|
||||
"profileViewOnlyWarning": "Ten profil służy tylko do przeglądania mapy. Proszę wybrać profil możliwy do zgłoszenia, aby edytować węzły.",
|
||||
"loadingAreaData": "Ładowanie danych obszaru... Poczekaj przed zgłoszeniem.",
|
||||
"cannotMoveConstrainedNode": "Nie można przenieść tej kamery - jest połączona z innym elementem mapy (droga/relacja OSM). Nadal możesz edytować jej tagi i kierunek.",
|
||||
"zoomInRequiredMessage": "Przybliż do co najmniej poziomu {}, aby dodawać lub edytować węzły nadzoru. Zapewnia to precyzyjne pozycjonowanie dla dokładnego mapowania.",
|
||||
"extractFromWay": "Wyciągnij węzeł z drogi/relacji",
|
||||
"extractFromWaySubtitle": "Utwórz nowy węzeł z tymi samymi tagami, pozwalając na przeniesienie do nowej lokalizacji",
|
||||
"refineTags": "Doprecyzuj Tagi",
|
||||
"existingTags": "<Istniejące tagi>",
|
||||
"noChangesDetected": "Nie wykryto zmian - nie ma nic do zgłoszenia",
|
||||
"noChangesTitle": "Brak Zmian do Zgłoszenia",
|
||||
"noChangesMessage": "Nie wprowadziłeś żadnych zmian do tego węzła. Aby zgłosić edycję, musisz zmienić lokalizację, profil, kierunki lub tagi."
|
||||
},
|
||||
"download": {
|
||||
"title": "Pobierz Obszar Mapy",
|
||||
"maxZoomLevel": "Maksymalny poziom przybliżenia",
|
||||
"storageEstimate": "Oszacowanie pamięci:",
|
||||
"tilesAndSize": "{} kafelków, {} MB",
|
||||
"minZoom": "Min przybliżenie:",
|
||||
"maxRecommendedZoom": "Maksymalne zalecane przybliżenie: Z{}",
|
||||
"withinTileLimit": "W granicach {} limitu kafelków",
|
||||
"exceedsTileLimit": "Obecny wybór przekracza {} limit kafelków",
|
||||
"offlineModeWarning": "Pobieranie wyłączone w trybie offline. Wyłącz tryb offline, aby pobierać nowe obszary.",
|
||||
"areaTooBigMessage": "Przybliż do co najmniej poziomu {}, aby pobierać obszary offline. Duże pobieranie obszarów może sprawić, że aplikacja przestanie odpowiadać.",
|
||||
"downloadStarted": "Pobieranie rozpoczęte! Pobieranie kafelków i węzłów...",
|
||||
"downloadFailed": "Nie udało się rozpocząć pobierania: {}",
|
||||
"offlineNotPermitted": "Serwer {} nie zezwala na pobieranie offline. Przełącz się na dostawcę kafelków, który obsługuje tryb offline (np. Bing Maps, Mapbox lub samodzielnie hostowany serwer kafelków).",
|
||||
"currentTileProvider": "bieżący kafelek",
|
||||
"noTileProviderSelected": "Nie wybrano dostawcy kafelków. Wybierz styl mapy przed pobraniem obszaru offline."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Pobieranie Rozpoczęte",
|
||||
"message": "Pobieranie rozpoczęte! Pobieranie kafelków i węzłów...",
|
||||
"ok": "OK",
|
||||
"viewProgress": "Zobacz Postęp w Ustawieniach"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Miejsce Docelowe Przesyłania",
|
||||
"subtitle": "Wybierz gdzie przesyłane są kamery",
|
||||
"production": "Produkcja",
|
||||
"sandbox": "Piaskownica",
|
||||
"simulate": "Symulacja",
|
||||
"productionDescription": "Prześlij do aktywnej bazy danych OSM (widoczne dla wszystkich użytkowników)",
|
||||
"sandboxDescription": "Przesłania trafiają do Piaskownicy OSM (bezpieczne do testowania, regularne resetowanie).",
|
||||
"simulateDescription": "Symuluj przesyłanie (nie kontaktuje się z serwerami OSM)",
|
||||
"cannotChangeWithQueue": "Nie można zmienić miejsca docelowego przesyłania, gdy {} elementów jest w kolejce. Najpierw wyczyść kolejkę."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Konto OpenStreetMap",
|
||||
"osmAccountSubtitle": "Zarządzaj logowaniem OSM i przeglądaj swoje wkłady",
|
||||
"loggedInAs": "Zalogowany jako {}",
|
||||
"loginToOSM": "Zaloguj się do OpenStreetMap",
|
||||
"tapToLogout": "Stuknij aby się wylogować",
|
||||
"requiredToSubmit": "Wymagane do zgłaszania danych kamer",
|
||||
"loggedOut": "Wylogowany",
|
||||
"testConnection": "Testuj Połączenie",
|
||||
"testConnectionSubtitle": "Sprawdź czy dane logowania OSM działają",
|
||||
"connectionOK": "Połączenie OK - dane logowania są ważne",
|
||||
"connectionFailed": "Połączenie nie powiodło się - zaloguj się ponownie",
|
||||
"viewMyEdits": "Zobacz Moje Edycje w OSM",
|
||||
"viewMyEditsSubtitle": "Zobacz swoją historię edycji w OpenStreetMap",
|
||||
"aboutOSM": "O OpenStreetMap",
|
||||
"aboutOSMDescription": "OpenStreetMap to współpracujący projekt mapowania open-source, gdzie współtwórcy tworzą i utrzymują darmową, edytowalną mapę świata. Twoje wkłady urządzeń nadzoru pomagają uczynić tę infrastrukturę widoczną i możliwą do przeszukiwania.",
|
||||
"visitOSM": "Odwiedź OpenStreetMap",
|
||||
"deleteAccount": "Usuń Konto OSM",
|
||||
"deleteAccountSubtitle": "Zarządzaj swoim kontem OpenStreetMap",
|
||||
"deleteAccountExplanation": "Aby usunąć swoje konto OpenStreetMap, musisz odwiedzić stronę OpenStreetMap. To trwale usunie twoje konto OSM i wszystkie powiązane dane.",
|
||||
"deleteAccountWarning": "Ostrzeżenie: Ta akcja nie może być cofnięta i trwale usunie twoje konto OSM.",
|
||||
"goToOSM": "Przejdź do OpenStreetMap",
|
||||
"accountManagement": "Zarządzanie Kontem",
|
||||
"accountManagementDescription": "Aby usunąć swoje konto OpenStreetMap, musisz odwiedzić odpowiednią stronę OpenStreetMap. To trwale usunie twoje konto i wszystkie powiązane dane.",
|
||||
"currentDestinationProduction": "Obecnie połączony z: Produkcyjny OpenStreetMap",
|
||||
"currentDestinationSandbox": "Obecnie połączony z: Sandbox OpenStreetMap",
|
||||
"currentDestinationSimulate": "Obecnie w: Trybie symulacji (brak rzeczywistego konta)",
|
||||
"viewMessages": "Zobacz Wiadomości w OSM",
|
||||
"unreadMessagesCount": "Masz {} nieprzeczytanych wiadomości",
|
||||
"noUnreadMessages": "Brak nieprzeczytanych wiadomości",
|
||||
"reauthRequired": "Odśwież Uwierzytelnienie",
|
||||
"reauthExplanation": "Musisz odświeżyć uwierzytelnienie, aby otrzymywać powiadomienia o wiadomościach OSM przez aplikację.",
|
||||
"reauthBenefit": "To włączy kropki powiadomień, gdy masz nieprzeczytane wiadomości w OpenStreetMap.",
|
||||
"reauthNow": "Zrób To Teraz",
|
||||
"newChangesetComments": "Nowy Komentarz do Zestawu Zmian",
|
||||
"newChangesetCommentsSubtitle": "Ktoś skomentował jeden lub więcej Twoich zestawów zmian",
|
||||
"reauthLater": "Później",
|
||||
"unreadNotificationsTitle": "Masz Nieprzeczytane Powiadomienia",
|
||||
"unreadNotificationsMessage": "Masz nieprzeczytane wiadomości OSM i/lub nowe komentarze do Twoich zestawów zmian.",
|
||||
"unreadNotificationsView": "Zobacz Teraz"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Kolejka Przesyłania",
|
||||
"subtitle": "Zarządzaj oczekującymi przesłaniami urządzeń nadzoru",
|
||||
"pendingUploads": "Oczekujące przesłania: {}",
|
||||
"pendingItemsCount": "Oczekujące Elementy: {}",
|
||||
"nothingInQueue": "Nic w kolejce",
|
||||
"simulateModeEnabled": "Tryb symulacji włączony – przesłania symulowane",
|
||||
"sandboxMode": "Tryb piaskownicy – przesłania idą do OSM Sandbox",
|
||||
"tapToViewQueue": "Stuknij aby zobaczyć kolejkę",
|
||||
"clearUploadQueue": "Wyczyść Kolejkę Przesyłania",
|
||||
"removeAllPending": "Usuń wszystkie {} oczekujące przesłania",
|
||||
"clearQueueTitle": "Wyczyść Kolejkę",
|
||||
"clearQueueConfirm": "Usunąć wszystkie {} oczekujące przesłania?",
|
||||
"queueCleared": "Kolejka wyczyszczona",
|
||||
"uploadQueueTitle": "Kolejka Przesyłania ({} elementów)",
|
||||
"queueIsEmpty": "Kolejka jest pusta",
|
||||
"itemWithIndex": "Element {}",
|
||||
"error": " (Błąd)",
|
||||
"completing": " (Kończenie...)",
|
||||
"destination": "Cel: {}",
|
||||
"latitude": "Szerokość: {}",
|
||||
"longitude": "Długość: {}",
|
||||
"direction": "Kierunek: {}°",
|
||||
"attempts": "Próby: {}",
|
||||
"uploadFailedRetry": "Przesyłanie nie powiodło się. Stuknij ponownie aby spróbować ponownie.",
|
||||
"retryUpload": "Spróbuj ponownie przesłać",
|
||||
"clearAll": "Wyczyść Wszystko",
|
||||
"errorDetails": "Szczegóły Błędu",
|
||||
"creatingChangeset": " (Tworzenie zestawu zmian...)",
|
||||
"uploading": " (Przesyłanie...)",
|
||||
"closingChangeset": " (Zamykanie zestawu zmian...)",
|
||||
"processingPaused": "Przetwarzanie Kolejki Wstrzymane",
|
||||
"pausedDueToOffline": "Przetwarzanie przesyłania jest wstrzymane, ponieważ tryb offline jest włączony.",
|
||||
"pausedByUser": "Przetwarzanie przesyłania jest ręcznie wstrzymane.",
|
||||
"inFlightWaitTitle": "Kończenie Przesyłania",
|
||||
"inFlightWaitMessage": "Przesyłanie jest obecnie w toku i musi zostać zakończone, zanim to ustawienie będzie mogło zostać zastosowane. To powinno zająć tylko chwilę.",
|
||||
"inFlightCompleteTitle": "Przesyłanie Zakończone",
|
||||
"inFlightCompleteMessage": "Twoje przesyłanie zakończyło się pomyślnie. Stosowanie ustawienia teraz."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Dostawcy Kafelków",
|
||||
"noProvidersConfigured": "Brak skonfigurowanych dostawców kafelków",
|
||||
"tileTypesCount": "{} typów kafelków",
|
||||
"apiKeyConfigured": "Klucz API skonfigurowany",
|
||||
"needsApiKey": "Potrzebuje klucz API",
|
||||
"editProvider": "Edytuj Dostawcę",
|
||||
"addProvider": "Dodaj Dostawcę",
|
||||
"deleteProvider": "Usuń Dostawcę",
|
||||
"deleteProviderConfirm": "Czy na pewno chcesz usunąć \"{}\"?",
|
||||
"clearCaches": "Wyczyść Cache",
|
||||
"clearCachesConfirm": "Wyczyścić wszystkie cache kafelków dla \"{}\"? To zwolni miejsce na dysku, ale kafelki będą musiały zostać ponownie pobrane podczas przeglądania tych obszarów.",
|
||||
"cachesCleared": "Cache wyczyszczone dla \"{}\"",
|
||||
"providerName": "Nazwa Dostawcy",
|
||||
"providerNameHint": "np., Niestandardowe Mapy Sp. z o.o.",
|
||||
"providerNameRequired": "Nazwa dostawcy jest wymagana",
|
||||
"apiKey": "Klucz API (Opcjonalnie)",
|
||||
"apiKeyHint": "Wprowadź klucz API jeśli wymagany przez typy kafelków",
|
||||
"tileTypes": "Typy Kafelków",
|
||||
"addType": "Dodaj Typ",
|
||||
"noTileTypesConfigured": "Brak skonfigurowanych typów kafelków",
|
||||
"atLeastOneTileTypeRequired": "Przynajmniej jeden typ kafelka jest wymagany",
|
||||
"manageTileProviders": "Zarządzaj Dostawcami"
|
||||
},
|
||||
"tileTypeEditor": {
|
||||
"editTileType": "Edytuj Typ Kafelka",
|
||||
"addTileType": "Dodaj Typ Kafelka",
|
||||
"name": "Nazwa",
|
||||
"nameHint": "np., Satelita",
|
||||
"nameRequired": "Nazwa jest wymagana",
|
||||
"urlTemplate": "Szablon URL",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "Szablon URL jest wymagany",
|
||||
"urlTemplatePlaceholders": "URL musi zawierać albo {quadkey} albo {z}, {x} i {y} symbole zastępcze",
|
||||
"attribution": "Atrybucja",
|
||||
"attributionHint": "© Dostawca Map",
|
||||
"attributionRequired": "Atrybucja jest wymagana",
|
||||
"maxZoom": "Maksymalny Poziom Przybliżenia",
|
||||
"maxZoomHint": "Maksymalny poziom przybliżenia (1-23)",
|
||||
"maxZoomRequired": "Maksymalne przybliżenie jest wymagane",
|
||||
"maxZoomInvalid": "Maksymalne przybliżenie musi być liczbą",
|
||||
"maxZoomRange": "Maksymalne przybliżenie musi być między {} a {}",
|
||||
"fetchPreview": "Pobierz Podgląd",
|
||||
"previewTileLoaded": "Kafelek podglądu załadowany pomyślnie",
|
||||
"previewTileFailed": "Nie udało się pobrać podglądu: {}",
|
||||
"save": "Zapisz"
|
||||
},
|
||||
"profiles": {
|
||||
"nodeProfiles": "Profile Węzłów",
|
||||
"newProfile": "Nowy Profil",
|
||||
"builtIn": "Wbudowany",
|
||||
"custom": "Niestandardowy",
|
||||
"view": "Zobacz",
|
||||
"deleteProfile": "Usuń Profil",
|
||||
"deleteProfileConfirm": "Czy na pewno chcesz usunąć \"{}\"?",
|
||||
"profileDeleted": "Profil usunięty",
|
||||
"getMore": "Pobierz więcej...",
|
||||
"addProfileChoice": "Dodaj Profil",
|
||||
"addProfileChoiceMessage": "Jak chciałbyś dodać profil?",
|
||||
"createCustomProfile": "Utwórz Niestandardowy Profil",
|
||||
"createCustomProfileDescription": "Zbuduj profil od zera z własnymi tagami",
|
||||
"importFromWebsite": "Importuj ze Strony",
|
||||
"importFromWebsiteDescription": "Przeglądaj i importuj profile z deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Kafelki Mapy",
|
||||
"manageProviders": "Zarządzaj Dostawcami",
|
||||
"attribution": "Atrybucja Mapy",
|
||||
"mapAttribution": "Źródło mapy: {}",
|
||||
"couldNotOpenLink": "Nie udało się otworzyć linku",
|
||||
"openLicense": "Otwórz licencję: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Zobacz Profil",
|
||||
"newProfile": "Nowy Profil",
|
||||
"editProfile": "Edytuj Profil",
|
||||
"profileName": "Nazwa profilu",
|
||||
"profileNameHint": "np., Niestandardowa Kamera ALPR",
|
||||
"profileNameRequired": "Nazwa profilu jest wymagana",
|
||||
"requiresDirection": "Wymaga Kierunku",
|
||||
"requiresDirectionSubtitle": "Czy kamery tego typu potrzebują tagu kierunku",
|
||||
"fov": "Pole Widzenia",
|
||||
"fovHint": "FOV w stopniach (zostaw puste dla domyślnego)",
|
||||
"fovSubtitle": "Pole widzenia kamery - używane dla szerokości stożka i formatu zgłaszania zasięgu",
|
||||
"fovInvalid": "FOV musi być między 1 a 360 stopniami",
|
||||
"fov360": "Pole Widzenia 360°",
|
||||
"fov360Subtitle": "Kamera ma wielokierunkowe pole widzenia o zasięgu 360 stopni",
|
||||
"submittable": "Możliwy do Zgłoszenia",
|
||||
"submittableSubtitle": "Czy ten profil może być używany do zgłoszeń kamer",
|
||||
"osmTags": "Tagi OSM",
|
||||
"addTag": "Dodaj tag",
|
||||
"saveProfile": "Zapisz Profil",
|
||||
"keyHint": "klucz",
|
||||
"valueHint": "wartość",
|
||||
"atLeastOneTagRequired": "Przynajmniej jeden tag jest wymagany",
|
||||
"profileSaved": "Profil \"{}\" zapisany"
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Nowy Profil Operatora",
|
||||
"editOperatorProfile": "Edytuj Profil Operatora",
|
||||
"operatorName": "Nazwa operatora",
|
||||
"operatorNameHint": "np., Policja Warszawska",
|
||||
"operatorNameRequired": "Nazwa operatora jest wymagana",
|
||||
"operatorProfileSaved": "Profil operatora \"{}\" zapisany"
|
||||
},
|
||||
"operatorProfiles": {
|
||||
"title": "Profile Operatorów",
|
||||
"noProfilesMessage": "Brak zdefiniowanych profili operatorów. Utwórz jeden, aby zastosować tagi operatorów do zgłoszeń węzłów.",
|
||||
"tagsCount": "{} tagów",
|
||||
"deleteOperatorProfile": "Usuń Profil Operatora",
|
||||
"deleteOperatorProfileConfirm": "Czy na pewno chcesz usunąć \"{}\"?",
|
||||
"operatorProfileDeleted": "Profil operatora usunięty"
|
||||
},
|
||||
"offlineAreas": {
|
||||
"title": "Obszary Offline",
|
||||
"noAreasTitle": "Brak obszarów offline",
|
||||
"noAreasSubtitle": "Pobierz obszar mapy do użytku offline.",
|
||||
"provider": "Dostawca",
|
||||
"maxZoom": "Maksymalne przybliżenie",
|
||||
"zoomLevels": "Z{}-{}",
|
||||
"latitude": "Szerokość",
|
||||
"longitude": "Długość",
|
||||
"tiles": "Kafelki",
|
||||
"size": "Rozmiar",
|
||||
"nodes": "Węzły",
|
||||
"areaIdFallback": "Obszar {}...",
|
||||
"renameArea": "Zmień nazwę obszaru",
|
||||
"refreshWorldTiles": "Odśwież/pobierz ponownie kafelki światowe",
|
||||
"deleteOfflineArea": "Usuń obszar offline",
|
||||
"cancelDownload": "Anuluj pobieranie",
|
||||
"renameAreaDialogTitle": "Zmień Nazwę Obszaru Offline",
|
||||
"areaNameLabel": "Nazwa Obszaru",
|
||||
"renameButton": "Zmień Nazwę",
|
||||
"megabytes": "MB",
|
||||
"kilobytes": "KB",
|
||||
"progress": "{}%",
|
||||
"refreshArea": "Odśwież obszar",
|
||||
"refreshAreaDialogTitle": "Odśwież Obszar Offline",
|
||||
"refreshAreaDialogSubtitle": "Wybierz co odświeżyć dla tego obszaru:",
|
||||
"refreshTiles": "Odśwież Kafelki Mapy",
|
||||
"refreshTilesSubtitle": "Pobierz ponownie wszystkie kafelki dla zaktualizowanych obrazów",
|
||||
"refreshNodes": "Odśwież Węzły",
|
||||
"refreshNodesSubtitle": "Pobierz ponownie dane węzłów dla tego obszaru",
|
||||
"startRefresh": "Rozpocznij Odświeżanie",
|
||||
"refreshStarted": "Odświeżanie rozpoczęte!",
|
||||
"refreshFailed": "Odświeżanie nie powiodło się: {}",
|
||||
"disableConfirmTitle": "Usunąć Istniejące Dane Obszarów Offline?",
|
||||
"disableConfirmMessage": "Masz już istniejące dane obszarów offline. Wyłączenie funkcji offline uniemożliwi aplikacji ich używanie. Czy chcesz zachować te dane na urządzeniu na wypadek ponownego włączenia funkcji offline później, czy usunąć je teraz, aby zwolnić miejsce na dysku?",
|
||||
"keepData": "Zachowaj Dane",
|
||||
"deleteData": "Usuń Dane"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Doprecyzuj Tagi",
|
||||
"operatorProfile": "Profil Operatora",
|
||||
"done": "Gotowe",
|
||||
"none": "Brak",
|
||||
"noAdditionalOperatorTags": "Brak dodatkowych tagów operatora",
|
||||
"additionalTags": "dodatkowe tagi",
|
||||
"additionalTagsTitle": "Dodatkowe Tagi",
|
||||
"noTagsDefinedForProfile": "Brak tagów zdefiniowanych dla tego profilu operatora.",
|
||||
"noOperatorProfiles": "Brak zdefiniowanych profili operatorów",
|
||||
"noOperatorProfilesMessage": "Utwórz profile operatorów w Ustawieniach, aby zastosować dodatkowe tagi do swoich zgłoszeń węzłów.",
|
||||
"profileTags": "Tagi Profilu",
|
||||
"profileTagsDescription": "Wypełnij te opcjonalne wartości tagów dla bardziej szczegółowych zgłoszeń:",
|
||||
"selectValue": "Wybierz wartość...",
|
||||
"noValue": "(zostaw puste)",
|
||||
"noSuggestions": "Brak dostępnych sugestii",
|
||||
"existingTagsTitle": "Istniejące Tagi",
|
||||
"existingTagsDescription": "Edytuj istniejące tagi na tym urządzeniu. Dodaj, usuń lub zmodyfikuj dowolny tag:",
|
||||
"existingOperator": "<Istniejący operator>",
|
||||
"existingOperatorTags": "istniejące tagi operatora"
|
||||
},
|
||||
"layerSelector": {
|
||||
"cannotChangeTileTypes": "Nie można zmieniać typów kafelków podczas pobierania obszarów offline",
|
||||
"selectMapLayer": "Wybierz Warstwę Mapy",
|
||||
"noTileProvidersAvailable": "Brak dostępnych dostawców kafelków"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Zaawansowane Opcje Edycji",
|
||||
"subtitle": "Te edytory oferują bardziej zaawansowane funkcje dla złożonych edycji.",
|
||||
"webEditors": "Edytory Webowe",
|
||||
"mobileEditors": "Edytory Mobilne",
|
||||
"iDEditor": "Edytor iD",
|
||||
"iDEditorSubtitle": "W pełni funkcjonalny edytor webowy - zawsze działa",
|
||||
"rapidEditor": "Edytor RapiD",
|
||||
"rapidEditorSubtitle": "Edycja wspomagana AI z danymi Facebook",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Zaawansowany edytor OSM dla Androida",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Aplikacja do mapowania oparta na ankietach",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Szybka edycja POI",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "Edytor OSM dla iOS",
|
||||
"couldNotOpenEditor": "Nie można otworzyć edytora - aplikacja może nie być zainstalowana",
|
||||
"couldNotOpenURL": "Nie można otworzyć URL",
|
||||
"couldNotOpenOSMWebsite": "Nie można otworzyć strony OSM"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Pokaż wskaźnik stanu sieci",
|
||||
"showIndicatorSubtitle": "Wyświetl status ładowania danych nadzoru i błędów",
|
||||
"loading": "Ładowanie danych nadzoru...",
|
||||
"timedOut": "Żądanie przekroczyło limit czasu",
|
||||
"noData": "Brak danych offline",
|
||||
"success": "Dane nadzoru załadowane",
|
||||
"nodeDataSlow": "Dane nadzoru powolne",
|
||||
"rateLimited": "Ograniczone przez serwer",
|
||||
"networkError": "Błąd sieci"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "Pokazuje {rendered} z {total} urządzeń",
|
||||
"editingDisabledMessage": "Pokazano zbyt wiele urządzeń, aby bezpiecznie edytować. Przybliż dalej, aby zmniejszyć liczbę widocznych urządzeń, następnie spróbuj ponownie."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Szukaj Lokalizacji",
|
||||
"searchPlaceholder": "Szukaj miejsc lub współrzędnych...",
|
||||
"routeTo": "Trasa Do",
|
||||
"routeFrom": "Trasa Od",
|
||||
"selectLocation": "Wybierz Lokalizację",
|
||||
"calculatingRoute": "Obliczanie trasy...",
|
||||
"routeCalculationFailed": "Obliczanie trasy nie powiodło się",
|
||||
"start": "Start",
|
||||
"resume": "Wznów",
|
||||
"endRoute": "Zakończ Trasę",
|
||||
"routeOverview": "Przegląd Trasy",
|
||||
"retry": "Spróbuj Ponownie",
|
||||
"cancelSearch": "Anuluj wyszukiwanie",
|
||||
"noResultsFound": "Nie znaleziono wyników",
|
||||
"searching": "Wyszukiwanie...",
|
||||
"location": "Lokalizacja",
|
||||
"startPoint": "Start",
|
||||
"endPoint": "Koniec",
|
||||
"startSelect": "Start (wybierz)",
|
||||
"endSelect": "Koniec (wybierz)",
|
||||
"distance": "Odległość: {} km",
|
||||
"routeActive": "Trasa aktywna",
|
||||
"locationsTooClose": "Lokalizacje startu i mety są zbyt blisko siebie",
|
||||
"navigationSettings": "Nawigacja",
|
||||
"navigationSettingsSubtitle": "Planowanie tras i ustawienia unikania",
|
||||
"avoidanceDistance": "Odległość Unikania",
|
||||
"avoidanceDistanceSubtitle": "Minimalna odległość do utrzymania od urządzeń nadzoru",
|
||||
"searchHistory": "Maksymalna Historia Wyszukiwania",
|
||||
"searchHistorySubtitle": "Maksymalna liczba ostatnich wyszukiwań do zapamiętania"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Podejrzane Lokalizacje",
|
||||
"showSuspectedLocations": "Pokaż Podejrzane Lokalizacje",
|
||||
"showSuspectedLocationsSubtitle": "Pokaż znaczniki znaku zapytania dla podejrzanych miejsc nadzoru z danych pozwoleń użyteczności publicznej",
|
||||
"lastUpdated": "Ostatnio Zaktualizowane",
|
||||
"refreshNow": "Odśwież teraz",
|
||||
"dataSource": "Źródło Danych",
|
||||
"dataSourceDescription": "Dane pozwoleń użyteczności publicznej wskazujące potencjalne miejsca instalacji infrastruktury nadzoru",
|
||||
"dataSourceCredit": "Zbieranie danych i hosting zapewnione przez alprwatch.org",
|
||||
"minimumDistance": "Minimalna Odległość od Rzeczywistych Węzłów",
|
||||
"minimumDistanceSubtitle": "Ukryj podejrzane lokalizacje w promieniu {} od istniejących urządzeń nadzoru",
|
||||
"updating": "Aktualizowanie Podejrzanych Lokalizacji",
|
||||
"downloadingAndProcessing": "Pobieranie i przetwarzanie danych...",
|
||||
"updateSuccess": "Podejrzane lokalizacje zaktualizowane pomyślnie",
|
||||
"updateFailed": "Nie udało się zaktualizować podejrzanych lokalizacji",
|
||||
"neverFetched": "Nigdy nie pobrano",
|
||||
"daysAgo": "{} dni temu",
|
||||
"hoursAgo": "{} godzin temu",
|
||||
"minutesAgo": "{} minut temu",
|
||||
"justNow": "Właśnie teraz"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Podejrzana Lokalizacja #{}",
|
||||
"ticketNo": "Nr Biletu",
|
||||
"address": "Adres",
|
||||
"street": "Ulica",
|
||||
"city": "Miasto",
|
||||
"state": "Województwo",
|
||||
"intersectingStreet": "Przecinająca Ulica",
|
||||
"workDoneFor": "Praca Wykonana Dla",
|
||||
"remarks": "Uwagi",
|
||||
"url": "URL",
|
||||
"coordinates": "Współrzędne",
|
||||
"noAddressAvailable": "Brak dostępnego adresu"
|
||||
},
|
||||
"units": {
|
||||
"meters": "m",
|
||||
"feet": "ft",
|
||||
"kilometers": "km",
|
||||
"miles": "mila",
|
||||
"metersLong": "metry",
|
||||
"feetLong": "stopy",
|
||||
"kilometersLong": "kilometry",
|
||||
"milesLong": "mile",
|
||||
"metric": "Metryczny",
|
||||
"imperial": "Imperialny",
|
||||
"metricDescription": "Metryczny (km, m)",
|
||||
"imperialDescription": "Imperialny (mila, ft)"
|
||||
}
|
||||
}
|
||||
+74
-14
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "Configurações Avançadas",
|
||||
"advancedSettingsSubtitle": "Configurações de desempenho, alertas e provedores de mapas",
|
||||
"proximityAlerts": "Alertas de Proximidade",
|
||||
"networkStatusIndicator": "Indicador de Status de Rede"
|
||||
"keepScreenAwake": "Manter Ecrã Ativa",
|
||||
"networkStatusIndicator": "Indicador de Status de Rede",
|
||||
"hideZoomControls": "Ocultar Controlos de Zoom",
|
||||
"enableOfflineFeatures": "Ativar Funcionalidades Offline",
|
||||
"enableOfflineFeaturesTitle": "Ativar funcionalidades offline",
|
||||
"enableOfflineFeaturesSubtitle": "Permitir descarregar e usar áreas de mapa offline. Se desativado, o modo offline e as áreas descarregadas não estarão disponíveis."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Manter o ecrã ativo durante o uso do app",
|
||||
"subtitle": "Impede que o ecrã se desligue automaticamente enquanto a app estiver em uso"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Ocultar controlos de zoom",
|
||||
"subtitle": "Oculta os botões de zoom +/- e o indicador de nível de zoom. Ainda pode ampliar com gestos de pinça."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Receba notificações ao se aproximar de dispositivos de vigilância",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "Habilitar Notificações",
|
||||
"checkingPermissions": "Verificando permissões...",
|
||||
"alertDistance": "Distância de alerta: ",
|
||||
"rangeInfo": "Faixa: {}-{} {} (padrão: {})"
|
||||
"rangeInfo": "Faixa: {}-{} {} (padrão: {})",
|
||||
"backgroundServiceTitle": "Alertas de proximidade ativos",
|
||||
"backgroundServiceText": "Procurando dispositivos de vigilância próximos",
|
||||
"backgroundServiceChannel": "Monitoramento de alertas de proximidade",
|
||||
"openSettings": "Abrir configurações",
|
||||
"blockedTitle": "As notificações estão bloqueadas",
|
||||
"blockedMessage": "As notificações estão desativadas para o DeFlock. Ative-as nas configurações do sistema para receber alertas de proximidade."
|
||||
},
|
||||
"node": {
|
||||
"title": "Nó #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "Edição de nó na fila para envio",
|
||||
"deleteQueuedForUpload": "Exclusão de nó na fila para envio",
|
||||
"confirmDeleteTitle": "Excluir Nó",
|
||||
"confirmDeleteMessage": "Tem certeza de que deseja excluir o nó #{}? Esta ação não pode ser desfeita."
|
||||
"confirmDeleteMessage": "Tem certeza de que deseja excluir o nó #{}? Esta ação não pode ser desfeita.",
|
||||
"deleteReasonLabel": "Motivo para Exclusão",
|
||||
"deleteReasonSelectHint": "Selecionar...",
|
||||
"deleteReasonDeviceRemoved": "Dispositivo removido",
|
||||
"deleteReasonDuplicateNode": "Nó duplicado",
|
||||
"deleteReasonMisidentifiedInfra": "Infraestrutura mal identificada",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalismo",
|
||||
"deleteReasonCustom": "Personalizado..",
|
||||
"deleteReasonHint": "Descreva o motivo...",
|
||||
"mustBeLoggedInToDelete": "Você precisa estar conectado com uma conta do OpenStreetMap para contribuir com dados do mapa.",
|
||||
"uploadPending": "Envio pendente",
|
||||
"uploadCreatingChangeset": "Criando changeset...",
|
||||
"uploadUploading": "Enviando...",
|
||||
"uploadClosingChangeset": "Fechando changeset...",
|
||||
"uploadError": "Falha no envio",
|
||||
"uploadComplete": "Envio concluído",
|
||||
"viewInQueue": "Ver na Fila",
|
||||
"deletedSuccessfully": "Este nó foi excluído com sucesso do OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Perfil",
|
||||
@@ -181,7 +217,10 @@
|
||||
"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: {}"
|
||||
"downloadFailed": "Falha ao iniciar o download: {}",
|
||||
"offlineNotPermitted": "O servidor {} não permite downloads offline. Mude para um provedor de tiles que permita uso offline (por ex., Bing Maps, Mapbox ou um servidor de tiles próprio).",
|
||||
"currentTileProvider": "tile atual",
|
||||
"noTileProviderSelected": "Nenhum provedor de tiles selecionado. Selecione um estilo de mapa antes de baixar uma área offline."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Download Iniciado",
|
||||
@@ -234,7 +273,12 @@
|
||||
"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"
|
||||
"newChangesetComments": "Novo Comentário no Changeset",
|
||||
"newChangesetCommentsSubtitle": "Alguém comentou em um ou mais dos seus changesets",
|
||||
"reauthLater": "Mais Tarde",
|
||||
"unreadNotificationsTitle": "Você Tem Notificações Não Lidas",
|
||||
"unreadNotificationsMessage": "Você tem mensagens OSM não lidas e/ou novos comentários nos seus changesets.",
|
||||
"unreadNotificationsView": "Ver Agora"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Fila de Upload",
|
||||
@@ -269,7 +313,11 @@
|
||||
"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."
|
||||
"pausedByUser": "O processamento de upload está pausado manualmente.",
|
||||
"inFlightWaitTitle": "Finalizando Envio",
|
||||
"inFlightWaitMessage": "Atualmente há um envio em andamento que precisa terminar antes que esta configuração possa ser aplicada. Isso deve levar apenas um momento.",
|
||||
"inFlightCompleteTitle": "Envio Concluído",
|
||||
"inFlightCompleteMessage": "Seu envio foi concluído com sucesso. Aplicando sua configuração agora."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Provedores de Tiles",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "Adicionar Provedor",
|
||||
"deleteProvider": "Excluir Provedor",
|
||||
"deleteProviderConfirm": "Tem certeza de que deseja excluir \"{}\"?",
|
||||
"clearCaches": "Limpar Caches",
|
||||
"clearCachesConfirm": "Limpar todos os caches de mapas para \"{}\"? Isso liberará espaço de armazenamento, mas os mapas precisarão ser baixados novamente ao visualizar essas áreas.",
|
||||
"cachesCleared": "Caches limpos para \"{}\"",
|
||||
"providerName": "Nome do Provedor",
|
||||
"providerNameHint": "ex., Mapas Personalizados Inc.",
|
||||
"providerNameRequired": "Nome do provedor é obrigatório",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "Como gostaria de adicionar um perfil?",
|
||||
"createCustomProfile": "Criar Perfil Personalizado",
|
||||
"createCustomProfileDescription": "Construir um perfil do zero com suas próprias tags",
|
||||
"importFromWebsite": "Importar do Site",
|
||||
"importFromWebsite": "Importar do Site",
|
||||
"importFromWebsiteDescription": "Navegar e importar perfis do deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Tiles do Mapa",
|
||||
"manageProviders": "Gerenciar Provedores",
|
||||
"attribution": "Atribuição do Mapa"
|
||||
"attribution": "Atribuição do Mapa",
|
||||
"mapAttribution": "Atribuição do mapa: {}",
|
||||
"couldNotOpenLink": "Não foi possível abrir o link",
|
||||
"openLicense": "Abrir licença: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Ver Perfil",
|
||||
@@ -350,6 +404,8 @@
|
||||
"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",
|
||||
"fov360": "Campo de Visão 360°",
|
||||
"fov360Subtitle": "A câmera tem um campo de visão omnidirecional de 360 graus",
|
||||
"submittable": "Enviável",
|
||||
"submittableSubtitle": "Se este perfil pode ser usado para envios de câmeras",
|
||||
"osmTags": "Tags OSM",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Novo Perfil de Operador",
|
||||
"editOperatorProfile": "Editar Perfil de Operador",
|
||||
"editOperatorProfile": "Editar Perfil de Operador",
|
||||
"operatorName": "Nome do operador",
|
||||
"operatorNameHint": "ex., Departamento de Polícia de Austin",
|
||||
"operatorNameRequired": "Nome do operador é obrigatório",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "Buscar novamente os dados dos nós para esta área",
|
||||
"startRefresh": "Iniciar Atualização",
|
||||
"refreshStarted": "Atualização iniciada!",
|
||||
"refreshFailed": "Atualização falhou: {}"
|
||||
"refreshFailed": "Atualização falhou: {}",
|
||||
"disableConfirmTitle": "Eliminar Dados de Áreas Offline Existentes?",
|
||||
"disableConfirmMessage": "Já tem dados de áreas offline existentes. Desativar as funcionalidades offline impedirá que a app os utilize. Deseja manter estes dados no dispositivo caso reative as funcionalidades offline mais tarde, ou eliminá-los agora para libertar espaço de armazenamento?",
|
||||
"keepData": "Manter Dados",
|
||||
"deleteData": "Eliminar Dados"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Refinar Tags",
|
||||
@@ -513,14 +573,14 @@
|
||||
"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",
|
||||
"minimumDistanceSubtitle": "Ocultar localizações suspeitas dentro de {} 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",
|
||||
"hoursAgo": "{} horas atrás",
|
||||
"minutesAgo": "{} minutos atrás",
|
||||
"justNow": "Agora mesmo"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "Localização Suspeita #{}",
|
||||
"ticketNo": "N° do Ticket",
|
||||
"address": "Endereço",
|
||||
"street": "Rua",
|
||||
"street": "Rua",
|
||||
"city": "Cidade",
|
||||
"state": "Estado",
|
||||
"intersectingStreet": "Rua que Cruza",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "Métrico (km, m)",
|
||||
"imperialDescription": "Imperial (mi, ft)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,615 @@
|
||||
{
|
||||
"language": {
|
||||
"name": "Türkçe"
|
||||
},
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Gözetleme Şeffaflığı",
|
||||
"description": "DeFlock, OpenStreetMap kullanarak kamusal gözetleme altyapısını haritalamak için tasarlanmış gizlilik odaklı bir mobil uygulamadır. Topluluğunuzdaki kameraları, ALPR'leri, silah sesi dedektörlerini ve diğer gözetleme cihazlarını belgeleyerek bu altyapıyı görünür ve aranabilir hale getirin.",
|
||||
"features": "• İndirilebilir alanlarla çevrimdışı haritalama\n• OAuth2 ile doğrudan OpenStreetMap'e yükleme\n• Büyük üreticiler için yerleşik profiller\n• Gizlilik dostu - kullanıcı verisi toplanmaz\n• Çoklu harita döşemeleri (OSM, uydu görüntüleri)",
|
||||
"initiative": "Gözetleme şeffaflığını destekleyen daha geniş DeFlock girişiminin parçasıdır.",
|
||||
"footer": "Ziyaret edin: deflock.me\nFlutter ile yapıldı • Açık Kaynak",
|
||||
"showWelcome": "Hoş Geldin Mesajını Göster",
|
||||
"showSubmissionGuide": "Gönderim Rehberini Göster",
|
||||
"viewReleaseNotes": "Sürüm Notlarını Görüntüle"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "DeFlock'a Hoş Geldiniz",
|
||||
"description": "DeFlock, kamusal gözetleme araçlarının şeffaf olması gerektiği fikri üzerine kurulmuştur. Bu mobil uygulama içerisinde, web sitesinde olduğu gibi, yerel bölgenizdeki ve yurtdışındaki ALPR'lerin ve diğer gözetleme altyapılarının konumlarını görebileceksiniz.",
|
||||
"mission": "Ancak bu proje otomatik değil; bu projeyi daha iyi hale getirmek hepimize bağlı. Haritayı görüntülerken, daha önce bilinmeyen bir kurulumu eklemek için \"Yeni Düğüm\"e dokunabilirsiniz. Yardımınızla, gözetleme altyapısının şeffaflığını ve kamusal farkındalığını artırma hedefimize ulaşabiliriz.",
|
||||
"firsthandKnowledge": "ÖNEMLİ: Sadece kişisel olarak gözlemlediğiniz gözetleme cihazlarını ekleyin. OpenStreetMap ve Google politikaları, Street View görüntüleri gibi kaynaklarının gönderimler için kullanılmasını yasaklar. Katkılarınız kendi doğrudan gözlemlerinize dayanmalıdır.",
|
||||
"privacy": "Gizlilik Notu: Bu uygulama tamamen cihazınızda yerel olarak çalışır ve veri depolama ve gönderimler için üçüncü taraf OpenStreetMap API'sini kullanır. DeFlock herhangi bir kullanıcı verisini toplamaz veya saklamaz ve hesap yönetiminden sorumlu değildir.",
|
||||
"tileNote": "NOT: OpenStreetMap'den ücretsiz harita döşemeleri yüklenmesi çok yavaş olabilir. Alternatif döşeme sağlayıcıları Ayarlar > Gelişmiş'te yapılandırılabilir.",
|
||||
"moreInfo": "Daha fazla bağlantıyı Ayarlar > Hakkında'da bulabilirsiniz.",
|
||||
"dontShowAgain": "Bu hoş geldin mesajını bir daha gösterme",
|
||||
"getStarted": "Hadi DeFlocking'e Başlayalım!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Gönderim En İyi Uygulamaları",
|
||||
"description": "İlk gözetleme cihazınızı göndermeden önce, OpenStreetMap'e yüksek kaliteli katkılar sağlamak için bu önemli yönergeleri gözden geçirin.",
|
||||
"bestPractices": "• Sadece kişisel olarak gözlemlediğiniz cihazları haritalayın\n• Cihaz tipini ve üreticisini doğru şekilde belirlemeye zaman ayırın\n• Hassas konumlandırma kullanın - işaretçiyi yerleştirmeden önce yakınlaştırın\n• Uygun olduğunda yön bilgisini dahil edin\n• Göndermeden önce etiket seçimlerinizi iki kez kontrol edin",
|
||||
"placementNote": "Unutmayın: Doğru, ilk elden veriler DeFlock topluluğu ve OpenStreetMap projesi için temeldir.",
|
||||
"moreInfo": "Cihaz tanımlama ve haritalama en iyi uygulamaları için ayrıntılı rehberlik:",
|
||||
"identificationGuide": "Tanımlama Rehberi",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Bu rehberi bir daha gösterme",
|
||||
"gotIt": "Anladım!"
|
||||
},
|
||||
"positioningTutorial": {
|
||||
"title": "Konumunuzu Hassaslaştırın",
|
||||
"instructions": "Cihaz işaretçisini gözetleme cihazının konumu üzerine tam olarak yerleştirmek için haritayı sürükleyin.",
|
||||
"hint": "Konumlandırmadan önce daha iyi doğruluk için yakınlaştırabilirsiniz."
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Yeni Düğüm",
|
||||
"download": "İndir",
|
||||
"settings": "Ayarlar",
|
||||
"edit": "Düzenle",
|
||||
"delete": "Sil",
|
||||
"cancel": "İptal",
|
||||
"ok": "Tamam",
|
||||
"close": "Kapat",
|
||||
"submit": "Gönder",
|
||||
"logIn": "Giriş Yap",
|
||||
"saveEdit": "Düzenlemeyi Kaydet",
|
||||
"clear": "Temizle",
|
||||
"viewOnOSM": "OSM'de Görüntüle",
|
||||
"advanced": "Gelişmiş",
|
||||
"useAdvancedEditor": "Gelişmiş Düzenleyiciyi Kullan"
|
||||
},
|
||||
"proximityWarning": {
|
||||
"title": "Düğüm Mevcut Cihaza Çok Yakın",
|
||||
"message": "Bu düğüm mevcut bir gözetleme cihazından sadece {} metre uzakta.",
|
||||
"suggestion": "Aynı direk üzerinde birden fazla cihaz varsa, ayrı düğümler oluşturmak yerine lütfen tek bir düğümde birden fazla yön kullanın.",
|
||||
"nearbyNodes": "Yakındaki cihaz(lar) bulundu ({}):",
|
||||
"nodeInfo": "Düğüm #{} - {}",
|
||||
"andMore": "...ve {} tane daha",
|
||||
"goBack": "Geri Dön",
|
||||
"submitAnyway": "Yine de Gönder",
|
||||
"nodeType": {
|
||||
"alpr": "ALPR/ANPR Kamerası",
|
||||
"publicCamera": "Kamusal Güvenlik Kamerası",
|
||||
"camera": "Güvenlik Kamerası",
|
||||
"amenity": "{}",
|
||||
"device": "{} Cihazı",
|
||||
"unknown": "Bilinmeyen Cihaz"
|
||||
}
|
||||
},
|
||||
"followMe": {
|
||||
"off": "Takip etmeyi etkinleştir",
|
||||
"follow": "Takip etmeyi etkinleştir (dönen)",
|
||||
"rotating": "Takip etmeyi devre dışı bırak"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Ayarlar",
|
||||
"language": "Dil ve Bölge",
|
||||
"systemDefault": "Sistem Varsayılanı",
|
||||
"aboutInfo": "Hakkında / Bilgi",
|
||||
"aboutThisApp": "Bu Uygulama Hakkında",
|
||||
"aboutSubtitle": "Uygulama bilgileri ve krediler",
|
||||
"languageSubtitle": "Tercih ettiğiniz dili ve birimleri seçin",
|
||||
"distanceUnit": "Mesafe Birimleri",
|
||||
"distanceUnitSubtitle": "Metrik (km/m) veya imperial (mil/ft) birimler arasında seçim yapın",
|
||||
"metricUnits": "Metrik (km, m)",
|
||||
"imperialUnits": "İmperial (mil, ft)",
|
||||
"maxNodes": "Çizilen maksimum düğüm",
|
||||
"maxNodesSubtitle": "Haritadaki düğüm sayısı için üst limit belirleyin.",
|
||||
"maxNodesWarning": "Bunu yapmak için kesinlikle iyi bir nedeniniz olduğundan emin değilseniz, bunu yapmak istemezsiniz.",
|
||||
"offlineMode": "Çevrimdışı Mod",
|
||||
"offlineModeSubtitle": "Yerel/çevrimdışı alanlar dışındaki tüm ağ isteklerini devre dışı bırak.",
|
||||
"pauseQueueProcessing": "Yükleme Kuyruğunu Duraklat",
|
||||
"pauseQueueProcessingSubtitle": "Canlı veri erişimini korurken sıraya alınan değişiklikleri yüklemeyi durdur.",
|
||||
"offlineModeWarningTitle": "Aktif İndirmeler",
|
||||
"offlineModeWarningMessage": "Çevrimdışı modu etkinleştirmek aktif alan indirmelerini iptal edecektir. Devam etmek istiyor musunuz?",
|
||||
"enableOfflineMode": "Çevrimdışı Modu Etkinleştir",
|
||||
"profiles": "Profiller",
|
||||
"profilesSubtitle": "Düğüm ve operatör profillerini yönet",
|
||||
"offlineSettings": "Çevrimdışı Ayarlar",
|
||||
"offlineSettingsSubtitle": "Çevrimdışı mod ve indirilen alanları yönet",
|
||||
"advancedSettings": "Gelişmiş Ayarlar",
|
||||
"advancedSettingsSubtitle": "Performans, uyarılar ve döşeme sağlayıcı ayarları",
|
||||
"proximityAlerts": "Yakınlık Uyarıları",
|
||||
"keepScreenAwake": "Ekranı Açık Tut",
|
||||
"networkStatusIndicator": "Ağ Durumu Göstergesi",
|
||||
"hideZoomControls": "Yakınlaştırma Kontrollerini Gizle",
|
||||
"enableOfflineFeatures": "Çevrimdışı Özellikleri Etkinleştir",
|
||||
"enableOfflineFeaturesTitle": "Çevrimdışı özellikleri etkinleştir",
|
||||
"enableOfflineFeaturesSubtitle": "Çevrimdışı harita alanlarını indirmeye ve kullanmaya izin ver. Devre dışı bırakılırsa, çevrimdışı mod ve indirilen alanlar kullanılamaz."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Uygulamayı kullanırken ekranı açık tut",
|
||||
"subtitle": "Uygulamayı kullanırken ekranın otomatik olarak kapanmasını engeller"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Yakınlaştırma kontrollerini gizle",
|
||||
"subtitle": "+/- yakınlaştırma düğmelerini ve yakınlaştırma seviyesi göstergesini gizler. Yine de kıstırma hareketleriyle yakınlaştırabilirsiniz."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Gözetleme cihazlarına yaklaşırken bildirim al",
|
||||
"batteryUsage": "Sürekli konum izleme için ekstra batarya kullanır",
|
||||
"notificationsEnabled": "✓ Bildirimler etkinleştirildi",
|
||||
"notificationsDisabled": "⚠ Bildirimler devre dışı",
|
||||
"permissionRequired": "Bildirim izni gerekli",
|
||||
"permissionExplanation": "Push bildirimleri devre dışı. Sadece uygulama içi uyarıları göreceksiniz ve uygulama arka plandayken bilgilendirilmeyeceksiniz.",
|
||||
"enableNotifications": "Bildirimleri Etkinleştir",
|
||||
"checkingPermissions": "İzinler kontrol ediliyor...",
|
||||
"alertDistance": "Uyarı mesafesi: ",
|
||||
"rangeInfo": "Aralık: {}-{} {} (varsayılan: {})",
|
||||
"backgroundServiceTitle": "Yakınlık uyarıları etkin",
|
||||
"backgroundServiceText": "Yakındaki gözetim cihazları aranıyor",
|
||||
"backgroundServiceChannel": "Yakınlık Uyarısı İzleme",
|
||||
"openSettings": "Ayarları aç",
|
||||
"blockedTitle": "Bildirimler engellendi",
|
||||
"blockedMessage": "DeFlock için bildirimler kapalı. Yakınlık uyarıları almak için sistem ayarlarından etkinleştirin."
|
||||
},
|
||||
"node": {
|
||||
"title": "Düğüm #{}",
|
||||
"tagSheetTitle": "Gözetleme Cihazı Etiketleri",
|
||||
"queuedForUpload": "Düğüm yükleme için sıraya alındı",
|
||||
"editQueuedForUpload": "Düğüm düzenlemesi yükleme için sıraya alındı",
|
||||
"deleteQueuedForUpload": "Düğüm silme işlemi yükleme için sıraya alındı",
|
||||
"confirmDeleteTitle": "Düğümü Sil",
|
||||
"confirmDeleteMessage": "#{} düğümünü silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.",
|
||||
"deleteReasonLabel": "Silme Nedeni",
|
||||
"deleteReasonSelectHint": "Seçin...",
|
||||
"deleteReasonDeviceRemoved": "Cihaz kaldırıldı",
|
||||
"deleteReasonDuplicateNode": "Yinelenen düğüm",
|
||||
"deleteReasonMisidentifiedInfra": "Yanlış tanımlanmış altyapı",
|
||||
"deleteReasonSpamVandalism": "Spam/vandalizm",
|
||||
"deleteReasonCustom": "Özel..",
|
||||
"deleteReasonHint": "Lütfen nedeni açıklayın...",
|
||||
"mustBeLoggedInToDelete": "Harita verilerine katkıda bulunmak için bir OpenStreetMap hesabıyla oturum açmış olmanız gerekir.",
|
||||
"uploadPending": "Yükleme bekliyor",
|
||||
"uploadCreatingChangeset": "Değişiklik seti oluşturuluyor...",
|
||||
"uploadUploading": "Yükleniyor...",
|
||||
"uploadClosingChangeset": "Değişiklik seti kapatılıyor...",
|
||||
"uploadError": "Yükleme başarısız oldu",
|
||||
"uploadComplete": "Yükleme tamamlandı",
|
||||
"viewInQueue": "Sırada Görüntüle",
|
||||
"deletedSuccessfully": "Bu düğüm OpenStreetMap'ten başarıyla silindi."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Bir profil seçin...",
|
||||
"profileRequired": "Devam etmek için lütfen bir profil seçin.",
|
||||
"direction": "Yön {}°",
|
||||
"profileNoDirectionInfo": "Bu profil bir yön gerektirmez.",
|
||||
"mustBeLoggedIn": "Yeni düğümler göndermek için giriş yapmalısınız. Lütfen Ayarlar üzerinden giriş yapın.",
|
||||
"enableSubmittableProfile": "Yeni düğümler göndermek için Ayarlarda gönderilebilir bir profili etkinleştirin.",
|
||||
"profileViewOnlyWarning": "Bu profil sadece harita görüntüleme içindir. Yeni düğümler göndermek için lütfen gönderilebilir bir profil seçin.",
|
||||
"loadingAreaData": "Alan verisi yükleniyor... Göndermeden önce lütfen bekleyin.",
|
||||
"refineTags": "Etiketleri Düzenle"
|
||||
},
|
||||
"editNode": {
|
||||
"title": "Düğümü Düzenle #{}",
|
||||
"profile": "Profil",
|
||||
"selectProfile": "Bir profil seçin...",
|
||||
"profileRequired": "Devam etmek için lütfen bir profil seçin.",
|
||||
"direction": "Yön {}°",
|
||||
"profileNoDirectionInfo": "Bu profil bir yön gerektirmez.",
|
||||
"temporarilyDisabled": "Bir hatayı çözmemiz sırasında düzenlemeler geçici olarak devre dışı bırakıldı - özür dileriz - yakında tekrar kontrol edin.",
|
||||
"mustBeLoggedIn": "Düğümleri düzenlemek için giriş yapmalısınız. Lütfen Ayarlar üzerinden giriş yapın.",
|
||||
"sandboxModeWarning": "Üretim düğümlerinde düzenlemeleri sandbox'a gönderemezsiniz. Düğümleri düzenlemek için Ayarlar'da Üretim moduna geçin.",
|
||||
"enableSubmittableProfile": "Düğümleri düzenlemek için Ayarlarda gönderilebilir bir profili etkinleştirin.",
|
||||
"profileViewOnlyWarning": "Bu profil sadece harita görüntüleme içindir. Düğümleri düzenlemek için lütfen gönderilebilir bir profil seçin.",
|
||||
"loadingAreaData": "Alan verisi yükleniyor... Göndermeden önce lütfen bekleyin.",
|
||||
"cannotMoveConstrainedNode": "Bu kamerayı taşıyamazsınız - başka bir harita öğesine (OSM yolu/ilişkisi) bağlı. Yine de etiketlerini ve yönünü düzenleyebilirsiniz.",
|
||||
"zoomInRequiredMessage": "Gözetleme düğümleri eklemek veya düzenlemek için en az {} seviyesine yakınlaştırın. Bu doğru haritalama için hassas konumlandırmayı sağlar.",
|
||||
"extractFromWay": "Düğümü yol/ilişkiden çıkar",
|
||||
"extractFromWaySubtitle": "Aynı etiketlerle yeni düğüm oluştur, yeni konuma taşımaya izin ver",
|
||||
"refineTags": "Etiketleri Düzenle",
|
||||
"existingTags": "<Mevcut etiketler>",
|
||||
"noChangesDetected": "Değişiklik tespit edilmedi - gönderilecek bir şey yok",
|
||||
"noChangesTitle": "Gönderilecek Değişiklik Yok",
|
||||
"noChangesMessage": "Bu düğümde herhangi bir değişiklik yapmadınız. Düzenleme göndermek için konumu, profili, yönleri veya etiketleri değiştirmeniz gerekir."
|
||||
},
|
||||
"download": {
|
||||
"title": "Harita Alanını İndir",
|
||||
"maxZoomLevel": "Maksimum yakınlaştırma seviyesi",
|
||||
"storageEstimate": "Depolama tahmini:",
|
||||
"tilesAndSize": "{} döşeme, {} MB",
|
||||
"minZoom": "Min yakınlaştırma:",
|
||||
"maxRecommendedZoom": "Maksimum önerilen yakınlaştırma: Z{}",
|
||||
"withinTileLimit": "{} döşeme sınırı içinde",
|
||||
"exceedsTileLimit": "Mevcut seçim {} döşeme sınırını aşıyor",
|
||||
"offlineModeWarning": "Çevrimdışı moddayken indirmeler devre dışı. Yeni alanları indirmek için çevrimdışı modu devre dışı bırakın.",
|
||||
"areaTooBigMessage": "Çevrimdışı alanları indirmek için en az {} seviyesine yakınlaştırın. Büyük alan indirmeleri uygulamanın yanıt vermemesine neden olabilir.",
|
||||
"downloadStarted": "İndirme başladı! Döşemeler ve düğümler getiriliyor...",
|
||||
"downloadFailed": "İndirme başlatılamadı: {}",
|
||||
"offlineNotPermitted": "{} sunucusu çevrimdışı indirmelere izin vermiyor. Çevrimdışı kullanıma izin veren bir döşeme sağlayıcısına geçin (ör. Bing Maps, Mapbox veya kendi barındırdığınız bir döşeme sunucusu).",
|
||||
"currentTileProvider": "mevcut döşeme",
|
||||
"noTileProviderSelected": "Döşeme sağlayıcı seçilmedi. Çevrimdışı alan indirmeden önce lütfen bir harita stili seçin."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "İndirme Başladı",
|
||||
"message": "İndirme başladı! Döşemeler ve düğümler getiriliyor...",
|
||||
"ok": "Tamam",
|
||||
"viewProgress": "Ayarlarda İlerlemeyi Görüntüle"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Yükleme Hedefi",
|
||||
"subtitle": "Kameraların nereye yüklendiğini seçin",
|
||||
"production": "Üretim",
|
||||
"sandbox": "Sandbox",
|
||||
"simulate": "Simülasyon",
|
||||
"productionDescription": "Canlı OSM veritabanına yükle (tüm kullanıcılara görünür)",
|
||||
"sandboxDescription": "Yüklemeler OSM Sandbox'ına gider (test için güvenli, düzenli olarak sıfırlanır).",
|
||||
"simulateDescription": "Yüklemeleri simüle et (OSM sunucularıyla iletişim kurmaz)",
|
||||
"cannotChangeWithQueue": "Sırada {} öğe varken yükleme hedefi değiştirilemez. Önce sırayı temizleyin."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "OpenStreetMap Hesabı",
|
||||
"osmAccountSubtitle": "OSM girişinizi yönetin ve katkılarınızı görüntüleyin",
|
||||
"loggedInAs": "{} olarak giriş yapıldı",
|
||||
"loginToOSM": "OpenStreetMap'e giriş yap",
|
||||
"tapToLogout": "Çıkış yapmak için dokun",
|
||||
"requiredToSubmit": "Kamera verisi göndermek için gerekli",
|
||||
"loggedOut": "Çıkış yapıldı",
|
||||
"testConnection": "Bağlantıyı Test Et",
|
||||
"testConnectionSubtitle": "OSM kimlik bilgilerinin çalışıp çalışmadığını doğrulayın",
|
||||
"connectionOK": "Bağlantı Tamam - kimlik bilgileri geçerli",
|
||||
"connectionFailed": "Bağlantı başarısız - lütfen yeniden giriş yapın",
|
||||
"viewMyEdits": "OSM'deki Düzenlemelerimi Görüntüle",
|
||||
"viewMyEditsSubtitle": "OpenStreetMap'teki düzenleme geçmişinizi görün",
|
||||
"aboutOSM": "OpenStreetMap Hakkında",
|
||||
"aboutOSMDescription": "OpenStreetMap, katkıda bulunanların dünyanın ücretsiz, düzenlenebilir haritasını oluşturdukları ve sürdürdükleri işbirlikçi, açık kaynaklı bir haritalama projesidir. Gözetleme cihazı katkılarınız bu altyapıyı görünür ve aranabilir hale getirmeye yardımcı olur.",
|
||||
"visitOSM": "OpenStreetMap'i Ziyaret Et",
|
||||
"deleteAccount": "OSM Hesabını Sil",
|
||||
"deleteAccountSubtitle": "OpenStreetMap hesabınızı yönetin",
|
||||
"deleteAccountExplanation": "OpenStreetMap hesabınızı silmek için OpenStreetMap web sitesini ziyaret etmeniz gerekecek. Bu, OSM hesabınızı ve ilişkili tüm verileri kalıcı olarak kaldıracaktır.",
|
||||
"deleteAccountWarning": "Uyarı: Bu işlem geri alınamaz ve OSM hesabınızı kalıcı olarak silecektir.",
|
||||
"goToOSM": "OpenStreetMap'e Git",
|
||||
"accountManagement": "Hesap Yönetimi",
|
||||
"accountManagementDescription": "OpenStreetMap hesabınızı silmek için uygun OpenStreetMap web sitesini ziyaret etmeniz gerekecek. Bu, hesabınızı ve ilişkili tüm verileri kalıcı olarak kaldıracaktır.",
|
||||
"currentDestinationProduction": "Şu anda bağlı: Üretim OpenStreetMap",
|
||||
"currentDestinationSandbox": "Şu anda bağlı: Sandbox OpenStreetMap",
|
||||
"currentDestinationSimulate": "Şu anda: Simülasyon modu (gerçek hesap yok)",
|
||||
"viewMessages": "OSM'deki Mesajları Görüntüle",
|
||||
"unreadMessagesCount": "{} okunmamış mesajınız var",
|
||||
"noUnreadMessages": "Okunmamış mesaj yok",
|
||||
"reauthRequired": "Kimlik Doğrulamayı Yenile",
|
||||
"reauthExplanation": "Uygulama üzerinden OSM mesaj bildirimlerini alabilmek için kimlik doğrulamanızı yenilemeniz gerekir.",
|
||||
"reauthBenefit": "Bu, OpenStreetMap'te okunmamış mesajlarınız olduğunda bildirim noktalarını etkinleştirecek.",
|
||||
"reauthNow": "Şimdi Yap",
|
||||
"newChangesetComments": "Yeni Değişiklik Kümesi Yorumu",
|
||||
"newChangesetCommentsSubtitle": "Biri değişiklik kümelerinizden birine veya birkaçına yorum yaptı",
|
||||
"reauthLater": "Sonra",
|
||||
"unreadNotificationsTitle": "Okunmamış Bildirimleriniz Var",
|
||||
"unreadNotificationsMessage": "Okunmamış OSM mesajlarınız ve/veya değişiklik kümelerinize yapılan yeni yorumlar var.",
|
||||
"unreadNotificationsView": "Şimdi Görüntüle"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Yükleme Kuyruğu",
|
||||
"subtitle": "Bekleyen gözetleme cihazı yüklemelerini yönet",
|
||||
"pendingUploads": "Bekleyen yüklemeler: {}",
|
||||
"pendingItemsCount": "Bekleyen Öğeler: {}",
|
||||
"nothingInQueue": "Kuyrukta hiçbir şey yok",
|
||||
"simulateModeEnabled": "Simülasyon modu etkin – yüklemeler simüle ediliyor",
|
||||
"sandboxMode": "Sandbox modu – yüklemeler OSM Sandbox'ına gidiyor",
|
||||
"tapToViewQueue": "Kuyruğu görüntülemek için dokun",
|
||||
"clearUploadQueue": "Yükleme Kuyruğunu Temizle",
|
||||
"removeAllPending": "Tüm {} bekleyen yüklemeyi kaldır",
|
||||
"clearQueueTitle": "Kuyruğu Temizle",
|
||||
"clearQueueConfirm": "Tüm {} bekleyen yükleme kaldırılsın mı?",
|
||||
"queueCleared": "Kuyruk temizlendi",
|
||||
"uploadQueueTitle": "Yükleme Kuyruğu ({} öğe)",
|
||||
"queueIsEmpty": "Kuyruk boş",
|
||||
"itemWithIndex": "Öğe {}",
|
||||
"error": " (Hata)",
|
||||
"completing": " (Tamamlanıyor...)",
|
||||
"destination": "Hedef: {}",
|
||||
"latitude": "Enlem: {}",
|
||||
"longitude": "Boylam: {}",
|
||||
"direction": "Yön: {}°",
|
||||
"attempts": "Denemeler: {}",
|
||||
"uploadFailedRetry": "Yükleme başarısız. Tekrar denemek için yeniden dene'ye dokun.",
|
||||
"retryUpload": "Yüklemeyi yeniden dene",
|
||||
"clearAll": "Tümünü Temizle",
|
||||
"errorDetails": "Hata Detayları",
|
||||
"creatingChangeset": " (Değişiklik seti oluşturuluyor...)",
|
||||
"uploading": " (Yükleniyor...)",
|
||||
"closingChangeset": " (Değişiklik seti kapatılıyor...)",
|
||||
"processingPaused": "Kuyruk İşleme Duraklatıldı",
|
||||
"pausedDueToOffline": "Çevrimdışı mod etkin olduğu için yükleme işleme duraklatıldı.",
|
||||
"pausedByUser": "Yükleme işleme manuel olarak duraklatıldı.",
|
||||
"inFlightWaitTitle": "Gönderim Tamamlanıyor",
|
||||
"inFlightWaitMessage": "Şu anda devam eden bir gönderim var ve bu ayar uygulanmadan önce tamamlanması gerekiyor. Bu sadece bir an sürmelidir.",
|
||||
"inFlightCompleteTitle": "Gönderim Tamamlandı",
|
||||
"inFlightCompleteMessage": "Gönderiminiz başarıyla tamamlandı. Ayarınız şimdi uygulanıyor."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Döşeme Sağlayıcıları",
|
||||
"noProvidersConfigured": "Döşeme sağlayıcısı yapılandırılmamış",
|
||||
"tileTypesCount": "{} döşeme türü",
|
||||
"apiKeyConfigured": "API Anahtarı yapılandırıldı",
|
||||
"needsApiKey": "API anahtarı gerekiyor",
|
||||
"editProvider": "Sağlayıcıyı Düzenle",
|
||||
"addProvider": "Sağlayıcı Ekle",
|
||||
"deleteProvider": "Sağlayıcıyı Sil",
|
||||
"deleteProviderConfirm": "\"{}\" silmek istediğinizden emin misiniz?",
|
||||
"clearCaches": "Önbellekleri Temizle",
|
||||
"clearCachesConfirm": "\"{}\" için tüm döşeme önbelleklerini temizle? Bu depolama alanını boşaltacak ancak bu alanları görüntülerken döşemelerin tekrar indirilmesi gerekecek.",
|
||||
"cachesCleared": "\"{}\" için önbellekler temizlendi",
|
||||
"providerName": "Sağlayıcı Adı",
|
||||
"providerNameHint": "örn., Özel Haritalar A.Ş.",
|
||||
"providerNameRequired": "Sağlayıcı adı gerekli",
|
||||
"apiKey": "API Anahtarı (İsteğe Bağlı)",
|
||||
"apiKeyHint": "Döşeme türleri gerektiriyorsa API anahtarını girin",
|
||||
"tileTypes": "Döşeme Türleri",
|
||||
"addType": "Tür Ekle",
|
||||
"noTileTypesConfigured": "Döşeme türü yapılandırılmamış",
|
||||
"atLeastOneTileTypeRequired": "En az bir döşeme türü gerekli",
|
||||
"manageTileProviders": "Sağlayıcıları Yönet"
|
||||
},
|
||||
"tileTypeEditor": {
|
||||
"editTileType": "Döşeme Türünü Düzenle",
|
||||
"addTileType": "Döşeme Türü Ekle",
|
||||
"name": "Ad",
|
||||
"nameHint": "örn., Uydu",
|
||||
"nameRequired": "Ad gerekli",
|
||||
"urlTemplate": "URL Şablonu",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "URL şablonu gerekli",
|
||||
"urlTemplatePlaceholders": "URL ya {quadkey} ya da {z}, {x}, ve {y} yer tutucularını içermelidir",
|
||||
"attribution": "Atıf",
|
||||
"attributionHint": "© Harita Sağlayıcısı",
|
||||
"attributionRequired": "Atıf gerekli",
|
||||
"maxZoom": "Maksimum Yakınlaştırma Seviyesi",
|
||||
"maxZoomHint": "Maksimum yakınlaştırma seviyesi (1-23)",
|
||||
"maxZoomRequired": "Maksimum yakınlaştırma gerekli",
|
||||
"maxZoomInvalid": "Maksimum yakınlaştırma bir sayı olmalıdır",
|
||||
"maxZoomRange": "Maksimum yakınlaştırma {} ile {} arasında olmalıdır",
|
||||
"fetchPreview": "Önizleme Getir",
|
||||
"previewTileLoaded": "Önizleme döşemesi başarıyla yüklendi",
|
||||
"previewTileFailed": "Önizleme getirilemedi: {}",
|
||||
"save": "Kaydet"
|
||||
},
|
||||
"profiles": {
|
||||
"nodeProfiles": "Düğüm Profilleri",
|
||||
"newProfile": "Yeni Profil",
|
||||
"builtIn": "Yerleşik",
|
||||
"custom": "Özel",
|
||||
"view": "Görüntüle",
|
||||
"deleteProfile": "Profili Sil",
|
||||
"deleteProfileConfirm": "\"{}\" silmek istediğinizden emin misiniz?",
|
||||
"profileDeleted": "Profil silindi",
|
||||
"getMore": "Daha fazla al...",
|
||||
"addProfileChoice": "Profil Ekle",
|
||||
"addProfileChoiceMessage": "Nasıl bir profil eklemek istersiniz?",
|
||||
"createCustomProfile": "Özel Profil Oluştur",
|
||||
"createCustomProfileDescription": "Kendi etiketlerinizle sıfırdan bir profil oluşturun",
|
||||
"importFromWebsite": "Web Sitesinden İçe Aktar",
|
||||
"importFromWebsiteDescription": "deflock.me/identify'dan profilleri inceleyin ve içe aktarın"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Harita Döşemeleri",
|
||||
"manageProviders": "Sağlayıcıları Yönet",
|
||||
"attribution": "Harita Atfı",
|
||||
"mapAttribution": "Harita kaynağı: {}",
|
||||
"couldNotOpenLink": "Bağlantı açılamadı",
|
||||
"openLicense": "Lisansı aç: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Profili Görüntüle",
|
||||
"newProfile": "Yeni Profil",
|
||||
"editProfile": "Profili Düzenle",
|
||||
"profileName": "Profil adı",
|
||||
"profileNameHint": "örn., Özel ALPR Kamerası",
|
||||
"profileNameRequired": "Profil adı gerekli",
|
||||
"requiresDirection": "Yön Gerektirir",
|
||||
"requiresDirectionSubtitle": "Bu türdeki kameraların yön etiketi gerekip gerekmediği",
|
||||
"fov": "Görüş Alanı",
|
||||
"fovHint": "FOV derece cinsinden (varsayılan için boş bırakın)",
|
||||
"fovSubtitle": "Kamera görüş alanı - koni genişliği ve aralık gönderim formatı için kullanılır",
|
||||
"fovInvalid": "FOV 1 ile 360 derece arasında olmalıdır",
|
||||
"fov360": "360° Görüş Alanı",
|
||||
"fov360Subtitle": "Kamera 360 derece çok yönlü görüş alanına sahiptir",
|
||||
"submittable": "Gönderilebilir",
|
||||
"submittableSubtitle": "Bu profilin kamera gönderimlerinde kullanılıp kullanılamayacağı",
|
||||
"osmTags": "OSM Etiketleri",
|
||||
"addTag": "Etiket ekle",
|
||||
"saveProfile": "Profili Kaydet",
|
||||
"keyHint": "anahtar",
|
||||
"valueHint": "değer",
|
||||
"atLeastOneTagRequired": "En az bir etiket gerekli",
|
||||
"profileSaved": "\"{}\" profili kaydedildi"
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Yeni Operatör Profili",
|
||||
"editOperatorProfile": "Operatör Profilini Düzenle",
|
||||
"operatorName": "Operatör adı",
|
||||
"operatorNameHint": "örn., Ankara Polis Müdürlüğü",
|
||||
"operatorNameRequired": "Operatör adı gerekli",
|
||||
"operatorProfileSaved": "\"{}\" operatör profili kaydedildi"
|
||||
},
|
||||
"operatorProfiles": {
|
||||
"title": "Operatör Profilleri",
|
||||
"noProfilesMessage": "Operatör profili tanımlanmamış. Düğüm gönderimlerine operatör etiketleri uygulamak için bir tane oluşturun.",
|
||||
"tagsCount": "{} etiket",
|
||||
"deleteOperatorProfile": "Operatör Profilini Sil",
|
||||
"deleteOperatorProfileConfirm": "\"{}\" silmek istediğinizden emin misiniz?",
|
||||
"operatorProfileDeleted": "Operatör profili silindi"
|
||||
},
|
||||
"offlineAreas": {
|
||||
"title": "Çevrimdışı Alanlar",
|
||||
"noAreasTitle": "Çevrimdışı alan yok",
|
||||
"noAreasSubtitle": "Çevrimdışı kullanım için bir harita alanı indirin.",
|
||||
"provider": "Sağlayıcı",
|
||||
"maxZoom": "Maksimum yakınlaştırma",
|
||||
"zoomLevels": "Z{}-{}",
|
||||
"latitude": "Enlem",
|
||||
"longitude": "Boylam",
|
||||
"tiles": "Döşemeler",
|
||||
"size": "Boyut",
|
||||
"nodes": "Düğümler",
|
||||
"areaIdFallback": "Alan {}...",
|
||||
"renameArea": "Alanı yeniden adlandır",
|
||||
"refreshWorldTiles": "Dünya döşemelerini yenile/yeniden indir",
|
||||
"deleteOfflineArea": "Çevrimdışı alanı sil",
|
||||
"cancelDownload": "İndirmeyi iptal et",
|
||||
"renameAreaDialogTitle": "Çevrimdışı Alanı Yeniden Adlandır",
|
||||
"areaNameLabel": "Alan Adı",
|
||||
"renameButton": "Yeniden Adlandır",
|
||||
"megabytes": "MB",
|
||||
"kilobytes": "KB",
|
||||
"progress": "{}%",
|
||||
"refreshArea": "Alanı yenile",
|
||||
"refreshAreaDialogTitle": "Çevrimdışı Alanı Yenile",
|
||||
"refreshAreaDialogSubtitle": "Bu alan için ne yenilenecek seçin:",
|
||||
"refreshTiles": "Harita Döşemelerini Yenile",
|
||||
"refreshTilesSubtitle": "Güncellenmiş görüntüler için tüm döşemeleri yeniden indir",
|
||||
"refreshNodes": "Düğümleri Yenile",
|
||||
"refreshNodesSubtitle": "Bu alan için düğüm verisini yeniden getir",
|
||||
"startRefresh": "Yenilemeyi Başlat",
|
||||
"refreshStarted": "Yenileme başladı!",
|
||||
"refreshFailed": "Yenileme başarısız: {}",
|
||||
"disableConfirmTitle": "Mevcut Çevrimdışı Alan Verileri Silinsin mi?",
|
||||
"disableConfirmMessage": "Zaten mevcut çevrimdışı alan verileriniz var. Çevrimdışı özellikleri devre dışı bırakmak, uygulamanın bunları kullanmasını engelleyecektir. Daha sonra çevrimdışı özellikleri tekrar etkinleştirme ihtimaline karşı bu verileri cihazda saklamak mı istersiniz, yoksa depolama alanını boşaltmak için şimdi silmek mi istersiniz?",
|
||||
"keepData": "Verileri Sakla",
|
||||
"deleteData": "Verileri Sil"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Etiketleri Düzenle",
|
||||
"operatorProfile": "Operatör Profili",
|
||||
"done": "Tamam",
|
||||
"none": "Hiçbiri",
|
||||
"noAdditionalOperatorTags": "Ek operatör etiketi yok",
|
||||
"additionalTags": "ek etiketler",
|
||||
"additionalTagsTitle": "Ek Etiketler",
|
||||
"noTagsDefinedForProfile": "Bu operatör profili için etiket tanımlanmamış.",
|
||||
"noOperatorProfiles": "Operatör profili tanımlanmamış",
|
||||
"noOperatorProfilesMessage": "Düğüm gönderimlerinize ek etiketler uygulamak için Ayarlar'da operatör profilleri oluşturun.",
|
||||
"profileTags": "Profil Etiketleri",
|
||||
"profileTagsDescription": "Daha detaylı gönderimler için bu isteğe bağlı etiket değerlerini tamamlayın:",
|
||||
"selectValue": "Değer seçin...",
|
||||
"noValue": "(boş bırak)",
|
||||
"noSuggestions": "Öneri bulunmuyor",
|
||||
"existingTagsTitle": "Mevcut Etiketler",
|
||||
"existingTagsDescription": "Bu cihazdaki mevcut etiketleri düzenleyin. Herhangi bir etiketi ekleyin, kaldırın veya değiştirin:",
|
||||
"existingOperator": "<Mevcut operatör>",
|
||||
"existingOperatorTags": "mevcut operatör etiketleri"
|
||||
},
|
||||
"layerSelector": {
|
||||
"cannotChangeTileTypes": "Çevrimdışı alanlar indirilirken döşeme türleri değiştirilemez",
|
||||
"selectMapLayer": "Harita Katmanını Seç",
|
||||
"noTileProvidersAvailable": "Döşeme sağlayıcısı mevcut değil"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Gelişmiş Düzenleme Seçenekleri",
|
||||
"subtitle": "Bu editörler karmaşık düzenlemeler için daha gelişmiş özellikler sunar.",
|
||||
"webEditors": "Web Editörleri",
|
||||
"mobileEditors": "Mobil Editörler",
|
||||
"iDEditor": "iD Editörü",
|
||||
"iDEditorSubtitle": "Tam özellikli web editörü - her zaman çalışır",
|
||||
"rapidEditor": "RapiD Editörü",
|
||||
"rapidEditorSubtitle": "Facebook verileriyle AI destekli düzenleme",
|
||||
"vespucci": "Vespucci",
|
||||
"vespucciSubtitle": "Gelişmiş Android OSM editörü",
|
||||
"streetComplete": "StreetComplete",
|
||||
"streetCompleteSubtitle": "Anket tabanlı haritalama uygulaması",
|
||||
"everyDoor": "EveryDoor",
|
||||
"everyDoorSubtitle": "Hızlı POI düzenleme",
|
||||
"goMap": "Go Map!!",
|
||||
"goMapSubtitle": "iOS OSM editörü",
|
||||
"couldNotOpenEditor": "Editör açılamadı - uygulama yüklü olmayabilir",
|
||||
"couldNotOpenURL": "URL açılamadı",
|
||||
"couldNotOpenOSMWebsite": "OSM web sitesi açılamadı"
|
||||
},
|
||||
"networkStatus": {
|
||||
"showIndicator": "Ağ durumu göstergesini göster",
|
||||
"showIndicatorSubtitle": "Gözetleme verisi yükleme ve hata durumunu göster",
|
||||
"loading": "Gözetleme verisi yükleniyor...",
|
||||
"timedOut": "İstek zaman aşımına uğradı",
|
||||
"noData": "Çevrimdışı veri yok",
|
||||
"success": "Gözetleme verisi yüklendi",
|
||||
"nodeDataSlow": "Gözetleme verisi yavaş",
|
||||
"rateLimited": "Sunucu tarafından hız sınırlandı",
|
||||
"networkError": "Ağ hatası"
|
||||
},
|
||||
"nodeLimitIndicator": {
|
||||
"message": "{total} cihazdan {rendered} tanesi gösteriliyor",
|
||||
"editingDisabledMessage": "Güvenli düzenleme için çok fazla cihaz gösteriliyor. Görünen cihaz sayısını azaltmak için daha fazla yakınlaştırın, sonra tekrar deneyin."
|
||||
},
|
||||
"navigation": {
|
||||
"searchLocation": "Konum Ara",
|
||||
"searchPlaceholder": "Yerler veya koordinatlar ara...",
|
||||
"routeTo": "Buraya Yol Tarifi",
|
||||
"routeFrom": "Buradan Yol Tarifi",
|
||||
"selectLocation": "Konum Seç",
|
||||
"calculatingRoute": "Rota hesaplanıyor...",
|
||||
"routeCalculationFailed": "Rota hesaplama başarısız",
|
||||
"start": "Başlat",
|
||||
"resume": "Devam Et",
|
||||
"endRoute": "Rotayı Bitir",
|
||||
"routeOverview": "Rota Özeti",
|
||||
"retry": "Yeniden Dene",
|
||||
"cancelSearch": "Aramayı iptal et",
|
||||
"noResultsFound": "Sonuç bulunamadı",
|
||||
"searching": "Aranıyor...",
|
||||
"location": "Konum",
|
||||
"startPoint": "Başlangıç",
|
||||
"endPoint": "Bitiş",
|
||||
"startSelect": "Başlangıç (seç)",
|
||||
"endSelect": "Bitiş (seç)",
|
||||
"distance": "Mesafe: {} km",
|
||||
"routeActive": "Rota aktif",
|
||||
"locationsTooClose": "Başlangıç ve bitiş konumları birbirine çok yakın",
|
||||
"navigationSettings": "Navigasyon",
|
||||
"navigationSettingsSubtitle": "Rota planlama ve kaçınma ayarları",
|
||||
"avoidanceDistance": "Kaçınma Mesafesi",
|
||||
"avoidanceDistanceSubtitle": "Gözetleme cihazlarından uzak durmak için minimum mesafe",
|
||||
"searchHistory": "Maksimum Arama Geçmişi",
|
||||
"searchHistorySubtitle": "Hatırlanacak son aramaların maksimum sayısı"
|
||||
},
|
||||
"suspectedLocations": {
|
||||
"title": "Şüpheli Konumlar",
|
||||
"showSuspectedLocations": "Şüpheli Konumları Göster",
|
||||
"showSuspectedLocationsSubtitle": "Altyapı izin verilerinden şüpheli gözetleme siteleri için soru işareti işaretçilerini göster",
|
||||
"lastUpdated": "Son Güncellenme",
|
||||
"refreshNow": "Şimdi yenile",
|
||||
"dataSource": "Veri Kaynağı",
|
||||
"dataSourceDescription": "Potansiyel gözetleme altyapısı kurulum sitelerini gösteren altyapı izin verileri",
|
||||
"dataSourceCredit": "Veri toplama ve barındırma alprwatch.org tarafından sağlanır",
|
||||
"minimumDistance": "Gerçek Düğümlerden Minimum Mesafe",
|
||||
"minimumDistanceSubtitle": "Mevcut gözetleme cihazlarının {} yakınındaki şüpheli konumları gizle",
|
||||
"updating": "Şüpheli Konumlar Güncelleniyor",
|
||||
"downloadingAndProcessing": "Veri indiriliyor ve işleniyor...",
|
||||
"updateSuccess": "Şüpheli konumlar başarıyla güncellendi",
|
||||
"updateFailed": "Şüpheli konumları güncelleme başarısız",
|
||||
"neverFetched": "Hiç getirilmedi",
|
||||
"daysAgo": "{} gün önce",
|
||||
"hoursAgo": "{} saat önce",
|
||||
"minutesAgo": "{} dakika önce",
|
||||
"justNow": "Şimdi"
|
||||
},
|
||||
"suspectedLocation": {
|
||||
"title": "Şüpheli Konum #{}",
|
||||
"ticketNo": "Bilet No",
|
||||
"address": "Adres",
|
||||
"street": "Sokak",
|
||||
"city": "Şehir",
|
||||
"state": "Eyalet",
|
||||
"intersectingStreet": "Kesişen Sokak",
|
||||
"workDoneFor": "İş Yapılan",
|
||||
"remarks": "Açıklamalar",
|
||||
"url": "URL",
|
||||
"coordinates": "Koordinatlar",
|
||||
"noAddressAvailable": "Adres mevcut değil"
|
||||
},
|
||||
"units": {
|
||||
"meters": "m",
|
||||
"feet": "ft",
|
||||
"kilometers": "km",
|
||||
"miles": "mil",
|
||||
"metersLong": "metre",
|
||||
"feetLong": "fit",
|
||||
"kilometersLong": "kilometre",
|
||||
"milesLong": "mil",
|
||||
"metric": "Metrik",
|
||||
"imperial": "İmperial",
|
||||
"metricDescription": "Metrik (km, m)",
|
||||
"imperialDescription": "İmperial (mil, ft)"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,615 @@
|
||||
{
|
||||
"language": {
|
||||
"name": "Українська"
|
||||
},
|
||||
"app": {
|
||||
"title": "DeFlock"
|
||||
},
|
||||
"about": {
|
||||
"title": "DeFlock - Прозорість Спостереження",
|
||||
"description": "DeFlock - це мобільний додаток, зосереджений на конфіденційності, для картування громадської інфраструктури спостереження з використанням OpenStreetMap. Документуйте камери, ALPR, детектори пострілів та інші пристрої спостереження у вашій громаді, щоб зробити цю інфраструктуру видимою та доступною для пошуку.",
|
||||
"features": "• Картування в офлайн-режимі з завантажуваними областями\n• Завантаження безпосередньо в OpenStreetMap через OAuth2\n• Вбудовані профілі для великих виробників\n• Повага до приватності - дані користувача не збираються\n• Кілька постачальників карт (OSM, супутникові знімки)",
|
||||
"initiative": "Частина ширшої ініціативи DeFlock з просування прозорості спостереження.",
|
||||
"footer": "Відвідайте: deflock.me\nПобудовано з Flutter • Відкритий код",
|
||||
"showWelcome": "Показати Привітальне Повідомлення",
|
||||
"showSubmissionGuide": "Показати Посібник Подання",
|
||||
"viewReleaseNotes": "Переглянути Примітки Випуску"
|
||||
},
|
||||
"welcome": {
|
||||
"title": "Ласкаво просимо до DeFlock",
|
||||
"description": "DeFlock був заснований на ідеї, що інструменти громадського спостереження повинні бути прозорими. В цьому мобільному додатку, як і на веб-сайті, ви зможете переглядати місця розташування ALPR та іншої інфраструктури спостереження у вашому районі та за кордоном.",
|
||||
"mission": "Однак цей проект не автоматизований; потрібні зусилля всіх нас, щоб покращити цей проект. Переглядаючи карту, ви можете натиснути \"Новий Вузол\", щоб додати раніше невідому установку. З вашою допомогою ми можемо досягти нашої мети підвищення прозорості та громадської обізнаності щодо інфраструктури спостереження.",
|
||||
"firsthandKnowledge": "ВАЖЛИВО: Додавайте лише пристрої спостереження, які ви особисто спостерігали власними очима. Політика OpenStreetMap та Google забороняє використання таких джерел, як зображення Street View для подань. Ваші внески повинні базуватися на ваших власних безпосередніх спостереженнях.",
|
||||
"privacy": "Примітка щодо конфіденційності: Цей додаток працює повністю локально на вашому пристрої та використовує сторонній API OpenStreetMap для зберігання даних та подань. DeFlock не збирає та не зберігає жодних даних користувачів і не несе відповідальності за управління обліковими записами.",
|
||||
"tileNote": "ПРИМІТКА: Безкоштовні плитки карт з OpenStreetMap можуть завантажуватися дуже повільно. Альтернативні постачальники плиток можна налаштувати в Налаштуваннях > Розширені.",
|
||||
"moreInfo": "Більше посилань можна знайти в Налаштуваннях > Про програму.",
|
||||
"dontShowAgain": "Не показувати це привітальне повідомлення знову",
|
||||
"getStarted": "Давайте почнемо DeFlocking!"
|
||||
},
|
||||
"submissionGuide": {
|
||||
"title": "Найкращі Практики Подання",
|
||||
"description": "Перш ніж подати ваш перший пристрій спостереження, будь ласка, приділіть хвилину для перегляду цих важливих вказівок, щоб забезпечити високоякісні внески в OpenStreetMap.",
|
||||
"bestPractices": "• Картуйте лише пристрої, які ви особисто спостерігали\n• Приділіть час точному визначенню типу пристрою та виробника\n• Використовуйте точне позиціонування - збільшуйте масштаб перед розміщенням маркера\n• Включайте інформацію про напрямок, коли це застосовно\n• Двічі перевірте ваші вибори тегів перед поданням",
|
||||
"placementNote": "Пам'ятайте: Точні дані з перших рук є важливими для спільноти DeFlock та проекту OpenStreetMap.",
|
||||
"moreInfo": "Для детального керівництва з ідентифікації пристроїв та найкращих практик картування:",
|
||||
"identificationGuide": "Посібник Ідентифікації",
|
||||
"osmWiki": "OpenStreetMap Wiki",
|
||||
"dontShowAgain": "Не показувати цей посібник знову",
|
||||
"gotIt": "Зрозуміло!"
|
||||
},
|
||||
"positioningTutorial": {
|
||||
"title": "Уточнити Ваше Місце",
|
||||
"instructions": "Перетягніть карту, щоб точно розмістити маркер пристрою над місцем розташування пристрою спостереження.",
|
||||
"hint": "Ви можете збільшити масштаб для кращої точності перед позиціонуванням."
|
||||
},
|
||||
"actions": {
|
||||
"tagNode": "Новий Вузол",
|
||||
"download": "Завантажити",
|
||||
"settings": "Налаштування",
|
||||
"edit": "Редагувати",
|
||||
"delete": "Видалити",
|
||||
"cancel": "Скасувати",
|
||||
"ok": "ОК",
|
||||
"close": "Закрити",
|
||||
"submit": "Подати",
|
||||
"logIn": "Увійти",
|
||||
"saveEdit": "Зберегти Редагування",
|
||||
"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": "Увімкнути слідування",
|
||||
"follow": "Увімкнути слідування (обертання)",
|
||||
"rotating": "Вимкнути слідування"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Налаштування",
|
||||
"language": "Мова та Регіон",
|
||||
"systemDefault": "Системна За Замовчуванням",
|
||||
"aboutInfo": "Про / Інформація",
|
||||
"aboutThisApp": "Про Цей Додаток",
|
||||
"aboutSubtitle": "Інформація про додаток та автори",
|
||||
"languageSubtitle": "Оберіть вашу бажану мову та одиниці вимірювання",
|
||||
"distanceUnit": "Одиниці Відстані",
|
||||
"distanceUnitSubtitle": "Оберіть між метричними (км/м) або імперськими (миля/фут) одиницями",
|
||||
"metricUnits": "Метричні (км, м)",
|
||||
"imperialUnits": "Імперські (миля, фут)",
|
||||
"maxNodes": "Максимум намальованих вузлів",
|
||||
"maxNodesSubtitle": "Встановити верхню межу для кількості вузлів на карті.",
|
||||
"maxNodesWarning": "Ви, мабуть, не хочете робити це, якщо ви абсолютно не впевнені, що у вас є вагома причина для цього.",
|
||||
"offlineMode": "Офлайн Режим",
|
||||
"offlineModeSubtitle": "Вимкнути всі мережеві запити, крім локальних/офлайн областей.",
|
||||
"pauseQueueProcessing": "Призупинити Обробку Черги Завантаження",
|
||||
"pauseQueueProcessingSubtitle": "Припинити завантаження змін у черзі, зберігаючи доступ до живих даних.",
|
||||
"offlineModeWarningTitle": "Активні Завантаження",
|
||||
"offlineModeWarningMessage": "Включення офлайн режиму скасує всі активні завантаження областей. Ви хочете продовжити?",
|
||||
"enableOfflineMode": "Увімкнути Офлайн Режим",
|
||||
"profiles": "Профілі",
|
||||
"profilesSubtitle": "Управління профілями вузлів та операторів",
|
||||
"offlineSettings": "Офлайн Налаштування",
|
||||
"offlineSettingsSubtitle": "Управління офлайн режимом та завантаженими областями",
|
||||
"advancedSettings": "Розширені Налаштування",
|
||||
"advancedSettingsSubtitle": "Продуктивність, сповіщення та налаштування постачальників плиток",
|
||||
"proximityAlerts": "Сповіщення Про Близькість",
|
||||
"keepScreenAwake": "Тримати екран активним",
|
||||
"networkStatusIndicator": "Індикатор Стану Мережі",
|
||||
"hideZoomControls": "Приховати Елементи Керування Масштабом",
|
||||
"enableOfflineFeatures": "Увімкнути Офлайн-Функції",
|
||||
"enableOfflineFeaturesTitle": "Увімкнути офлайн-функції",
|
||||
"enableOfflineFeaturesSubtitle": "Дозволити завантаження та використання офлайн-областей карти. Якщо вимкнено, офлайн-режим і завантажені області будуть недоступні."
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "Тримати екран активним під час використання програми",
|
||||
"subtitle": "Запобігає автоматичному вимкненню екрана під час використання програми"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "Приховати елементи керування масштабом",
|
||||
"subtitle": "Приховує кнопки масштабування +/- та індикатор рівня масштабу. Ви все ще можете масштабувати жестами."
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "Отримувати сповіщення при наближенні до пристроїв спостереження",
|
||||
"batteryUsage": "Використовує додаткову батарею для безперервного моніторингу місцезнаходження",
|
||||
"notificationsEnabled": "✓ Сповіщення увімкнено",
|
||||
"notificationsDisabled": "⚠ Сповіщення вимкнено",
|
||||
"permissionRequired": "Потрібен дозвіл на сповіщення",
|
||||
"permissionExplanation": "Push-сповіщення вимкнено. Ви бачитимете лише сповіщення в додатку і не будете сповіщені, коли додаток працює у фоновому режимі.",
|
||||
"enableNotifications": "Увімкнути Сповіщення",
|
||||
"checkingPermissions": "Перевірка дозволів...",
|
||||
"alertDistance": "Відстань сповіщення: ",
|
||||
"rangeInfo": "Діапазон: {}-{} {} (за замовчуванням: {})",
|
||||
"backgroundServiceTitle": "Сповіщення про наближення активні",
|
||||
"backgroundServiceText": "Пошук пристроїв стеження поблизу",
|
||||
"backgroundServiceChannel": "Моніторинг сповіщень про наближення",
|
||||
"openSettings": "Відкрити налаштування",
|
||||
"blockedTitle": "Сповіщення заблоковано",
|
||||
"blockedMessage": "Сповіщення для DeFlock вимкнено. Увімкніть їх у налаштуваннях системи, щоб отримувати сповіщення про наближення."
|
||||
},
|
||||
"node": {
|
||||
"title": "Вузол #{}",
|
||||
"tagSheetTitle": "Теги Пристрою Спостереження",
|
||||
"queuedForUpload": "Вузол поставлено в чергу для завантаження",
|
||||
"editQueuedForUpload": "Редагування вузла поставлено в чергу для завантаження",
|
||||
"deleteQueuedForUpload": "Видалення вузла поставлено в чергу для завантаження",
|
||||
"confirmDeleteTitle": "Видалити Вузол",
|
||||
"confirmDeleteMessage": "Ви впевнені, що хочете видалити вузол #{}? Цю дію не можна скасувати.",
|
||||
"deleteReasonLabel": "Причина Видалення",
|
||||
"deleteReasonSelectHint": "Вибрати...",
|
||||
"deleteReasonDeviceRemoved": "Пристрій видалено",
|
||||
"deleteReasonDuplicateNode": "Дубльований вузол",
|
||||
"deleteReasonMisidentifiedInfra": "Неправильно ідентифікована інфраструктура",
|
||||
"deleteReasonSpamVandalism": "Спам/вандалізм",
|
||||
"deleteReasonCustom": "Власний..",
|
||||
"deleteReasonHint": "Опишіть причину...",
|
||||
"mustBeLoggedInToDelete": "Ви повинні увійти в обліковий запис OpenStreetMap, щоб надавати дані карти.",
|
||||
"uploadPending": "Завантаження очікує",
|
||||
"uploadCreatingChangeset": "Створення набору змін...",
|
||||
"uploadUploading": "Завантаження...",
|
||||
"uploadClosingChangeset": "Закриття набору змін...",
|
||||
"uploadError": "Помилка завантаження",
|
||||
"uploadComplete": "Завантаження завершено",
|
||||
"viewInQueue": "Переглянути в Черзі",
|
||||
"deletedSuccessfully": "Цей вузол було успішно видалено з OpenStreetMap."
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "Профіль",
|
||||
"selectProfile": "Оберіть профіль...",
|
||||
"profileRequired": "Будь ласка, оберіть профіль для продовження.",
|
||||
"direction": "Напрямок {}°",
|
||||
"profileNoDirectionInfo": "Цей профіль не потребує напрямку.",
|
||||
"mustBeLoggedIn": "Ви повинні увійти в систему, щоб подавати нові вузли. Будь ласка, увійдіть через Налаштування.",
|
||||
"enableSubmittableProfile": "Увімкніть профіль, який можна подавати, в Налаштуваннях для подання нових вузлів.",
|
||||
"profileViewOnlyWarning": "Цей профіль призначений лише для перегляду карти. Будь ласка, оберіть профіль, який можна подавати, для подання нових вузлів.",
|
||||
"loadingAreaData": "Завантаження даних області... Будь ласка, зачекайте перед поданням.",
|
||||
"refineTags": "Уточнити Теги"
|
||||
},
|
||||
"editNode": {
|
||||
"title": "Редагувати Вузол #{}",
|
||||
"profile": "Профіль",
|
||||
"selectProfile": "Оберіть профіль...",
|
||||
"profileRequired": "Будь ласка, оберіть профіль для продовження.",
|
||||
"direction": "Напрямок {}°",
|
||||
"profileNoDirectionInfo": "Цей профіль не потребує напрямку.",
|
||||
"temporarilyDisabled": "Редагування тимчасово вимкнено, поки ми розбираємося з помилкою - вибачте - перевірте пізніше.",
|
||||
"mustBeLoggedIn": "Ви повинні увійти в систему, щоб редагувати вузли. Будь ласка, увійдіть через Налаштування.",
|
||||
"sandboxModeWarning": "Не можна подавати редагування виробничих вузлів в sandbox. Перейдіть в режим Виробництва в Налаштуваннях для редагування вузлів.",
|
||||
"enableSubmittableProfile": "Увімкніть профіль, який можна подавати, в Налаштуваннях для редагування вузлів.",
|
||||
"profileViewOnlyWarning": "Цей профіль призначений лише для перегляду карти. Будь ласка, оберіть профіль, який можна подавати, для редагування вузлів.",
|
||||
"loadingAreaData": "Завантаження даних області... Будь ласка, зачекайте перед поданням.",
|
||||
"cannotMoveConstrainedNode": "Неможливо перемістити цю камеру - вона підключена до іншого елементу карти (OSM шлях/відношення). Ви все ще можете редагувати її теги та напрямок.",
|
||||
"zoomInRequiredMessage": "Збільште масштаб до принаймні рівня {} для додавання або редагування вузлів спостереження. Це забезпечує точне позиціонування для точного картування.",
|
||||
"extractFromWay": "Витягнути вузол з шляху/відношення",
|
||||
"extractFromWaySubtitle": "Створити новий вузол з тими ж тегами, дозволити переміщення до нового місця",
|
||||
"refineTags": "Уточнити Теги",
|
||||
"existingTags": "<Існуючі теги>",
|
||||
"noChangesDetected": "Зміни не виявлено - нічого подавати",
|
||||
"noChangesTitle": "Немає Змін для Подання",
|
||||
"noChangesMessage": "Ви не внесли жодних змін до цього вузла. Щоб подати редагування, вам потрібно змінити місце, профіль, напрямки або теги."
|
||||
},
|
||||
"download": {
|
||||
"title": "Завантажити Область Карти",
|
||||
"maxZoomLevel": "Максимальний рівень масштабування",
|
||||
"storageEstimate": "Оцінка сховища:",
|
||||
"tilesAndSize": "{} плиток, {} МБ",
|
||||
"minZoom": "Мін масштаб:",
|
||||
"maxRecommendedZoom": "Максимальний рекомендований масштаб: Z{}",
|
||||
"withinTileLimit": "В межах {} ліміту плиток",
|
||||
"exceedsTileLimit": "Поточний вибір перевищує {} ліміт плиток",
|
||||
"offlineModeWarning": "Завантаження вимкнено в офлайн режимі. Вимкніть офлайн режим для завантаження нових областей.",
|
||||
"areaTooBigMessage": "Збільште масштаб до принаймні рівня {} для завантаження офлайн областей. Великі завантаження областей можуть призвести до того, що додаток перестане відповідати.",
|
||||
"downloadStarted": "Завантаження почалося! Отримання плиток та вузлів...",
|
||||
"downloadFailed": "Не вдалося почати завантаження: {}",
|
||||
"offlineNotPermitted": "Сервер {} не дозволяє офлайн-завантаження. Перейдіть на постачальника плиток, який дозволяє офлайн-використання (наприклад, Bing Maps, Mapbox або власний сервер плиток).",
|
||||
"currentTileProvider": "поточна плитка",
|
||||
"noTileProviderSelected": "Постачальник плиток не вибраний. Виберіть стиль карти перед завантаженням офлайн-області."
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "Завантаження Почалося",
|
||||
"message": "Завантаження почалося! Отримання плиток та вузлів...",
|
||||
"ok": "ОК",
|
||||
"viewProgress": "Переглянути Прогрес в Налаштуваннях"
|
||||
},
|
||||
"uploadMode": {
|
||||
"title": "Місце Призначення Завантаження",
|
||||
"subtitle": "Оберіть, куди завантажуються камери",
|
||||
"production": "Виробництво",
|
||||
"sandbox": "Sandbox",
|
||||
"simulate": "Симуляція",
|
||||
"productionDescription": "Завантажити в активну базу даних OSM (видима всім користувачам)",
|
||||
"sandboxDescription": "Завантаження йдуть в OSM Sandbox (безпечно для тестування, регулярно скидається).",
|
||||
"simulateDescription": "Симулювати завантаження (не зв'язується з серверами OSM)",
|
||||
"cannotChangeWithQueue": "Неможливо змінити місце призначення завантаження, поки в черзі є {} елементів. Спочатку очистіть чергу."
|
||||
},
|
||||
"auth": {
|
||||
"osmAccountTitle": "Обліковий Запис OpenStreetMap",
|
||||
"osmAccountSubtitle": "Управління входом OSM та перегляд ваших внесків",
|
||||
"loggedInAs": "Увійшли як {}",
|
||||
"loginToOSM": "Увійти в OpenStreetMap",
|
||||
"tapToLogout": "Натисніть для виходу",
|
||||
"requiredToSubmit": "Потрібно для подання даних камер",
|
||||
"loggedOut": "Вихід здійснено",
|
||||
"testConnection": "Тестувати З'єднання",
|
||||
"testConnectionSubtitle": "Перевірити, що облікові дані OSM працюють",
|
||||
"connectionOK": "З'єднання в порядку - облікові дані дійсні",
|
||||
"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": "Зараз підключено до: Sandbox OpenStreetMap",
|
||||
"currentDestinationSimulate": "Зараз в: Режимі симуляції (без справжнього облікового запису)",
|
||||
"viewMessages": "Переглянути Повідомлення в OSM",
|
||||
"unreadMessagesCount": "У вас {} непрочитаних повідомлень",
|
||||
"noUnreadMessages": "Немає непрочитаних повідомлень",
|
||||
"reauthRequired": "Оновити Автентифікацію",
|
||||
"reauthExplanation": "Ви повинні оновити вашу автентифікацію, щоб отримувати сповіщення про повідомлення OSM через додаток.",
|
||||
"reauthBenefit": "Це дозволить показувати точки сповіщень, коли у вас є непрочитані повідомлення в OpenStreetMap.",
|
||||
"reauthNow": "Зробити Зараз",
|
||||
"newChangesetComments": "Новий Коментар до Набору Змін",
|
||||
"newChangesetCommentsSubtitle": "Хтось прокоментував один або декілька ваших наборів змін",
|
||||
"reauthLater": "Пізніше",
|
||||
"unreadNotificationsTitle": "У Вас Є Непрочитані Сповіщення",
|
||||
"unreadNotificationsMessage": "У вас є непрочитані повідомлення OSM та/або нові коментарі до ваших наборів змін.",
|
||||
"unreadNotificationsView": "Переглянути Зараз"
|
||||
},
|
||||
"queue": {
|
||||
"title": "Черга Завантаження",
|
||||
"subtitle": "Управління очікуваними завантаженнями пристроїв спостереження",
|
||||
"pendingUploads": "Очікувані завантаження: {}",
|
||||
"pendingItemsCount": "Очікуючі Елементи: {}",
|
||||
"nothingInQueue": "Нічого в черзі",
|
||||
"simulateModeEnabled": "Режим симуляції увімкнено – завантаження симулюються",
|
||||
"sandboxMode": "Режим sandbox – завантаження йдуть в OSM Sandbox",
|
||||
"tapToViewQueue": "Натисніть для перегляду черги",
|
||||
"clearUploadQueue": "Очистити Чергу Завантаження",
|
||||
"removeAllPending": "Видалити всі {} очікувані завантаження",
|
||||
"clearQueueTitle": "Очистити Чергу",
|
||||
"clearQueueConfirm": "Видалити всі {} очікувані завантаження?",
|
||||
"queueCleared": "Чергу очищено",
|
||||
"uploadQueueTitle": "Черга Завантаження ({} елементів)",
|
||||
"queueIsEmpty": "Черга порожня",
|
||||
"itemWithIndex": "Елемент {}",
|
||||
"error": " (Помилка)",
|
||||
"completing": " (Завершуємо...)",
|
||||
"destination": "Місце призначення: {}",
|
||||
"latitude": "Широта: {}",
|
||||
"longitude": "Довгота: {}",
|
||||
"direction": "Напрямок: {}°",
|
||||
"attempts": "Спроби: {}",
|
||||
"uploadFailedRetry": "Завантаження не вдалося. Натисніть повторити, щоб спробувати знову.",
|
||||
"retryUpload": "Повторити завантаження",
|
||||
"clearAll": "Очистити Все",
|
||||
"errorDetails": "Деталі Помилки",
|
||||
"creatingChangeset": " (Створення набору змін...)",
|
||||
"uploading": " (Завантаження...)",
|
||||
"closingChangeset": " (Закриття набору змін...)",
|
||||
"processingPaused": "Обробка Черги Призупинена",
|
||||
"pausedDueToOffline": "Обробка завантаження призупинена, оскільки увімкнено офлайн режим.",
|
||||
"pausedByUser": "Обробка завантаження призупинена вручну.",
|
||||
"inFlightWaitTitle": "Завершення Подання",
|
||||
"inFlightWaitMessage": "Наразі триває подання, яке потрібно завершити перед застосуванням цього налаштування. Це має зайняти лише мить.",
|
||||
"inFlightCompleteTitle": "Подання Завершено",
|
||||
"inFlightCompleteMessage": "Ваше подання успішно завершено. Застосування вашого налаштування зараз."
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "Постачальники Плиток",
|
||||
"noProvidersConfigured": "Постачальників плиток не налаштовано",
|
||||
"tileTypesCount": "{} типів плиток",
|
||||
"apiKeyConfigured": "API ключ налаштовано",
|
||||
"needsApiKey": "Потрібен API ключ",
|
||||
"editProvider": "Редагувати Постачальника",
|
||||
"addProvider": "Додати Постачальника",
|
||||
"deleteProvider": "Видалити Постачальника",
|
||||
"deleteProviderConfirm": "Ви впевнені, що хочете видалити \"{}\"?",
|
||||
"clearCaches": "Очистити Кеш",
|
||||
"clearCachesConfirm": "Очистити всі кеші тайлів для \"{}\"? Це звільнить місце на диску, але тайли доведеться знову завантажити при перегляді цих областей.",
|
||||
"cachesCleared": "Кеш очищено для \"{}\"",
|
||||
"providerName": "Назва Постачальника",
|
||||
"providerNameHint": "напр., Кастомні Карти ТОВ",
|
||||
"providerNameRequired": "Назва постачальника обов'язкова",
|
||||
"apiKey": "API Ключ (Опціонально)",
|
||||
"apiKeyHint": "Введіть API ключ, якщо потрібно для типів плиток",
|
||||
"tileTypes": "Типи Плиток",
|
||||
"addType": "Додати Тип",
|
||||
"noTileTypesConfigured": "Типи плиток не налаштовано",
|
||||
"atLeastOneTileTypeRequired": "Потрібен принаймні один тип плитки",
|
||||
"manageTileProviders": "Управляти Постачальниками"
|
||||
},
|
||||
"tileTypeEditor": {
|
||||
"editTileType": "Редагувати Тип Плитки",
|
||||
"addTileType": "Додати Тип Плитки",
|
||||
"name": "Назва",
|
||||
"nameHint": "напр., Супутник",
|
||||
"nameRequired": "Назва обов'язкова",
|
||||
"urlTemplate": "Шаблон URL",
|
||||
"urlTemplateHint": "https://example.com/{z}/{x}/{y}.png",
|
||||
"urlTemplateRequired": "Шаблон URL обов'язковий",
|
||||
"urlTemplatePlaceholders": "URL повинен містити або {quadkey}, або {z}, {x} і {y} заповнювачі",
|
||||
"attribution": "Атрибуція",
|
||||
"attributionHint": "© Постачальник Карт",
|
||||
"attributionRequired": "Атрибуція обов'язкова",
|
||||
"maxZoom": "Максимальний Рівень Масштабування",
|
||||
"maxZoomHint": "Максимальний рівень масштабування (1-23)",
|
||||
"maxZoomRequired": "Максимальний масштаб обов'язковий",
|
||||
"maxZoomInvalid": "Максимальний масштаб повинен бути числом",
|
||||
"maxZoomRange": "Максимальний масштаб повинен бути між {} і {}",
|
||||
"fetchPreview": "Отримати Попередній Перегляд",
|
||||
"previewTileLoaded": "Плитка попереднього перегляду успішно завантажена",
|
||||
"previewTileFailed": "Не вдалося отримати попередній перегляд: {}",
|
||||
"save": "Зберегти"
|
||||
},
|
||||
"profiles": {
|
||||
"nodeProfiles": "Профілі Вузлів",
|
||||
"newProfile": "Новий Профіль",
|
||||
"builtIn": "Вбудований",
|
||||
"custom": "Власний",
|
||||
"view": "Переглянути",
|
||||
"deleteProfile": "Видалити Профіль",
|
||||
"deleteProfileConfirm": "Ви впевнені, що хочете видалити \"{}\"?",
|
||||
"profileDeleted": "Профіль видалено",
|
||||
"getMore": "Отримати більше...",
|
||||
"addProfileChoice": "Додати Профіль",
|
||||
"addProfileChoiceMessage": "Як би ви хотіли додати профіль?",
|
||||
"createCustomProfile": "Створити Власний Профіль",
|
||||
"createCustomProfileDescription": "Побудувати профіль з нуля з власними тегами",
|
||||
"importFromWebsite": "Імпортувати з Веб-сайту",
|
||||
"importFromWebsiteDescription": "Переглянути та імпортувати профілі з deflock.me/identify"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "Плитки Карти",
|
||||
"manageProviders": "Управляти Постачальниками",
|
||||
"attribution": "Атрибуція Карти",
|
||||
"mapAttribution": "Джерело карти: {}",
|
||||
"couldNotOpenLink": "Не вдалося відкрити посилання",
|
||||
"openLicense": "Відкрити ліцензію: {}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "Переглянути Профіль",
|
||||
"newProfile": "Новий Профіль",
|
||||
"editProfile": "Редагувати Профіль",
|
||||
"profileName": "Назва профілю",
|
||||
"profileNameHint": "напр., Власна ALPR Камера",
|
||||
"profileNameRequired": "Назва профілю обов'язкова",
|
||||
"requiresDirection": "Потребує Напрямку",
|
||||
"requiresDirectionSubtitle": "Чи потрібен тег напрямку для камер цього типу",
|
||||
"fov": "Поле Зору",
|
||||
"fovHint": "FOV в градусах (залиште порожнім для значення за замовчуванням)",
|
||||
"fovSubtitle": "Поле зору камери - використовується для ширини конуса та формату подання діапазону",
|
||||
"fovInvalid": "FOV повинно бути між 1 і 360 градусами",
|
||||
"fov360": "Поле Зору 360°",
|
||||
"fov360Subtitle": "Камера має всенаправлене поле зору на 360 градусів",
|
||||
"submittable": "Можна Подавати",
|
||||
"submittableSubtitle": "Чи можна використовувати цей профіль для подань камер",
|
||||
"osmTags": "OSM Теги",
|
||||
"addTag": "Додати тег",
|
||||
"saveProfile": "Зберегти Профіль",
|
||||
"keyHint": "ключ",
|
||||
"valueHint": "значення",
|
||||
"atLeastOneTagRequired": "Потрібен принаймні один тег",
|
||||
"profileSaved": "Профіль \"{}\" збережено"
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "Новий Профіль Оператора",
|
||||
"editOperatorProfile": "Редагувати Профіль Оператора",
|
||||
"operatorName": "Назва оператора",
|
||||
"operatorNameHint": "напр., Поліція Києва",
|
||||
"operatorNameRequired": "Назва оператора обов'язкова",
|
||||
"operatorProfileSaved": "Профіль оператора \"{}\" збережено"
|
||||
},
|
||||
"operatorProfiles": {
|
||||
"title": "Профілі Операторів",
|
||||
"noProfilesMessage": "Профілі операторів не визначено. Створіть один для застосування тегів операторів до подань вузлів.",
|
||||
"tagsCount": "{} тегів",
|
||||
"deleteOperatorProfile": "Видалити Профіль Оператора",
|
||||
"deleteOperatorProfileConfirm": "Ви впевнені, що хочете видалити \"{}\"?",
|
||||
"operatorProfileDeleted": "Профіль оператора видалено"
|
||||
},
|
||||
"offlineAreas": {
|
||||
"title": "Офлайн Області",
|
||||
"noAreasTitle": "Немає офлайн областей",
|
||||
"noAreasSubtitle": "Завантажте область карти для офлайн використання.",
|
||||
"provider": "Постачальник",
|
||||
"maxZoom": "Максимальний масштаб",
|
||||
"zoomLevels": "Z{}-{}",
|
||||
"latitude": "Широта",
|
||||
"longitude": "Довгота",
|
||||
"tiles": "Плитки",
|
||||
"size": "Розмір",
|
||||
"nodes": "Вузли",
|
||||
"areaIdFallback": "Область {}...",
|
||||
"renameArea": "Перейменувати область",
|
||||
"refreshWorldTiles": "Оновити/перезавантажити світові плитки",
|
||||
"deleteOfflineArea": "Видалити офлайн область",
|
||||
"cancelDownload": "Скасувати завантаження",
|
||||
"renameAreaDialogTitle": "Перейменувати Офлайн Область",
|
||||
"areaNameLabel": "Назва Області",
|
||||
"renameButton": "Перейменувати",
|
||||
"megabytes": "МБ",
|
||||
"kilobytes": "КБ",
|
||||
"progress": "{}%",
|
||||
"refreshArea": "Оновити область",
|
||||
"refreshAreaDialogTitle": "Оновити Офлайн Область",
|
||||
"refreshAreaDialogSubtitle": "Виберіть що оновити для цієї області:",
|
||||
"refreshTiles": "Оновити Плитки Карти",
|
||||
"refreshTilesSubtitle": "Перезавантажити всі плитки для оновлених зображень",
|
||||
"refreshNodes": "Оновити Вузли",
|
||||
"refreshNodesSubtitle": "Повторно отримати дані вузлів для цієї області",
|
||||
"startRefresh": "Почати Оновлення",
|
||||
"refreshStarted": "Оновлення розпочато!",
|
||||
"refreshFailed": "Оновлення не вдалося: {}",
|
||||
"disableConfirmTitle": "Видалити Наявні Дані Офлайн-Областей?",
|
||||
"disableConfirmMessage": "У вас вже є наявні дані офлайн-областей. Вимкнення офлайн-функцій завадить додатку використовувати їх. Бажаєте зберегти ці дані на пристрої на випадок, якщо ви знову увімкнете офлайн-функції пізніше, чи видалити їх зараз, щоб звільнити місце на диску?",
|
||||
"keepData": "Зберегти Дані",
|
||||
"deleteData": "Видалити Дані"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "Уточнити Теги",
|
||||
"operatorProfile": "Профіль Оператора",
|
||||
"done": "Готово",
|
||||
"none": "Немає",
|
||||
"noAdditionalOperatorTags": "Немає додаткових тегів оператора",
|
||||
"additionalTags": "додаткові теги",
|
||||
"additionalTagsTitle": "Додаткові Теги",
|
||||
"noTagsDefinedForProfile": "Для цього профілю оператора не визначено тегів.",
|
||||
"noOperatorProfiles": "Профілі операторів не визначено",
|
||||
"noOperatorProfilesMessage": "Створіть профілі операторів в Налаштуваннях для застосування додаткових тегів до ваших подань вузлів.",
|
||||
"profileTags": "Теги Профілю",
|
||||
"profileTagsDescription": "Заповніть ці опціональні значення тегів для більш детальних подань:",
|
||||
"selectValue": "Вибрати значення...",
|
||||
"noValue": "(залишити порожнім)",
|
||||
"noSuggestions": "Немає доступних пропозицій",
|
||||
"existingTagsTitle": "Існуючі Теги",
|
||||
"existingTagsDescription": "Редагуйте існуючі теги на цьому пристрої. Додайте, видаліть або змініть будь-який тег:",
|
||||
"existingOperator": "<Існуючий оператор>",
|
||||
"existingOperatorTags": "існуючі теги оператора"
|
||||
},
|
||||
"layerSelector": {
|
||||
"cannotChangeTileTypes": "Неможливо змінити типи плиток під час завантаження офлайн областей",
|
||||
"selectMapLayer": "Вибрати Шар Карти",
|
||||
"noTileProvidersAvailable": "Немає доступних постачальників плиток"
|
||||
},
|
||||
"advancedEdit": {
|
||||
"title": "Розширені Опції Редагування",
|
||||
"subtitle": "Ці редактори пропонують більш розширені можливості для складних редагувань.",
|
||||
"webEditors": "Веб Редактори",
|
||||
"mobileEditors": "Мобільні Редактори",
|
||||
"iDEditor": "iD Редактор",
|
||||
"iDEditorSubtitle": "Повнофункціональний веб редактор - завжди працює",
|
||||
"rapidEditor": "RapiD Редактор",
|
||||
"rapidEditorSubtitle": "AI-асистоване редагування з даними Facebook",
|
||||
"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": "Повільні дані спостереження",
|
||||
"rateLimited": "Обмежено швидкість сервером",
|
||||
"networkError": "Помилка мережі"
|
||||
},
|
||||
"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": "Максимальна кількість нещодавніх пошуків для запам'ятовування"
|
||||
},
|
||||
"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": "URL",
|
||||
"coordinates": "Координати",
|
||||
"noAddressAvailable": "Адреса недоступна"
|
||||
},
|
||||
"units": {
|
||||
"meters": "м",
|
||||
"feet": "фут",
|
||||
"kilometers": "км",
|
||||
"miles": "миля",
|
||||
"metersLong": "метри",
|
||||
"feetLong": "фути",
|
||||
"kilometersLong": "кілометри",
|
||||
"milesLong": "милі",
|
||||
"metric": "Метричні",
|
||||
"imperial": "Імперські",
|
||||
"metricDescription": "Метричні (км, м)",
|
||||
"imperialDescription": "Імперські (миля, фут)"
|
||||
}
|
||||
}
|
||||
+74
-14
@@ -111,7 +111,20 @@
|
||||
"advancedSettings": "高级设置",
|
||||
"advancedSettingsSubtitle": "性能、警报和地图提供商设置",
|
||||
"proximityAlerts": "邻近警报",
|
||||
"networkStatusIndicator": "网络状态指示器"
|
||||
"keepScreenAwake": "保持屏幕常亮",
|
||||
"networkStatusIndicator": "网络状态指示器",
|
||||
"hideZoomControls": "隐藏缩放控件",
|
||||
"enableOfflineFeatures": "启用离线功能",
|
||||
"enableOfflineFeaturesTitle": "启用离线功能",
|
||||
"enableOfflineFeaturesSubtitle": "允许下载和使用离线地图区域。禁用后,离线模式和已下载的区域将不可用。"
|
||||
},
|
||||
"keepScreenAwake": {
|
||||
"title": "使用应用时保持屏幕常亮",
|
||||
"subtitle": "防止在使用应用期间屏幕自动熄灭"
|
||||
},
|
||||
"hideZoomControls": {
|
||||
"title": "隐藏缩放控件",
|
||||
"subtitle": "隐藏 +/- 缩放按钮和缩放级别指示器。您仍然可以使用捏合手势进行缩放。"
|
||||
},
|
||||
"proximityAlerts": {
|
||||
"getNotified": "接近监控设备时接收通知",
|
||||
@@ -123,7 +136,13 @@
|
||||
"enableNotifications": "启用通知",
|
||||
"checkingPermissions": "检查权限中...",
|
||||
"alertDistance": "警报距离:",
|
||||
"rangeInfo": "范围:{}-{} {}(默认:{})"
|
||||
"rangeInfo": "范围:{}-{} {}(默认:{})",
|
||||
"backgroundServiceTitle": "邻近提醒已启用",
|
||||
"backgroundServiceText": "正在搜索附近的监控设备",
|
||||
"backgroundServiceChannel": "邻近提醒监控",
|
||||
"openSettings": "打开设置",
|
||||
"blockedTitle": "通知已被阻止",
|
||||
"blockedMessage": "DeFlock 的通知已关闭。请在系统设置中启用,以接收邻近提醒。"
|
||||
},
|
||||
"node": {
|
||||
"title": "节点 #{}",
|
||||
@@ -132,7 +151,24 @@
|
||||
"editQueuedForUpload": "节点编辑已排队上传",
|
||||
"deleteQueuedForUpload": "节点删除已排队上传",
|
||||
"confirmDeleteTitle": "删除节点",
|
||||
"confirmDeleteMessage": "您确定要删除节点 #{} 吗?此操作无法撤销。"
|
||||
"confirmDeleteMessage": "您确定要删除节点 #{} 吗?此操作无法撤销。",
|
||||
"deleteReasonLabel": "删除原因",
|
||||
"deleteReasonSelectHint": "请选择...",
|
||||
"deleteReasonDeviceRemoved": "设备已移除",
|
||||
"deleteReasonDuplicateNode": "重复节点",
|
||||
"deleteReasonMisidentifiedInfra": "识别错误的基础设施",
|
||||
"deleteReasonSpamVandalism": "垃圾信息/破坏",
|
||||
"deleteReasonCustom": "自定义..",
|
||||
"deleteReasonHint": "请描述原因...",
|
||||
"mustBeLoggedInToDelete": "您必须使用 OpenStreetMap 账户登录才能贡献地图数据。",
|
||||
"uploadPending": "上传待处理",
|
||||
"uploadCreatingChangeset": "正在创建变更集...",
|
||||
"uploadUploading": "正在上传...",
|
||||
"uploadClosingChangeset": "正在关闭变更集...",
|
||||
"uploadError": "上传失败",
|
||||
"uploadComplete": "上传完成",
|
||||
"viewInQueue": "在队列中查看",
|
||||
"deletedSuccessfully": "此节点已成功从 OpenStreetMap 删除。"
|
||||
},
|
||||
"addNode": {
|
||||
"profile": "配置文件",
|
||||
@@ -181,7 +217,10 @@
|
||||
"offlineModeWarning": "离线模式下禁用下载。禁用离线模式以下载新区域。",
|
||||
"areaTooBigMessage": "请放大至至少第{}级来下载离线区域。下载大区域可能导致应用程序无响应。",
|
||||
"downloadStarted": "下载已开始!正在获取瓦片和节点...",
|
||||
"downloadFailed": "启动下载失败:{}"
|
||||
"downloadFailed": "启动下载失败:{}",
|
||||
"offlineNotPermitted": "{}服务器不允许离线下载。请切换到允许离线使用的瓦片提供商(例如 Bing Maps、Mapbox 或自托管的瓦片服务器)。",
|
||||
"currentTileProvider": "当前瓦片",
|
||||
"noTileProviderSelected": "未选择瓦片提供商。请在下载离线区域之前选择地图样式。"
|
||||
},
|
||||
"downloadStarted": {
|
||||
"title": "下载已开始",
|
||||
@@ -234,7 +273,12 @@
|
||||
"reauthExplanation": "您必须刷新身份验证才能通过应用接收 OSM 消息通知。",
|
||||
"reauthBenefit": "这将在您在 OpenStreetMap 上有未读消息时启用通知点。",
|
||||
"reauthNow": "现在执行",
|
||||
"reauthLater": "稍后"
|
||||
"newChangesetComments": "新的变更集评论",
|
||||
"newChangesetCommentsSubtitle": "有人评论了您的一个或多个变更集",
|
||||
"reauthLater": "稍后",
|
||||
"unreadNotificationsTitle": "您有未读通知",
|
||||
"unreadNotificationsMessage": "您有未读的 OSM 消息和/或对您变更集的新评论。",
|
||||
"unreadNotificationsView": "立即查看"
|
||||
},
|
||||
"queue": {
|
||||
"title": "上传队列",
|
||||
@@ -269,7 +313,11 @@
|
||||
"closingChangeset": " (关闭变更集...)",
|
||||
"processingPaused": "队列处理已暂停",
|
||||
"pausedDueToOffline": "因为离线模式已启用,上传处理已暂停。",
|
||||
"pausedByUser": "上传处理已手动暂停。"
|
||||
"pausedByUser": "上传处理已手动暂停。",
|
||||
"inFlightWaitTitle": "正在完成提交",
|
||||
"inFlightWaitMessage": "当前有一个提交正在进行中,需要先完成才能应用此设置。这应该只需要一点时间。",
|
||||
"inFlightCompleteTitle": "提交完成",
|
||||
"inFlightCompleteMessage": "您的提交已成功完成。正在应用您的设置。"
|
||||
},
|
||||
"tileProviders": {
|
||||
"title": "瓦片提供商",
|
||||
@@ -281,6 +329,9 @@
|
||||
"addProvider": "添加提供商",
|
||||
"deleteProvider": "删除提供商",
|
||||
"deleteProviderConfirm": "您确定要删除 \"{}\" 吗?",
|
||||
"clearCaches": "清除缓存",
|
||||
"clearCachesConfirm": "清除 \"{}\" 的所有瓦片缓存?这将释放存储空间,但在查看这些区域时需要重新下载瓦片。",
|
||||
"cachesCleared": "已清除 \"{}\" 的缓存",
|
||||
"providerName": "提供商名称",
|
||||
"providerNameHint": "例如,自定义地图公司",
|
||||
"providerNameRequired": "提供商名称为必填项",
|
||||
@@ -329,13 +380,16 @@
|
||||
"addProfileChoiceMessage": "您希望如何添加配置文件?",
|
||||
"createCustomProfile": "创建自定义配置文件",
|
||||
"createCustomProfileDescription": "从头开始构建带有您自己标签的配置文件",
|
||||
"importFromWebsite": "从网站导入",
|
||||
"importFromWebsite": "从网站导入",
|
||||
"importFromWebsiteDescription": "浏览并从 deflock.me/identify 导入配置文件"
|
||||
},
|
||||
"mapTiles": {
|
||||
"title": "地图瓦片",
|
||||
"manageProviders": "管理提供商",
|
||||
"attribution": "地图归属"
|
||||
"attribution": "地图归属",
|
||||
"mapAttribution": "地图来源:{}",
|
||||
"couldNotOpenLink": "无法打开链接",
|
||||
"openLicense": "打开许可证:{}"
|
||||
},
|
||||
"profileEditor": {
|
||||
"viewProfile": "查看配置文件",
|
||||
@@ -350,6 +404,8 @@
|
||||
"fovHint": "视场角度数(留空使用默认值)",
|
||||
"fovSubtitle": "摄像头视场角 - 用于锥体宽度和范围提交格式",
|
||||
"fovInvalid": "视场角必须在1到360度之间",
|
||||
"fov360": "360°视场角",
|
||||
"fov360Subtitle": "摄像头具有360度全方向视场角",
|
||||
"submittable": "可提交",
|
||||
"submittableSubtitle": "此配置文件是否可用于摄像头提交",
|
||||
"osmTags": "OSM 标签",
|
||||
@@ -362,7 +418,7 @@
|
||||
},
|
||||
"operatorProfileEditor": {
|
||||
"newOperatorProfile": "新建运营商配置文件",
|
||||
"editOperatorProfile": "编辑运营商配置文件",
|
||||
"editOperatorProfile": "编辑运营商配置文件",
|
||||
"operatorName": "运营商名称",
|
||||
"operatorNameHint": "例如,奥斯汀警察局",
|
||||
"operatorNameRequired": "运营商名称为必填项",
|
||||
@@ -408,7 +464,11 @@
|
||||
"refreshNodesSubtitle": "重新获取此区域的节点数据",
|
||||
"startRefresh": "开始刷新",
|
||||
"refreshStarted": "刷新已开始!",
|
||||
"refreshFailed": "刷新失败:{}"
|
||||
"refreshFailed": "刷新失败:{}",
|
||||
"disableConfirmTitle": "删除现有的离线区域数据?",
|
||||
"disableConfirmMessage": "您已有现有的离线区域数据。禁用离线功能将阻止应用使用这些数据。您是想将这些数据保留在设备上,以便日后重新启用离线功能时使用,还是现在删除以释放存储空间?",
|
||||
"keepData": "保留数据",
|
||||
"deleteData": "删除数据"
|
||||
},
|
||||
"refineTagsSheet": {
|
||||
"title": "细化标签",
|
||||
@@ -513,14 +573,14 @@
|
||||
"dataSourceDescription": "公用事业许可数据,表明潜在的监控基础设施安装站点",
|
||||
"dataSourceCredit": "数据收集和托管由 alprwatch.org 提供",
|
||||
"minimumDistance": "与真实节点的最小距离",
|
||||
"minimumDistanceSubtitle": "隐藏现有监控设备{}米范围内的疑似位置",
|
||||
"minimumDistanceSubtitle": "隐藏现有监控设备{}范围内的疑似位置",
|
||||
"updating": "正在更新疑似位置",
|
||||
"downloadingAndProcessing": "正在下载和处理数据...",
|
||||
"updateSuccess": "疑似位置更新成功",
|
||||
"updateFailed": "疑似位置更新失败",
|
||||
"neverFetched": "从未获取",
|
||||
"daysAgo": "{}天前",
|
||||
"hoursAgo": "{}小时前",
|
||||
"hoursAgo": "{}小时前",
|
||||
"minutesAgo": "{}分钟前",
|
||||
"justNow": "刚刚"
|
||||
},
|
||||
@@ -528,7 +588,7 @@
|
||||
"title": "疑似位置 #{}",
|
||||
"ticketNo": "工单号",
|
||||
"address": "地址",
|
||||
"street": "街道",
|
||||
"street": "街道",
|
||||
"city": "城市",
|
||||
"state": "州/省",
|
||||
"intersectingStreet": "交叉街道",
|
||||
@@ -552,4 +612,4 @@
|
||||
"metricDescription": "公制 (公里, 米)",
|
||||
"imperialDescription": "英制 (英里, 英尺)"
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
-4
@@ -14,20 +14,56 @@ 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/provider_tile_cache_manager.dart';
|
||||
import 'services/version_service.dart';
|
||||
import 'services/deep_link_service.dart';
|
||||
import 'services/deflock_tile_provider.dart' show TileLoadCancelledException, TileNotAvailableOfflineException;
|
||||
|
||||
|
||||
/// Suppress console noise for expected, already-handled tile load errors.
|
||||
///
|
||||
/// [TileLoadCancelledException] (tile scrolled off screen) and
|
||||
/// [TileNotAvailableOfflineException] (no cached data available) are thrown
|
||||
/// deliberately by DeflockOfflineTileImageProvider and are already handled —
|
||||
/// TileLayerManager.onTileLoadError() specifically skips retry logic for
|
||||
/// both. Flutter's image pipeline reports them via
|
||||
/// MultiFrameImageStreamCompleter with `silent: true`, but
|
||||
/// FlutterError.dumpErrorToConsole has a debug-mode assert() that ignores
|
||||
/// the silent flag and always prints to console anyway. This filters those
|
||||
/// two specific, expected exception types back out while leaving all other
|
||||
/// errors (including genuinely silent-but-unexpected ones) reported as
|
||||
/// normal.
|
||||
void _installTileErrorFilter() {
|
||||
final defaultOnError = FlutterError.onError;
|
||||
FlutterError.onError = (FlutterErrorDetails details) {
|
||||
final exception = details.exception;
|
||||
if (details.silent &&
|
||||
(exception is TileLoadCancelledException ||
|
||||
exception is TileNotAvailableOfflineException)) {
|
||||
return; // Already handled — don't spam the console.
|
||||
}
|
||||
if (defaultOnError != null) {
|
||||
defaultOnError(details);
|
||||
} else {
|
||||
FlutterError.presentError(details);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
|
||||
_installTileErrorFilter();
|
||||
|
||||
|
||||
// Initialize version service
|
||||
await VersionService().init();
|
||||
|
||||
|
||||
// Initialize localization service
|
||||
await LocalizationService.instance.init();
|
||||
|
||||
// Resolve platform cache directory for per-provider tile caching
|
||||
await ProviderTileCacheManager.init();
|
||||
|
||||
// Initialize deep link service
|
||||
await DeepLinkService().init();
|
||||
DeepLinkService().setNavigatorKey(_navigatorKey);
|
||||
@@ -88,8 +124,22 @@ class DeFlockApp extends StatelessWidget {
|
||||
'/settings/release-notes': (context) => const ReleaseNotesScreen(),
|
||||
},
|
||||
initialRoute: '/',
|
||||
|
||||
onUnknownRoute: (settings) {
|
||||
// Fallback for any genuinely unknown named route (e.g. a stale/bad
|
||||
// link). Deep links (deflockapp://...) are handled exclusively by
|
||||
// DeepLinkService via the app_links package - Flutter's own
|
||||
// implicit deep-link routing is disabled at the platform level
|
||||
// (see AndroidManifest.xml's flutter_deeplinking_enabled and
|
||||
// Info.plist's FlutterDeepLinkingEnabled) to avoid this handler
|
||||
// double-navigating and burying screens pushed by DeepLinkService.
|
||||
debugPrint('[Navigation] Unknown route intercepted: ${settings.name}');
|
||||
return MaterialPageRoute(
|
||||
settings: settings,
|
||||
builder: (_) => const HomeScreen(),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+109
-2
@@ -1,12 +1,14 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'app_state.dart';
|
||||
import 'services/offline_area_service.dart';
|
||||
import 'services/profile_service.dart';
|
||||
import 'services/suspected_location_cache.dart';
|
||||
import 'widgets/nuclear_reset_dialog.dart';
|
||||
import 'dev_config.dart';
|
||||
|
||||
|
||||
/// One-time migrations that run when users upgrade to specific versions.
|
||||
/// Each migration function is named after the version where it should run.
|
||||
@@ -115,6 +117,104 @@ class OneTimeMigrations {
|
||||
}
|
||||
}
|
||||
|
||||
/// Initialize profile ordering for existing users (v2.7.3)
|
||||
static Future<void> migrate_2_7_3(AppState appState) async {
|
||||
try {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
const orderKey = 'profile_order';
|
||||
|
||||
// Check if user already has custom profile ordering
|
||||
if (prefs.containsKey(orderKey)) {
|
||||
debugPrint('[Migration] 2.7.3: Profile order already exists, skipping');
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize with current profile order (preserves existing UI order)
|
||||
final currentProfiles = appState.profiles;
|
||||
final initialOrder = currentProfiles.map((p) => p.id).toList();
|
||||
|
||||
if (initialOrder.isNotEmpty) {
|
||||
await prefs.setStringList(orderKey, initialOrder);
|
||||
debugPrint('[Migration] 2.7.3: Initialized profile order with ${initialOrder.length} profiles');
|
||||
}
|
||||
|
||||
debugPrint('[Migration] 2.7.3 completed: initialized profile ordering');
|
||||
} catch (e) {
|
||||
debugPrint('[Migration] 2.7.3 ERROR: Failed to initialize profile ordering: $e');
|
||||
// Don't rethrow - this is non-critical, profiles will just use default order
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear non-360 FOV values from all profiles (v2.10.0)
|
||||
static Future<void> migrate_2_10_0(AppState appState) async {
|
||||
try {
|
||||
// Only perform this migration if non-360 FOVs are disabled
|
||||
if (kEnableNon360FOVs) {
|
||||
debugPrint('[Migration] 2.10.0: Non-360 FOVs enabled, skipping FOV cleanup');
|
||||
return;
|
||||
}
|
||||
|
||||
// Load all profiles from storage
|
||||
final profiles = await ProfileService().load();
|
||||
bool anyProfileChanged = false;
|
||||
int profilesCleared = 0;
|
||||
|
||||
// Clear non-360 FOV values from all profiles
|
||||
final updatedProfiles = profiles.map((profile) {
|
||||
if (profile.fov != null) {
|
||||
// Use approximation to handle floating point precision issues
|
||||
final fovValue = profile.fov!;
|
||||
final is360 = (fovValue - 360.0).abs() < 0.01; // Within 0.01 degrees of 360
|
||||
|
||||
if (!is360) {
|
||||
debugPrint('[Migration] 2.10.0: Clearing FOV $fovValue from profile: ${profile.name}');
|
||||
anyProfileChanged = true;
|
||||
profilesCleared++;
|
||||
return profile.copyWith(fov: null);
|
||||
}
|
||||
}
|
||||
return profile;
|
||||
}).toList();
|
||||
|
||||
// Save updated profiles back to storage if any changes were made
|
||||
if (anyProfileChanged) {
|
||||
await ProfileService().save(updatedProfiles);
|
||||
await appState.reloadProfiles();
|
||||
debugPrint('[Migration] 2.10.0: Cleared FOV from $profilesCleared profiles');
|
||||
}
|
||||
|
||||
debugPrint('[Migration] 2.10.0 completed: cleared non-360 FOV values from profiles');
|
||||
} catch (e, stackTrace) {
|
||||
debugPrint('[Migration] 2.10.0 ERROR: Failed to clear non-360 FOV values: $e');
|
||||
debugPrint('[Migration] 2.10.0 ERROR: Stack trace: $stackTrace');
|
||||
// Don't rethrow - this is non-critical, FOV restrictions will still apply going forward
|
||||
}
|
||||
}
|
||||
|
||||
/// Enable offline features for existing users who already have offline
|
||||
/// area data (v2.10.5). New installs and existing users who never used
|
||||
/// offline areas will keep the new "offline features enabled" setting at
|
||||
/// its default of false.
|
||||
static Future<void> migrate_2_10_5(AppState appState) async {
|
||||
try {
|
||||
final offlineAreaService = OfflineAreaService();
|
||||
await offlineAreaService.ensureInitialized();
|
||||
|
||||
if (offlineAreaService.offlineAreas.isNotEmpty) {
|
||||
await appState.setOfflineFeaturesEnabled(true);
|
||||
debugPrint('[Migration] 2.10.5: Existing offline area data found - enabled offline features');
|
||||
} else {
|
||||
debugPrint('[Migration] 2.10.5: No existing offline area data - leaving offline features disabled');
|
||||
}
|
||||
|
||||
debugPrint('[Migration] 2.10.5 completed: offline features migration done');
|
||||
} catch (e) {
|
||||
debugPrint('[Migration] 2.10.5 ERROR: Failed to migrate offline features setting: $e');
|
||||
// Don't rethrow - this is non-critical, worst case is the user needs
|
||||
// to manually re-enable the toggle to see their existing offline areas.
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the migration function for a specific version
|
||||
static Future<void> Function(AppState)? getMigrationForVersion(String version) {
|
||||
switch (version) {
|
||||
@@ -128,11 +228,18 @@ class OneTimeMigrations {
|
||||
return migrate_1_8_0;
|
||||
case '2.1.0':
|
||||
return migrate_2_1_0;
|
||||
case '2.7.3':
|
||||
return migrate_2_7_3;
|
||||
case '2.10.0':
|
||||
return migrate_2_10_0;
|
||||
case '2.10.5':
|
||||
return migrate_2_10_5;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Run migration for a specific version with nuclear reset on failure
|
||||
static Future<void> runMigration(String version, AppState appState, BuildContext? context) async {
|
||||
try {
|
||||
@@ -147,7 +254,7 @@ class OneTimeMigrations {
|
||||
debugPrint('[Migration] Stack trace: $stackTrace');
|
||||
|
||||
// Nuclear option: clear everything and show non-dismissible error dialog
|
||||
if (context != null) {
|
||||
if (context != null && context.mounted) {
|
||||
NuclearResetDialog.show(context, error, stackTrace);
|
||||
} else {
|
||||
// If no context available, just log and hope for the best
|
||||
|
||||
@@ -9,7 +9,7 @@ class DirectionFov {
|
||||
DirectionFov(this.centerDegrees, this.fovDegrees);
|
||||
|
||||
@override
|
||||
String toString() => 'DirectionFov(center: ${centerDegrees}°, fov: ${fovDegrees}°)';
|
||||
String toString() => 'DirectionFov(center: $centerDegrees°, fov: $fovDegrees°)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'osm_node.dart';
|
||||
|
||||
/// Sentinel value for copyWith methods to distinguish between null and not provided
|
||||
@@ -267,19 +266,36 @@ class NodeProfile {
|
||||
int get hashCode => id.hashCode;
|
||||
|
||||
/// Create a temporary empty profile for editing existing nodes
|
||||
/// Used as the default "<Existing tags>" option when editing nodes
|
||||
/// Used as the default `<Existing tags>` option when editing nodes
|
||||
/// All existing tags will flow through as additionalExistingTags
|
||||
static NodeProfile createExistingTagsProfile(OsmNode node) {
|
||||
// Calculate FOV from existing direction ranges if applicable
|
||||
// Only assign FOV if the original direction string actually contained range notation
|
||||
// (e.g., "90-270" or "55-125"), not if it was just single directions (e.g., "90")
|
||||
double? calculatedFov;
|
||||
|
||||
// If node has direction/FOV pairs, check if they all have the same FOV
|
||||
if (node.directionFovPairs.isNotEmpty) {
|
||||
final firstFov = node.directionFovPairs.first.fovDegrees;
|
||||
final raw = node.tags['direction'] ?? node.tags['camera:direction'];
|
||||
if (raw != null) {
|
||||
// Check if any part of the direction string contains range notation (dash with numbers)
|
||||
final parts = raw.split(';');
|
||||
bool hasRangeNotation = false;
|
||||
|
||||
// If all directions have the same FOV, use it for the profile
|
||||
if (node.directionFovPairs.every((df) => df.fovDegrees == firstFov)) {
|
||||
calculatedFov = firstFov;
|
||||
for (final part in parts) {
|
||||
final trimmed = part.trim();
|
||||
// Look for range pattern: numbers-numbers (e.g., "90-270", "55-125")
|
||||
if (trimmed.contains('-') && RegExp(r'^\d+\.?\d*-\d+\.?\d*$').hasMatch(trimmed)) {
|
||||
hasRangeNotation = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Only calculate FOV if the node originally had range notation
|
||||
if (hasRangeNotation && node.directionFovPairs.isNotEmpty) {
|
||||
final firstFov = node.directionFovPairs.first.fovDegrees;
|
||||
|
||||
// If all directions have the same FOV, use it for the profile
|
||||
if (node.directionFovPairs.every((df) => df.fovDegrees == firstFov)) {
|
||||
calculatedFov = firstFov;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +307,7 @@ class NodeProfile {
|
||||
requiresDirection: true,
|
||||
submittable: true,
|
||||
editable: false,
|
||||
fov: calculatedFov, // Use calculated FOV from existing direction ranges
|
||||
fov: calculatedFov, // Only use FOV if original had explicit range notation
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'osm_node.dart';
|
||||
|
||||
/// A bundle of OSM tags that describe a particular surveillance operator.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
/// A suspected surveillance location from the CSV data
|
||||
@@ -35,8 +36,8 @@ class SuspectedLocation {
|
||||
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');
|
||||
debugPrint('[SuspectedLocation] Failed to parse GeoJSON for ticket $ticketNo: $e');
|
||||
debugPrint('[SuspectedLocation] Location string: $locationString');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +61,7 @@ class SuspectedLocation {
|
||||
// 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');
|
||||
debugPrint('[SuspectedLocation] No coordinates found in GeoJSON');
|
||||
return (centroid: const LatLng(0, 0), bounds: <LatLng>[]);
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ class SuspectedLocation {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
print('Unsupported geometry type: $type');
|
||||
debugPrint('Unsupported geometry type: $type');
|
||||
}
|
||||
|
||||
if (points.isEmpty) {
|
||||
@@ -127,7 +128,7 @@ class SuspectedLocation {
|
||||
|
||||
return (centroid: centroid, bounds: points);
|
||||
} catch (e) {
|
||||
print('Error extracting coordinates from GeoJSON: $e');
|
||||
debugPrint('Error extracting coordinates from GeoJSON: $e');
|
||||
return (centroid: const LatLng(0, 0), bounds: <LatLng>[]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../services/service_policy.dart';
|
||||
|
||||
/// A specific tile type within a provider
|
||||
class TileType {
|
||||
final String id;
|
||||
@@ -10,7 +12,7 @@ class TileType {
|
||||
final Uint8List? previewTile; // Single tile image data for preview
|
||||
final int maxZoom; // Maximum zoom level for this tile type
|
||||
|
||||
const TileType({
|
||||
TileType({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.urlTemplate,
|
||||
@@ -76,6 +78,15 @@ class TileType {
|
||||
/// Check if this tile type needs an API key
|
||||
bool get requiresApiKey => urlTemplate.contains('{api_key}');
|
||||
|
||||
/// The service policy that applies to this tile type's server.
|
||||
/// Cached because [urlTemplate] is immutable.
|
||||
late final ServicePolicy servicePolicy =
|
||||
ServicePolicyResolver.resolve(urlTemplate);
|
||||
|
||||
/// Whether this tile server's usage policy permits offline/bulk downloading.
|
||||
/// Resolved via [ServicePolicyResolver] from the URL template.
|
||||
bool get allowsOfflineDownload => servicePolicy.allowsOfflineDownload;
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../dev_config.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../services/nuclear_reset_service.dart';
|
||||
import '../widgets/welcome_dialog.dart';
|
||||
import '../widgets/submission_guide_dialog.dart';
|
||||
|
||||
@@ -76,10 +79,20 @@ class AboutScreen extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
// About OpenStreetMap section
|
||||
_buildAboutOSMSection(context),
|
||||
const SizedBox(height: 24),
|
||||
// Information dialogs section
|
||||
_buildDialogButtons(context),
|
||||
const SizedBox(height: 24),
|
||||
_buildHelpLinks(context),
|
||||
|
||||
// Dev-only nuclear reset button at very bottom
|
||||
if (kDebugMode || kEnableDevelopmentModes) ...[
|
||||
const SizedBox(height: 32),
|
||||
_buildDevNuclearResetButton(context),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -96,6 +109,8 @@ class AboutScreen extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'Privacy Policy', 'https://deflock.me/privacy'),
|
||||
const SizedBox(height: 8),
|
||||
_buildLinkText(context, 'Report issue with OSM base map', 'https://www.openstreetmap.org/fixthemap'),
|
||||
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'),
|
||||
@@ -121,6 +136,39 @@ class AboutScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAboutOSMSection(BuildContext context) {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
return 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: () => _launchUrl('https://openstreetmap.org', context),
|
||||
icon: const Icon(Icons.open_in_new),
|
||||
label: Text(locService.t('auth.visitOSM')),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDialogButtons(BuildContext context) {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
@@ -165,5 +213,231 @@ class AboutScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
/// Dev-only nuclear reset button (only visible in debug mode)
|
||||
Widget _buildDevNuclearResetButton(BuildContext context) {
|
||||
return Card(
|
||||
color: Theme.of(context).colorScheme.errorContainer.withValues(alpha: 0.1),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.developer_mode,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
size: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Developer Tools',
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'These tools are only available in debug mode for development and troubleshooting.',
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () => _showNuclearResetConfirmation(context),
|
||||
icon: const Icon(Icons.delete_forever, color: Colors.red),
|
||||
label: const Text(
|
||||
'Nuclear Reset (Clear All Data)',
|
||||
style: TextStyle(color: Colors.red),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Colors.red),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Show confirmation dialog for nuclear reset
|
||||
Future<void> _showNuclearResetConfirmation(BuildContext context) async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Row(
|
||||
children: [
|
||||
Icon(Icons.warning, color: Colors.red),
|
||||
SizedBox(width: 8),
|
||||
Text('Nuclear Reset'),
|
||||
],
|
||||
),
|
||||
content: const Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'This will completely clear ALL app data:',
|
||||
style: TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Text('• All settings and preferences'),
|
||||
Text('• OAuth login credentials'),
|
||||
Text('• Custom profiles and operators'),
|
||||
Text('• Upload queue and cached data'),
|
||||
Text('• Downloaded offline areas'),
|
||||
Text('• Everything else'),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'The app will behave exactly like a fresh install after this operation.',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Text(
|
||||
'This action cannot be undone.',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
child: const Text('Cancel'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(true),
|
||||
style: TextButton.styleFrom(foregroundColor: Colors.red),
|
||||
child: const Text('Nuclear Reset'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (confirmed == true && context.mounted) {
|
||||
await _performNuclearReset(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// Perform the nuclear reset operation
|
||||
Future<void> _performNuclearReset(BuildContext context) async {
|
||||
// Show progress dialog
|
||||
if (!context.mounted) return;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => const AlertDialog(
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CircularProgressIndicator(),
|
||||
SizedBox(height: 16),
|
||||
Text('Clearing all app data...'),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
// Perform the nuclear reset
|
||||
await NuclearResetService.clearEverything();
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
// Close progress dialog
|
||||
Navigator.of(context).pop();
|
||||
|
||||
// Show completion dialog
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Row(
|
||||
children: [
|
||||
Icon(Icons.check_circle, color: Colors.green),
|
||||
SizedBox(width: 8),
|
||||
Text('Reset Complete'),
|
||||
],
|
||||
),
|
||||
content: const Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'All app data has been cleared successfully.',
|
||||
style: TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Text(
|
||||
'Please close and restart the app to continue with a fresh state.',
|
||||
style: TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('OK'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
if (!context.mounted) return;
|
||||
|
||||
// Close progress dialog if it's still open
|
||||
Navigator.of(context).pop();
|
||||
|
||||
// Show error dialog
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Row(
|
||||
children: [
|
||||
Icon(Icons.error, color: Colors.red),
|
||||
SizedBox(width: 8),
|
||||
Text('Reset Failed'),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'An error occurred during the nuclear reset:',
|
||||
style: TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
e.toString(),
|
||||
style: const TextStyle(fontFamily: 'monospace'),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
'Some data may have been partially cleared. You may want to manually clear app data through device settings.',
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('OK'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,9 @@ 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 'settings/sections/keep_screen_awake_section.dart';
|
||||
import 'settings/sections/hide_zoom_controls_section.dart';
|
||||
|
||||
import '../services/localization_service.dart';
|
||||
|
||||
class AdvancedSettingsScreen extends StatelessWidget {
|
||||
@@ -33,6 +35,11 @@ class AdvancedSettingsScreen extends StatelessWidget {
|
||||
Divider(),
|
||||
SuspectedLocationsSection(),
|
||||
Divider(),
|
||||
KeepScreenAwakeSection(),
|
||||
Divider(),
|
||||
HideZoomControlsSection(),
|
||||
Divider(),
|
||||
|
||||
// NetworkStatusSection(), // Commented out - network status indicator now defaults to enabled
|
||||
// Divider(),
|
||||
TileProviderSection(),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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';
|
||||
@@ -125,4 +126,50 @@ class MapInteractionHandler {
|
||||
// Clear suspected location selection
|
||||
appState.clearSuspectedLocationSelection();
|
||||
}
|
||||
|
||||
/// Handle long press on empty map area (add node here)
|
||||
void handleMapLongPress({
|
||||
required BuildContext context,
|
||||
required LatLng tapLocation,
|
||||
required AnimatedMapController mapController,
|
||||
required VoidCallback onAddNode,
|
||||
}) {
|
||||
final appState = context.read<AppState>();
|
||||
|
||||
debugPrint('[MapInteractionHandler] Long press at: ${tapLocation.latitude}, ${tapLocation.longitude}');
|
||||
|
||||
// Check if we should handle this long press
|
||||
// Don't handle if any sheet is open or if in search mode
|
||||
if (appState.isInSearchMode || appState.showingOverview) {
|
||||
debugPrint('[MapInteractionHandler] Long press ignored - in search/navigation mode');
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't handle if any session is active (add/edit sheets are open)
|
||||
if (appState.session != null || appState.editSession != null) {
|
||||
debugPrint('[MapInteractionHandler] Long press ignored - node sheet already open');
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable follow-me when user long presses
|
||||
appState.setFollowMeMode(FollowMeMode.off);
|
||||
|
||||
// First, center the map on the tap location
|
||||
try {
|
||||
mapController.animateTo(
|
||||
dest: tapLocation,
|
||||
zoom: mapController.mapController.camera.zoom,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[MapInteractionHandler] Could not center map on long press location: $e');
|
||||
}
|
||||
|
||||
// After a short delay to let the map center, open the add node sheet
|
||||
// This matches the existing pattern used for node taps
|
||||
Future.delayed(const Duration(milliseconds: 350), () {
|
||||
onAddNode();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import '../../widgets/add_node_sheet.dart';
|
||||
import '../../widgets/edit_node_sheet.dart';
|
||||
import '../../widgets/navigation_sheet.dart';
|
||||
import '../../widgets/measured_sheet.dart';
|
||||
import '../../state/settings_state.dart' show FollowMeMode;
|
||||
|
||||
/// Coordinates all bottom sheet operations including opening, closing, height tracking,
|
||||
/// and sheet-related validation logic.
|
||||
@@ -118,9 +117,8 @@ class SheetCoordinator {
|
||||
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();
|
||||
@@ -187,9 +185,8 @@ class SheetCoordinator {
|
||||
_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();
|
||||
@@ -266,7 +263,7 @@ class SheetCoordinator {
|
||||
/// Restore the follow-me mode that was active before opening a node sheet
|
||||
void _restoreFollowMeMode(AppState appState) {
|
||||
if (_followMeModeBeforeSheet != null) {
|
||||
debugPrint('[SheetCoordinator] Restoring follow-me mode: ${_followMeModeBeforeSheet}');
|
||||
debugPrint('[SheetCoordinator] Restoring follow-me mode: $_followMeModeBeforeSheet');
|
||||
appState.setFollowMeMode(_followMeModeBeforeSheet!);
|
||||
_followMeModeBeforeSheet = null; // Clear stored state
|
||||
}
|
||||
|
||||
+153
-101
@@ -1,5 +1,4 @@
|
||||
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';
|
||||
@@ -9,21 +8,22 @@ import '../app_state.dart';
|
||||
import '../dev_config.dart';
|
||||
import '../widgets/map_view.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../services/map_data_provider.dart';
|
||||
|
||||
|
||||
import '../widgets/add_node_sheet.dart';
|
||||
import '../widgets/edit_node_sheet.dart';
|
||||
import '../widgets/node_tag_sheet.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 '../widgets/unread_notifications_dialog.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import '../models/suspected_location.dart';
|
||||
import '../models/search_result.dart';
|
||||
import '../services/changelog_service.dart';
|
||||
import '../services/deep_link_service.dart';
|
||||
import 'coordinators/sheet_coordinator.dart';
|
||||
import 'coordinators/navigation_coordinator.dart';
|
||||
import 'coordinators/map_interaction_handler.dart';
|
||||
@@ -54,6 +54,9 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
|
||||
// Track popup display to avoid showing multiple times
|
||||
bool _hasCheckedForPopup = false;
|
||||
|
||||
// Track whether we've shown the unread notifications popup this session
|
||||
bool _hasShownUnreadNotificationsPopup = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -62,10 +65,12 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
_sheetCoordinator = SheetCoordinator();
|
||||
_navigationCoordinator = NavigationCoordinator();
|
||||
_mapInteractionHandler = MapInteractionHandler();
|
||||
DeepLinkService().onNodeDeepLink = _handleNodeDeepLink;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
DeepLinkService().onNodeDeepLink = null;
|
||||
_mapController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -190,6 +195,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
|
||||
// Run any needed migrations first
|
||||
final versionsNeedingMigration = await ChangelogService().getVersionsNeedingMigration();
|
||||
if (!mounted) return;
|
||||
for (final version in versionsNeedingMigration) {
|
||||
await ChangelogService().runMigration(version, appState, context);
|
||||
}
|
||||
@@ -214,6 +220,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
|
||||
case PopupType.changelog:
|
||||
final changelogContent = await ChangelogService().getChangelogContentForDisplay();
|
||||
if (!mounted) return;
|
||||
if (changelogContent != null) {
|
||||
await showDialog(
|
||||
context: context,
|
||||
@@ -244,6 +251,21 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
}
|
||||
}
|
||||
|
||||
void _showUnreadNotificationsDialog() {
|
||||
if (!mounted) return;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => UnreadNotificationsDialog(
|
||||
onView: () {
|
||||
Navigator.of(context).pushNamed('/settings/osm-account');
|
||||
},
|
||||
onDismiss: () {
|
||||
// Just dismiss - badges remain visible until the user views them.
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _onStartRoute() {
|
||||
_navigationCoordinator.startRoute(
|
||||
context: context,
|
||||
@@ -252,35 +274,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
);
|
||||
}
|
||||
|
||||
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,
|
||||
@@ -318,6 +311,40 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
);
|
||||
}
|
||||
|
||||
void _onMapLongPress(LatLng location) {
|
||||
// Don't handle long press if tag sheet is open
|
||||
if (_sheetCoordinator.tagSheetHeight > 0) {
|
||||
debugPrint('[HomeScreen] Long press ignored - tag sheet is open');
|
||||
return;
|
||||
}
|
||||
|
||||
_mapInteractionHandler.handleMapLongPress(
|
||||
context: context,
|
||||
tapLocation: location,
|
||||
mapController: _mapController,
|
||||
onAddNode: _openAddNodeSheet,
|
||||
);
|
||||
}
|
||||
|
||||
void _handleNodeDeepLink(OsmNode node) {
|
||||
try {
|
||||
_mapController.animateTo(
|
||||
dest: node.coord,
|
||||
zoom: 16.0,
|
||||
duration: const Duration(milliseconds: 600),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[HomeScreen] Could not animate to deep link node: $e');
|
||||
}
|
||||
|
||||
Future.delayed(const Duration(milliseconds: 700), () {
|
||||
if (mounted) {
|
||||
openNodeTagSheet(node);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void openNodeTagSheet(OsmNode node) {
|
||||
// Handle the map interaction (centering and follow-me disable)
|
||||
_mapInteractionHandler.handleNodeTap(
|
||||
@@ -402,9 +429,11 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
);
|
||||
|
||||
// Reset height and clear selection when sheet is dismissed
|
||||
final appState = context.read<AppState>();
|
||||
controller.closed.then((_) {
|
||||
if (!mounted) return;
|
||||
_sheetCoordinator.resetTagSheetHeight(() => setState(() {}));
|
||||
context.read<AppState>().clearSuspectedLocationSelection();
|
||||
appState.clearSuspectedLocationSelection();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -447,6 +476,35 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
});
|
||||
}
|
||||
|
||||
// Show a one-time popup this session if the user has unread messages
|
||||
// and/or unread changeset comments. Gated on _hasCheckedForPopup so it
|
||||
// doesn't race with the welcome/changelog dialog above.
|
||||
if (_hasCheckedForPopup &&
|
||||
!_hasShownUnreadNotificationsPopup &&
|
||||
appState.isLoggedIn &&
|
||||
appState.hasUnreadNotifications) {
|
||||
_hasShownUnreadNotificationsPopup = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_showUnreadNotificationsDialog();
|
||||
});
|
||||
}
|
||||
|
||||
// Auto-focus a node's details sheet right after it was submitted/edited/deleted,
|
||||
// behind kAutoOpenNodeSheetAfterSubmit (pending A/B testing/team feedback).
|
||||
if (kAutoOpenNodeSheetAfterSubmit) {
|
||||
final focusNodeId = appState.consumePendingFocusNodeId();
|
||||
if (focusNodeId != null && !_sheetCoordinator.hasActiveNodeSheet) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted) return;
|
||||
final node = MapDataProvider().getNodeById(focusNodeId);
|
||||
if (node != null) {
|
||||
openNodeTagSheet(node);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Pass the active sheet height directly to the map
|
||||
final activeSheetHeight = _sheetCoordinator.activeSheetHeight;
|
||||
|
||||
@@ -484,23 +542,9 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
icon: Badge(
|
||||
isLabelVisible: appState.hasUnreadNotifications,
|
||||
child: const Icon(Icons.settings),
|
||||
),
|
||||
onPressed: () => Navigator.pushNamed(context, '/settings'),
|
||||
);
|
||||
@@ -528,6 +572,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
// Re-render when location status changes (for follow-me button state)
|
||||
setState(() {});
|
||||
},
|
||||
onMapLongPress: _onMapLongPress,
|
||||
onUserGesture: () {
|
||||
// Only clear selected node if tag sheet is not open
|
||||
// This prevents nodes from losing their grey-out when map is moved while viewing tags
|
||||
@@ -578,7 +623,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Theme.of(context).shadowColor.withOpacity(0.3),
|
||||
color: Theme.of(context).shadowColor.withValues(alpha: 0.3),
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, -2),
|
||||
)
|
||||
@@ -586,63 +631,70 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
),
|
||||
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: AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final appState = context.watch<AppState>();
|
||||
final showDownloadButton = appState.offlineFeaturesEnabled;
|
||||
final canDownload = appState.selectedTileType?.allowsOfflineDownload ?? false;
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
// Take full width when the download button is hidden
|
||||
flex: showDownloadButton ? 7 : 10,
|
||||
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),
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.add_location_alt),
|
||||
label: Text(LocalizationService.instance.tagNode),
|
||||
onPressed: _openAddNodeSheet,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (showDownloadButton) ...[
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
flex: 3, // 30% for secondary action
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: ElevatedButton.icon(
|
||||
icon: Icon(Icons.download_for_offline),
|
||||
label: Text(LocalizationService.instance.download),
|
||||
onPressed: canDownload ? () {
|
||||
// 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),
|
||||
);
|
||||
} : null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(0, 48),
|
||||
textStyle: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -132,7 +132,7 @@ class _NavigationSettingsScreenState extends State<NavigationSettingsScreen> {
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../app_state.dart';
|
||||
import 'settings/sections/enable_offline_features_section.dart';
|
||||
import 'settings/sections/offline_mode_section.dart';
|
||||
import 'settings/sections/offline_areas_section.dart';
|
||||
import '../services/localization_service.dart';
|
||||
@@ -16,20 +19,42 @@ class OfflineSettingsScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(locService.t('settings.offlineSettings')),
|
||||
),
|
||||
body: ListView(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: const [
|
||||
OfflineModeSection(),
|
||||
Divider(),
|
||||
OfflineAreasSection(),
|
||||
],
|
||||
body: Consumer<AppState>(
|
||||
builder: (context, appState, child) {
|
||||
final offlineFeaturesEnabled = appState.offlineFeaturesEnabled;
|
||||
|
||||
return ListView(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
children: [
|
||||
const EnableOfflineFeaturesSection(),
|
||||
const Divider(),
|
||||
// Grey out and disable interaction with the rest of the
|
||||
// offline settings when the master toggle is off, while
|
||||
// keeping them visible/discoverable.
|
||||
Opacity(
|
||||
opacity: offlineFeaturesEnabled ? 1.0 : 0.4,
|
||||
child: IgnorePointer(
|
||||
ignoring: !offlineFeaturesEnabled,
|
||||
child: const Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
OfflineModeSection(),
|
||||
Divider(),
|
||||
OfflineAreasSection(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,6 @@ class _OperatorProfileEditorState extends State<OperatorProfileEditor> {
|
||||
|
||||
return List.generate(_tags.length, (i) {
|
||||
final keyController = TextEditingController(text: _tags[i].key);
|
||||
final valueController = TextEditingController(text: _tags[i].value);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
@@ -156,8 +155,13 @@ class _OperatorProfileEditorState extends State<OperatorProfileEditor> {
|
||||
|
||||
final tagMap = <String, String>{};
|
||||
for (final e in _tags) {
|
||||
if (e.key.trim().isEmpty) continue; // Skip only if key is empty
|
||||
tagMap[e.key.trim()] = e.value.trim(); // Allow empty values for refinement
|
||||
final key = e.key.trim();
|
||||
final value = e.value.trim();
|
||||
|
||||
// Skip if key is empty OR value is empty (no empty values for operator profiles)
|
||||
if (key.isEmpty || value.isEmpty) continue;
|
||||
|
||||
tagMap[key] = value;
|
||||
}
|
||||
|
||||
final newProfile = widget.profile.copyWith(
|
||||
|
||||
@@ -128,38 +128,46 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
},
|
||||
),
|
||||
|
||||
// Unread changeset comments - links directly to the
|
||||
// specific changeset with the new comment, and only
|
||||
// appears when there is one.
|
||||
if (appState.hasUnreadChangesetComments) ...[
|
||||
const Divider(),
|
||||
ListTile(
|
||||
leading: Badge(
|
||||
isLabelVisible: true,
|
||||
child: const Icon(Icons.comment),
|
||||
),
|
||||
title: Text(locService.t('auth.newChangesetComments')),
|
||||
subtitle: Text(locService.t('auth.newChangesetCommentsSubtitle')),
|
||||
trailing: const Icon(Icons.open_in_new),
|
||||
onTap: () async {
|
||||
final changesetUrl = appState.getUnreadChangesetUrl();
|
||||
if (changesetUrl == null) return;
|
||||
final url = Uri.parse(changesetUrl);
|
||||
if (await canLaunchUrl(url)) {
|
||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
// The user has now had the opportunity to see the
|
||||
// new comment on OSM's website - clear our badge.
|
||||
appState.markChangesetCommentsRead();
|
||||
} 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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
leading: Badge(
|
||||
isLabelVisible: appState.hasUnreadMessages,
|
||||
label: Text('${appState.unreadMessageCount ?? 0}'),
|
||||
child: const Icon(Icons.message),
|
||||
),
|
||||
title: Text(locService.t('auth.viewMessages')),
|
||||
subtitle: Text(appState.hasUnreadMessages
|
||||
@@ -195,50 +203,9 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
child: UploadModeSection(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
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),
|
||||
@@ -275,7 +242,7 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest.withValues(alpha: 0.5),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Row(
|
||||
@@ -308,7 +275,7 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
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)),
|
||||
side: BorderSide(color: Theme.of(context).colorScheme.error.withValues(alpha: 0.5)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -354,10 +321,10 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.errorContainer.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.errorContainer.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.error.withOpacity(0.3),
|
||||
color: Theme.of(context).colorScheme.error.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../models/node_profile.dart';
|
||||
import '../app_state.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../widgets/nsi_tag_value_field.dart';
|
||||
import '../dev_config.dart';
|
||||
|
||||
class ProfileEditor extends StatefulWidget {
|
||||
const ProfileEditor({super.key, required this.profile});
|
||||
@@ -22,6 +23,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
late bool _requiresDirection;
|
||||
late bool _submittable;
|
||||
late TextEditingController _fovCtrl;
|
||||
late bool _is360Fov;
|
||||
|
||||
static const _defaultTags = [
|
||||
MapEntry('man_made', 'surveillance'),
|
||||
@@ -41,6 +43,7 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
_requiresDirection = widget.profile.requiresDirection;
|
||||
_submittable = widget.profile.submittable;
|
||||
_fovCtrl = TextEditingController(text: widget.profile.fov?.toString() ?? '');
|
||||
_is360Fov = widget.profile.fov == 360.0;
|
||||
|
||||
if (widget.profile.tags.isEmpty) {
|
||||
// New profile → start with sensible defaults
|
||||
@@ -94,28 +97,68 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
if (widget.profile.editable) ...[
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.requiresDirection')),
|
||||
subtitle: Text(locService.t('profileEditor.requiresDirectionSubtitle')),
|
||||
value: _requiresDirection,
|
||||
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
|
||||
// Direction and FOV configuration - show different UI based on dev config
|
||||
if (kEnableNon360FOVs) ...[
|
||||
// Old UI: direction required + optional custom FOV text field (development mode)
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.requiresDirection')),
|
||||
subtitle: Text(locService.t('profileEditor.requiresDirectionSubtitle')),
|
||||
value: _requiresDirection,
|
||||
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
|
||||
),
|
||||
),
|
||||
] else ...[
|
||||
// New UI: mutually exclusive direction vs 360° FOV checkboxes (production mode)
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.requiresDirection')),
|
||||
subtitle: Text(locService.t('profileEditor.requiresDirectionSubtitle')),
|
||||
value: _requiresDirection,
|
||||
onChanged: widget.profile.editable
|
||||
? (value) {
|
||||
setState(() {
|
||||
_requiresDirection = value ?? false;
|
||||
// Make mutually exclusive with 360° FOV
|
||||
if (_requiresDirection) {
|
||||
_is360Fov = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
: null,
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.fov360')),
|
||||
subtitle: Text(locService.t('profileEditor.fov360Subtitle')),
|
||||
value: _is360Fov,
|
||||
onChanged: widget.profile.editable
|
||||
? (value) {
|
||||
setState(() {
|
||||
_is360Fov = value ?? false;
|
||||
// Make mutually exclusive with direction requirement
|
||||
if (_is360Fov) {
|
||||
_requiresDirection = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
: null,
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
),
|
||||
],
|
||||
CheckboxListTile(
|
||||
title: Text(locService.t('profileEditor.submittable')),
|
||||
subtitle: Text(locService.t('profileEditor.submittableSubtitle')),
|
||||
@@ -153,7 +196,6 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
|
||||
return List.generate(_tags.length, (i) {
|
||||
final keyController = TextEditingController(text: _tags[i].key);
|
||||
final valueController = TextEditingController(text: _tags[i].value);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
@@ -200,6 +242,9 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
}
|
||||
|
||||
String? _validateFov() {
|
||||
// Only validate when using text field mode
|
||||
if (!kEnableNon360FOVs) return null;
|
||||
|
||||
final text = _fovCtrl.text.trim();
|
||||
if (text.isEmpty) return null; // Optional field
|
||||
|
||||
@@ -220,14 +265,21 @@ class _ProfileEditorState extends State<ProfileEditor> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate FOV if provided
|
||||
if (_validateFov() != null) {
|
||||
// Validate FOV if using text field mode
|
||||
if (kEnableNon360FOVs && _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);
|
||||
// Parse FOV based on dev config mode
|
||||
double? fov;
|
||||
if (kEnableNon360FOVs) {
|
||||
// Old mode: parse from text field
|
||||
final fovText = _fovCtrl.text.trim();
|
||||
fov = fovText.isEmpty ? null : double.tryParse(fovText);
|
||||
} else {
|
||||
// New mode: use checkbox state
|
||||
fov = _is360Fov ? 360.0 : null;
|
||||
}
|
||||
|
||||
final tagMap = <String, String>{};
|
||||
for (final e in _tags) {
|
||||
|
||||
@@ -99,7 +99,7 @@ class _ReleaseNotesScreenState extends State<ReleaseNotesScreen> {
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.3),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -142,8 +142,8 @@ class _ReleaseNotesScreenState extends State<ReleaseNotesScreen> {
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: isCurrentVersion
|
||||
? Theme.of(context).colorScheme.primary.withOpacity(0.3)
|
||||
: Theme.of(context).dividerColor.withOpacity(0.3),
|
||||
? Theme.of(context).colorScheme.primary.withValues(alpha: 0.3)
|
||||
: Theme.of(context).dividerColor.withValues(alpha: 0.3),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../app_state.dart';
|
||||
import '../../../services/offline_area_service.dart';
|
||||
import '../../../services/localization_service.dart';
|
||||
|
||||
/// Master toggle for all offline-area functionality (downloading, browsing,
|
||||
/// and using cached tiles/nodes offline). When disabled, the rest of the
|
||||
/// Offline Settings screen (offline mode + offline areas list) is greyed out
|
||||
/// and the download button on the map screen is hidden. Functionally, the
|
||||
/// app will behave as if no offline area data exists at all while this is
|
||||
/// off, regardless of whether area files still exist on disk.
|
||||
class EnableOfflineFeaturesSection extends StatelessWidget {
|
||||
const EnableOfflineFeaturesSection({super.key});
|
||||
|
||||
Future<void> _handleToggle(BuildContext context, AppState appState, bool value) async {
|
||||
if (value) {
|
||||
// Enabling requires no confirmation.
|
||||
await appState.setOfflineFeaturesEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Disabling: if offline area data already exists, ask whether to keep
|
||||
// or delete it. Either choice proceeds to disable the toggle - there is
|
||||
// no "cancel" path once this dialog is shown.
|
||||
final offlineService = OfflineAreaService();
|
||||
await offlineService.ensureInitialized();
|
||||
if (!context.mounted) return;
|
||||
final hasExistingAreas = offlineService.offlineAreas.isNotEmpty;
|
||||
|
||||
if (!hasExistingAreas) {
|
||||
await appState.setOfflineFeaturesEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
final locService = LocalizationService.instance;
|
||||
final shouldDelete = await showDialog<bool>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(locService.t('offlineAreas.disableConfirmTitle')),
|
||||
content: Text(locService.t('offlineAreas.disableConfirmMessage')),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
child: Text(locService.t('offlineAreas.keepData')),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.of(context).pop(true),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: Text(locService.t('offlineAreas.deleteData')),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (shouldDelete == true) {
|
||||
for (final area in offlineService.offlineAreas.toList()) {
|
||||
offlineService.deleteArea(area.id);
|
||||
}
|
||||
}
|
||||
|
||||
// Disable regardless of the user's data choice.
|
||||
await appState.setOfflineFeaturesEnabled(false);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final locService = LocalizationService.instance;
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
locService.t('settings.enableOfflineFeatures'),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SwitchListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
title: Text(locService.t('settings.enableOfflineFeaturesTitle')),
|
||||
subtitle: Text(
|
||||
locService.t('settings.enableOfflineFeaturesSubtitle'),
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
value: appState.offlineFeaturesEnabled,
|
||||
onChanged: (value) => _handleToggle(context, appState, value),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../app_state.dart';
|
||||
import '../../../services/localization_service.dart';
|
||||
|
||||
class HideZoomControlsSection extends StatelessWidget {
|
||||
const HideZoomControlsSection({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Standard Pattern: Use AnimatedBuilder to respond to language/localization changes
|
||||
return AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final locService = LocalizationService.instance;
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Bold Section Header (matches Keep Screen Awake, Proximity, etc.)
|
||||
Text(
|
||||
locService.t('settings.hideZoomControls'),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// The Functional Toggle
|
||||
SwitchListTile(
|
||||
contentPadding: EdgeInsets.zero, // Aligns switch text with the bold header
|
||||
title: Text(locService.t('hideZoomControls.title')),
|
||||
subtitle: Text(
|
||||
locService.t('hideZoomControls.subtitle'),
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
value: appState.hideZoomControls,
|
||||
onChanged: (bool value) {
|
||||
appState.setHideZoomControls(value);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../app_state.dart';
|
||||
import '../../../services/localization_service.dart';
|
||||
|
||||
class KeepScreenAwakeSection extends StatelessWidget {
|
||||
const KeepScreenAwakeSection({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Standard Pattern: Use AnimatedBuilder to respond to language/localization changes
|
||||
return AnimatedBuilder(
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final locService = LocalizationService.instance;
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Bold Section Header (matches Max Nodes, Proximity, etc.)
|
||||
Text(
|
||||
locService.t('settings.keepScreenAwake'),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// The Functional Toggle
|
||||
SwitchListTile(
|
||||
contentPadding: EdgeInsets.zero, // Aligns switch text with the bold header
|
||||
title: Text(locService.t('keepScreenAwake.title')),
|
||||
subtitle: Text(
|
||||
locService.t('keepScreenAwake.subtitle'),
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
value: appState.keepScreenAwake,
|
||||
onChanged: (bool value) {
|
||||
appState.setKeepScreenAwake(value);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -23,27 +23,29 @@ class _LanguageSectionState extends State<LanguageSection> {
|
||||
_loadLanguageNames();
|
||||
}
|
||||
|
||||
_loadSelectedLanguage() async {
|
||||
Future<void> _loadSelectedLanguage() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_selectedLanguage = prefs.getString('language_code');
|
||||
});
|
||||
}
|
||||
|
||||
_loadLanguageNames() async {
|
||||
Future<void> _loadLanguageNames() async {
|
||||
final locService = LocalizationService.instance;
|
||||
final Map<String, String> names = {};
|
||||
|
||||
|
||||
for (String langCode in locService.availableLanguages) {
|
||||
names[langCode] = await locService.getLanguageDisplayName(langCode);
|
||||
}
|
||||
|
||||
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_languageNames = names;
|
||||
});
|
||||
}
|
||||
|
||||
_setLanguage(String? languageCode) async {
|
||||
Future<void> _setLanguage(String? languageCode) async {
|
||||
await LocalizationService.instance.setLanguage(languageCode);
|
||||
setState(() {
|
||||
_selectedLanguage = languageCode;
|
||||
@@ -58,44 +60,46 @@ class _LanguageSectionState extends State<LanguageSection> {
|
||||
animation: LocalizationService.instance,
|
||||
builder: (context, child) {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Language section
|
||||
// System Default option
|
||||
RadioListTile<String?>(
|
||||
title: Text(locService.t('settings.systemDefault')),
|
||||
value: null,
|
||||
RadioGroup<String?>(
|
||||
groupValue: _selectedLanguage,
|
||||
onChanged: _setLanguage,
|
||||
),
|
||||
// English always appears second (if available)
|
||||
if (locService.availableLanguages.contains('en'))
|
||||
RadioListTile<String>(
|
||||
title: Text(_languageNames['en'] ?? 'English'),
|
||||
value: 'en',
|
||||
groupValue: _selectedLanguage,
|
||||
onChanged: _setLanguage,
|
||||
),
|
||||
// Other language options (excluding English since it's already shown)
|
||||
...locService.availableLanguages
|
||||
.where((langCode) => langCode != 'en')
|
||||
.map((langCode) =>
|
||||
RadioListTile<String>(
|
||||
title: Text(_languageNames[langCode] ?? langCode.toUpperCase()),
|
||||
value: langCode,
|
||||
groupValue: _selectedLanguage,
|
||||
onChanged: _setLanguage,
|
||||
child: Column(
|
||||
children: [
|
||||
// System Default option
|
||||
RadioListTile<String?>(
|
||||
title: Text(locService.t('settings.systemDefault')),
|
||||
value: null,
|
||||
),
|
||||
// English always appears second (if available)
|
||||
if (locService.availableLanguages.contains('en'))
|
||||
RadioListTile<String?>(
|
||||
title: Text(_languageNames['en'] ?? 'English'),
|
||||
value: 'en',
|
||||
),
|
||||
// Other language options (excluding English since it's already shown)
|
||||
...locService.availableLanguages
|
||||
.where((langCode) => langCode != 'en')
|
||||
.map((langCode) =>
|
||||
RadioListTile<String?>(
|
||||
title: Text(_languageNames[langCode] ?? langCode.toUpperCase()),
|
||||
value: langCode,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
// Divider between language and units
|
||||
const SizedBox(height: 24),
|
||||
const Divider(),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
|
||||
// Distance Units section
|
||||
Text(
|
||||
locService.t('settings.distanceUnit'),
|
||||
@@ -105,33 +109,33 @@ class _LanguageSectionState extends State<LanguageSection> {
|
||||
Text(
|
||||
locService.t('settings.distanceUnitSubtitle'),
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.7),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// Metric option
|
||||
RadioListTile<DistanceUnit>(
|
||||
title: Text(locService.t('units.metricDescription')),
|
||||
value: DistanceUnit.metric,
|
||||
groupValue: appState.distanceUnit,
|
||||
onChanged: (unit) {
|
||||
if (unit != null) {
|
||||
appState.setDistanceUnit(unit);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
// Imperial option
|
||||
RadioListTile<DistanceUnit>(
|
||||
title: Text(locService.t('units.imperialDescription')),
|
||||
value: DistanceUnit.imperial,
|
||||
|
||||
RadioGroup<DistanceUnit>(
|
||||
groupValue: appState.distanceUnit,
|
||||
onChanged: (unit) {
|
||||
if (unit != null) {
|
||||
appState.setDistanceUnit(unit);
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
// Metric option
|
||||
RadioListTile<DistanceUnit>(
|
||||
title: Text(locService.t('units.metricDescription')),
|
||||
value: DistanceUnit.metric,
|
||||
),
|
||||
|
||||
// Imperial option
|
||||
RadioListTile<DistanceUnit>(
|
||||
title: Text(locService.t('units.imperialDescription')),
|
||||
value: DistanceUnit.imperial,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -141,4 +145,4 @@ class _LanguageSectionState extends State<LanguageSection> {
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,76 +34,101 @@ class NodeProfilesSection extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
...appState.profiles.map(
|
||||
(p) => ListTile(
|
||||
leading: Checkbox(
|
||||
value: appState.isEnabled(p),
|
||||
onChanged: (v) => appState.toggleProfile(p, v ?? false),
|
||||
),
|
||||
title: Text(p.name),
|
||||
subtitle: Text(p.builtin ? locService.t('profiles.builtIn') : locService.t('profiles.custom')),
|
||||
trailing: !p.editable
|
||||
? PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'view',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.visibility),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('profiles.view')),
|
||||
],
|
||||
),
|
||||
ReorderableListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: appState.profiles.length,
|
||||
onReorderItem: (oldIndex, newIndex) {
|
||||
appState.reorderProfiles(oldIndex, newIndex);
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
final p = appState.profiles[index];
|
||||
return ListTile(
|
||||
key: ValueKey(p.id),
|
||||
leading: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// Drag handle
|
||||
ReorderableDragStartListener(
|
||||
index: index,
|
||||
child: const Icon(
|
||||
Icons.drag_handle,
|
||||
color: Colors.grey,
|
||||
),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'view') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ProfileEditor(profile: p),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
// Checkbox
|
||||
Checkbox(
|
||||
value: appState.isEnabled(p),
|
||||
onChanged: (v) => appState.toggleProfile(p, v ?? false),
|
||||
),
|
||||
],
|
||||
),
|
||||
title: Text(p.name),
|
||||
subtitle: Text(p.builtin ? locService.t('profiles.builtIn') : locService.t('profiles.custom')),
|
||||
trailing: !p.editable
|
||||
? PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'view',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.visibility),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('profiles.view')),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
)
|
||||
: PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'edit',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.edit),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('actions.edit')),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'delete',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete, color: Colors.red),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('profiles.deleteProfile'), style: const TextStyle(color: Colors.red)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'edit') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ProfileEditor(profile: p),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'view') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ProfileEditor(profile: p),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
)
|
||||
: PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'edit',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.edit),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('actions.edit')),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else if (value == 'delete') {
|
||||
_showDeleteProfileDialog(context, p);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'delete',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete, color: Colors.red),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('profiles.deleteProfile'), style: const TextStyle(color: Colors.red)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'edit') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ProfileEditor(profile: p),
|
||||
),
|
||||
);
|
||||
} else if (value == 'delete') {
|
||||
_showDeleteProfileDialog(context, p);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -118,7 +143,7 @@ class NodeProfilesSection extends StatelessWidget {
|
||||
);
|
||||
|
||||
// If user chose to create custom profile, open the profile editor
|
||||
if (result == 'create') {
|
||||
if (result == 'create' && context.mounted) {
|
||||
_createNewProfile(context);
|
||||
}
|
||||
// If user chose import from website, ProfileAddChoiceDialog handles opening the URL
|
||||
|
||||
@@ -87,9 +87,9 @@ class _OfflineAreasSectionState extends State<OfflineAreasSection> {
|
||||
: "${(area.sizeBytes / 1024).toStringAsFixed(1)} ${locService.t('offlineAreas.kilobytes')}"
|
||||
: '--';
|
||||
|
||||
String subtitle = '${locService.t('offlineAreas.provider')}: ${area.tileProviderDisplay}\n' +
|
||||
'${locService.t('offlineAreas.maxZoom')}: Z${area.maxZoom}' + '\n' +
|
||||
'${locService.t('offlineAreas.latitude')}: ${area.bounds.southWest.latitude.toStringAsFixed(3)}, ${area.bounds.southWest.longitude.toStringAsFixed(3)}\n' +
|
||||
String subtitle = '${locService.t('offlineAreas.provider')}: ${area.tileProviderDisplay}\n'
|
||||
'${locService.t('offlineAreas.maxZoom')}: Z${area.maxZoom}\n'
|
||||
'${locService.t('offlineAreas.latitude')}: ${area.bounds.southWest.latitude.toStringAsFixed(3)}, ${area.bounds.southWest.longitude.toStringAsFixed(3)}\n'
|
||||
'${locService.t('offlineAreas.latitude')}: ${area.bounds.northEast.latitude.toStringAsFixed(3)}, ${area.bounds.northEast.longitude.toStringAsFixed(3)}';
|
||||
|
||||
if (area.status == OfflineAreaStatus.downloading) {
|
||||
@@ -207,7 +207,7 @@ class _OfflineAreasSectionState extends State<OfflineAreasSection> {
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
}),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -3,6 +3,8 @@ import 'package:provider/provider.dart';
|
||||
import '../../../app_state.dart';
|
||||
import '../../../services/offline_area_service.dart';
|
||||
import '../../../services/localization_service.dart';
|
||||
import '../../../widgets/in_flight_upload_wait_dialog.dart';
|
||||
|
||||
|
||||
class OfflineModeSection extends StatelessWidget {
|
||||
const OfflineModeSection({super.key});
|
||||
@@ -49,10 +51,17 @@ class OfflineModeSection extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
// Proceed with the change
|
||||
await appState.setOfflineMode(value);
|
||||
// Proceed with the change, respecting any in-flight submission that
|
||||
// needs to finish before offline mode actually takes effect.
|
||||
if (!context.mounted) return;
|
||||
await applyQueueSettingChangeRespectingInFlightUploads(
|
||||
context: context,
|
||||
appState: appState,
|
||||
applyChange: () => appState.setOfflineMode(value),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
|
||||
@@ -54,47 +54,64 @@ class OperatorProfilesSection extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
else
|
||||
...appState.operatorProfiles.map(
|
||||
(p) => ListTile(
|
||||
title: Text(p.name),
|
||||
subtitle: Text(locService.t('operatorProfiles.tagsCount', params: [p.tags.length.toString()])),
|
||||
trailing: PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'edit',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.edit),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('actions.edit')),
|
||||
],
|
||||
),
|
||||
ReorderableListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: appState.operatorProfiles.length,
|
||||
onReorderItem: (oldIndex, newIndex) {
|
||||
appState.reorderOperatorProfiles(oldIndex, newIndex);
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
final p = appState.operatorProfiles[index];
|
||||
return ListTile(
|
||||
key: ValueKey(p.id),
|
||||
leading: ReorderableDragStartListener(
|
||||
index: index,
|
||||
child: const Icon(
|
||||
Icons.drag_handle,
|
||||
color: Colors.grey,
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'delete',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete, color: Colors.red),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('operatorProfiles.deleteOperatorProfile'), style: const TextStyle(color: Colors.red)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'edit') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => OperatorProfileEditor(profile: p),
|
||||
),
|
||||
title: Text(p.name),
|
||||
subtitle: Text(locService.t('operatorProfiles.tagsCount', params: [p.tags.length.toString()])),
|
||||
trailing: PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'edit',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.edit),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('actions.edit')),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else if (value == 'delete') {
|
||||
_showDeleteProfileDialog(context, p);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'delete',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete, color: Colors.red),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('operatorProfiles.deleteOperatorProfile'), style: const TextStyle(color: Colors.red)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
onSelected: (value) {
|
||||
if (value == 'edit') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => OperatorProfileEditor(profile: p),
|
||||
),
|
||||
);
|
||||
} else if (value == 'delete') {
|
||||
_showDeleteProfileDialog(context, p);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -18,7 +18,8 @@ class ProximityAlertsSection extends StatefulWidget {
|
||||
State<ProximityAlertsSection> createState() => _ProximityAlertsSectionState();
|
||||
}
|
||||
|
||||
class _ProximityAlertsSectionState extends State<ProximityAlertsSection> {
|
||||
class _ProximityAlertsSectionState extends State<ProximityAlertsSection>
|
||||
with WidgetsBindingObserver {
|
||||
late final TextEditingController _distanceController;
|
||||
bool _notificationsEnabled = false;
|
||||
bool _checkingPermissions = false;
|
||||
@@ -26,6 +27,9 @@ class _ProximityAlertsSectionState extends State<ProximityAlertsSection> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Re-check on resume: the user may have just granted notifications in the
|
||||
// system settings app and come back.
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
final appState = context.read<AppState>();
|
||||
// Convert meters to display units for the text field
|
||||
final displayValue = DistanceService.convertFromMeters(
|
||||
@@ -57,19 +61,59 @@ class _ProximityAlertsSectionState extends State<ProximityAlertsSection> {
|
||||
setState(() {
|
||||
_checkingPermissions = true;
|
||||
});
|
||||
|
||||
|
||||
final enabled = await ProximityAlertService().requestNotificationPermissions();
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_notificationsEnabled = enabled;
|
||||
_checkingPermissions = false;
|
||||
});
|
||||
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_notificationsEnabled = enabled;
|
||||
_checkingPermissions = false;
|
||||
});
|
||||
|
||||
// Still not granted. On iOS the system prompt only ever appears once, so
|
||||
// re-requesting silently does nothing — the only remaining path is the
|
||||
// system settings app.
|
||||
if (!enabled) {
|
||||
await _promptOpenSystemSettings();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _promptOpenSystemSettings() async {
|
||||
final locService = LocalizationService.instance;
|
||||
|
||||
final shouldOpen = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (dialogContext) => AlertDialog(
|
||||
title: Text(locService.t('proximityAlerts.blockedTitle')),
|
||||
content: Text(locService.t('proximityAlerts.blockedMessage')),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(dialogContext).pop(false),
|
||||
child: Text(locService.t('actions.cancel')),
|
||||
),
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(dialogContext).pop(true),
|
||||
child: Text(locService.t('proximityAlerts.openSettings')),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (shouldOpen == true) {
|
||||
await ProximityAlertService().openSystemSettings();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
if (state == AppLifecycleState.resumed) {
|
||||
_checkNotificationPermissions();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
_distanceController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -140,9 +184,9 @@ class _ProximityAlertsSectionState extends State<ProximityAlertsSection> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange.withOpacity(0.1),
|
||||
color: Colors.orange.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: Colors.orange.withOpacity(0.3)),
|
||||
border: Border.all(color: Colors.orange.withValues(alpha: 0.3)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -233,7 +277,7 @@ class _ProximityAlertsSectionState extends State<ProximityAlertsSection> {
|
||||
DistanceService.convertFromMeters(kProximityAlertDefaultDistance.toDouble(), appState.distanceUnit).round().toString(),
|
||||
]),
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../app_state.dart';
|
||||
import '../../../services/localization_service.dart';
|
||||
import '../../../state/settings_state.dart';
|
||||
|
||||
class QueueSection extends StatelessWidget {
|
||||
const QueueSection({super.key});
|
||||
@@ -112,20 +111,20 @@ class QueueSection extends StatelessWidget {
|
||||
? Colors.red
|
||||
: _getUploadModeColor(upload.uploadMode),
|
||||
),
|
||||
title: Text(locService.t('queue.cameraWithIndex', params: [(index + 1).toString()]) +
|
||||
title: Text(locService.t('queue.itemWithIndex', params: [(index + 1).toString()]) +
|
||||
(upload.error ? locService.t('queue.error') : "") +
|
||||
(upload.completing ? locService.t('queue.completing') : "")),
|
||||
subtitle: Text(
|
||||
locService.t('queue.destination', params: [_getUploadModeDisplayName(upload.uploadMode)]) + '\n' +
|
||||
locService.t('queue.latitude', params: [upload.coord.latitude.toStringAsFixed(6)]) + '\n' +
|
||||
locService.t('queue.longitude', params: [upload.coord.longitude.toStringAsFixed(6)]) + '\n' +
|
||||
locService.t('queue.direction', params: [
|
||||
upload.direction is String
|
||||
'${locService.t('queue.destination', params: [_getUploadModeDisplayName(upload.uploadMode)])}\n'
|
||||
'${locService.t('queue.latitude', params: [upload.coord.latitude.toStringAsFixed(6)])}\n'
|
||||
'${locService.t('queue.longitude', params: [upload.coord.longitude.toStringAsFixed(6)])}\n'
|
||||
'${locService.t('queue.direction', params: [
|
||||
upload.direction is String
|
||||
? upload.direction.toString()
|
||||
: upload.direction.round().toString()
|
||||
]) + '\n' +
|
||||
locService.t('queue.attempts', params: [upload.attempts.toString()]) +
|
||||
(upload.error ? "\n${locService.t('queue.uploadFailedRetry')}" : "")
|
||||
])}\n'
|
||||
'${locService.t('queue.attempts', params: [upload.attempts.toString()])}'
|
||||
'${upload.error ? "\n${locService.t('queue.uploadFailedRetry')}" : ""}'
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -44,7 +44,7 @@ class TileProviderSection extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
else
|
||||
...providers.map((provider) => _buildProviderTile(context, provider, appState)).toList(),
|
||||
...providers.map((provider) => _buildProviderTile(context, provider, appState)),
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -89,7 +89,7 @@ class TileProviderSection extends StatelessWidget {
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: isSelected
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.surfaceVariant,
|
||||
: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: Icon(
|
||||
Icons.map,
|
||||
color: isSelected
|
||||
@@ -104,6 +104,9 @@ class TileProviderSection extends StatelessWidget {
|
||||
case 'edit':
|
||||
_editProvider(context, provider);
|
||||
break;
|
||||
case 'clear_cache':
|
||||
_clearProviderCaches(context, provider);
|
||||
break;
|
||||
case 'delete':
|
||||
_deleteProvider(context, provider);
|
||||
break;
|
||||
@@ -120,6 +123,16 @@ class TileProviderSection extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'clear_cache',
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.clear_all),
|
||||
const SizedBox(width: 8),
|
||||
Text(locService.t('tileProviders.clearCaches')),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'delete',
|
||||
child: Row(
|
||||
@@ -154,6 +167,37 @@ class TileProviderSection extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
void _clearProviderCaches(BuildContext context, TileProvider provider) {
|
||||
final locService = LocalizationService.instance;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(locService.t('tileProviders.clearCaches')),
|
||||
content: Text(locService.t('tileProviders.clearCachesConfirm', params: [provider.name])),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(locService.t('actions.cancel')),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
await context.read<AppState>().clearTileProviderCaches(provider.id);
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(locService.t('tileProviders.cachesCleared', params: [provider.name])),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Text(locService.t('tileProviders.clearCaches')),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _deleteProvider(BuildContext context, TileProvider provider) {
|
||||
final locService = LocalizationService.instance;
|
||||
showDialog(
|
||||
|
||||
@@ -23,6 +23,8 @@ class UploadModeSection extends StatelessWidget {
|
||||
subtitle: Text(locService.t('uploadMode.subtitle')),
|
||||
trailing: DropdownButton<UploadMode>(
|
||||
value: appState.uploadMode,
|
||||
// This entire section is gated behind kEnableDevelopmentModes
|
||||
// in osm_account_screen.dart, so all modes are always available here.
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: UploadMode.production,
|
||||
@@ -81,7 +83,7 @@ class UploadModeSection extends StatelessWidget {
|
||||
fontSize: 12,
|
||||
color: appState.pendingCount > 0
|
||||
? Theme.of(context).disabledColor
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.7)
|
||||
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7)
|
||||
)
|
||||
);
|
||||
case UploadMode.sandbox:
|
||||
@@ -95,7 +97,6 @@ class UploadModeSection extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
case UploadMode.simulate:
|
||||
default:
|
||||
return Text(
|
||||
locService.t('uploadMode.simulateDescription'),
|
||||
style: TextStyle(
|
||||
|
||||
@@ -102,7 +102,7 @@ class SettingsScreen extends StatelessWidget {
|
||||
child: Text(
|
||||
'Version: ${VersionService().version}',
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -117,23 +117,9 @@ class SettingsScreen extends StatelessWidget {
|
||||
final appState = context.watch<AppState>();
|
||||
|
||||
return ListTile(
|
||||
leading: Stack(
|
||||
children: [
|
||||
const Icon(Icons.account_circle),
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
leading: Badge(
|
||||
isLabelVisible: appState.hasUnreadNotifications,
|
||||
child: const Icon(Icons.account_circle),
|
||||
),
|
||||
title: Text(locService.t('auth.osmAccountTitle')),
|
||||
subtitle: Text(locService.t('auth.osmAccountSubtitle')),
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
import '../app_state.dart';
|
||||
import '../models/tile_provider.dart';
|
||||
import '../services/http_client.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../dev_config.dart';
|
||||
|
||||
@@ -408,6 +407,7 @@ class _TileTypeDialogState extends State<_TileTypeDialog> {
|
||||
_isLoadingPreview = true;
|
||||
});
|
||||
|
||||
final client = UserAgentClient();
|
||||
try {
|
||||
// Create a temporary TileType to use the getTileUrl method
|
||||
final tempTileType = TileType(
|
||||
@@ -416,21 +416,21 @@ class _TileTypeDialogState extends State<_TileTypeDialog> {
|
||||
urlTemplate: _urlController.text.trim(),
|
||||
attribution: 'Preview',
|
||||
);
|
||||
|
||||
|
||||
final url = tempTileType.getTileUrl(
|
||||
kPreviewTileZoom,
|
||||
kPreviewTileX,
|
||||
kPreviewTileY,
|
||||
apiKey: null, // Don't use API key for preview
|
||||
);
|
||||
|
||||
final response = await http.get(Uri.parse(url));
|
||||
|
||||
|
||||
final response = await client.get(Uri.parse(url));
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
setState(() {
|
||||
_previewTile = response.bodyBytes;
|
||||
});
|
||||
|
||||
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(locService.t('tileTypeEditor.previewTileLoaded'))),
|
||||
@@ -446,6 +446,7 @@ class _TileTypeDialogState extends State<_TileTypeDialog> {
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
client.close();
|
||||
setState(() {
|
||||
_isLoadingPreview = false;
|
||||
});
|
||||
|
||||
@@ -3,7 +3,8 @@ import 'package:provider/provider.dart';
|
||||
import '../app_state.dart';
|
||||
import '../models/pending_upload.dart';
|
||||
import '../services/localization_service.dart';
|
||||
import '../state/settings_state.dart';
|
||||
import '../widgets/in_flight_upload_wait_dialog.dart';
|
||||
|
||||
|
||||
class UploadQueueScreen extends StatelessWidget {
|
||||
const UploadQueueScreen({super.key});
|
||||
@@ -85,6 +86,22 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _handlePauseQueueChange(BuildContext context, AppState appState, bool value) async {
|
||||
// Only need to wait for in-flight uploads when turning pause ON.
|
||||
// Resuming (turning it off) can happen immediately.
|
||||
if (!value) {
|
||||
await appState.setPauseQueueProcessing(value);
|
||||
return;
|
||||
}
|
||||
|
||||
await applyQueueSettingChangeRespectingInFlightUploads(
|
||||
context: context,
|
||||
appState: appState,
|
||||
applyChange: () => appState.setPauseQueueProcessing(value),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
@@ -114,8 +131,8 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange.withOpacity(0.1),
|
||||
border: Border.all(color: Colors.orange.withOpacity(0.3)),
|
||||
color: Colors.orange.withValues(alpha: 0.1),
|
||||
border: Border.all(color: Colors.orange.withValues(alpha: 0.3)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
@@ -167,9 +184,10 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
value: appState.pauseQueueProcessing,
|
||||
onChanged: appState.offlineMode
|
||||
? null // Disable when offline mode is on
|
||||
: (value) => appState.setPauseQueueProcessing(value),
|
||||
: (value) => _handlePauseQueueChange(context, appState, value),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
@@ -205,7 +223,7 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
icon: const Icon(Icons.clear_all),
|
||||
label: Text(locService.t('queue.clearUploadQueue')),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: appState.pendingCount > 0 ? null : Theme.of(context).disabledColor.withOpacity(0.1),
|
||||
backgroundColor: appState.pendingCount > 0 ? null : Theme.of(context).disabledColor.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -224,13 +242,13 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
Icon(
|
||||
Icons.check_circle_outline,
|
||||
size: 64,
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.4),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.4),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
locService.t('queue.nothingInQueue'),
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6),
|
||||
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -272,16 +290,16 @@ class UploadQueueScreen extends StatelessWidget {
|
||||
_getUploadStateText(upload, locService)
|
||||
),
|
||||
subtitle: Text(
|
||||
locService.t('queue.destination', params: [_getUploadModeDisplayName(upload.uploadMode)]) + '\n' +
|
||||
locService.t('queue.latitude', params: [upload.coord.latitude.toStringAsFixed(6)]) + '\n' +
|
||||
locService.t('queue.longitude', params: [upload.coord.longitude.toStringAsFixed(6)]) + '\n' +
|
||||
locService.t('queue.direction', params: [
|
||||
upload.direction is String
|
||||
'${locService.t('queue.destination', params: [_getUploadModeDisplayName(upload.uploadMode)])}\n'
|
||||
'${locService.t('queue.latitude', params: [upload.coord.latitude.toStringAsFixed(6)])}\n'
|
||||
'${locService.t('queue.longitude', params: [upload.coord.longitude.toStringAsFixed(6)])}\n'
|
||||
'${locService.t('queue.direction', params: [
|
||||
upload.direction is String
|
||||
? upload.direction.toString()
|
||||
: upload.direction.round().toString()
|
||||
]) + '\n' +
|
||||
locService.t('queue.attempts', params: [upload.attempts.toString()]) +
|
||||
(upload.uploadState == UploadState.error ? "\n${locService.t('queue.uploadFailedRetry')}" : "")
|
||||
])}\n'
|
||||
'${locService.t('queue.attempts', params: [upload.attempts.toString()])}'
|
||||
'${upload.uploadState == UploadState.error ? "\n${locService.t('queue.uploadFailedRetry')}" : ""}'
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:oauth2_client/oauth2_client.dart';
|
||||
import 'package:oauth2_client/oauth2_helper.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
/// Handles PKCE OAuth login with OpenStreetMap.
|
||||
import '../keys.dart';
|
||||
import '../app_state.dart' show UploadMode;
|
||||
import 'http_client.dart';
|
||||
|
||||
class AuthService {
|
||||
// Both client IDs from keys.dart
|
||||
@@ -30,13 +30,13 @@ class AuthService {
|
||||
case UploadMode.sandbox:
|
||||
return 'osm_token_sandbox';
|
||||
case UploadMode.simulate:
|
||||
default:
|
||||
return 'osm_token_simulate';
|
||||
}
|
||||
}
|
||||
|
||||
void setUploadMode(UploadMode mode) {
|
||||
_mode = mode;
|
||||
if (mode == UploadMode.simulate || !kHasOsmSecrets) return;
|
||||
final isSandbox = (mode == UploadMode.sandbox);
|
||||
final authBase = isSandbox
|
||||
? 'https://master.apis.dev.openstreetmap.org'
|
||||
@@ -86,21 +86,21 @@ class AuthService {
|
||||
}
|
||||
try {
|
||||
final token = await _helper.getToken();
|
||||
if (token?.accessToken == null) {
|
||||
if (token.accessToken == null) {
|
||||
log('OAuth error: token null or missing accessToken');
|
||||
return null;
|
||||
}
|
||||
final tokenMap = {
|
||||
'accessToken': token!.accessToken,
|
||||
'accessToken': token.accessToken,
|
||||
'refreshToken': token.refreshToken,
|
||||
};
|
||||
final tokenJson = jsonEncode(tokenMap);
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setString(_tokenKey, tokenJson); // Save token for current mode
|
||||
_displayName = await _fetchUsername(token!.accessToken!);
|
||||
_displayName = await _fetchUsername(token.accessToken!);
|
||||
return _displayName;
|
||||
} catch (e) {
|
||||
print('AuthService: OAuth login failed: $e');
|
||||
debugPrint('AuthService: OAuth login failed: $e');
|
||||
log('OAuth login failed: $e');
|
||||
rethrow;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class AuthService {
|
||||
_displayName = await _fetchUsername(accessToken);
|
||||
return _displayName;
|
||||
} catch (e) {
|
||||
print('AuthService: Error restoring login with stored token: $e');
|
||||
debugPrint('AuthService: Error restoring login with stored token: $e');
|
||||
log('Error restoring login with stored token: $e');
|
||||
// Token might be expired or invalid, clear it
|
||||
await logout();
|
||||
@@ -151,7 +151,9 @@ class AuthService {
|
||||
|
||||
// Force a fresh login by clearing stored tokens
|
||||
Future<String?> forceLogin() async {
|
||||
await _helper.removeAllTokens();
|
||||
if (_mode != UploadMode.simulate) {
|
||||
await _helper.removeAllTokens();
|
||||
}
|
||||
_displayName = null;
|
||||
return await login();
|
||||
}
|
||||
@@ -179,9 +181,11 @@ class AuthService {
|
||||
: 'https://api.openstreetmap.org';
|
||||
}
|
||||
|
||||
final _client = UserAgentClient();
|
||||
|
||||
Future<String?> _fetchUsername(String accessToken) async {
|
||||
try {
|
||||
final resp = await http.get(
|
||||
final resp = await _client.get(
|
||||
Uri.parse('$_apiHost/api/0.6/user/details.json'),
|
||||
headers: {'Authorization': 'Bearer $accessToken'},
|
||||
);
|
||||
@@ -194,7 +198,7 @@ class AuthService {
|
||||
final displayName = userData['user']?['display_name'];
|
||||
return displayName;
|
||||
} catch (e) {
|
||||
print('AuthService: Error fetching username: $e');
|
||||
debugPrint('AuthService: Error fetching username: $e');
|
||||
log('Error fetching username: $e');
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -226,7 +225,28 @@ class ChangelogService {
|
||||
versionsNeedingMigration.add('1.6.3');
|
||||
}
|
||||
|
||||
if (needsMigration(lastSeenVersion, currentVersion, '1.8.0')) {
|
||||
versionsNeedingMigration.add('1.8.0');
|
||||
}
|
||||
|
||||
if (needsMigration(lastSeenVersion, currentVersion, '2.1.0')) {
|
||||
versionsNeedingMigration.add('2.1.0');
|
||||
}
|
||||
|
||||
if (needsMigration(lastSeenVersion, currentVersion, '2.7.3')) {
|
||||
versionsNeedingMigration.add('2.7.3');
|
||||
}
|
||||
|
||||
if (needsMigration(lastSeenVersion, currentVersion, '2.10.0')) {
|
||||
versionsNeedingMigration.add('2.10.0');
|
||||
}
|
||||
|
||||
if (needsMigration(lastSeenVersion, currentVersion, '2.10.5')) {
|
||||
versionsNeedingMigration.add('2.10.5');
|
||||
}
|
||||
|
||||
// Future versions can be added here
|
||||
|
||||
// if (needsMigration(lastSeenVersion, currentVersion, '2.0.0')) {
|
||||
// versionsNeedingMigration.add('2.0.0');
|
||||
// }
|
||||
@@ -304,8 +324,8 @@ class ChangelogService {
|
||||
final v2Parts = v2.split('.').map(int.parse).toList();
|
||||
|
||||
// Ensure we have at least 3 parts (major.minor.patch)
|
||||
while (v1Parts.length < 3) v1Parts.add(0);
|
||||
while (v2Parts.length < 3) v2Parts.add(0);
|
||||
while (v1Parts.length < 3) { v1Parts.add(0); }
|
||||
while (v2Parts.length < 3) { v2Parts.add(0); }
|
||||
|
||||
// Compare major version first
|
||||
if (v1Parts[0] < v2Parts[0]) return -1;
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
import 'dart:convert';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../state/settings_state.dart';
|
||||
import 'http_client.dart';
|
||||
|
||||
/// Tracks unread comments on the user's own changesets.
|
||||
///
|
||||
/// The OSM API has no "read" concept for changeset comments, so we track it
|
||||
/// ourselves: we remember the `comments_count` we last saw for each of the
|
||||
/// user's recent changesets, and flag a changeset as having unread comments
|
||||
/// if it now has a higher count than what we last recorded.
|
||||
///
|
||||
/// This only looks at the user's most recent 100 changesets (the OSM API's
|
||||
/// max page size, and it doesn't support simple offset paging). If a
|
||||
/// changeset receives a new comment and then ages out of that window
|
||||
/// entirely before the next check, we will miss it - an accepted limitation
|
||||
/// of polling a bounded recent-activity window rather than a real
|
||||
/// notification feed.
|
||||
class ChangesetCommentsService {
|
||||
static const _cacheDuration = Duration(minutes: 5);
|
||||
final _client = UserAgentClient();
|
||||
|
||||
DateTime? _lastCheck;
|
||||
int? _lastResult; // ID of changeset with unread comments, or null if none
|
||||
bool _lastResultIsSet = false; // whether _lastResult holds a valid cached value
|
||||
UploadMode? _lastMode;
|
||||
|
||||
/// Returns the ID of a changeset with more comments now than the last
|
||||
/// time [markRead] was called for this upload mode, or null if there are
|
||||
/// none (or if not logged in, in simulate mode, or on error). When
|
||||
/// multiple changesets have new comments, returns the most recent one
|
||||
/// (the API returns changesets newest-first).
|
||||
Future<int?> getUnreadChangesetId({
|
||||
required String? username,
|
||||
required UploadMode uploadMode,
|
||||
bool forceRefresh = false,
|
||||
}) async {
|
||||
if (uploadMode == UploadMode.simulate) return null;
|
||||
if (username == null || username.isEmpty) return null;
|
||||
|
||||
if (!forceRefresh &&
|
||||
_lastResultIsSet &&
|
||||
_lastMode == uploadMode &&
|
||||
_lastCheck != null &&
|
||||
DateTime.now().difference(_lastCheck!) < _cacheDuration) {
|
||||
return _lastResult;
|
||||
}
|
||||
|
||||
try {
|
||||
final current = await _fetchCommentCounts(username, uploadMode);
|
||||
if (current == null) return null;
|
||||
|
||||
final seen = await _loadSeenCounts(uploadMode);
|
||||
// current is built from the API response, which is ordered
|
||||
// newest-first, so the first match found is the most recent one.
|
||||
int? unreadId;
|
||||
for (final entry in current.entries) {
|
||||
if (entry.value > (seen[entry.key] ?? 0)) {
|
||||
unreadId = entry.key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_lastCheck = DateTime.now();
|
||||
_lastResult = unreadId;
|
||||
_lastResultIsSet = true;
|
||||
_lastMode = uploadMode;
|
||||
|
||||
return unreadId;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark all currently-visible changeset comments as read by saving the
|
||||
/// current comment counts as the new baseline.
|
||||
Future<void> markRead({
|
||||
required String? username,
|
||||
required UploadMode uploadMode,
|
||||
}) async {
|
||||
if (uploadMode == UploadMode.simulate) return;
|
||||
if (username == null || username.isEmpty) return;
|
||||
|
||||
try {
|
||||
final current = await _fetchCommentCounts(username, uploadMode);
|
||||
if (current == null) return;
|
||||
|
||||
await _saveSeenCounts(uploadMode, current);
|
||||
|
||||
// Update in-memory cache so getUnreadChangesetId() doesn't need to
|
||||
// re-fetch immediately after marking read.
|
||||
_lastCheck = DateTime.now();
|
||||
_lastResult = null;
|
||||
_lastResultIsSet = true;
|
||||
_lastMode = uploadMode;
|
||||
} catch (e) {
|
||||
// Best-effort - if this fails the badge will just persist until the
|
||||
// next successful mark-read attempt.
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear cached state (useful on logout or upload mode change).
|
||||
void clearCache() {
|
||||
_lastCheck = null;
|
||||
_lastResult = null;
|
||||
_lastResultIsSet = false;
|
||||
_lastMode = null;
|
||||
}
|
||||
|
||||
/// Build the URL to the given changeset on the OSM website for the given
|
||||
/// upload mode.
|
||||
String getChangesetUrl(int changesetId, UploadMode uploadMode) {
|
||||
switch (uploadMode) {
|
||||
case UploadMode.production:
|
||||
return 'https://www.openstreetmap.org/changeset/$changesetId';
|
||||
case UploadMode.sandbox:
|
||||
return 'https://master.apis.dev.openstreetmap.org/changeset/$changesetId';
|
||||
case UploadMode.simulate:
|
||||
return 'https://www.openstreetmap.org/changeset/$changesetId';
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetches the user's most recent changesets and returns a map of
|
||||
/// changeset ID -> comments_count. Returns null on any error.
|
||||
Future<Map<int, int>?> _fetchCommentCounts(
|
||||
String username,
|
||||
UploadMode uploadMode,
|
||||
) async {
|
||||
final apiHost = _getApiHost(uploadMode);
|
||||
final response = await _client.get(
|
||||
Uri.parse('$apiHost/api/0.6/changesets.json?display_name=${Uri.encodeQueryComponent(username)}'),
|
||||
);
|
||||
|
||||
if (response.statusCode != 200) return null;
|
||||
|
||||
final data = jsonDecode(response.body);
|
||||
final changesets = data['changesets'];
|
||||
if (changesets is! List) return null;
|
||||
|
||||
final result = <int, int>{};
|
||||
for (final cs in changesets) {
|
||||
final id = cs['id'];
|
||||
final count = cs['comments_count'];
|
||||
if (id is int && count is int) {
|
||||
result[id] = count;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<Map<int, int>> _loadSeenCounts(UploadMode uploadMode) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final json = prefs.getString(_prefsKey(uploadMode));
|
||||
if (json == null) return {};
|
||||
try {
|
||||
final decoded = jsonDecode(json) as Map<String, dynamic>;
|
||||
return decoded.map((k, v) => MapEntry(int.parse(k), v as int));
|
||||
} catch (e) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _saveSeenCounts(UploadMode uploadMode, Map<int, int> counts) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final encoded = jsonEncode(counts.map((k, v) => MapEntry(k.toString(), v)));
|
||||
await prefs.setString(_prefsKey(uploadMode), encoded);
|
||||
}
|
||||
|
||||
String _prefsKey(UploadMode uploadMode) =>
|
||||
'changeset_comments_seen_${uploadMode.name}';
|
||||
|
||||
String _getApiHost(UploadMode uploadMode) {
|
||||
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';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/// Shared validation helpers for geographic coordinates and zoom levels.
|
||||
///
|
||||
/// Used wherever a coordinate or zoom level comes from an external source
|
||||
/// (GPS fixes, persisted preferences, live map camera state) that isn't
|
||||
/// guaranteed to be finite/in-range.
|
||||
library;
|
||||
|
||||
import '../dev_config.dart' show kAbsoluteMaxZoom;
|
||||
|
||||
/// Validate that a latitude value is finite and within -90 to 90.
|
||||
bool isValidLatitude(double value) {
|
||||
return !value.isNaN && !value.isInfinite && value >= -90.0 && value <= 90.0;
|
||||
}
|
||||
|
||||
/// Validate that a longitude value is finite and within -180 to 180.
|
||||
bool isValidLongitude(double value) {
|
||||
return !value.isNaN && !value.isInfinite && value >= -180.0 && value <= 180.0;
|
||||
}
|
||||
|
||||
/// Validate that a zoom level is finite and within a sane range.
|
||||
///
|
||||
/// Defaults to 1.0 to [kAbsoluteMaxZoom]. `num` is used (rather than
|
||||
/// `double`) so the `int` constant [kAbsoluteMaxZoom] can be used directly
|
||||
/// as a default parameter value.
|
||||
bool isValidZoom(double zoom, {num min = 1.0, num max = kAbsoluteMaxZoom}) {
|
||||
return !zoom.isNaN && !zoom.isInfinite && zoom >= min && zoom <= max;
|
||||
}
|
||||
@@ -1,11 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:app_links/app_links.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
import '../models/node_profile.dart';
|
||||
import '../models/operator_profile.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import 'http_client.dart';
|
||||
import 'profile_import_service.dart';
|
||||
import 'operator_profile_import_service.dart';
|
||||
import '../screens/profile_editor.dart';
|
||||
import '../screens/operator_profile_editor.dart';
|
||||
|
||||
class DeepLinkService {
|
||||
static final DeepLinkService _instance = DeepLinkService._internal();
|
||||
@@ -14,6 +20,9 @@ class DeepLinkService {
|
||||
|
||||
late AppLinks _appLinks;
|
||||
StreamSubscription<Uri>? _linkSubscription;
|
||||
|
||||
/// Callback for HomeScreen to receive node deep links
|
||||
void Function(OsmNode node)? onNodeDeepLink;
|
||||
|
||||
/// Initialize deep link handling (sets up stream listener only)
|
||||
Future<void> init() async {
|
||||
@@ -43,6 +52,9 @@ class DeepLinkService {
|
||||
case 'profiles':
|
||||
_handleProfilesLink(uri);
|
||||
break;
|
||||
case 'node':
|
||||
_handleNodeLink(uri);
|
||||
break;
|
||||
case 'auth':
|
||||
// OAuth links are handled by flutter_web_auth_2
|
||||
debugPrint('[DeepLinkService] OAuth link handled by flutter_web_auth_2');
|
||||
@@ -69,6 +81,59 @@ class DeepLinkService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle node deep link: `deflockapp://node?id=<nodeId>`
|
||||
Future<void> _handleNodeLink(Uri uri) async {
|
||||
final idStr = uri.queryParameters['id'];
|
||||
final nodeId = int.tryParse(idStr ?? '');
|
||||
if (nodeId == null) {
|
||||
_showError('Invalid node link: missing or invalid ID');
|
||||
return;
|
||||
}
|
||||
|
||||
final node = await _fetchNodeById(nodeId);
|
||||
if (node == null) {
|
||||
_showError('Node $nodeId not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (onNodeDeepLink != null) {
|
||||
onNodeDeepLink!(node);
|
||||
} else {
|
||||
debugPrint('[DeepLinkService] No node deep link handler registered');
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch an OSM node by ID from the OpenStreetMap API
|
||||
Future<OsmNode?> _fetchNodeById(int nodeId) async {
|
||||
try {
|
||||
final url = Uri.parse('https://api.openstreetmap.org/api/0.6/node/$nodeId.json');
|
||||
final client = UserAgentClient();
|
||||
final response = await client.get(url);
|
||||
if (response.statusCode != 200) return null;
|
||||
|
||||
final json = jsonDecode(response.body);
|
||||
final elements = json['elements'] as List?;
|
||||
if (elements == null || elements.isEmpty) return null;
|
||||
|
||||
final e = elements[0];
|
||||
final tags = <String, String>{};
|
||||
if (e['tags'] != null) {
|
||||
(e['tags'] as Map<String, dynamic>).forEach((k, v) {
|
||||
tags[k] = v.toString();
|
||||
});
|
||||
}
|
||||
|
||||
return OsmNode(
|
||||
id: e['id'] as int,
|
||||
coord: LatLng((e['lat'] as num).toDouble(), (e['lon'] as num).toDouble()),
|
||||
tags: tags,
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[DeepLinkService] Failed to fetch node $nodeId: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle profile-related deep links
|
||||
void _handleProfilesLink(Uri uri) {
|
||||
final segments = uri.pathSegments;
|
||||
@@ -87,8 +152,16 @@ class DeepLinkService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle profile add deep link: deflockapp://profiles/add?p=<base64>
|
||||
/// Handle profile add deep link: `deflockapp://profiles/add?p=<base64>` or `deflockapp://profiles/add?op=<base64>`
|
||||
void _handleAddProfileLink(Uri uri) {
|
||||
// Check for operator profile parameter first
|
||||
final operatorBase64Data = uri.queryParameters['op'];
|
||||
if (operatorBase64Data != null && operatorBase64Data.isNotEmpty) {
|
||||
_handleOperatorProfileImport(operatorBase64Data);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise check for device profile parameter
|
||||
final base64Data = uri.queryParameters['p'];
|
||||
|
||||
if (base64Data == null || base64Data.isEmpty) {
|
||||
@@ -108,6 +181,20 @@ class DeepLinkService {
|
||||
_navigateToProfileEditor(profile);
|
||||
}
|
||||
|
||||
/// Handle operator profile import from deep link
|
||||
void _handleOperatorProfileImport(String base64Data) {
|
||||
// Parse operator profile from base64
|
||||
final operatorProfile = OperatorProfileImportService.parseProfileFromBase64(base64Data);
|
||||
|
||||
if (operatorProfile == null) {
|
||||
_showError('Invalid operator profile data');
|
||||
return;
|
||||
}
|
||||
|
||||
// Navigate to operator profile editor with the imported profile
|
||||
_navigateToOperatorProfileEditor(operatorProfile);
|
||||
}
|
||||
|
||||
/// Navigate to profile editor with pre-filled profile data
|
||||
void _navigateToProfileEditor(NodeProfile profile) {
|
||||
final context = _navigatorKey?.currentContext;
|
||||
@@ -125,6 +212,23 @@ class DeepLinkService {
|
||||
);
|
||||
}
|
||||
|
||||
/// Navigate to operator profile editor with pre-filled operator profile data
|
||||
void _navigateToOperatorProfileEditor(OperatorProfile operatorProfile) {
|
||||
final context = _navigatorKey?.currentContext;
|
||||
|
||||
if (context == null) {
|
||||
debugPrint('[DeepLinkService] No navigator context available');
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => OperatorProfileEditor(profile: operatorProfile),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Show error message to user
|
||||
void _showError(String message) {
|
||||
final context = _navigatorKey?.currentContext;
|
||||
|
||||
@@ -1,158 +1,471 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:http/retry.dart';
|
||||
|
||||
import '../app_state.dart';
|
||||
import '../models/tile_provider.dart' as models;
|
||||
import 'map_data_provider.dart';
|
||||
import 'http_client.dart';
|
||||
import 'map_data_submodules/tiles_from_local.dart';
|
||||
import 'offline_area_service.dart';
|
||||
|
||||
/// Custom tile provider that integrates with DeFlock's offline/online architecture.
|
||||
///
|
||||
/// This replaces the complex HTTP interception approach with a clean TileProvider
|
||||
/// implementation that directly interfaces with our MapDataProvider system.
|
||||
class DeflockTileProvider extends TileProvider {
|
||||
final MapDataProvider _mapDataProvider = MapDataProvider();
|
||||
|
||||
/// Thrown when a tile load is cancelled (tile scrolled off screen).
|
||||
/// TileLayerManager skips retry for these — the tile is already gone.
|
||||
class TileLoadCancelledException implements Exception {
|
||||
const TileLoadCancelledException();
|
||||
}
|
||||
|
||||
/// Thrown when a tile is not available offline (no offline area or cache hit).
|
||||
/// TileLayerManager skips retry for these — retrying won't help without network.
|
||||
class TileNotAvailableOfflineException implements Exception {
|
||||
const TileNotAvailableOfflineException();
|
||||
}
|
||||
|
||||
/// Custom tile provider that extends NetworkTileProvider to leverage its
|
||||
/// built-in disk cache, RetryClient, ETag revalidation, and abort support,
|
||||
/// while routing URLs through our TileType logic and supporting offline tiles.
|
||||
///
|
||||
/// Each instance is configured for a specific tile provider/type combination
|
||||
/// with frozen config — no AppState lookups at request time (except for the
|
||||
/// global offlineMode toggle).
|
||||
///
|
||||
/// Two runtime paths:
|
||||
/// 1. **Common path** (no offline areas for current provider): delegates to
|
||||
/// super.getImageWithCancelLoadingSupport() — full NetworkTileImageProvider
|
||||
/// pipeline (disk cache, ETag revalidation, RetryClient, abort support).
|
||||
/// 2. **Offline-first path** (has offline areas or offline mode): returns
|
||||
/// DeflockOfflineTileImageProvider — checks disk cache and local tiles
|
||||
/// first, falls back to HTTP via shared RetryClient on miss.
|
||||
class DeflockTileProvider extends NetworkTileProvider {
|
||||
/// The shared HTTP client we own. We keep a reference because
|
||||
/// NetworkTileProvider._httpClient is private and _isInternallyCreatedClient
|
||||
/// will be false (we passed it in), so super.dispose() won't close it.
|
||||
final Client _sharedHttpClient;
|
||||
|
||||
/// Frozen config for this provider instance.
|
||||
final String providerId;
|
||||
final models.TileType tileType;
|
||||
final String? apiKey;
|
||||
|
||||
/// Opaque fingerprint of the config this provider was created with.
|
||||
/// Used by [TileLayerManager] to detect config drift after edits.
|
||||
final String configFingerprint;
|
||||
|
||||
/// Caching provider for the offline-first path. The same instance is passed
|
||||
/// to super for the common path — we keep a reference here so we can also
|
||||
/// use it in [DeflockOfflineTileImageProvider].
|
||||
final MapCachingProvider? _cachingProvider;
|
||||
|
||||
/// Called when a tile loads successfully via the network in the offline-first
|
||||
/// path. Used by [TileLayerManager] to reset exponential backoff.
|
||||
VoidCallback? onNetworkSuccess;
|
||||
|
||||
// ignore: use_super_parameters
|
||||
DeflockTileProvider._({
|
||||
required Client httpClient,
|
||||
required this.providerId,
|
||||
required this.tileType,
|
||||
this.apiKey,
|
||||
MapCachingProvider? cachingProvider,
|
||||
this.onNetworkSuccess,
|
||||
this.configFingerprint = '',
|
||||
}) : _sharedHttpClient = httpClient,
|
||||
_cachingProvider = cachingProvider,
|
||||
super(
|
||||
httpClient: httpClient,
|
||||
cachingProvider: cachingProvider,
|
||||
// Let errors propagate so flutter_map marks tiles as failed
|
||||
// (loadError = true) rather than caching transparent images as
|
||||
// "successfully loaded". The TileLayerManager wires a reset stream
|
||||
// that retries failed tiles after a debounced delay.
|
||||
silenceExceptions: false,
|
||||
);
|
||||
|
||||
factory DeflockTileProvider({
|
||||
required String providerId,
|
||||
required models.TileType tileType,
|
||||
String? apiKey,
|
||||
MapCachingProvider? cachingProvider,
|
||||
VoidCallback? onNetworkSuccess,
|
||||
String configFingerprint = '',
|
||||
}) {
|
||||
final client = UserAgentClient(RetryClient(Client()));
|
||||
return DeflockTileProvider._(
|
||||
httpClient: client,
|
||||
providerId: providerId,
|
||||
tileType: tileType,
|
||||
apiKey: apiKey,
|
||||
cachingProvider: cachingProvider,
|
||||
onNetworkSuccess: onNetworkSuccess,
|
||||
configFingerprint: configFingerprint,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
ImageProvider getImage(TileCoordinates coordinates, TileLayer options) {
|
||||
// Get current provider info to include in cache key
|
||||
final appState = AppState.instance;
|
||||
final providerId = appState.selectedTileProvider?.id ?? 'unknown';
|
||||
final tileTypeId = appState.selectedTileType?.id ?? 'unknown';
|
||||
|
||||
return DeflockTileImageProvider(
|
||||
String getTileUrl(TileCoordinates coordinates, TileLayer options) {
|
||||
return tileType.getTileUrl(
|
||||
coordinates.z,
|
||||
coordinates.x,
|
||||
coordinates.y,
|
||||
apiKey: apiKey,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
ImageProvider getImageWithCancelLoadingSupport(
|
||||
TileCoordinates coordinates,
|
||||
TileLayer options,
|
||||
Future<void> cancelLoading,
|
||||
) {
|
||||
if (!_shouldCheckOfflineCache(coordinates.z)) {
|
||||
// Common path: no offline areas — delegate to NetworkTileProvider's
|
||||
// full pipeline (disk cache, ETag, RetryClient, abort support).
|
||||
return super.getImageWithCancelLoadingSupport(
|
||||
coordinates,
|
||||
options,
|
||||
cancelLoading,
|
||||
);
|
||||
}
|
||||
|
||||
// Offline-first path: check local tiles first, fall back to network.
|
||||
return DeflockOfflineTileImageProvider(
|
||||
coordinates: coordinates,
|
||||
options: options,
|
||||
mapDataProvider: _mapDataProvider,
|
||||
httpClient: _sharedHttpClient,
|
||||
headers: headers,
|
||||
cancelLoading: cancelLoading,
|
||||
isOfflineOnly: AppState.instance.offlineMode,
|
||||
providerId: providerId,
|
||||
tileTypeId: tileTypeId,
|
||||
tileTypeId: tileType.id,
|
||||
tileUrl: getTileUrl(coordinates, options),
|
||||
cachingProvider: _cachingProvider,
|
||||
onNetworkSuccess: onNetworkSuccess,
|
||||
);
|
||||
}
|
||||
|
||||
/// Determine if we should check offline cache for this tile request.
|
||||
/// Only returns true if:
|
||||
/// 1. We're in offline mode (forced), OR
|
||||
/// 2. We have offline areas for the current provider/type
|
||||
///
|
||||
/// This avoids the offline-first path (and its filesystem searches) when
|
||||
/// browsing online with providers that have no offline areas.
|
||||
bool _shouldCheckOfflineCache(int zoom) {
|
||||
// Always use offline path in offline mode
|
||||
if (AppState.instance.offlineMode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// For online mode, only use offline path if we have relevant offline data
|
||||
// at this zoom level — tiles outside any area's zoom range go through the
|
||||
// common NetworkTileProvider path for better performance.
|
||||
final offlineService = OfflineAreaService();
|
||||
return offlineService.hasOfflineAreasForProviderAtZoom(
|
||||
providerId,
|
||||
tileType.id,
|
||||
zoom,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> dispose() async {
|
||||
// Only call super — do NOT close _sharedHttpClient here.
|
||||
// flutter_map calls dispose() whenever the TileLayer widget is recycled
|
||||
// (e.g. provider switch causes a new FlutterMap key), but
|
||||
// TileLayerManager caches and reuses provider instances across switches.
|
||||
// Closing the HTTP client here would leave the cached instance broken —
|
||||
// all future tile requests would fail with "Client closed".
|
||||
//
|
||||
// Since we passed our own httpClient to NetworkTileProvider,
|
||||
// _isInternallyCreatedClient is false, so super.dispose() won't close it
|
||||
// either. The client is closed in [shutdown], called by
|
||||
// TileLayerManager.dispose() when the map is truly torn down.
|
||||
await super.dispose();
|
||||
}
|
||||
|
||||
/// Permanently close the HTTP client. Called by [TileLayerManager.dispose]
|
||||
/// when the map widget is being torn down — NOT by flutter_map's widget
|
||||
/// recycling.
|
||||
void shutdown() {
|
||||
_sharedHttpClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
/// Image provider that fetches tiles through our MapDataProvider.
|
||||
///
|
||||
/// This handles the actual tile fetching using our existing offline/online
|
||||
/// routing logic without any HTTP interception complexity.
|
||||
class DeflockTileImageProvider extends ImageProvider<DeflockTileImageProvider> {
|
||||
/// Image provider for the offline-first path.
|
||||
///
|
||||
/// Checks disk cache and offline areas before falling back to the network.
|
||||
/// Caches successful network fetches to disk so panning back doesn't re-fetch.
|
||||
/// On cancellation, lets in-flight downloads complete and caches the result
|
||||
/// (fire-and-forget) instead of discarding downloaded bytes.
|
||||
///
|
||||
/// **Online mode flow:**
|
||||
/// 1. Disk cache (fast hash-based file read) → hit + fresh → return
|
||||
/// 2. Offline areas (file scan) → hit → return
|
||||
/// 3. Network fetch with conditional headers from stale cache entry
|
||||
/// 4. On cancel → fire-and-forget cache write for the in-flight download
|
||||
/// 5. On 304 → return stale cached bytes, update cache metadata
|
||||
/// 6. On 200 → cache to disk, decode and return
|
||||
/// 7. On error → throw (flutter_map marks tile as failed)
|
||||
///
|
||||
/// **Offline mode flow:**
|
||||
/// 1. Offline areas (primary source — guaranteed available)
|
||||
/// 2. Disk cache (tiles cached from previous online sessions)
|
||||
/// 3. Throw if both miss (flutter_map marks tile as failed)
|
||||
class DeflockOfflineTileImageProvider
|
||||
extends ImageProvider<DeflockOfflineTileImageProvider> {
|
||||
final TileCoordinates coordinates;
|
||||
final TileLayer options;
|
||||
final MapDataProvider mapDataProvider;
|
||||
final Client httpClient;
|
||||
final Map<String, String> headers;
|
||||
final Future<void> cancelLoading;
|
||||
final bool isOfflineOnly;
|
||||
final String providerId;
|
||||
final String tileTypeId;
|
||||
|
||||
const DeflockTileImageProvider({
|
||||
final String tileUrl;
|
||||
final MapCachingProvider? cachingProvider;
|
||||
final VoidCallback? onNetworkSuccess;
|
||||
|
||||
const DeflockOfflineTileImageProvider({
|
||||
required this.coordinates,
|
||||
required this.options,
|
||||
required this.mapDataProvider,
|
||||
required this.httpClient,
|
||||
required this.headers,
|
||||
required this.cancelLoading,
|
||||
required this.isOfflineOnly,
|
||||
required this.providerId,
|
||||
required this.tileTypeId,
|
||||
required this.tileUrl,
|
||||
this.cachingProvider,
|
||||
this.onNetworkSuccess,
|
||||
});
|
||||
|
||||
|
||||
@override
|
||||
Future<DeflockTileImageProvider> obtainKey(ImageConfiguration configuration) {
|
||||
return SynchronousFuture<DeflockTileImageProvider>(this);
|
||||
Future<DeflockOfflineTileImageProvider> obtainKey(
|
||||
ImageConfiguration configuration) {
|
||||
return SynchronousFuture<DeflockOfflineTileImageProvider>(this);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
ImageStreamCompleter loadImage(DeflockTileImageProvider key, ImageDecoderCallback decode) {
|
||||
ImageStreamCompleter loadImage(
|
||||
DeflockOfflineTileImageProvider key, ImageDecoderCallback decode) {
|
||||
final chunkEvents = StreamController<ImageChunkEvent>();
|
||||
|
||||
|
||||
return MultiFrameImageStreamCompleter(
|
||||
codec: _loadAsync(key, decode, chunkEvents),
|
||||
// Chain whenComplete into the codec future so there's a single future
|
||||
// for MultiFrameImageStreamCompleter to handle. Without this, the
|
||||
// whenComplete creates an orphaned future whose errors go unhandled.
|
||||
codec: _loadAsync(key, decode, chunkEvents).whenComplete(() {
|
||||
chunkEvents.close();
|
||||
}),
|
||||
chunkEvents: chunkEvents.stream,
|
||||
scale: 1.0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// Try to read a tile from the disk cache. Returns null on miss or error.
|
||||
Future<CachedMapTile?> _getCachedTile() async {
|
||||
if (cachingProvider == null || !cachingProvider!.isSupported) return null;
|
||||
try {
|
||||
return await cachingProvider!.getTile(tileUrl);
|
||||
} on CachedMapTileReadFailure {
|
||||
return null;
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Write a tile to the disk cache (best-effort, never throws).
|
||||
void _putCachedTile({
|
||||
required Map<String, String> responseHeaders,
|
||||
Uint8List? bytes,
|
||||
}) {
|
||||
if (cachingProvider == null || !cachingProvider!.isSupported) return;
|
||||
try {
|
||||
final metadata = CachedMapTileMetadata.fromHttpHeaders(responseHeaders);
|
||||
cachingProvider!
|
||||
.putTile(url: tileUrl, metadata: metadata, bytes: bytes)
|
||||
.catchError((_) {});
|
||||
} catch (_) {
|
||||
// Best-effort: never fail the tile load due to cache write errors.
|
||||
}
|
||||
}
|
||||
|
||||
Future<Codec> _loadAsync(
|
||||
DeflockTileImageProvider key,
|
||||
DeflockOfflineTileImageProvider key,
|
||||
ImageDecoderCallback decode,
|
||||
StreamController<ImageChunkEvent> chunkEvents,
|
||||
) async {
|
||||
Future<Codec> decodeBytes(Uint8List bytes) =>
|
||||
ImmutableBuffer.fromUint8List(bytes).then(decode);
|
||||
|
||||
// Track cancellation synchronously via Completer so the catch block
|
||||
// can reliably check it without microtask ordering races.
|
||||
final cancelled = Completer<void>();
|
||||
cancelLoading.then((_) {
|
||||
if (!cancelled.isCompleted) cancelled.complete();
|
||||
}).ignore();
|
||||
|
||||
try {
|
||||
// Get current tile provider and type from app state
|
||||
final appState = AppState.instance;
|
||||
final selectedProvider = appState.selectedTileProvider;
|
||||
final selectedTileType = appState.selectedTileType;
|
||||
|
||||
if (selectedProvider == null || selectedTileType == null) {
|
||||
throw Exception('No tile provider configured');
|
||||
if (isOfflineOnly) {
|
||||
return await _loadOffline(decodeBytes, cancelled);
|
||||
}
|
||||
|
||||
// Smart cache routing: only check offline cache when needed
|
||||
final MapSource source = _shouldCheckOfflineCache(appState)
|
||||
? MapSource.auto // Check offline first, then network
|
||||
: MapSource.remote; // Skip offline cache, go directly to network
|
||||
|
||||
final tileBytes = await mapDataProvider.getTile(
|
||||
z: coordinates.z,
|
||||
x: coordinates.x,
|
||||
y: coordinates.y,
|
||||
source: source,
|
||||
);
|
||||
|
||||
// Decode the image bytes
|
||||
final buffer = await ImmutableBuffer.fromUint8List(Uint8List.fromList(tileBytes));
|
||||
return await decode(buffer);
|
||||
|
||||
return await _loadOnline(decodeBytes, cancelled);
|
||||
} catch (e) {
|
||||
// Don't log routine offline misses to avoid console spam
|
||||
if (!e.toString().contains('offline mode is enabled')) {
|
||||
debugPrint('[DeflockTileProvider] Failed to load tile ${coordinates.z}/${coordinates.x}/${coordinates.y}: $e');
|
||||
// Cancelled tiles throw — flutter_map handles the error silently.
|
||||
// Preserve TileNotAvailableOfflineException even if the tile was also
|
||||
// cancelled — it has distinct semantics (genuine cache miss) that
|
||||
// matter for diagnostics and future UI indicators.
|
||||
if (cancelled.isCompleted && e is! TileNotAvailableOfflineException) {
|
||||
throw const TileLoadCancelledException();
|
||||
}
|
||||
|
||||
// Re-throw the exception and let FlutterMap handle missing tiles gracefully
|
||||
// This is better than trying to provide fallback images
|
||||
throw e;
|
||||
|
||||
// Let real errors propagate so flutter_map marks loadError = true
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Online mode: disk cache → offline areas → network (with caching).
|
||||
Future<Codec> _loadOnline(
|
||||
Future<Codec> Function(Uint8List) decodeBytes,
|
||||
Completer<void> cancelled,
|
||||
) async {
|
||||
// 1. Check disk cache — fast hash-based file read.
|
||||
final cachedTile = await _getCachedTile();
|
||||
if (cachedTile != null && !cachedTile.metadata.isStale) {
|
||||
return await decodeBytes(cachedTile.bytes);
|
||||
}
|
||||
|
||||
// 2. Check offline areas — file scan per area.
|
||||
try {
|
||||
final localBytes = await fetchLocalTile(
|
||||
z: coordinates.z,
|
||||
x: coordinates.x,
|
||||
y: coordinates.y,
|
||||
providerId: providerId,
|
||||
tileTypeId: tileTypeId,
|
||||
);
|
||||
return await decodeBytes(Uint8List.fromList(localBytes));
|
||||
} catch (_) {
|
||||
// Local miss — fall through to network
|
||||
}
|
||||
|
||||
// 3. If cancelled before network, bail.
|
||||
if (cancelled.isCompleted) throw const TileLoadCancelledException();
|
||||
|
||||
// 4. Network fetch with conditional headers from stale cache entry.
|
||||
final request = Request('GET', Uri.parse(tileUrl));
|
||||
request.headers.addAll(headers);
|
||||
if (cachedTile != null) {
|
||||
if (cachedTile.metadata.lastModified case final lastModified?) {
|
||||
request.headers[HttpHeaders.ifModifiedSinceHeader] =
|
||||
HttpDate.format(lastModified);
|
||||
}
|
||||
if (cachedTile.metadata.etag case final etag?) {
|
||||
request.headers[HttpHeaders.ifNoneMatchHeader] = etag;
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Race the download against cancelLoading.
|
||||
final networkFuture = httpClient.send(request).then((response) async {
|
||||
final bytes = await response.stream.toBytes();
|
||||
return (
|
||||
statusCode: response.statusCode,
|
||||
bytes: bytes,
|
||||
headers: response.headers,
|
||||
);
|
||||
});
|
||||
|
||||
final result = await Future.any([
|
||||
networkFuture,
|
||||
cancelLoading.then((_) => (
|
||||
statusCode: 0,
|
||||
bytes: Uint8List(0),
|
||||
headers: <String, String>{},
|
||||
)),
|
||||
]);
|
||||
|
||||
// 6. On cancel — fire-and-forget cache write for the in-flight download
|
||||
// instead of discarding the downloaded bytes.
|
||||
if (cancelled.isCompleted || result.statusCode == 0) {
|
||||
networkFuture.then((r) {
|
||||
if (r.statusCode == 200 && r.bytes.isNotEmpty) {
|
||||
_putCachedTile(responseHeaders: r.headers, bytes: r.bytes);
|
||||
}
|
||||
}).ignore();
|
||||
throw const TileLoadCancelledException();
|
||||
}
|
||||
|
||||
// 7. On 304 Not Modified → return stale cached bytes, update metadata.
|
||||
if (result.statusCode == HttpStatus.notModified && cachedTile != null) {
|
||||
_putCachedTile(responseHeaders: result.headers);
|
||||
onNetworkSuccess?.call();
|
||||
return await decodeBytes(cachedTile.bytes);
|
||||
}
|
||||
|
||||
// 8. On 200 OK → cache to disk, decode and return.
|
||||
if (result.statusCode == 200 && result.bytes.isNotEmpty) {
|
||||
_putCachedTile(responseHeaders: result.headers, bytes: result.bytes);
|
||||
onNetworkSuccess?.call();
|
||||
return await decodeBytes(result.bytes);
|
||||
}
|
||||
|
||||
// 9. Network error — throw so flutter_map marks the tile as failed.
|
||||
// Don't include tileUrl in the exception — it may contain API keys.
|
||||
throw HttpException(
|
||||
'Tile ${coordinates.z}/${coordinates.x}/${coordinates.y} '
|
||||
'returned status ${result.statusCode}',
|
||||
);
|
||||
}
|
||||
|
||||
/// Offline mode: offline areas → disk cache → throw.
|
||||
Future<Codec> _loadOffline(
|
||||
Future<Codec> Function(Uint8List) decodeBytes,
|
||||
Completer<void> cancelled,
|
||||
) async {
|
||||
// 1. Check offline areas (primary source — guaranteed available).
|
||||
try {
|
||||
final localBytes = await fetchLocalTile(
|
||||
z: coordinates.z,
|
||||
x: coordinates.x,
|
||||
y: coordinates.y,
|
||||
providerId: providerId,
|
||||
tileTypeId: tileTypeId,
|
||||
);
|
||||
if (cancelled.isCompleted) throw const TileLoadCancelledException();
|
||||
return await decodeBytes(Uint8List.fromList(localBytes));
|
||||
} on TileLoadCancelledException {
|
||||
rethrow;
|
||||
} catch (_) {
|
||||
// Local miss — fall through to disk cache
|
||||
}
|
||||
|
||||
// 2. Check disk cache (tiles cached from previous online sessions).
|
||||
if (cancelled.isCompleted) throw const TileLoadCancelledException();
|
||||
final cachedTile = await _getCachedTile();
|
||||
if (cachedTile != null) {
|
||||
return await decodeBytes(cachedTile.bytes);
|
||||
}
|
||||
|
||||
// 3. Both miss — throw so flutter_map marks the tile as failed.
|
||||
throw const TileNotAvailableOfflineException();
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other.runtimeType != runtimeType) return false;
|
||||
return other is DeflockTileImageProvider &&
|
||||
other.coordinates == coordinates &&
|
||||
other.providerId == providerId &&
|
||||
other.tileTypeId == tileTypeId;
|
||||
return other is DeflockOfflineTileImageProvider &&
|
||||
other.coordinates == coordinates &&
|
||||
other.providerId == providerId &&
|
||||
other.tileTypeId == tileTypeId &&
|
||||
other.isOfflineOnly == isOfflineOnly;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(coordinates, providerId, tileTypeId);
|
||||
|
||||
/// Determine if we should check offline cache for this tile request.
|
||||
/// Only check offline cache if:
|
||||
/// 1. We're in offline mode (forced), OR
|
||||
/// 2. We have offline areas for the current provider/type
|
||||
///
|
||||
/// This avoids expensive filesystem searches when browsing online
|
||||
/// with providers that have no offline areas.
|
||||
bool _shouldCheckOfflineCache(AppState appState) {
|
||||
// Always check offline cache in offline mode
|
||||
if (appState.offlineMode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// For online mode, only check if we might actually have relevant offline data
|
||||
final currentProvider = appState.selectedTileProvider;
|
||||
final currentTileType = appState.selectedTileType;
|
||||
|
||||
if (currentProvider == null || currentTileType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Quick check: do we have any offline areas for this provider/type?
|
||||
// This avoids the expensive per-tile filesystem search in fetchLocalTile
|
||||
final offlineService = OfflineAreaService();
|
||||
final hasRelevantAreas = offlineService.hasOfflineAreasForProvider(
|
||||
currentProvider.id,
|
||||
currentTileType.id,
|
||||
);
|
||||
|
||||
return hasRelevantAreas;
|
||||
}
|
||||
}
|
||||
int get hashCode =>
|
||||
Object.hash(coordinates, providerId, tileTypeId, isOfflineOnly);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import '../models/node_profile.dart';
|
||||
|
||||
/// Formats editor direction values exactly as they will be queued for upload.
|
||||
class DirectionSubmissionFormatter {
|
||||
const DirectionSubmissionFormatter._();
|
||||
|
||||
static Object format(List<double> directions, NodeProfile? profile) {
|
||||
if (directions.isEmpty) return 0.0;
|
||||
|
||||
final fov = profile?.fov;
|
||||
if (fov != null && fov > 0) {
|
||||
final ranges = directions
|
||||
.map((center) => _formatDirectionWithFov(center, fov))
|
||||
.toList();
|
||||
return ranges.length == 1 ? ranges.first : ranges.join(';');
|
||||
}
|
||||
|
||||
if (directions.length == 1) return directions.first;
|
||||
return directions
|
||||
.map((direction) => direction.round().toString())
|
||||
.join(';');
|
||||
}
|
||||
|
||||
static String _formatDirectionWithFov(double center, double fov) {
|
||||
if (fov >= 360) return '0-360';
|
||||
|
||||
final halfFov = fov / 2;
|
||||
final start = (center - halfFov + 360) % 360;
|
||||
final end = (center + halfFov) % 360;
|
||||
return '${start.round()}-${end.round()}';
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ class DistanceService {
|
||||
// Conversion constants
|
||||
static const double _metersToFeet = 3.28084;
|
||||
static const double _metersToMiles = 0.000621371;
|
||||
static const double _kmToMiles = 0.621371;
|
||||
|
||||
/// Format distance for display based on unit preference
|
||||
///
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
import '../models/pending_upload.dart';
|
||||
import '../state/session_state.dart';
|
||||
import '../state/settings_state.dart';
|
||||
import 'direction_submission_formatter.dart';
|
||||
|
||||
/// Detects whether an edit would serialize to a different OSM node.
|
||||
class EditNodeChangeDetector {
|
||||
const EditNodeChangeDetector._();
|
||||
|
||||
static bool hasActualChanges(EditNodeSession session) {
|
||||
if (session.extractFromWay) return true;
|
||||
|
||||
const tolerance = 0.0000001;
|
||||
if ((session.target.latitude - session.originalNode.coord.latitude).abs() >
|
||||
tolerance ||
|
||||
(session.target.longitude - session.originalNode.coord.longitude)
|
||||
.abs() >
|
||||
tolerance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final originalTags = session.originalNode.tags;
|
||||
final submittedTags = _getSubmittedTags(session);
|
||||
|
||||
final originalDirection = _directionValue(originalTags);
|
||||
final submittedDirection =
|
||||
originalDirection == null && session.directions.isEmpty
|
||||
? null
|
||||
: _directionValue(submittedTags);
|
||||
if (originalDirection != submittedDirection) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !_tagsEqual(originalTags, submittedTags);
|
||||
}
|
||||
|
||||
static Map<String, String> _getSubmittedTags(EditNodeSession session) {
|
||||
if (session.profile == null) return <String, String>{};
|
||||
|
||||
return PendingUpload(
|
||||
coord: session.target,
|
||||
direction: DirectionSubmissionFormatter.format(
|
||||
session.directions,
|
||||
session.profile,
|
||||
),
|
||||
profile: session.profile,
|
||||
operatorProfile: session.operatorProfile,
|
||||
refinedTags: session.refinedTags,
|
||||
additionalExistingTags: session.additionalExistingTags,
|
||||
changesetComment: session.changesetComment,
|
||||
uploadMode: UploadMode.production,
|
||||
operation: UploadOperation.modify,
|
||||
originalNodeId: session.originalNode.id,
|
||||
).getCombinedTags();
|
||||
}
|
||||
|
||||
static String? _directionValue(Map<String, String> tags) =>
|
||||
tags['direction'] ?? tags['camera:direction'];
|
||||
|
||||
static bool _tagsEqual(
|
||||
Map<String, String> originalTags,
|
||||
Map<String, String> submittedTags,
|
||||
) {
|
||||
final original = Map<String, String>.from(originalTags)
|
||||
..remove('direction')
|
||||
..remove('camera:direction');
|
||||
final submitted = Map<String, String>.from(submittedTags)
|
||||
..remove('direction')
|
||||
..remove('camera:direction');
|
||||
|
||||
if (original.length != submitted.length) return false;
|
||||
for (final entry in original.entries) {
|
||||
if (submitted[entry.key] != entry.value) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
/// Mean meters per degree of latitude. Constant enough at any latitude for
|
||||
/// picking a node lookup box.
|
||||
const double _metersPerDegreeLat = 111320.0;
|
||||
|
||||
/// Smallest cos(latitude) we will divide by. Past ~89.4° the true factor tends
|
||||
/// to zero and the longitude span would blow up to the whole globe.
|
||||
const double _minCosLatitude = 0.01;
|
||||
|
||||
/// A square of roughly [radiusMeters] in every direction around [center].
|
||||
///
|
||||
/// Used to pull cached nodes near a GPS position, as opposed to near whatever
|
||||
/// the map camera is showing — the camera is frozen while the app is
|
||||
/// backgrounded, so it is not a usable proxy for where the user is.
|
||||
///
|
||||
/// A degree of longitude shrinks by cos(latitude), so the box is widened east
|
||||
/// to west to keep the real-world radius honest as you move away from the
|
||||
/// equator.
|
||||
LatLngBounds boundsAround(LatLng center, num radiusMeters) {
|
||||
final radius = radiusMeters.toDouble().abs();
|
||||
final latDelta = radius / _metersPerDegreeLat;
|
||||
final cosLat = math.cos(center.latitude * math.pi / 180).abs();
|
||||
final lngDelta =
|
||||
radius / (_metersPerDegreeLat * math.max(cosLat, _minCosLatitude));
|
||||
|
||||
return LatLngBounds(
|
||||
LatLng(
|
||||
(center.latitude - latDelta).clamp(-90.0, 90.0),
|
||||
(center.longitude - lngDelta).clamp(-180.0, 180.0),
|
||||
),
|
||||
LatLng(
|
||||
(center.latitude + latDelta).clamp(-90.0, 90.0),
|
||||
(center.longitude + lngDelta).clamp(-180.0, 180.0),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../dev_config.dart';
|
||||
import 'version_service.dart';
|
||||
|
||||
/// An [http.BaseClient] that injects a User-Agent header into every request.
|
||||
///
|
||||
/// Reads the app name and version dynamically from [VersionService] so the UA
|
||||
/// string stays in sync with pubspec.yaml without hard-coding values.
|
||||
///
|
||||
/// Uses [putIfAbsent] so a manually-set User-Agent is never overwritten.
|
||||
class UserAgentClient extends http.BaseClient {
|
||||
final http.Client _inner;
|
||||
|
||||
UserAgentClient([http.Client? inner]) : _inner = inner ?? http.Client();
|
||||
|
||||
/// The User-Agent string sent with every request.
|
||||
///
|
||||
/// Format follows OSM tile usage policy recommendations:
|
||||
/// `AppName/version (+homepage; contact: email)`
|
||||
static String get userAgent {
|
||||
final vs = VersionService();
|
||||
return '${vs.appName}/${vs.version} (+$kHomepageUrl; contact: $kContactEmail)';
|
||||
}
|
||||
|
||||
@override
|
||||
Future<http.StreamedResponse> send(http.BaseRequest request) {
|
||||
request.headers.putIfAbsent('User-Agent', () => userAgent);
|
||||
return _inner.send(request);
|
||||
}
|
||||
|
||||
@override
|
||||
void close() => _inner.close();
|
||||
}
|
||||
@@ -25,42 +25,32 @@ class LocalizationService extends ChangeNotifier {
|
||||
|
||||
Future<void> _discoverAvailableLanguages() async {
|
||||
_availableLanguages = [];
|
||||
|
||||
|
||||
try {
|
||||
// Get the asset manifest to find all localization files
|
||||
final manifestContent = await rootBundle.loadString('AssetManifest.json');
|
||||
final Map<String, dynamic> manifestMap = json.decode(manifestContent);
|
||||
|
||||
// Find all .json files in lib/localizations/
|
||||
final localizationFiles = manifestMap.keys
|
||||
.where((String key) => key.startsWith('lib/localizations/') && key.endsWith('.json'))
|
||||
final assetManifest = await AssetManifest.loadFromAssetBundle(rootBundle);
|
||||
final localizationAssets = assetManifest.listAssets()
|
||||
.where((path) => path.startsWith('lib/localizations/') && path.endsWith('.json'))
|
||||
.toList();
|
||||
|
||||
for (final filePath in localizationFiles) {
|
||||
// Extract language code from filename (e.g., 'lib/localizations/pt.json' -> 'pt')
|
||||
final fileName = filePath.split('/').last;
|
||||
final languageCode = fileName.substring(0, fileName.length - 5); // Remove '.json'
|
||||
|
||||
|
||||
for (final assetPath in localizationAssets) {
|
||||
try {
|
||||
// Try to load and parse the file to ensure it's valid
|
||||
final jsonString = await rootBundle.loadString(filePath);
|
||||
final jsonString = await rootBundle.loadString(assetPath);
|
||||
final parsedJson = json.decode(jsonString);
|
||||
|
||||
// Basic validation - ensure it has the expected structure
|
||||
|
||||
if (parsedJson is Map && parsedJson.containsKey('language')) {
|
||||
final languageCode = assetPath.split('/').last.replaceAll('.json', '');
|
||||
_availableLanguages.add(languageCode);
|
||||
debugPrint('Found localization: $languageCode');
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('Failed to load localization file $filePath: $e');
|
||||
debugPrint('Failed to load localization file $assetPath: $e');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('Failed to read AssetManifest.json: $e');
|
||||
// If manifest reading fails, we'll have an empty list
|
||||
// The system will handle this gracefully by falling back to 'en' in _loadSavedLanguage
|
||||
debugPrint('Failed to load asset manifest: $e');
|
||||
_availableLanguages = ['en'];
|
||||
}
|
||||
|
||||
|
||||
debugPrint('Available languages: $_availableLanguages');
|
||||
}
|
||||
|
||||
@@ -119,28 +109,31 @@ class LocalizationService extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
String t(String key, {List<String>? params}) {
|
||||
String t(String key, {List<String>? params}) =>
|
||||
lookup(_strings, key, params: params);
|
||||
|
||||
/// Pure lookup function used by [t] and available for testing.
|
||||
static String lookup(Map<String, dynamic> strings, String key,
|
||||
{List<String>? params}) {
|
||||
List<String> keys = key.split('.');
|
||||
dynamic current = _strings;
|
||||
|
||||
dynamic current = strings;
|
||||
|
||||
for (String k in keys) {
|
||||
if (current is Map && current.containsKey(k)) {
|
||||
current = current[k];
|
||||
} else {
|
||||
// Return the key as fallback for missing translations
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String result = current is String ? current : key;
|
||||
|
||||
// Replace parameters if provided - replace first occurrence only for each parameter
|
||||
|
||||
if (params != null) {
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
result = result.replaceFirst('{}', params[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../models/node_profile.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import '../app_state.dart';
|
||||
import 'map_data_submodules/tiles_from_remote.dart';
|
||||
import 'http_client.dart';
|
||||
import 'map_data_submodules/tiles_from_local.dart';
|
||||
import 'node_data_manager.dart';
|
||||
import 'node_spatial_cache.dart';
|
||||
@@ -25,6 +24,7 @@ class MapDataProvider {
|
||||
MapDataProvider._();
|
||||
|
||||
final NodeDataManager _nodeDataManager = NodeDataManager();
|
||||
final UserAgentClient _httpClient = UserAgentClient();
|
||||
|
||||
bool get isOfflineMode => AppState.instance.offlineMode;
|
||||
void setOfflineMode(bool enabled) {
|
||||
@@ -54,8 +54,8 @@ class MapDataProvider {
|
||||
required List<NodeProfile> profiles,
|
||||
UploadMode uploadMode = UploadMode.production,
|
||||
int maxResults = 0, // 0 = no limit for offline downloads
|
||||
int maxTries = 3,
|
||||
}) async {
|
||||
|
||||
if (AppState.instance.offlineMode) {
|
||||
throw OfflineModeException("Cannot fetch remote nodes for offline area download in offline mode.");
|
||||
}
|
||||
@@ -98,29 +98,24 @@ class MapDataProvider {
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch remote tile using current provider from AppState
|
||||
/// Fetch remote tile using current provider from AppState.
|
||||
/// Only used by offline area downloader — the main tile pipeline now goes
|
||||
/// through NetworkTileProvider (see DeflockTileProvider).
|
||||
Future<List<int>> _fetchRemoteTileFromCurrentProvider(int z, int x, int y) async {
|
||||
final appState = AppState.instance;
|
||||
final selectedTileType = appState.selectedTileType;
|
||||
final selectedProvider = appState.selectedTileProvider;
|
||||
|
||||
// We guarantee that a provider and tile type are always selected
|
||||
|
||||
if (selectedTileType == null || selectedProvider == null) {
|
||||
throw Exception('No tile provider selected - this should never happen');
|
||||
}
|
||||
|
||||
final tileUrl = selectedTileType.getTileUrl(z, x, y, apiKey: selectedProvider.apiKey);
|
||||
return fetchRemoteTile(z: z, x: x, y: y, url: tileUrl);
|
||||
}
|
||||
|
||||
/// Clear any queued tile requests (call when map view changes significantly)
|
||||
void clearTileQueue() {
|
||||
clearRemoteTileQueue();
|
||||
}
|
||||
|
||||
/// Clear only tile requests that are no longer visible in the current bounds
|
||||
void clearTileQueueSelective(LatLngBounds currentBounds) {
|
||||
clearRemoteTileQueueSelective(currentBounds);
|
||||
final tileUrl = selectedTileType.getTileUrl(z, x, y, apiKey: selectedProvider.apiKey);
|
||||
final resp = await _httpClient.get(Uri.parse(tileUrl));
|
||||
if (resp.statusCode == 200 && resp.bodyBytes.isNotEmpty) {
|
||||
return resp.bodyBytes;
|
||||
}
|
||||
throw Exception('Failed to fetch tile $z/$x/$y: status ${resp.statusCode}');
|
||||
}
|
||||
|
||||
/// Add or update nodes in cache (for upload queue integration)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:xml/xml.dart';
|
||||
@@ -8,7 +7,8 @@ import 'package:xml/xml.dart';
|
||||
import '../../models/node_profile.dart';
|
||||
import '../../models/osm_node.dart';
|
||||
import '../../app_state.dart';
|
||||
import '../network_status.dart';
|
||||
import '../http_client.dart';
|
||||
import '../service_policy.dart';
|
||||
|
||||
/// Fetches surveillance nodes from the direct OSM API using bbox query.
|
||||
/// This is a fallback for when Overpass is not available (e.g., sandbox mode).
|
||||
@@ -35,6 +35,8 @@ Future<List<OsmNode>> fetchOsmApiNodes({
|
||||
}
|
||||
}
|
||||
|
||||
final _client = UserAgentClient();
|
||||
|
||||
/// Internal method that performs the actual OSM API fetch.
|
||||
Future<List<OsmNode>> _fetchFromOsmApi({
|
||||
required LatLngBounds bounds,
|
||||
@@ -58,30 +60,38 @@ Future<List<OsmNode>> _fetchFromOsmApi({
|
||||
try {
|
||||
debugPrint('[fetchOsmApiNodes] Querying OSM API for nodes in bbox...');
|
||||
debugPrint('[fetchOsmApiNodes] URL: $url');
|
||||
|
||||
final response = await http.get(Uri.parse(url));
|
||||
|
||||
|
||||
// Enforce max 2 concurrent download threads per OSM API usage policy
|
||||
await ServiceRateLimiter.acquire(ServiceType.osmEditingApi);
|
||||
|
||||
final http.Response response;
|
||||
try {
|
||||
response = await _client.get(Uri.parse(url));
|
||||
} finally {
|
||||
ServiceRateLimiter.release(ServiceType.osmEditingApi);
|
||||
}
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
debugPrint('[fetchOsmApiNodes] OSM API error: ${response.statusCode} - ${response.body}');
|
||||
throw Exception('OSM API error: ${response.statusCode} - ${response.body}');
|
||||
}
|
||||
|
||||
|
||||
// Parse XML response
|
||||
final document = XmlDocument.parse(response.body);
|
||||
final nodes = _parseOsmApiResponseWithConstraints(document, profiles, maxResults);
|
||||
|
||||
|
||||
if (nodes.isNotEmpty) {
|
||||
debugPrint('[fetchOsmApiNodes] Retrieved ${nodes.length} matching surveillance nodes');
|
||||
}
|
||||
|
||||
|
||||
// Don't report success here - let the top level handle it
|
||||
return nodes;
|
||||
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('[fetchOsmApiNodes] Exception: $e');
|
||||
|
||||
|
||||
// Don't report status here - let the top level handle it
|
||||
throw e; // Re-throw to let caller handle
|
||||
rethrow; // Re-throw to let caller handle
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
import 'dart:io';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import 'package:flutter/foundation.dart' show visibleForTesting;
|
||||
|
||||
import '../offline_area_service.dart';
|
||||
import '../offline_areas/offline_area_models.dart';
|
||||
import '../offline_areas/offline_tile_utils.dart';
|
||||
import '../../app_state.dart';
|
||||
|
||||
/// Fetch a tile from the newest offline area that matches the current provider, or throw if not found.
|
||||
Future<List<int>> fetchLocalTile({required int z, required int x, required int y}) async {
|
||||
/// Fetch a tile from the newest offline area that matches the given provider, or throw if not found.
|
||||
///
|
||||
/// When [providerId] and [tileTypeId] are supplied the lookup is pinned to
|
||||
/// those values (avoids a race when the user switches provider mid-flight).
|
||||
/// Otherwise falls back to the current AppState selection.
|
||||
Future<List<int>> fetchLocalTile({
|
||||
required int z,
|
||||
required int x,
|
||||
required int y,
|
||||
String? providerId,
|
||||
String? tileTypeId,
|
||||
}) async {
|
||||
final appState = AppState.instance;
|
||||
final currentProvider = appState.selectedTileProvider;
|
||||
final currentTileType = appState.selectedTileType;
|
||||
|
||||
final currentProviderId = providerId ?? appState.selectedTileProvider?.id;
|
||||
final currentTileTypeId = tileTypeId ?? appState.selectedTileType?.id;
|
||||
|
||||
final offlineService = OfflineAreaService();
|
||||
await offlineService.ensureInitialized();
|
||||
final areas = offlineService.offlineAreas;
|
||||
@@ -19,29 +32,58 @@ Future<List<int>> fetchLocalTile({required int z, required int x, required int y
|
||||
for (final area in areas) {
|
||||
if (area.status != OfflineAreaStatus.complete) continue;
|
||||
if (z < area.minZoom || z > area.maxZoom) continue;
|
||||
|
||||
// Only consider areas that match the current provider/type
|
||||
if (area.tileProviderId != currentProvider?.id || area.tileTypeId != currentTileType?.id) continue;
|
||||
|
||||
// Get tile coverage for area at this zoom only
|
||||
final coveredTiles = computeTileList(area.bounds, z, z);
|
||||
final hasTile = coveredTiles.any((tile) => tile[0] == z && tile[1] == x && tile[2] == y);
|
||||
if (hasTile) {
|
||||
final tilePath = _tilePath(area.directory, z, x, y);
|
||||
final file = File(tilePath);
|
||||
if (await file.exists()) {
|
||||
final stat = await file.stat();
|
||||
candidates.add(_AreaTileMatch(area: area, file: file, modified: stat.modified));
|
||||
}
|
||||
// Only consider areas that match the current provider/type
|
||||
if (area.tileProviderId != currentProviderId || area.tileTypeId != currentTileTypeId) continue;
|
||||
|
||||
// O(1) bounds check instead of enumerating all tiles at this zoom level
|
||||
if (!tileInBounds(area.bounds, z, x, y)) continue;
|
||||
|
||||
final tilePath = _tilePath(area.directory, z, x, y);
|
||||
final file = File(tilePath);
|
||||
try {
|
||||
final stat = await file.stat();
|
||||
if (stat.type == FileSystemEntityType.notFound) continue;
|
||||
candidates.add(_AreaTileMatch(area: area, file: file, modified: stat.modified));
|
||||
} on FileSystemException {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (candidates.isEmpty) {
|
||||
throw Exception('Tile $z/$x/$y from current provider ${currentProvider?.id}/${currentTileType?.id} not found in any offline area');
|
||||
throw Exception('Tile $z/$x/$y from provider $currentProviderId/$currentTileTypeId not found in any offline area');
|
||||
}
|
||||
candidates.sort((a, b) => b.modified.compareTo(a.modified)); // newest first
|
||||
return await candidates.first.file.readAsBytes();
|
||||
}
|
||||
|
||||
/// O(1) check whether tile (z, x, y) falls within the given lat/lng bounds.
|
||||
///
|
||||
/// Uses the same Mercator projection math as [latLonToTile] in
|
||||
/// offline_tile_utils.dart, but only computes the bounding tile range
|
||||
/// instead of enumerating every tile at that zoom level.
|
||||
///
|
||||
/// Note: Y axis is inverted in tile coordinates — north = lower Y.
|
||||
@visibleForTesting
|
||||
bool tileInBounds(LatLngBounds bounds, int z, int x, int y) {
|
||||
final n = pow(2.0, z);
|
||||
final west = bounds.west;
|
||||
final east = bounds.east;
|
||||
final north = bounds.north;
|
||||
final south = bounds.south;
|
||||
|
||||
final minX = ((west + 180.0) / 360.0 * n).floor();
|
||||
final maxX = ((east + 180.0) / 360.0 * n).floor();
|
||||
// North → lower Y (Mercator projection inverts latitude)
|
||||
final minY = ((1.0 - log(tan(north * pi / 180.0) +
|
||||
1.0 / cos(north * pi / 180.0)) /
|
||||
pi) / 2.0 * n).floor();
|
||||
final maxY = ((1.0 - log(tan(south * pi / 180.0) +
|
||||
1.0 / cos(south * pi / 180.0)) /
|
||||
pi) / 2.0 * n).floor();
|
||||
|
||||
return x >= minX && x <= maxX && y >= minY && y <= maxY;
|
||||
}
|
||||
|
||||
String _tilePath(String areaDir, int z, int x, int y) =>
|
||||
'$areaDir/tiles/$z/$x/$y.png';
|
||||
|
||||
|
||||
@@ -1,263 +0,0 @@
|
||||
import 'dart:math';
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:deflockapp/dev_config.dart';
|
||||
|
||||
/// Global semaphore to limit simultaneous tile fetches
|
||||
final _tileFetchSemaphore = _SimpleSemaphore(kTileFetchConcurrentThreads);
|
||||
|
||||
/// Clear queued tile requests when map view changes significantly
|
||||
void clearRemoteTileQueue() {
|
||||
final clearedCount = _tileFetchSemaphore.clearQueue();
|
||||
// Only log if we actually cleared something significant
|
||||
if (clearedCount > 5) {
|
||||
debugPrint('[RemoteTiles] Cleared $clearedCount queued tile requests');
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear only tile requests that are no longer visible in the given bounds
|
||||
void clearRemoteTileQueueSelective(LatLngBounds currentBounds) {
|
||||
final clearedCount = _tileFetchSemaphore.clearStaleRequests((z, x, y) {
|
||||
// Return true if tile should be cleared (i.e., is NOT visible)
|
||||
return !_isTileVisible(z, x, y, currentBounds);
|
||||
});
|
||||
|
||||
if (clearedCount > 0) {
|
||||
debugPrint('[RemoteTiles] Selectively cleared $clearedCount non-visible tile requests');
|
||||
}
|
||||
}
|
||||
|
||||
/// Calculate retry delay using configurable backoff strategy.
|
||||
/// Uses: initialDelay * (multiplier ^ (attempt - 1)) + randomJitter, capped at maxDelay
|
||||
int _calculateRetryDelay(int attempt, Random random) {
|
||||
// Calculate exponential backoff
|
||||
final baseDelay = (kTileFetchInitialDelayMs *
|
||||
pow(kTileFetchBackoffMultiplier, attempt - 1)).round();
|
||||
|
||||
// Add random jitter to avoid thundering herd
|
||||
final jitter = random.nextInt(kTileFetchRandomJitterMs + 1);
|
||||
|
||||
// Apply max delay cap
|
||||
return (baseDelay + jitter).clamp(0, kTileFetchMaxDelayMs);
|
||||
}
|
||||
|
||||
/// Convert tile coordinates to lat/lng bounds for spatial filtering
|
||||
class _TileBounds {
|
||||
final double north, south, east, west;
|
||||
_TileBounds({required this.north, required this.south, required this.east, required this.west});
|
||||
}
|
||||
|
||||
/// Calculate the lat/lng bounds for a given tile
|
||||
_TileBounds _tileToBounds(int z, int x, int y) {
|
||||
final n = pow(2, z);
|
||||
final lon1 = (x / n) * 360.0 - 180.0;
|
||||
final lon2 = ((x + 1) / n) * 360.0 - 180.0;
|
||||
final lat1 = _yToLatitude(y, z);
|
||||
final lat2 = _yToLatitude(y + 1, z);
|
||||
|
||||
return _TileBounds(
|
||||
north: max(lat1, lat2),
|
||||
south: min(lat1, lat2),
|
||||
east: max(lon1, lon2),
|
||||
west: min(lon1, lon2),
|
||||
);
|
||||
}
|
||||
|
||||
/// Convert tile Y coordinate to latitude
|
||||
double _yToLatitude(int y, int z) {
|
||||
final n = pow(2, z);
|
||||
final latRad = atan(_sinh(pi * (1 - 2 * y / n)));
|
||||
return latRad * 180.0 / pi;
|
||||
}
|
||||
|
||||
/// Hyperbolic sine function: sinh(x) = (e^x - e^(-x)) / 2
|
||||
double _sinh(double x) {
|
||||
return (exp(x) - exp(-x)) / 2;
|
||||
}
|
||||
|
||||
/// Check if a tile intersects with the current view bounds
|
||||
bool _isTileVisible(int z, int x, int y, LatLngBounds viewBounds) {
|
||||
final tileBounds = _tileToBounds(z, x, y);
|
||||
|
||||
// Check if tile bounds intersect with view bounds
|
||||
return !(tileBounds.east < viewBounds.west ||
|
||||
tileBounds.west > viewBounds.east ||
|
||||
tileBounds.north < viewBounds.south ||
|
||||
tileBounds.south > viewBounds.north);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Fetches a tile from any remote provider with unlimited retries.
|
||||
/// Returns tile image bytes. Retries forever until success.
|
||||
/// Brutalist approach: Keep trying until it works - no arbitrary retry limits.
|
||||
Future<List<int>> fetchRemoteTile({
|
||||
required int z,
|
||||
required int x,
|
||||
required int y,
|
||||
required String url,
|
||||
}) async {
|
||||
int attempt = 0;
|
||||
final random = Random();
|
||||
final hostInfo = Uri.parse(url).host; // For logging
|
||||
|
||||
while (true) {
|
||||
await _tileFetchSemaphore.acquire(z: z, x: x, y: y);
|
||||
try {
|
||||
// Only log on first attempt
|
||||
if (attempt == 0) {
|
||||
debugPrint('[fetchRemoteTile] Fetching $z/$x/$y from $hostInfo');
|
||||
}
|
||||
attempt++;
|
||||
final resp = await http.get(Uri.parse(url));
|
||||
|
||||
if (resp.statusCode == 200 && resp.bodyBytes.isNotEmpty) {
|
||||
// Success!
|
||||
if (attempt > 1) {
|
||||
debugPrint('[fetchRemoteTile] SUCCESS $z/$x/$y from $hostInfo after $attempt attempts');
|
||||
}
|
||||
return resp.bodyBytes;
|
||||
} else {
|
||||
debugPrint('[fetchRemoteTile] FAIL $z/$x/$y from $hostInfo: code=${resp.statusCode}, bytes=${resp.bodyBytes.length}');
|
||||
throw HttpException('Failed to fetch tile $z/$x/$y from $hostInfo: status ${resp.statusCode}');
|
||||
}
|
||||
} catch (e) {
|
||||
// Calculate delay and retry (no attempt limit - keep trying forever)
|
||||
final delay = _calculateRetryDelay(attempt, random);
|
||||
if (attempt == 1) {
|
||||
debugPrint("[fetchRemoteTile] Attempt $attempt for $z/$x/$y from $hostInfo failed: $e. Retrying in ${delay}ms.");
|
||||
} else if (attempt % 10 == 0) {
|
||||
// Log every 10th attempt to show we're still working
|
||||
debugPrint("[fetchRemoteTile] Still trying $z/$x/$y from $hostInfo (attempt $attempt). Retrying in ${delay}ms.");
|
||||
}
|
||||
await Future.delayed(Duration(milliseconds: delay));
|
||||
} finally {
|
||||
_tileFetchSemaphore.release(z: z, x: x, y: y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Legacy function for backward compatibility
|
||||
@Deprecated('Use fetchRemoteTile instead')
|
||||
Future<List<int>> fetchOSMTile({
|
||||
required int z,
|
||||
required int x,
|
||||
required int y,
|
||||
}) async {
|
||||
return fetchRemoteTile(
|
||||
z: z,
|
||||
x: x,
|
||||
y: y,
|
||||
url: 'https://tile.openstreetmap.org/$z/$x/$y.png',
|
||||
);
|
||||
}
|
||||
|
||||
/// Enhanced tile request entry that tracks coordinates for spatial filtering
|
||||
class _TileRequest {
|
||||
final int z, x, y;
|
||||
final VoidCallback callback;
|
||||
|
||||
_TileRequest({required this.z, required this.x, required this.y, required this.callback});
|
||||
}
|
||||
|
||||
/// Spatially-aware counting semaphore for tile requests with deduplication
|
||||
class _SimpleSemaphore {
|
||||
final int _max;
|
||||
int _current = 0;
|
||||
final List<_TileRequest> _queue = [];
|
||||
final Set<String> _inFlightTiles = {}; // Track in-flight requests for deduplication
|
||||
_SimpleSemaphore(this._max);
|
||||
|
||||
Future<void> acquire({int? z, int? x, int? y}) async {
|
||||
// Create tile key for deduplication
|
||||
final tileKey = '${z ?? -1}/${x ?? -1}/${y ?? -1}';
|
||||
|
||||
// If this tile is already in flight, skip the request
|
||||
if (_inFlightTiles.contains(tileKey)) {
|
||||
debugPrint('[SimpleSemaphore] Skipping duplicate request for $tileKey');
|
||||
return;
|
||||
}
|
||||
|
||||
// Add to in-flight tracking
|
||||
_inFlightTiles.add(tileKey);
|
||||
|
||||
if (_current < _max) {
|
||||
_current++;
|
||||
return;
|
||||
} else {
|
||||
// Check queue size limit to prevent memory bloat
|
||||
if (_queue.length >= kTileFetchMaxQueueSize) {
|
||||
// Remove oldest request to make room
|
||||
final oldRequest = _queue.removeAt(0);
|
||||
final oldKey = '${oldRequest.z}/${oldRequest.x}/${oldRequest.y}';
|
||||
_inFlightTiles.remove(oldKey);
|
||||
debugPrint('[SimpleSemaphore] Queue full, dropped oldest request: $oldKey');
|
||||
}
|
||||
|
||||
final c = Completer<void>();
|
||||
final request = _TileRequest(
|
||||
z: z ?? -1,
|
||||
x: x ?? -1,
|
||||
y: y ?? -1,
|
||||
callback: () => c.complete(),
|
||||
);
|
||||
_queue.add(request);
|
||||
await c.future;
|
||||
}
|
||||
}
|
||||
|
||||
void release({int? z, int? x, int? y}) {
|
||||
// Remove from in-flight tracking
|
||||
final tileKey = '${z ?? -1}/${x ?? -1}/${y ?? -1}';
|
||||
_inFlightTiles.remove(tileKey);
|
||||
|
||||
if (_queue.isNotEmpty) {
|
||||
final request = _queue.removeAt(0);
|
||||
request.callback();
|
||||
} else {
|
||||
_current--;
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear all queued requests (call when view changes significantly)
|
||||
int clearQueue() {
|
||||
final clearedCount = _queue.length;
|
||||
_queue.clear();
|
||||
_inFlightTiles.clear(); // Also clear deduplication tracking
|
||||
return clearedCount;
|
||||
}
|
||||
|
||||
/// Clear only tiles that don't pass the visibility filter
|
||||
int clearStaleRequests(bool Function(int z, int x, int y) isStale) {
|
||||
final initialCount = _queue.length;
|
||||
final initialInFlightCount = _inFlightTiles.length;
|
||||
|
||||
// Remove stale requests from queue
|
||||
_queue.removeWhere((request) => isStale(request.z, request.x, request.y));
|
||||
|
||||
// Remove stale tiles from in-flight tracking
|
||||
_inFlightTiles.removeWhere((tileKey) {
|
||||
final parts = tileKey.split('/');
|
||||
if (parts.length == 3) {
|
||||
final z = int.tryParse(parts[0]) ?? -1;
|
||||
final x = int.tryParse(parts[1]) ?? -1;
|
||||
final y = int.tryParse(parts[2]) ?? -1;
|
||||
return isStale(z, x, y);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
final queueClearedCount = initialCount - _queue.length;
|
||||
final inFlightClearedCount = initialInFlightCount - _inFlightTiles.length;
|
||||
|
||||
if (queueClearedCount > 0 || inFlightClearedCount > 0) {
|
||||
debugPrint('[SimpleSemaphore] Cleared $queueClearedCount stale queue + $inFlightClearedCount stale in-flight, kept ${_queue.length}');
|
||||
}
|
||||
|
||||
return queueClearedCount + inFlightClearedCount;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import 'dart:async';
|
||||
/// Only tracks the latest user-initiated request - background requests are ignored.
|
||||
enum NetworkRequestStatus {
|
||||
idle, // No active requests
|
||||
loading, // Request in progress
|
||||
loading, // Request in progress
|
||||
splitting, // Request being split due to limits/timeouts
|
||||
success, // Data loaded successfully
|
||||
timeout, // Request timed out
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
@@ -85,7 +86,7 @@ class NodeCache {
|
||||
/// Remove a node by ID from the cache (used for successful deletions)
|
||||
void removeNodeById(int nodeId) {
|
||||
if (_nodes.remove(nodeId) != null) {
|
||||
print('[NodeCache] Removed node $nodeId from cache (successful deletion)');
|
||||
debugPrint('[NodeCache] Removed node $nodeId from cache (successful deletion)');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,19 +112,19 @@ class NodeCache {
|
||||
}
|
||||
|
||||
if (nodesToRemove.isNotEmpty) {
|
||||
print('[NodeCache] Removed ${nodesToRemove.length} temp nodes at coordinate ${coord.latitude}, ${coord.longitude}');
|
||||
debugPrint('[NodeCache] Removed ${nodesToRemove.length} temp nodes at coordinate ${coord.latitude}, ${coord.longitude}');
|
||||
}
|
||||
}
|
||||
|
||||
/// Remove a specific temporary node by its ID (for queue item-specific cleanup)
|
||||
void removeTempNodeById(int tempNodeId) {
|
||||
if (tempNodeId >= 0) {
|
||||
print('[NodeCache] Warning: Attempted to remove non-temp node ID $tempNodeId');
|
||||
debugPrint('[NodeCache] Warning: Attempted to remove non-temp node ID $tempNodeId');
|
||||
return;
|
||||
}
|
||||
|
||||
if (_nodes.remove(tempNodeId) != null) {
|
||||
print('[NodeCache] Removed specific temp node $tempNodeId from cache');
|
||||
debugPrint('[NodeCache] Removed specific temp node $tempNodeId from cache');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
@@ -217,7 +215,18 @@ class NodeDataManager extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch nodes with automatic area splitting if needed
|
||||
/// Fetch nodes, splitting the query area into quadrants only when Overpass
|
||||
/// reports the query would exceed its hard 50k node limit ([NodeLimitError]).
|
||||
///
|
||||
/// Splitting is deliberately NOT used for other failure modes:
|
||||
/// - [RateLimitError] (HTTP 429): the server explicitly asked us to slow
|
||||
/// down, so firing off up to 4x more requests would be counterproductive.
|
||||
/// We back off instead, while still surfacing the "slow" status
|
||||
/// indicator to the user (same UI feedback as the splitting case).
|
||||
/// - Timeouts / other transient failures now surface as [NetworkError]
|
||||
/// (see [OverpassService]) and are not caught here at all — they're
|
||||
/// handled by the normal retry/backoff/fallback logic and reported as a
|
||||
/// plain timeout/error status by the caller.
|
||||
Future<List<OsmNode>> fetchWithSplitting(
|
||||
LatLngBounds bounds,
|
||||
List<NodeProfile> profiles, {
|
||||
@@ -240,7 +249,7 @@ class NodeDataManager extends ChangeNotifier {
|
||||
return nodes;
|
||||
|
||||
} on NodeLimitError {
|
||||
// Hit node limit or timeout - split area if not too deep
|
||||
// Hit the deterministic 50k node limit - split area if not too deep
|
||||
if (splitDepth >= maxSplitDepth) {
|
||||
debugPrint('[NodeDataManager] Max split depth reached, giving up');
|
||||
return [];
|
||||
@@ -256,13 +265,20 @@ class NodeDataManager extends ChangeNotifier {
|
||||
return _fetchSplitAreas(bounds, profiles, splitDepth + 1, isUserInitiated: isUserInitiated);
|
||||
|
||||
} on RateLimitError {
|
||||
// Rate limited - wait and return empty
|
||||
debugPrint('[NodeDataManager] Rate limited, backing off');
|
||||
// Rate limited - back off without splitting the area. Splitting here
|
||||
// would multiply request volume against a server that just told us to
|
||||
// slow down. We still show the same "slow" status indicator so the
|
||||
// user gets feedback, but there is no recursive quadrant fetching.
|
||||
debugPrint('[NodeDataManager] Rate limited, backing off (no area splitting)');
|
||||
if (isUserInitiated) {
|
||||
NetworkStatus.instance.setSplitting();
|
||||
}
|
||||
await Future.delayed(const Duration(seconds: 30));
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Fetch data by splitting area into quadrants
|
||||
Future<List<OsmNode>> _fetchSplitAreas(
|
||||
LatLngBounds bounds,
|
||||
@@ -374,8 +390,13 @@ class NodeDataManager extends ChangeNotifier {
|
||||
|
||||
/// Load all offline nodes into cache (call at app startup)
|
||||
Future<void> preloadOfflineNodes() async {
|
||||
// Skip entirely when the user has disabled offline features — this call
|
||||
// isn't gated by OfflineAreaService.hasOfflineAreasForProvider*() since
|
||||
// it fetches directly via fetchLocalNodes, so we guard it explicitly.
|
||||
if (!AppState.instance.offlineFeaturesEnabled) return;
|
||||
try {
|
||||
final offlineAreaService = OfflineAreaService();
|
||||
|
||||
|
||||
for (final area in offlineAreaService.offlineAreas) {
|
||||
if (area.status != OfflineAreaStatus.complete) continue;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../app_state.dart';
|
||||
import '../dev_config.dart';
|
||||
import 'http_client.dart';
|
||||
|
||||
/// Service for fetching tag value suggestions from OpenStreetMap Name Suggestion Index
|
||||
class NSIService {
|
||||
@@ -11,7 +11,7 @@ class NSIService {
|
||||
factory NSIService() => _instance;
|
||||
NSIService._();
|
||||
|
||||
static const String _userAgent = 'DeFlock/2.1.0 (OSM surveillance mapping app)';
|
||||
final _client = UserAgentClient();
|
||||
static const Duration _timeout = Duration(seconds: 10);
|
||||
|
||||
// Cache to avoid repeated API calls
|
||||
@@ -55,10 +55,7 @@ class NSIService {
|
||||
'rp': '15', // Get top 15 most commonly used values
|
||||
});
|
||||
|
||||
final response = await http.get(
|
||||
uri,
|
||||
headers: {'User-Agent': _userAgent},
|
||||
).timeout(_timeout);
|
||||
final response = await _client.get(uri).timeout(_timeout);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
throw Exception('TagInfo API returned status ${response.statusCode}');
|
||||
@@ -84,8 +81,7 @@ class NSIService {
|
||||
}
|
||||
}
|
||||
|
||||
// Limit to top 10 suggestions for UI performance
|
||||
if (suggestions.length >= 10) break;
|
||||
if (suggestions.length >= kNSIMaxSuggestions) break;
|
||||
}
|
||||
|
||||
return suggestions;
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'offline_areas/offline_area_models.dart';
|
||||
import 'offline_areas/offline_tile_utils.dart';
|
||||
import 'offline_areas/offline_area_downloader.dart';
|
||||
|
||||
import '../models/osm_node.dart';
|
||||
import '../app_state.dart';
|
||||
import 'map_data_provider.dart';
|
||||
import 'package:deflockapp/dev_config.dart';
|
||||
|
||||
/// Service for managing download, storage, and retrieval of offline map areas and cameras.
|
||||
class OfflineAreaService {
|
||||
@@ -32,18 +29,52 @@ class OfflineAreaService {
|
||||
/// Fast check: do we have any completed offline areas for a specific provider/type?
|
||||
/// This allows smart cache routing without expensive filesystem searches.
|
||||
/// Safe to call before initialization - returns false if not yet initialized.
|
||||
///
|
||||
/// Returns false immediately if the user has disabled offline features via
|
||||
/// the master "Enable Offline Features" toggle, regardless of whether area
|
||||
/// data still exists on disk — this fully gates the offline-first tile
|
||||
/// pipeline without needing to touch fetchLocalTile/fetchLocalNodes.
|
||||
bool hasOfflineAreasForProvider(String providerId, String tileTypeId) {
|
||||
if (!AppState.instance.offlineFeaturesEnabled) return false;
|
||||
if (!_initialized) {
|
||||
return false; // No offline areas loaded yet
|
||||
}
|
||||
|
||||
return _areas.any((area) =>
|
||||
|
||||
return _areas.any((area) =>
|
||||
area.status == OfflineAreaStatus.complete &&
|
||||
area.tileProviderId == providerId &&
|
||||
area.tileTypeId == tileTypeId
|
||||
);
|
||||
}
|
||||
|
||||
/// Like [hasOfflineAreasForProvider] but also checks that at least one area
|
||||
/// covers the given [zoom] level. Used by [DeflockTileProvider] to skip the
|
||||
/// offline-first path for tiles that will never be found locally.
|
||||
///
|
||||
/// Also returns false immediately when offline features are disabled (see
|
||||
/// [hasOfflineAreasForProvider] for rationale).
|
||||
bool hasOfflineAreasForProviderAtZoom(String providerId, String tileTypeId, int zoom) {
|
||||
if (!AppState.instance.offlineFeaturesEnabled) return false;
|
||||
if (!_initialized) return false;
|
||||
return _areas.any((area) =>
|
||||
area.status == OfflineAreaStatus.complete &&
|
||||
area.tileProviderId == providerId &&
|
||||
area.tileTypeId == tileTypeId &&
|
||||
zoom >= area.minZoom &&
|
||||
zoom <= area.maxZoom
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// Reset service state and inject areas for unit tests.
|
||||
@visibleForTesting
|
||||
void setAreasForTesting(List<OfflineArea> areas) {
|
||||
_areas
|
||||
..clear()
|
||||
..addAll(areas);
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
/// Cancel all active downloads (used when enabling offline mode)
|
||||
Future<void> cancelActiveDownloads() async {
|
||||
final activeAreas = _areas.where((area) => area.status == OfflineAreaStatus.downloading).toList();
|
||||
@@ -216,7 +247,7 @@ class OfflineAreaService {
|
||||
area = OfflineArea(
|
||||
id: id,
|
||||
name: name ?? area?.name ?? '',
|
||||
bounds: bounds,
|
||||
bounds: normalizeBounds(bounds),
|
||||
minZoom: minZoom,
|
||||
maxZoom: maxZoom,
|
||||
directory: directory,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import '../../models/osm_node.dart';
|
||||
import 'offline_tile_utils.dart' show normalizeBounds;
|
||||
|
||||
/// Status of an offline area
|
||||
enum OfflineAreaStatus { downloading, complete, error, cancelled }
|
||||
@@ -71,10 +72,10 @@ class OfflineArea {
|
||||
};
|
||||
|
||||
static OfflineArea fromJson(Map<String, dynamic> json) {
|
||||
final bounds = LatLngBounds(
|
||||
final bounds = normalizeBounds(LatLngBounds(
|
||||
LatLng(json['bounds']['sw']['lat'], json['bounds']['sw']['lng']),
|
||||
LatLng(json['bounds']['ne']['lat'], json['bounds']['ne']['lng']),
|
||||
);
|
||||
));
|
||||
return OfflineArea(
|
||||
id: json['id'],
|
||||
name: json['name'] ?? '',
|
||||
|
||||
@@ -4,14 +4,15 @@ import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
|
||||
/// Utility for tile calculations and lat/lon conversions for OSM offline logic
|
||||
|
||||
Set<List<int>> computeTileList(LatLngBounds bounds, int zMin, int zMax) {
|
||||
Set<List<int>> tiles = {};
|
||||
/// Normalize bounds so south ≤ north, west ≤ east, and degenerate (near-zero)
|
||||
/// spans are expanded by epsilon. Call this before storing bounds so that
|
||||
/// `tileInBounds` and [computeTileList] see consistent corner ordering.
|
||||
LatLngBounds normalizeBounds(LatLngBounds bounds) {
|
||||
const double epsilon = 1e-7;
|
||||
double latMin = min(bounds.southWest.latitude, bounds.northEast.latitude);
|
||||
double latMax = max(bounds.southWest.latitude, bounds.northEast.latitude);
|
||||
double lonMin = min(bounds.southWest.longitude, bounds.northEast.longitude);
|
||||
double lonMax = max(bounds.southWest.longitude, bounds.northEast.longitude);
|
||||
// Expand degenerate/flat areas a hair
|
||||
var latMin = min(bounds.southWest.latitude, bounds.northEast.latitude);
|
||||
var latMax = max(bounds.southWest.latitude, bounds.northEast.latitude);
|
||||
var lonMin = min(bounds.southWest.longitude, bounds.northEast.longitude);
|
||||
var lonMax = max(bounds.southWest.longitude, bounds.northEast.longitude);
|
||||
if ((latMax - latMin).abs() < epsilon) {
|
||||
latMin -= epsilon;
|
||||
latMax += epsilon;
|
||||
@@ -20,6 +21,16 @@ Set<List<int>> computeTileList(LatLngBounds bounds, int zMin, int zMax) {
|
||||
lonMin -= epsilon;
|
||||
lonMax += epsilon;
|
||||
}
|
||||
return LatLngBounds(LatLng(latMin, lonMin), LatLng(latMax, lonMax));
|
||||
}
|
||||
|
||||
Set<List<int>> computeTileList(LatLngBounds bounds, int zMin, int zMax) {
|
||||
Set<List<int>> tiles = {};
|
||||
final normalized = normalizeBounds(bounds);
|
||||
final double latMin = normalized.south;
|
||||
final double latMax = normalized.north;
|
||||
final double lonMin = normalized.west;
|
||||
final double lonMax = normalized.east;
|
||||
for (int z = zMin; z <= zMax; z++) {
|
||||
final n = pow(2, z).toInt();
|
||||
final minTileRaw = latLonToTileRaw(latMin, lonMin, z);
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../models/operator_profile.dart';
|
||||
|
||||
class OperatorProfileImportService {
|
||||
// Maximum size for base64 encoded profile data (approx 50KB decoded)
|
||||
static const int maxBase64Length = 70000;
|
||||
|
||||
/// Parse and validate an operator profile from a base64-encoded JSON string
|
||||
/// Returns null if parsing/validation fails
|
||||
static OperatorProfile? parseProfileFromBase64(String base64Data) {
|
||||
try {
|
||||
// Basic size validation before expensive decode
|
||||
if (base64Data.length > maxBase64Length) {
|
||||
debugPrint('[OperatorProfileImportService] Base64 data too large: ${base64Data.length} characters');
|
||||
return null;
|
||||
}
|
||||
|
||||
// Decode base64
|
||||
final jsonBytes = base64Decode(base64Data);
|
||||
final jsonString = utf8.decode(jsonBytes);
|
||||
|
||||
// Parse JSON
|
||||
final jsonData = jsonDecode(jsonString) as Map<String, dynamic>;
|
||||
|
||||
// Validate and sanitize the profile data
|
||||
final sanitizedProfile = _validateAndSanitizeProfile(jsonData);
|
||||
return sanitizedProfile;
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('[OperatorProfileImportService] Failed to parse profile from base64: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Validate operator profile structure and sanitize all string values
|
||||
static OperatorProfile? _validateAndSanitizeProfile(Map<String, dynamic> data) {
|
||||
try {
|
||||
// Extract and sanitize required fields
|
||||
final name = _sanitizeString(data['name']);
|
||||
if (name == null || name.isEmpty) {
|
||||
debugPrint('[OperatorProfileImportService] Operator profile name is required');
|
||||
return null;
|
||||
}
|
||||
|
||||
// Extract and sanitize tags
|
||||
final tagsData = data['tags'];
|
||||
if (tagsData is! Map<String, dynamic>) {
|
||||
debugPrint('[OperatorProfileImportService] Operator profile tags must be a map');
|
||||
return null;
|
||||
}
|
||||
|
||||
final sanitizedTags = <String, String>{};
|
||||
for (final entry in tagsData.entries) {
|
||||
final key = _sanitizeString(entry.key);
|
||||
final value = _sanitizeString(entry.value);
|
||||
|
||||
if (key != null && key.isNotEmpty) {
|
||||
// Allow empty values for refinement purposes
|
||||
sanitizedTags[key] = value ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
if (sanitizedTags.isEmpty) {
|
||||
debugPrint('[OperatorProfileImportService] Operator profile must have at least one valid tag');
|
||||
return null;
|
||||
}
|
||||
|
||||
return OperatorProfile(
|
||||
id: const Uuid().v4(), // Always generate new ID for imported profiles
|
||||
name: name,
|
||||
tags: sanitizedTags,
|
||||
);
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('[OperatorProfileImportService] Failed to validate operator profile: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Sanitize a string value by trimming and removing potentially harmful characters
|
||||
static String? _sanitizeString(dynamic value) {
|
||||
if (value == null) return null;
|
||||
|
||||
final str = value.toString().trim();
|
||||
|
||||
// Remove control characters and limit length
|
||||
final sanitized = str.replaceAll(RegExp(r'[\x00-\x1F\x7F]'), '');
|
||||
|
||||
// Limit length to prevent abuse
|
||||
const maxLength = 500;
|
||||
if (sanitized.length > maxLength) {
|
||||
return sanitized.substring(0, maxLength);
|
||||
}
|
||||
|
||||
return sanitized;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import '../state/settings_state.dart';
|
||||
import 'http_client.dart';
|
||||
|
||||
/// Service for checking OSM user messages
|
||||
class OSMMessagesService {
|
||||
static const _messageCheckCacheDuration = Duration(minutes: 5);
|
||||
final _client = UserAgentClient();
|
||||
|
||||
DateTime? _lastCheck;
|
||||
int? _lastUnreadCount;
|
||||
@@ -38,7 +39,7 @@ class OSMMessagesService {
|
||||
|
||||
try {
|
||||
final apiHost = _getApiHost(uploadMode);
|
||||
final response = await http.get(
|
||||
final response = await _client.get(
|
||||
Uri.parse('$apiHost/api/0.6/user/details.json'),
|
||||
headers: {'Authorization': 'Bearer $accessToken'},
|
||||
);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/// Exception thrown when Overpass API returns an error indicating too many nodes were requested.
|
||||
/// This typically happens when querying large areas that would return more than 50k nodes.
|
||||
class OverpassNodeLimitException implements Exception {
|
||||
final String message;
|
||||
final String? serverResponse;
|
||||
|
||||
OverpassNodeLimitException(this.message, {this.serverResponse});
|
||||
|
||||
@override
|
||||
String toString() => 'OverpassNodeLimitException: $message';
|
||||
}
|
||||
|
||||
/// Exception thrown when Overpass API rate limits the request.
|
||||
/// Should trigger longer backoff delays, not area splitting.
|
||||
class OverpassRateLimitException implements Exception {
|
||||
final String message;
|
||||
final String? serverResponse;
|
||||
|
||||
OverpassRateLimitException(this.message, {this.serverResponse});
|
||||
|
||||
@override
|
||||
String toString() => 'OverpassRateLimitException: $message';
|
||||
}
|
||||
+258
-111
@@ -1,151 +1,295 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
|
||||
import '../models/node_profile.dart';
|
||||
import '../models/osm_node.dart';
|
||||
import '../dev_config.dart';
|
||||
import 'http_client.dart';
|
||||
import 'service_policy.dart';
|
||||
|
||||
/// Simple Overpass API client with proper HTTP retry logic.
|
||||
/// Simple Overpass API client with retry and fallback logic.
|
||||
/// Single responsibility: Make requests, handle network errors, return data.
|
||||
class OverpassService {
|
||||
static const String _endpoint = 'https://overpass-api.de/api/interpreter';
|
||||
|
||||
/// Fetch surveillance nodes from Overpass API with proper retry logic.
|
||||
/// Throws NetworkError for retryable failures, NodeLimitError for area splitting.
|
||||
static const String defaultEndpoint = 'https://overpass.deflock.org/api/interpreter';
|
||||
static const String fallbackEndpoint = 'https://overpass-api.de/api/interpreter';
|
||||
static const _policy = ResiliencePolicy(
|
||||
maxRetries: 3,
|
||||
httpTimeout: Duration(seconds: 45),
|
||||
);
|
||||
|
||||
final http.Client _client;
|
||||
/// Optional override endpoint. When null, uses [defaultEndpoint].
|
||||
final String? _endpointOverride;
|
||||
|
||||
OverpassService({http.Client? client, String? endpoint})
|
||||
: _client = client ?? UserAgentClient(),
|
||||
_endpointOverride = endpoint;
|
||||
|
||||
/// Resolve the primary endpoint: constructor override or default.
|
||||
String get _primaryEndpoint => _endpointOverride ?? defaultEndpoint;
|
||||
|
||||
/// Fetch surveillance nodes from Overpass API with retry and fallback.
|
||||
///
|
||||
/// Throws:
|
||||
/// - [NodeLimitError] when the query would exceed Overpass's hard 50k node
|
||||
/// limit. This is the *only* case where the caller should split the
|
||||
/// query area into smaller regions, since it's a deterministic function
|
||||
/// of how much data lives in the requested bounds.
|
||||
/// - [RateLimitError] when rate limited (HTTP 429 or equivalent). Callers
|
||||
/// should back off, not split/retry — splitting would only amplify load
|
||||
/// on a server that just told us to slow down.
|
||||
/// - [NetworkError] for timeouts and other retryable HTTP/network failures.
|
||||
/// Timeouts are usually a sign of server load or an expensive query, not
|
||||
/// "too much area" — retrying with a hail of smaller sub-requests makes
|
||||
/// the problem worse, so timeouts are treated like any other transient
|
||||
/// network failure (handled by the existing retry/backoff/fallback logic).
|
||||
Future<List<OsmNode>> fetchNodes({
|
||||
required LatLngBounds bounds,
|
||||
required List<NodeProfile> profiles,
|
||||
int maxRetries = 3,
|
||||
ResiliencePolicy? policy,
|
||||
}) async {
|
||||
if (profiles.isEmpty) return [];
|
||||
|
||||
|
||||
final query = _buildQuery(bounds, profiles);
|
||||
|
||||
for (int attempt = 0; attempt <= maxRetries; attempt++) {
|
||||
try {
|
||||
debugPrint('[OverpassService] Attempt ${attempt + 1}/${maxRetries + 1} for ${profiles.length} profiles');
|
||||
|
||||
final response = await http.post(
|
||||
Uri.parse(_endpoint),
|
||||
body: {'data': query},
|
||||
).timeout(kOverpassQueryTimeout);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return _parseResponse(response.body);
|
||||
}
|
||||
|
||||
// Check for specific error types
|
||||
final errorBody = response.body;
|
||||
|
||||
// Node limit error - caller should split area
|
||||
if (response.statusCode == 400 &&
|
||||
(errorBody.contains('too many nodes') && errorBody.contains('50000'))) {
|
||||
debugPrint('[OverpassService] Node limit exceeded, area should be split');
|
||||
throw NodeLimitError('Query exceeded 50k node limit');
|
||||
}
|
||||
|
||||
// Timeout error - also try splitting (complex query)
|
||||
if (errorBody.contains('timeout') ||
|
||||
errorBody.contains('runtime limit exceeded') ||
|
||||
errorBody.contains('Query timed out')) {
|
||||
debugPrint('[OverpassService] Query timeout, area should be split');
|
||||
throw NodeLimitError('Query timed out - area too complex');
|
||||
}
|
||||
|
||||
// Rate limit - throw immediately, don't retry
|
||||
if (response.statusCode == 429 ||
|
||||
errorBody.contains('rate limited') ||
|
||||
errorBody.contains('too many requests')) {
|
||||
debugPrint('[OverpassService] Rate limited by Overpass');
|
||||
throw RateLimitError('Rate limited by Overpass API');
|
||||
}
|
||||
|
||||
// Other HTTP errors - retry with backoff
|
||||
if (attempt < maxRetries) {
|
||||
final delay = Duration(milliseconds: (200 * (1 << attempt)).clamp(200, 5000));
|
||||
debugPrint('[OverpassService] HTTP ${response.statusCode} error, retrying in ${delay.inMilliseconds}ms');
|
||||
await Future.delayed(delay);
|
||||
continue;
|
||||
}
|
||||
|
||||
throw NetworkError('HTTP ${response.statusCode}: $errorBody');
|
||||
|
||||
} catch (e) {
|
||||
// Handle specific error types without retry
|
||||
if (e is NodeLimitError || e is RateLimitError) {
|
||||
rethrow;
|
||||
}
|
||||
|
||||
// Network/timeout errors - retry with backoff
|
||||
if (attempt < maxRetries) {
|
||||
final delay = Duration(milliseconds: (200 * (1 << attempt)).clamp(200, 5000));
|
||||
debugPrint('[OverpassService] Network error ($e), retrying in ${delay.inMilliseconds}ms');
|
||||
await Future.delayed(delay);
|
||||
continue;
|
||||
}
|
||||
|
||||
throw NetworkError('Network error after $maxRetries retries: $e');
|
||||
}
|
||||
}
|
||||
|
||||
throw NetworkError('Max retries exceeded');
|
||||
final endpoint = _primaryEndpoint;
|
||||
final canFallback = _endpointOverride == null;
|
||||
final effectivePolicy = policy ?? _policy;
|
||||
|
||||
return executeWithFallback<List<OsmNode>>(
|
||||
primaryUrl: endpoint,
|
||||
fallbackUrl: canFallback ? fallbackEndpoint : null,
|
||||
execute: (url) => _attemptFetch(url, query, effectivePolicy),
|
||||
classifyError: _classifyError,
|
||||
policy: effectivePolicy,
|
||||
);
|
||||
}
|
||||
|
||||
/// Build Overpass QL query for given bounds and profiles
|
||||
|
||||
/// Single POST + parse attempt (no retry logic — handled by executeWithFallback).
|
||||
Future<List<OsmNode>> _attemptFetch(String endpoint, String query, ResiliencePolicy policy) async {
|
||||
debugPrint('[OverpassService] POST $endpoint');
|
||||
|
||||
try {
|
||||
final response = await _client.post(
|
||||
Uri.parse(endpoint),
|
||||
body: {'data': query},
|
||||
).timeout(policy.httpTimeout);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return _parseResponse(response.body);
|
||||
}
|
||||
|
||||
final errorBody = response.body;
|
||||
|
||||
// Node limit error - a deterministic result-set size limit. This is
|
||||
// the one case where splitting the query area into smaller regions is
|
||||
// the correct fix, since it directly reduces nodes-per-request.
|
||||
if (response.statusCode == 400 &&
|
||||
(errorBody.contains('too many nodes') && errorBody.contains('50000'))) {
|
||||
debugPrint('[OverpassService] Node limit exceeded (50k), area should be split');
|
||||
throw NodeLimitError('Query exceeded 50k node limit');
|
||||
}
|
||||
|
||||
// Rate limit - back off, don't split or hammer the server with more requests.
|
||||
if (response.statusCode == 429 ||
|
||||
errorBody.contains('rate limited') ||
|
||||
errorBody.contains('too many requests')) {
|
||||
debugPrint('[OverpassService] Rate limited by Overpass');
|
||||
throw RateLimitError('Rate limited by Overpass API');
|
||||
}
|
||||
|
||||
// Timeout / runtime limit exceeded - treat as a plain retryable network
|
||||
// error. This is usually server load or query cost, not "area too
|
||||
// big" — splitting into up to 64 sub-requests would only make load
|
||||
// on the server worse.
|
||||
if (errorBody.contains('timeout') ||
|
||||
errorBody.contains('runtime limit exceeded') ||
|
||||
errorBody.contains('Query timed out')) {
|
||||
debugPrint('[OverpassService] Query timed out');
|
||||
throw NetworkError('Query timed out');
|
||||
}
|
||||
|
||||
throw NetworkError('HTTP ${response.statusCode}: $errorBody');
|
||||
} catch (e) {
|
||||
if (e is NodeLimitError || e is RateLimitError || e is NetworkError) {
|
||||
rethrow;
|
||||
}
|
||||
throw NetworkError('Network error: $e');
|
||||
}
|
||||
}
|
||||
|
||||
static ErrorDisposition _classifyError(Object error) {
|
||||
if (error is NodeLimitError) return ErrorDisposition.abort;
|
||||
if (error is RateLimitError) return ErrorDisposition.fallback;
|
||||
return ErrorDisposition.retry;
|
||||
}
|
||||
|
||||
/// Build Overpass QL query for given bounds and profiles.
|
||||
///
|
||||
/// Profiles are deduplicated first: if one profile's non-empty tags are a
|
||||
/// subset of another's (with identical values), the broader profile's query
|
||||
/// clause already returns every node the narrower one would, so the
|
||||
/// narrower clause is redundant and can be dropped. This directly reduces
|
||||
/// query size/complexity without changing the result set — client-side
|
||||
/// filtering (matching returned nodes against the full profile list) still
|
||||
/// happens independently, so nothing is lost.
|
||||
String _buildQuery(LatLngBounds bounds, List<NodeProfile> profiles) {
|
||||
final nodeClauses = profiles.map((profile) {
|
||||
// Convert profile tags to Overpass filter format, excluding empty values
|
||||
final tagFilters = profile.tags.entries
|
||||
final profilesToQuery = _deduplicateProfilesForQuery(profiles);
|
||||
|
||||
if (profilesToQuery.length < profiles.length) {
|
||||
debugPrint(
|
||||
'[OverpassService] Deduplicated ${profiles.length} profiles to ${profilesToQuery.length} for query efficiency');
|
||||
}
|
||||
|
||||
// Per-profile tag filter strings (e.g. ["man_made"="surveillance"]["surveillance:type"="ALPR"]),
|
||||
// excluding empty tag values. Reused twice below: once to select our nodes
|
||||
// in the bbox, and again to re-select just our nodes out of the pool of
|
||||
// way/relation-connected nodes (which may include unrelated node types).
|
||||
final tagFilterStrings = profilesToQuery.map((profile) {
|
||||
return profile.tags.entries
|
||||
.where((entry) => entry.value.trim().isNotEmpty)
|
||||
.map((entry) => '["${entry.key}"="${entry.value}"]')
|
||||
.join();
|
||||
|
||||
return 'node$tagFilters(${bounds.southWest.latitude},${bounds.southWest.longitude},${bounds.northEast.latitude},${bounds.northEast.longitude});';
|
||||
}).join('\n ');
|
||||
}).toList();
|
||||
|
||||
final bboxStr = '${bounds.southWest.latitude},${bounds.southWest.longitude},'
|
||||
'${bounds.northEast.latitude},${bounds.northEast.longitude}';
|
||||
|
||||
final allNodesClauses =
|
||||
tagFilterStrings.map((filters) => 'node$filters($bboxStr);').join('\n ');
|
||||
final resNodesClauses =
|
||||
tagFilterStrings.map((filters) => 'node.resNodes$filters;').join('\n ');
|
||||
|
||||
// Query strategy:
|
||||
// 1. Find all matching nodes in bbox -> .allNodes, output them with tags ("out body").
|
||||
// 2. Find any way/relation that references one of .allNodes ("bn." = "by node"),
|
||||
// then pull the node IDs those ways/relations reference -> .wayNodes/.relNodes.
|
||||
// (`node(w)`/`node(r)` on a way/relation set returns only node IDs, not
|
||||
// full tags/coords, keeping the query/response cheap.)
|
||||
// 3. Re-filter that combined node pool down to just our own matching
|
||||
// surveillance nodes (.resNodes may contain unrelated node types too).
|
||||
// 4. `convert restriction ::id = id();` emits each of those node IDs as a
|
||||
// lightweight synthetic `{"type":"restriction","id":<nodeId>}` element —
|
||||
// a flat, unambiguous list of which node IDs are "constrained" (part of
|
||||
// some way/relation), without needing the full way/relation node lists.
|
||||
return '''
|
||||
[out:json][timeout:${kOverpassQueryTimeout.inSeconds}];
|
||||
(
|
||||
$nodeClauses
|
||||
);
|
||||
out body;
|
||||
$allNodesClauses
|
||||
)->.allNodes;
|
||||
.allNodes out body;
|
||||
way(bn.allNodes); node(w)->.wayNodes;
|
||||
relation(bn.allNodes); node(r)->.relNodes;
|
||||
(.wayNodes;.relNodes;)->.resNodes;
|
||||
(
|
||||
way(bn);
|
||||
rel(bn);
|
||||
$resNodesClauses
|
||||
);
|
||||
out meta;
|
||||
convert restriction ::id = id();
|
||||
out;
|
||||
''';
|
||||
}
|
||||
|
||||
/// Parse Overpass JSON response into OsmNode objects
|
||||
|
||||
|
||||
/// Deduplicate profiles for Overpass queries by removing profiles that are
|
||||
/// subsumed by others. A profile A subsumes profile B if all of A's
|
||||
/// non-empty tags exist in B with identical values — meaning every node
|
||||
/// matching B's filter also matches A's filter, so B's clause is redundant.
|
||||
List<NodeProfile> _deduplicateProfilesForQuery(List<NodeProfile> profiles) {
|
||||
if (profiles.length <= 1) return profiles;
|
||||
|
||||
final result = <NodeProfile>[];
|
||||
|
||||
for (final candidate in profiles) {
|
||||
// Skip profiles that only have empty tags - they would match
|
||||
// everything and shouldn't be treated as subsuming or subsumable.
|
||||
final candidateNonEmptyTags = candidate.tags.entries
|
||||
.where((entry) => entry.value.trim().isNotEmpty)
|
||||
.toList();
|
||||
|
||||
if (candidateNonEmptyTags.isEmpty) continue;
|
||||
|
||||
// Check if any existing profile in our result subsumes this candidate
|
||||
bool isSubsumed = false;
|
||||
for (final existing in result) {
|
||||
if (_profileSubsumes(existing, candidate)) {
|
||||
isSubsumed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSubsumed) {
|
||||
// This candidate is not subsumed, so add it. But first, remove any
|
||||
// existing profiles that this candidate subsumes (candidate is
|
||||
// broader, so those clauses are now redundant).
|
||||
result.removeWhere((existing) => _profileSubsumes(candidate, existing));
|
||||
result.add(candidate);
|
||||
}
|
||||
}
|
||||
|
||||
// Safety check: if dedup removed everything (e.g. all-empty-tag
|
||||
// profiles), fall back to the original list rather than sending an
|
||||
// empty query.
|
||||
return result.isNotEmpty ? result : profiles;
|
||||
}
|
||||
|
||||
/// Check if [broaderProfile] subsumes [specificProfile]: true if all
|
||||
/// non-empty tags in [broaderProfile] exist in [specificProfile] with
|
||||
/// identical values.
|
||||
bool _profileSubsumes(NodeProfile broaderProfile, NodeProfile specificProfile) {
|
||||
final broaderTags = Map.fromEntries(
|
||||
broaderProfile.tags.entries.where((entry) => entry.value.trim().isNotEmpty),
|
||||
);
|
||||
final specificTags = Map.fromEntries(
|
||||
specificProfile.tags.entries.where((entry) => entry.value.trim().isNotEmpty),
|
||||
);
|
||||
|
||||
// If broader has no non-empty tags, it doesn't subsume anything (it
|
||||
// would match everything, which isn't a meaningful "broader filter").
|
||||
if (broaderTags.isEmpty) return false;
|
||||
|
||||
// If broader has more non-empty tags than specific, it can't subsume it.
|
||||
if (broaderTags.length > specificTags.length) return false;
|
||||
|
||||
for (final entry in broaderTags.entries) {
|
||||
if (specificTags[entry.key] != entry.value) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// Parse Overpass JSON response into OsmNode objects.
|
||||
///
|
||||
/// The query (see [_buildQuery]) produces two kinds of elements:
|
||||
/// - `type: "node"` — our matched surveillance nodes, with full tags/coords
|
||||
/// (from `.allNodes out body;`).
|
||||
/// - `type: "restriction"` — synthetic elements (from
|
||||
/// `convert restriction ::id = id();`) whose `id` is the OSM node ID of
|
||||
/// one of our nodes that Overpass determined is referenced by some way
|
||||
/// or relation. These carry no lat/lon/tags — just the id — and exist
|
||||
/// purely to tell us which node IDs are "constrained".
|
||||
List<OsmNode> _parseResponse(String responseBody) {
|
||||
final data = jsonDecode(responseBody) as Map<String, dynamic>;
|
||||
final elements = data['elements'] as List<dynamic>;
|
||||
|
||||
|
||||
final nodeElements = <Map<String, dynamic>>[];
|
||||
final constrainedNodeIds = <int>{};
|
||||
|
||||
// First pass: collect surveillance nodes and identify constrained nodes
|
||||
|
||||
// First pass: collect surveillance nodes and constrained-node markers.
|
||||
for (final element in elements.whereType<Map<String, dynamic>>()) {
|
||||
final type = element['type'] as String?;
|
||||
|
||||
|
||||
if (type == 'node') {
|
||||
nodeElements.add(element);
|
||||
} else if (type == 'way' || type == 'relation') {
|
||||
// Mark referenced nodes as constrained
|
||||
final refs = element['nodes'] as List<dynamic>? ??
|
||||
element['members']?.where((m) => m['type'] == 'node').map((m) => m['ref']) ?? [];
|
||||
|
||||
for (final ref in refs) {
|
||||
final nodeId = ref is int ? ref : int.tryParse(ref.toString());
|
||||
if (nodeId != null) constrainedNodeIds.add(nodeId);
|
||||
}
|
||||
} else if (type == 'restriction') {
|
||||
final rawId = element['id'];
|
||||
final nodeId = rawId is int ? rawId : int.tryParse(rawId.toString());
|
||||
if (nodeId != null) constrainedNodeIds.add(nodeId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Second pass: create OsmNode objects
|
||||
final nodes = nodeElements.map((element) {
|
||||
final nodeId = element['id'] as int;
|
||||
@@ -156,13 +300,16 @@ out meta;
|
||||
isConstrained: constrainedNodeIds.contains(nodeId),
|
||||
);
|
||||
}).toList();
|
||||
|
||||
|
||||
debugPrint('[OverpassService] Parsed ${nodes.length} nodes, ${constrainedNodeIds.length} constrained');
|
||||
return nodes;
|
||||
}
|
||||
}
|
||||
|
||||
/// Error thrown when query exceeds node limits or is too complex - area should be split
|
||||
|
||||
/// Error thrown when a query would exceed Overpass's 50k node limit.
|
||||
/// The caller should split the query area into smaller regions to resolve this
|
||||
/// — it's a deterministic function of how much data lives within the bounds.
|
||||
class NodeLimitError extends Error {
|
||||
final String message;
|
||||
NodeLimitError(this.message);
|
||||
@@ -178,10 +325,10 @@ class RateLimitError extends Error {
|
||||
String toString() => 'RateLimitError: $message';
|
||||
}
|
||||
|
||||
/// Error thrown for network/HTTP issues - retryable
|
||||
/// Error thrown for network/HTTP issues (including timeouts) - retryable
|
||||
class NetworkError extends Error {
|
||||
final String message;
|
||||
NetworkError(this.message);
|
||||
@override
|
||||
String toString() => 'NetworkError: $message';
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../models/node_profile.dart';
|
||||
import '../dev_config.dart';
|
||||
|
||||
class ProfileImportService {
|
||||
// Maximum size for base64 encoded profile data (approx 50KB decoded)
|
||||
@@ -72,13 +73,17 @@ class ProfileImportService {
|
||||
final requiresDirection = data['requiresDirection'] ?? true;
|
||||
final submittable = data['submittable'] ?? true;
|
||||
|
||||
// Parse FOV if provided
|
||||
// Parse FOV if provided, applying restrictions based on dev config
|
||||
double? fov;
|
||||
if (data['fov'] != null) {
|
||||
if (data['fov'] is num) {
|
||||
final fovValue = (data['fov'] as num).toDouble();
|
||||
if (fovValue > 0 && fovValue <= 360) {
|
||||
fov = fovValue;
|
||||
// If non-360 FOVs are disabled, only allow 360° FOV
|
||||
if (kEnableNon360FOVs || fovValue == 360.0) {
|
||||
fov = fovValue;
|
||||
}
|
||||
// Otherwise, clear non-360 FOV values (set fov to null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
import 'provider_tile_cache_store.dart';
|
||||
import 'service_policy.dart';
|
||||
|
||||
/// Factory and registry for per-provider [ProviderTileCacheStore] instances.
|
||||
///
|
||||
/// Creates cache stores under `{appCacheDir}/tile_cache/{providerId}/{tileTypeId}/`.
|
||||
/// Call [init] once at startup (e.g., from TileLayerManager.initialize) to
|
||||
/// resolve the platform cache directory. After init, [getOrCreate] is
|
||||
/// synchronous — the cache store lazily creates its directory on first write.
|
||||
class ProviderTileCacheManager {
|
||||
static final Map<String, ProviderTileCacheStore> _stores = {};
|
||||
static String? _baseCacheDir;
|
||||
|
||||
/// Resolve the platform cache directory. Call once at startup.
|
||||
static Future<void> init() async {
|
||||
if (_baseCacheDir != null) return;
|
||||
final cacheDir = await getApplicationCacheDirectory();
|
||||
_baseCacheDir = p.join(cacheDir.path, 'tile_cache');
|
||||
}
|
||||
|
||||
/// Whether the manager has been initialized.
|
||||
static bool get isInitialized => _baseCacheDir != null;
|
||||
|
||||
/// Get or create a cache store for a specific provider/tile type combination.
|
||||
///
|
||||
/// Synchronous after [init] has been called. The cache store lazily creates
|
||||
/// its directory on first write.
|
||||
static ProviderTileCacheStore getOrCreate({
|
||||
required String providerId,
|
||||
required String tileTypeId,
|
||||
required ServicePolicy policy,
|
||||
int? maxCacheBytes,
|
||||
}) {
|
||||
if (_baseCacheDir == null) {
|
||||
throw StateError(
|
||||
'ProviderTileCacheManager.init() must be called before getOrCreate()',
|
||||
);
|
||||
}
|
||||
|
||||
final key = '$providerId/$tileTypeId';
|
||||
if (_stores.containsKey(key)) return _stores[key]!;
|
||||
|
||||
final cacheDir = p.join(_baseCacheDir!, providerId, tileTypeId);
|
||||
|
||||
final store = ProviderTileCacheStore(
|
||||
cacheDirectory: cacheDir,
|
||||
maxCacheBytes: maxCacheBytes ?? 500 * 1024 * 1024,
|
||||
overrideFreshAge: policy.minCacheTtl,
|
||||
);
|
||||
|
||||
_stores[key] = store;
|
||||
return store;
|
||||
}
|
||||
|
||||
/// Delete a specific provider's cache directory and remove the store.
|
||||
static Future<void> deleteCache(String providerId, String tileTypeId) async {
|
||||
final key = '$providerId/$tileTypeId';
|
||||
final store = _stores[key];
|
||||
if (store != null) {
|
||||
// Use the store's clear method to properly reset its internal state
|
||||
await store.clear();
|
||||
// Don't remove from registry - let it be reused with clean state
|
||||
} else if (_baseCacheDir != null) {
|
||||
// Fallback for stores not in registry
|
||||
final cacheDir = Directory(p.join(_baseCacheDir!, providerId, tileTypeId));
|
||||
if (await cacheDir.exists()) {
|
||||
await cacheDir.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get estimated cache sizes for all active stores.
|
||||
///
|
||||
/// Returns a map of `providerId/tileTypeId` → size in bytes.
|
||||
static Future<Map<String, int>> getCacheSizes() async {
|
||||
final sizes = <String, int>{};
|
||||
for (final entry in _stores.entries) {
|
||||
sizes[entry.key] = await entry.value.estimatedSizeBytes;
|
||||
}
|
||||
return sizes;
|
||||
}
|
||||
|
||||
/// Remove a store from the registry (e.g., when a provider is disposed).
|
||||
static void unregister(String providerId, String tileTypeId) {
|
||||
_stores.remove('$providerId/$tileTypeId');
|
||||
}
|
||||
|
||||
/// Clear all stores and reset the registry (for testing).
|
||||
@visibleForTesting
|
||||
static Future<void> resetAll() async {
|
||||
for (final store in _stores.values) {
|
||||
await store.clear();
|
||||
}
|
||||
_stores.clear();
|
||||
_baseCacheDir = null;
|
||||
}
|
||||
|
||||
/// Set the base cache directory directly (for testing).
|
||||
@visibleForTesting
|
||||
static void setBaseCacheDir(String dir) {
|
||||
_baseCacheDir = dir;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
/// Per-provider tile cache implementing flutter_map's [MapCachingProvider].
|
||||
///
|
||||
/// Each instance manages an isolated cache directory with:
|
||||
/// - Deterministic UUID v5 key generation from tile URLs
|
||||
/// - Optional TTL override from [ServicePolicy.minCacheTtl]
|
||||
/// - Configurable max cache size with oldest-modified eviction
|
||||
///
|
||||
/// Files are stored as `{key}.tile` (image bytes) and `{key}.meta` (JSON
|
||||
/// metadata containing staleAt, lastModified, etag).
|
||||
class ProviderTileCacheStore implements MapCachingProvider {
|
||||
final String cacheDirectory;
|
||||
final int maxCacheBytes;
|
||||
final Duration? overrideFreshAge;
|
||||
|
||||
static const _uuid = Uuid();
|
||||
|
||||
/// Running estimate of cache size in bytes. Initialized lazily on first
|
||||
/// [putTile] call to avoid blocking construction.
|
||||
int? _estimatedSize;
|
||||
|
||||
/// Semaphore to limit concurrent file I/O operations and prevent
|
||||
/// "too many open files" errors during heavy tile loading.
|
||||
static final _ioSemaphore = _Semaphore(20); // Max 20 concurrent file operations
|
||||
|
||||
/// Throttle: don't re-scan more than once per minute.
|
||||
DateTime? _lastPruneCheck;
|
||||
|
||||
/// One-shot latch for lazy directory creation (safe under concurrent calls).
|
||||
Completer<void>? _directoryReady;
|
||||
|
||||
/// Guard against concurrent eviction runs.
|
||||
bool _isEvicting = false;
|
||||
|
||||
ProviderTileCacheStore({
|
||||
required this.cacheDirectory,
|
||||
this.maxCacheBytes = 500 * 1024 * 1024, // 500 MB default
|
||||
this.overrideFreshAge,
|
||||
});
|
||||
|
||||
@override
|
||||
bool get isSupported => true;
|
||||
|
||||
@override
|
||||
Future<CachedMapTile?> getTile(String url) async {
|
||||
final key = keyFor(url);
|
||||
final tileFile = File(p.join(cacheDirectory, '$key.tile'));
|
||||
final metaFile = File(p.join(cacheDirectory, '$key.meta'));
|
||||
|
||||
try {
|
||||
// Use semaphore to limit concurrent file I/O operations
|
||||
final result = await _ioSemaphore.execute(() async {
|
||||
final bytes = await tileFile.readAsBytes();
|
||||
final metaJson = json.decode(await metaFile.readAsString())
|
||||
as Map<String, dynamic>;
|
||||
return (bytes: bytes, metaJson: metaJson);
|
||||
});
|
||||
|
||||
final bytes = result.bytes;
|
||||
final metaJson = result.metaJson;
|
||||
|
||||
final metadata = CachedMapTileMetadata(
|
||||
staleAt: DateTime.fromMillisecondsSinceEpoch(
|
||||
metaJson['staleAt'] as int,
|
||||
isUtc: true,
|
||||
),
|
||||
lastModified: metaJson['lastModified'] != null
|
||||
? DateTime.fromMillisecondsSinceEpoch(
|
||||
metaJson['lastModified'] as int,
|
||||
isUtc: true,
|
||||
)
|
||||
: null,
|
||||
etag: metaJson['etag'] as String?,
|
||||
);
|
||||
|
||||
return (bytes: bytes, metadata: metadata);
|
||||
} on PathNotFoundException {
|
||||
return null;
|
||||
} catch (e) {
|
||||
throw CachedMapTileReadFailure(
|
||||
url: url,
|
||||
description: 'Failed to read cached tile',
|
||||
originalError: e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> putTile({
|
||||
required String url,
|
||||
required CachedMapTileMetadata metadata,
|
||||
Uint8List? bytes,
|
||||
}) async {
|
||||
await _ensureDirectory();
|
||||
|
||||
final key = keyFor(url);
|
||||
final tileFile = File(p.join(cacheDirectory, '$key.tile'));
|
||||
final metaFile = File(p.join(cacheDirectory, '$key.meta'));
|
||||
|
||||
// Apply minimum TTL override if configured (e.g., OSM 7-day minimum).
|
||||
// Use the later of server-provided staleAt and our minimum to avoid
|
||||
// accidentally shortening a longer server-provided freshness lifetime.
|
||||
final effectiveMetadata = overrideFreshAge != null
|
||||
? (() {
|
||||
final overrideStaleAt = DateTime.timestamp().add(overrideFreshAge!);
|
||||
final staleAt = metadata.staleAt.isAfter(overrideStaleAt)
|
||||
? metadata.staleAt
|
||||
: overrideStaleAt;
|
||||
return CachedMapTileMetadata(
|
||||
staleAt: staleAt,
|
||||
lastModified: metadata.lastModified,
|
||||
etag: metadata.etag,
|
||||
);
|
||||
})()
|
||||
: metadata;
|
||||
|
||||
final metaJson = json.encode({
|
||||
'staleAt': effectiveMetadata.staleAt.millisecondsSinceEpoch,
|
||||
'lastModified':
|
||||
effectiveMetadata.lastModified?.millisecondsSinceEpoch,
|
||||
'etag': effectiveMetadata.etag,
|
||||
});
|
||||
|
||||
// Write .tile before .meta: if we crash between the two writes, the
|
||||
// read path's both-must-exist check sees a miss rather than an orphan .meta.
|
||||
// Use semaphore to limit concurrent file I/O and prevent "too many open files" errors.
|
||||
await _ioSemaphore.execute(() async {
|
||||
if (bytes != null) {
|
||||
await tileFile.writeAsBytes(bytes);
|
||||
}
|
||||
await metaFile.writeAsString(metaJson);
|
||||
});
|
||||
|
||||
// Reset size estimate so it resyncs from disk on next check.
|
||||
// This avoids drift from overwrites where the old size isn't subtracted.
|
||||
_estimatedSize = null;
|
||||
|
||||
// Schedule lazy size check
|
||||
_scheduleEvictionCheck();
|
||||
}
|
||||
|
||||
/// Ensure the cache directory exists (lazy creation on first write).
|
||||
///
|
||||
/// Uses a Completer latch so concurrent callers share a single create().
|
||||
/// Safe under Dart's single-threaded event loop: the null check and
|
||||
/// assignment happen in the same synchronous block with no `await`
|
||||
/// between them, so no other microtask can interleave.
|
||||
Future<void> _ensureDirectory() {
|
||||
if (_directoryReady == null) {
|
||||
final completer = Completer<void>();
|
||||
_directoryReady = completer;
|
||||
Directory(cacheDirectory).create(recursive: true).then(
|
||||
(_) => completer.complete(),
|
||||
onError: (Object error, StackTrace stackTrace) {
|
||||
// Reset latch on error so later calls can retry directory creation.
|
||||
if (identical(_directoryReady, completer)) {
|
||||
_directoryReady = null;
|
||||
}
|
||||
completer.completeError(error, stackTrace);
|
||||
},
|
||||
);
|
||||
}
|
||||
return _directoryReady!.future;
|
||||
}
|
||||
|
||||
/// Generate a cache key from URL using UUID v5 (same as flutter_map built-in).
|
||||
@visibleForTesting
|
||||
static String keyFor(String url) => _uuid.v5(Namespace.url.value, url);
|
||||
|
||||
/// Estimate total cache size (lazy, first call scans directory).
|
||||
Future<int> _getEstimatedSize() async {
|
||||
if (_estimatedSize != null) return _estimatedSize!;
|
||||
|
||||
final dir = Directory(cacheDirectory);
|
||||
if (!await dir.exists()) {
|
||||
_estimatedSize = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
var total = 0;
|
||||
await for (final entity in dir.list()) {
|
||||
if (entity is File) {
|
||||
total += await entity.length();
|
||||
}
|
||||
}
|
||||
_estimatedSize = total;
|
||||
return total;
|
||||
}
|
||||
|
||||
/// Schedule eviction if we haven't checked recently.
|
||||
void _scheduleEvictionCheck() {
|
||||
final now = DateTime.now();
|
||||
if (_lastPruneCheck != null &&
|
||||
now.difference(_lastPruneCheck!) < const Duration(minutes: 1)) {
|
||||
return;
|
||||
}
|
||||
_lastPruneCheck = now;
|
||||
|
||||
// Fire-and-forget: eviction is best-effort background work.
|
||||
// _estimatedSize may be momentarily stale between eviction start and
|
||||
// completion, but this is acceptable — the guard only needs to be
|
||||
// approximately correct to prevent unbounded growth, and the throttle
|
||||
// ensures we re-check within a minute.
|
||||
// ignore: discarded_futures
|
||||
_evictIfNeeded();
|
||||
}
|
||||
|
||||
/// Evict oldest-modified tiles if cache exceeds size limit.
|
||||
///
|
||||
/// Sorts by file mtime (oldest first), not by last access — true LRU would
|
||||
/// require touching files on every [getTile] read, adding I/O on the hot
|
||||
/// path. In practice write-recency tracks usage well because tiles are
|
||||
/// immutable and flutter_map holds visible tiles in memory.
|
||||
///
|
||||
/// Guarded by [_isEvicting] to prevent concurrent runs from corrupting
|
||||
/// [_estimatedSize].
|
||||
Future<void> _evictIfNeeded() async {
|
||||
if (_isEvicting) return;
|
||||
_isEvicting = true;
|
||||
try {
|
||||
final currentSize = await _getEstimatedSize();
|
||||
if (currentSize <= maxCacheBytes) return;
|
||||
|
||||
final dir = Directory(cacheDirectory);
|
||||
if (!await dir.exists()) return;
|
||||
|
||||
// Collect all files, separating .tile and .meta for eviction + orphan cleanup.
|
||||
final tileFiles = <File>[];
|
||||
final metaFiles = <String>{};
|
||||
await for (final entity in dir.list()) {
|
||||
if (entity is File) {
|
||||
if (entity.path.endsWith('.tile')) {
|
||||
tileFiles.add(entity);
|
||||
} else if (entity.path.endsWith('.meta')) {
|
||||
metaFiles.add(p.basenameWithoutExtension(entity.path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tileFiles.isEmpty) return;
|
||||
|
||||
// Sort by modification time, oldest first
|
||||
final stats = await Future.wait(
|
||||
tileFiles.map((f) async => (file: f, stat: await f.stat())),
|
||||
);
|
||||
stats.sort((a, b) => a.stat.modified.compareTo(b.stat.modified));
|
||||
|
||||
var freedBytes = 0;
|
||||
final targetSize = (maxCacheBytes * 0.8).toInt(); // Free down to 80%
|
||||
final evictedKeys = <String>{};
|
||||
|
||||
for (final entry in stats) {
|
||||
if (currentSize - freedBytes <= targetSize) break;
|
||||
|
||||
final key = p.basenameWithoutExtension(entry.file.path);
|
||||
final metaFile = File(p.join(cacheDirectory, '$key.meta'));
|
||||
|
||||
try {
|
||||
final deletedBytes = await _ioSemaphore.execute(() async {
|
||||
await entry.file.delete();
|
||||
var bytes = entry.stat.size;
|
||||
if (await metaFile.exists()) {
|
||||
final metaStat = await metaFile.stat();
|
||||
await metaFile.delete();
|
||||
bytes += metaStat.size;
|
||||
}
|
||||
return bytes;
|
||||
});
|
||||
|
||||
freedBytes += deletedBytes;
|
||||
evictedKeys.add(key);
|
||||
} catch (e) {
|
||||
debugPrint('[ProviderTileCacheStore] Failed to evict $key: $e');
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up orphan .meta files (no matching .tile file).
|
||||
// Exclude keys we just evicted — their .tile is gone so they're orphans.
|
||||
final remainingTileKeys = tileFiles
|
||||
.map((f) => p.basenameWithoutExtension(f.path))
|
||||
.toSet()
|
||||
..removeAll(evictedKeys);
|
||||
for (final metaKey in metaFiles) {
|
||||
if (!remainingTileKeys.contains(metaKey)) {
|
||||
try {
|
||||
final orphan = File(p.join(cacheDirectory, '$metaKey.meta'));
|
||||
final orphanStat = await orphan.stat();
|
||||
await orphan.delete();
|
||||
freedBytes += orphanStat.size;
|
||||
} catch (_) {
|
||||
// Best-effort cleanup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_estimatedSize = currentSize - freedBytes;
|
||||
debugPrint(
|
||||
'[ProviderTileCacheStore] Evicted ${freedBytes ~/ 1024}KB '
|
||||
'from $cacheDirectory',
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('[ProviderTileCacheStore] Eviction error: $e');
|
||||
} finally {
|
||||
_isEvicting = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete all cached tiles in this store's directory.
|
||||
Future<void> clear() async {
|
||||
final dir = Directory(cacheDirectory);
|
||||
if (await dir.exists()) {
|
||||
await dir.delete(recursive: true);
|
||||
}
|
||||
_estimatedSize = null;
|
||||
_directoryReady = null; // Allow lazy re-creation
|
||||
_lastPruneCheck = null; // Reset throttle so next write can trigger eviction
|
||||
}
|
||||
|
||||
/// Get the current estimated cache size in bytes.
|
||||
Future<int> get estimatedSizeBytes => _getEstimatedSize();
|
||||
|
||||
/// Force an eviction check, bypassing the throttle.
|
||||
/// Only exposed for testing — production code uses [_scheduleEvictionCheck].
|
||||
@visibleForTesting
|
||||
Future<void> forceEviction() => _evictIfNeeded();
|
||||
}
|
||||
|
||||
/// Simple semaphore to limit concurrent operations and prevent resource exhaustion.
|
||||
class _Semaphore {
|
||||
final int maxCount;
|
||||
int _currentCount;
|
||||
final Queue<Completer<void>> _waitQueue = Queue<Completer<void>>();
|
||||
|
||||
_Semaphore(this.maxCount) : _currentCount = maxCount;
|
||||
|
||||
/// Acquire a permit. Returns a Future that completes when a permit is available.
|
||||
Future<void> acquire() {
|
||||
if (_currentCount > 0) {
|
||||
_currentCount--;
|
||||
return Future.value();
|
||||
} else {
|
||||
final completer = Completer<void>();
|
||||
_waitQueue.add(completer);
|
||||
return completer.future;
|
||||
}
|
||||
}
|
||||
|
||||
/// Release a permit, potentially unblocking a waiting operation.
|
||||
void release() {
|
||||
if (_waitQueue.isNotEmpty) {
|
||||
final completer = _waitQueue.removeFirst();
|
||||
completer.complete();
|
||||
} else {
|
||||
_currentCount++;
|
||||
}
|
||||
}
|
||||
|
||||
/// Execute a function while holding a permit.
|
||||
Future<T> execute<T>(Future<T> Function() operation) async {
|
||||
await acquire();
|
||||
try {
|
||||
return await operation();
|
||||
} finally {
|
||||
release();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import '../dev_config.dart';
|
||||
class RecentAlert {
|
||||
final int nodeId;
|
||||
final DateTime alertTime;
|
||||
|
||||
|
||||
RecentAlert({required this.nodeId, required this.alertTime});
|
||||
}
|
||||
|
||||
@@ -24,125 +24,189 @@ class ProximityAlertService {
|
||||
ProximityAlertService._internal();
|
||||
|
||||
FlutterLocalNotificationsPlugin? _notifications;
|
||||
bool _isInitialized = false;
|
||||
|
||||
|
||||
/// Whether the plugin itself is usable. Deliberately NOT derived from
|
||||
/// initialize()'s return value: on iOS that reports the outcome of the
|
||||
/// permission request, which we intentionally disable below, so it returns
|
||||
/// false even though the plugin works fine. Gating on it made every
|
||||
/// notification path dead on iOS.
|
||||
bool _pluginReady = false;
|
||||
|
||||
/// Guards against re-initializing on every settings visit.
|
||||
Future<void>? _initFuture;
|
||||
|
||||
// Simple in-memory tracking of recent alerts to prevent spam
|
||||
final List<RecentAlert> _recentAlerts = [];
|
||||
static const Duration _alertCooldown = kProximityAlertCooldown;
|
||||
|
||||
|
||||
// Callback for showing in-app visual alerts
|
||||
VoidCallback? _onVisualAlert;
|
||||
|
||||
/// Initialize the notification plugin and request permissions
|
||||
Future<void> initialize({VoidCallback? onVisualAlert}) async {
|
||||
_onVisualAlert = onVisualAlert;
|
||||
|
||||
|
||||
/// Initialize the notification plugin. Permissions are requested separately,
|
||||
/// on demand, when the user enables proximity alerts.
|
||||
Future<void> initialize({VoidCallback? onVisualAlert}) {
|
||||
if (onVisualAlert != null) _onVisualAlert = onVisualAlert;
|
||||
return _initFuture ??= _doInitialize();
|
||||
}
|
||||
|
||||
Future<void> _doInitialize() async {
|
||||
_notifications = FlutterLocalNotificationsPlugin();
|
||||
|
||||
|
||||
const androidSettings = AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
const iosSettings = DarwinInitializationSettings(
|
||||
requestAlertPermission: false,
|
||||
requestBadgePermission: false,
|
||||
requestSoundPermission: false,
|
||||
);
|
||||
|
||||
|
||||
const initSettings = InitializationSettings(
|
||||
android: androidSettings,
|
||||
iOS: iosSettings,
|
||||
);
|
||||
|
||||
|
||||
try {
|
||||
final initialized = await _notifications!.initialize(initSettings);
|
||||
_isInitialized = initialized ?? false;
|
||||
|
||||
// Note: We don't request notification permissions here anymore.
|
||||
// Permissions are requested on-demand when user enables proximity alerts.
|
||||
|
||||
debugPrint('[ProximityAlertService] Initialized: $_isInitialized (permissions deferred)');
|
||||
await _notifications!.initialize(initSettings);
|
||||
// Completing without throwing is the real signal that the plugin is up.
|
||||
_pluginReady = true;
|
||||
debugPrint('[ProximityAlertService] Plugin ready (permissions deferred)');
|
||||
} catch (e) {
|
||||
debugPrint('[ProximityAlertService] Failed to initialize: $e');
|
||||
_isInitialized = false;
|
||||
_pluginReady = false;
|
||||
_initFuture = null; // Allow a later retry
|
||||
}
|
||||
}
|
||||
|
||||
/// Ensure the plugin is up before touching it, so callers that arrive before
|
||||
/// MapView's fire-and-forget initialize() completes still work.
|
||||
Future<bool> _ensureReady() async {
|
||||
if (_pluginReady) return true;
|
||||
await initialize();
|
||||
return _pluginReady;
|
||||
}
|
||||
|
||||
/// Request notification permissions on both platforms
|
||||
/// Request notification permissions on both platforms.
|
||||
///
|
||||
/// Note that on iOS the system prompt appears only ONCE, ever. After the
|
||||
/// user has answered it, this call returns silently without showing
|
||||
/// anything — which is why callers must check the result and fall back to
|
||||
/// sending the user to system settings.
|
||||
Future<void> _requestNotificationPermissions() async {
|
||||
if (_notifications == null) return;
|
||||
|
||||
|
||||
try {
|
||||
// Request permissions - this will show the permission dialog on Android 13+
|
||||
final result = await _notifications!
|
||||
.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()
|
||||
?.requestNotificationsPermission();
|
||||
|
||||
debugPrint('[ProximityAlertService] Android notification permission result: $result');
|
||||
|
||||
// Also request for iOS (though this was already done in initialization)
|
||||
await _notifications!
|
||||
.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()
|
||||
?.requestPermissions(
|
||||
alert: true,
|
||||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
final android = _notifications!
|
||||
.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
|
||||
if (android != null) {
|
||||
final result = await android.requestNotificationsPermission();
|
||||
debugPrint('[ProximityAlertService] Android permission result: $result');
|
||||
return;
|
||||
}
|
||||
|
||||
final ios = _notifications!
|
||||
.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>();
|
||||
if (ios != null) {
|
||||
final result = await ios.requestPermissions(
|
||||
alert: true,
|
||||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
debugPrint('[ProximityAlertService] iOS permission result: $result');
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('[ProximityAlertService] Failed to request permissions: $e');
|
||||
}
|
||||
}
|
||||
|
||||
/// Open the OS settings page for this app, so the user can grant
|
||||
/// notifications after the one-shot iOS prompt has already been answered.
|
||||
/// Uses Geolocator's platform channel purely as a way to open app settings;
|
||||
/// it is not location-specific.
|
||||
Future<bool> openSystemSettings() async {
|
||||
try {
|
||||
return await Geolocator.openAppSettings();
|
||||
} catch (e) {
|
||||
debugPrint('[ProximityAlertService] Failed to open app settings: $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Check proximity to nodes and trigger alerts if needed
|
||||
/// This should be called on GPS position updates
|
||||
/// Check proximity to nodes and trigger alerts if needed.
|
||||
/// This should be called on GPS position updates.
|
||||
Future<void> checkProximity({
|
||||
required LatLng userLocation,
|
||||
required List<OsmNode> nodes,
|
||||
required List<NodeProfile> enabledProfiles,
|
||||
required int alertDistance,
|
||||
}) async {
|
||||
if (!_isInitialized || nodes.isEmpty) return;
|
||||
|
||||
if (!_pluginReady || nodes.isEmpty) return;
|
||||
|
||||
// Clean up old alerts (anything older than cooldown period)
|
||||
final cutoffTime = DateTime.now().subtract(_alertCooldown);
|
||||
_recentAlerts.removeWhere((alert) => alert.alertTime.isBefore(cutoffTime));
|
||||
|
||||
|
||||
// Check each node for proximity
|
||||
for (final node in nodes) {
|
||||
// Skip if we recently alerted for this node
|
||||
if (_recentAlerts.any((alert) => alert.nodeId == node.id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Calculate distance using Geolocator's distanceBetween
|
||||
if (_recentAlerts.any((alert) => alert.nodeId == node.id)) continue;
|
||||
|
||||
final distance = Geolocator.distanceBetween(
|
||||
userLocation.latitude,
|
||||
userLocation.longitude,
|
||||
node.coord.latitude,
|
||||
node.coord.longitude,
|
||||
);
|
||||
|
||||
// Check if within alert distance
|
||||
|
||||
if (distance <= alertDistance) {
|
||||
// Determine node type for alert message
|
||||
final nodeType = _getNodeTypeDescription(node, enabledProfiles);
|
||||
|
||||
// Trigger both push notification and visual alert
|
||||
|
||||
await _showNotification(node, nodeType, distance.round());
|
||||
_showVisualAlert();
|
||||
|
||||
// Track this alert to prevent spam
|
||||
_recentAlerts.add(RecentAlert(
|
||||
nodeId: node.id,
|
||||
alertTime: DateTime.now(),
|
||||
));
|
||||
|
||||
|
||||
_recentAlerts.add(RecentAlert(nodeId: node.id, alertTime: DateTime.now()));
|
||||
|
||||
debugPrint('[ProximityAlertService] Alert triggered for node ${node.id} ($nodeType) at ${distance.round()}m');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Notification IDs must fit in a signed 32-bit int, but OSM node IDs are
|
||||
/// well past that (currently ~12 billion), so passing one through raises
|
||||
/// "must fit within the size of a 32-bit integer" and the notification is
|
||||
/// dropped. Fold to a stable positive 31-bit value instead.
|
||||
///
|
||||
/// Deterministic across runs, so re-alerting for the same node replaces the
|
||||
/// existing notification rather than stacking a duplicate.
|
||||
static int _notificationId(int nodeId) => nodeId.abs() % 0x7FFFFFFF;
|
||||
|
||||
/// Show push notification for proximity alert
|
||||
Future<void> _showNotification(OsmNode node, String nodeType, int distance) async {
|
||||
if (!_isInitialized || _notifications == null) return;
|
||||
|
||||
await _show(
|
||||
id: _notificationId(node.id),
|
||||
title: 'Surveillance Device Nearby',
|
||||
body: '$nodeType detected ${distance}m ahead',
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _show({
|
||||
required int id,
|
||||
required String title,
|
||||
required String body,
|
||||
}) async {
|
||||
if (!_pluginReady || _notifications == null) {
|
||||
debugPrint('[ProximityAlertService] NOT SHOWN: plugin not ready');
|
||||
return;
|
||||
}
|
||||
|
||||
// A notification that silently no-ops because permission was never granted
|
||||
// is indistinguishable from one that was never triggered. Say which.
|
||||
if (!await areNotificationsEnabled()) {
|
||||
debugPrint(
|
||||
'[ProximityAlertService] NOT SHOWN: OS notification permission not '
|
||||
'granted. Settings → Proximity Alerts → Enable Notifications.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const androidDetails = AndroidNotificationDetails(
|
||||
'proximity_alerts',
|
||||
'Proximity Alerts',
|
||||
@@ -154,7 +218,13 @@ class ProximityAlertService {
|
||||
);
|
||||
|
||||
const iosDetails = DarwinNotificationDetails(
|
||||
// presentAlert is dead on iOS 14+: the plugin's willPresentNotification
|
||||
// only consults presentBanner/presentList there and ignores presentAlert
|
||||
// entirely. Setting just presentAlert produced no visible banner at all.
|
||||
// Keep it for iOS 13 and below, but presentBanner is what actually works.
|
||||
presentAlert: true,
|
||||
presentBanner: true,
|
||||
presentList: true,
|
||||
presentBadge: false,
|
||||
presentSound: true,
|
||||
);
|
||||
@@ -164,16 +234,16 @@ class ProximityAlertService {
|
||||
iOS: iosDetails,
|
||||
);
|
||||
|
||||
final title = 'Surveillance Device Nearby';
|
||||
final body = '$nodeType detected ${distance}m ahead';
|
||||
|
||||
try {
|
||||
await _notifications!.show(
|
||||
node.id, // Use node ID as notification ID
|
||||
id, // Use node ID as notification ID
|
||||
title,
|
||||
body,
|
||||
notificationDetails,
|
||||
);
|
||||
debugPrint('[ProximityAlertService] SHOWN id=$id "$title" — $body');
|
||||
} on ArgumentError catch (e) {
|
||||
debugPrint('[ProximityAlertService] Rejected notification id=$id: $e');
|
||||
} catch (e) {
|
||||
debugPrint('[ProximityAlertService] Failed to show notification: $e');
|
||||
}
|
||||
@@ -226,30 +296,46 @@ class ProximityAlertService {
|
||||
_recentAlerts.clear();
|
||||
}
|
||||
|
||||
/// Check if notification permissions are granted
|
||||
/// Check if notification permissions are granted.
|
||||
Future<bool> areNotificationsEnabled() async {
|
||||
if (!_isInitialized || _notifications == null) return false;
|
||||
|
||||
if (!await _ensureReady() || _notifications == null) return false;
|
||||
|
||||
try {
|
||||
// Check Android permissions
|
||||
final androidImpl = _notifications!
|
||||
.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
|
||||
if (androidImpl != null) {
|
||||
final result = await androidImpl.areNotificationsEnabled();
|
||||
return result ?? false;
|
||||
}
|
||||
|
||||
// For iOS, assume enabled if we got this far (permissions were requested during init)
|
||||
return true;
|
||||
|
||||
// iOS: actually ask the system rather than assuming. The old code
|
||||
// returned a blind `true` here, so the UI could never tell whether
|
||||
// notifications were really authorized.
|
||||
final iosImpl = _notifications!
|
||||
.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>();
|
||||
if (iosImpl != null) {
|
||||
final options = await iosImpl.checkPermissions();
|
||||
if (options == null) return false;
|
||||
return options.isEnabled || options.isProvisionalEnabled;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
debugPrint('[ProximityAlertService] Failed to check notification permissions: $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Request permissions again (can be called from settings)
|
||||
|
||||
/// Request permissions and report whether they ended up granted.
|
||||
///
|
||||
/// A `false` result does NOT mean the prompt was declined just now — on iOS
|
||||
/// the prompt may not have appeared at all because it was already answered
|
||||
/// in a previous launch. Callers should offer [openSystemSettings] on false.
|
||||
Future<bool> requestNotificationPermissions() async {
|
||||
if (!await _ensureReady()) return false;
|
||||
await _requestNotificationPermissions();
|
||||
return await areNotificationsEnabled();
|
||||
final enabled = await areNotificationsEnabled();
|
||||
debugPrint('[ProximityAlertService] Permissions after request: $enabled');
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,20 @@ import 'package:latlong2/latlong.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../app_state.dart';
|
||||
import '../dev_config.dart';
|
||||
import 'http_client.dart';
|
||||
import 'service_policy.dart';
|
||||
|
||||
class RouteResult {
|
||||
final List<LatLng> waypoints;
|
||||
final double distanceMeters;
|
||||
final double durationSeconds;
|
||||
|
||||
|
||||
const RouteResult({
|
||||
required this.waypoints,
|
||||
required this.distanceMeters,
|
||||
required this.durationSeconds,
|
||||
});
|
||||
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RouteResult(waypoints: ${waypoints.length}, distance: ${(distanceMeters/1000).toStringAsFixed(1)}km, duration: ${(durationSeconds/60).toStringAsFixed(1)}min)';
|
||||
@@ -25,10 +26,27 @@ class RouteResult {
|
||||
}
|
||||
|
||||
class RoutingService {
|
||||
static const String _baseUrl = 'https://alprwatch.org/api/v1/deflock/directions';
|
||||
static const String _userAgent = 'DeFlock/1.0 (OSM surveillance mapping app)';
|
||||
|
||||
// Calculate route between two points using alprwatch
|
||||
static const String defaultUrl = 'https://api.dontgetflocked.com/api/v1/deflock/directions';
|
||||
static const String fallbackUrl = 'https://alprwatch.org/api/v1/deflock/directions';
|
||||
static const _policy = ResiliencePolicy(
|
||||
maxRetries: 1,
|
||||
httpTimeout: Duration(seconds: 30),
|
||||
);
|
||||
|
||||
final http.Client _client;
|
||||
/// Optional override URL. When null, uses [defaultUrl].
|
||||
final String? _baseUrlOverride;
|
||||
|
||||
RoutingService({http.Client? client, String? baseUrl})
|
||||
: _client = client ?? UserAgentClient(),
|
||||
_baseUrlOverride = baseUrl;
|
||||
|
||||
void close() => _client.close();
|
||||
|
||||
/// Resolve the primary URL to use: constructor override or default.
|
||||
String get _primaryUrl => _baseUrlOverride ?? defaultUrl;
|
||||
|
||||
// Calculate route between two points
|
||||
Future<RouteResult> calculateRoute({
|
||||
required LatLng start,
|
||||
required LatLng end,
|
||||
@@ -36,18 +54,19 @@ class RoutingService {
|
||||
debugPrint('[RoutingService] Calculating route from $start to $end');
|
||||
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final avoidance_distance = await prefs.getInt('navigation_avoidance_distance');
|
||||
final avoidanceDistance = prefs.getInt('navigation_avoidance_distance') ?? 250;
|
||||
|
||||
final enabled_profiles = AppState.instance.enabledProfiles.map((p) {
|
||||
final enabledProfiles = AppState.instance.enabledProfiles.map((p) {
|
||||
final full = p.toJson();
|
||||
final tags = Map<String, String>.from(full['tags'] as Map);
|
||||
tags.removeWhere((key, value) => value.isEmpty);
|
||||
return {
|
||||
'id': full['id'],
|
||||
'name': full['name'],
|
||||
'tags': full['tags'],
|
||||
'tags': tags,
|
||||
};
|
||||
}).toList();
|
||||
|
||||
final uri = Uri.parse('$_baseUrl');
|
||||
|
||||
final params = {
|
||||
'start': {
|
||||
'longitude': start.longitude,
|
||||
@@ -57,42 +76,66 @@ class RoutingService {
|
||||
'longitude': end.longitude,
|
||||
'latitude': end.latitude
|
||||
},
|
||||
'avoidance_distance': avoidance_distance,
|
||||
'enabled_profiles': enabled_profiles,
|
||||
'show_exclusion_zone': false, // for debugging: if true, returns a GeoJSON Feature MultiPolygon showing what areas are avoided in calculating the route
|
||||
'avoidance_distance': avoidanceDistance,
|
||||
'enabled_profiles': enabledProfiles,
|
||||
'show_exclusion_zone': false,
|
||||
};
|
||||
|
||||
debugPrint('[RoutingService] alprwatch request: $uri $params');
|
||||
|
||||
|
||||
final primaryUrl = _primaryUrl;
|
||||
final canFallback = _baseUrlOverride == null;
|
||||
|
||||
return executeWithFallback<RouteResult>(
|
||||
primaryUrl: primaryUrl,
|
||||
fallbackUrl: canFallback ? fallbackUrl : null,
|
||||
execute: (url) => _postRoute(url, params),
|
||||
classifyError: _classifyError,
|
||||
policy: _policy,
|
||||
);
|
||||
}
|
||||
|
||||
Future<RouteResult> _postRoute(String url, Map<String, dynamic> params) async {
|
||||
final uri = Uri.parse(url);
|
||||
debugPrint('[RoutingService] POST $uri');
|
||||
|
||||
try {
|
||||
final response = await http.post(
|
||||
final response = await _client.post(
|
||||
uri,
|
||||
headers: {
|
||||
'User-Agent': _userAgent,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: json.encode(params)
|
||||
).timeout(kNavigationRoutingTimeout);
|
||||
).timeout(_policy.httpTimeout);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
throw RoutingException('HTTP ${response.statusCode}: ${response.reasonPhrase}');
|
||||
if (kDebugMode) {
|
||||
debugPrint('[RoutingService] Error response body: ${response.body}');
|
||||
} else {
|
||||
const maxLen = 500;
|
||||
final body = response.body;
|
||||
final truncated = body.length > maxLen
|
||||
? '${body.substring(0, maxLen)}… [truncated]'
|
||||
: body;
|
||||
debugPrint('[RoutingService] Error response body ($maxLen char max): $truncated');
|
||||
}
|
||||
throw RoutingException('HTTP ${response.statusCode}: ${response.reasonPhrase}',
|
||||
statusCode: response.statusCode);
|
||||
}
|
||||
|
||||
|
||||
final data = json.decode(response.body) as Map<String, dynamic>;
|
||||
debugPrint('[RoutingService] alprwatch response data: $data');
|
||||
|
||||
// Check alprwatch response status
|
||||
debugPrint('[RoutingService] response data: $data');
|
||||
|
||||
// Check response status
|
||||
final ok = data['ok'] as bool? ?? false;
|
||||
if ( ! ok ) {
|
||||
final message = data['error'] as String? ?? 'Unknown routing error';
|
||||
throw RoutingException('alprwatch error: $message');
|
||||
throw RoutingException('API error: $message', isApiError: true);
|
||||
}
|
||||
|
||||
|
||||
final route = data['result']['route'] as Map<String, dynamic>?;
|
||||
if (route == null) {
|
||||
throw RoutingException('No route found between these points');
|
||||
throw RoutingException('No route found between these points', isApiError: true);
|
||||
}
|
||||
|
||||
|
||||
final waypoints = (route['coordinates'] as List<dynamic>?)
|
||||
?.map((inner) {
|
||||
final pair = inner as List<dynamic>;
|
||||
@@ -100,19 +143,19 @@ class RoutingService {
|
||||
final lng = (pair[0] as num).toDouble();
|
||||
final lat = (pair[1] as num).toDouble();
|
||||
return LatLng(lat, lng);
|
||||
}).whereType<LatLng>().toList() ?? [];
|
||||
}).whereType<LatLng>().toList() ?? [];
|
||||
final distance = (route['distance'] as num?)?.toDouble() ?? 0.0;
|
||||
final duration = (route['duration'] as num?)?.toDouble() ?? 0.0;
|
||||
|
||||
|
||||
final result = RouteResult(
|
||||
waypoints: waypoints,
|
||||
distanceMeters: distance,
|
||||
durationSeconds: duration,
|
||||
);
|
||||
|
||||
|
||||
debugPrint('[RoutingService] Route calculated: $result');
|
||||
return result;
|
||||
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('[RoutingService] Route calculation failed: $e');
|
||||
if (e is RoutingException) {
|
||||
@@ -122,13 +165,26 @@ class RoutingService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static ErrorDisposition _classifyError(Object error) {
|
||||
if (error is! RoutingException) return ErrorDisposition.retry;
|
||||
if (error.isApiError) return ErrorDisposition.abort;
|
||||
final status = error.statusCode;
|
||||
if (status != null && status >= 400 && status < 500) {
|
||||
if (status == 429) return ErrorDisposition.fallback;
|
||||
return ErrorDisposition.abort;
|
||||
}
|
||||
return ErrorDisposition.retry;
|
||||
}
|
||||
}
|
||||
|
||||
class RoutingException implements Exception {
|
||||
final String message;
|
||||
|
||||
const RoutingException(this.message);
|
||||
|
||||
final int? statusCode;
|
||||
final bool isApiError;
|
||||
|
||||
const RoutingException(this.message, {this.statusCode, this.isApiError = false});
|
||||
|
||||
@override
|
||||
String toString() => 'RoutingException: $message';
|
||||
}
|
||||
@@ -1,17 +1,35 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_map/flutter_map.dart' show LatLngBounds;
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
import '../models/search_result.dart';
|
||||
import 'http_client.dart';
|
||||
import 'service_policy.dart';
|
||||
|
||||
/// Cached search result with expiry.
|
||||
class _CachedResult {
|
||||
final List<SearchResult> results;
|
||||
final DateTime cachedAt;
|
||||
|
||||
_CachedResult(this.results) : cachedAt = DateTime.now();
|
||||
|
||||
bool get isExpired =>
|
||||
DateTime.now().difference(cachedAt) > const Duration(minutes: 5);
|
||||
}
|
||||
|
||||
class SearchService {
|
||||
static const String _baseUrl = 'https://nominatim.openstreetmap.org';
|
||||
static const String _userAgent = 'DeFlock/1.0 (OSM surveillance mapping app)';
|
||||
static const int _maxResults = 5;
|
||||
static const Duration _timeout = Duration(seconds: 10);
|
||||
|
||||
final _client = UserAgentClient();
|
||||
|
||||
/// Client-side result cache, keyed by normalized query + viewbox.
|
||||
/// Required by Nominatim usage policy. Static so all SearchService
|
||||
/// instances share the cache and don't generate redundant requests.
|
||||
static final Map<String, _CachedResult> _resultCache = {};
|
||||
|
||||
|
||||
/// Search for places using Nominatim geocoding service
|
||||
Future<List<SearchResult>> search(String query, {LatLngBounds? viewbox}) async {
|
||||
if (query.trim().isEmpty) {
|
||||
@@ -27,23 +45,23 @@ class SearchService {
|
||||
// Otherwise, use Nominatim API
|
||||
return await _searchNominatim(query.trim(), viewbox: viewbox);
|
||||
}
|
||||
|
||||
|
||||
/// Try to parse various coordinate formats
|
||||
SearchResult? _tryParseCoordinates(String query) {
|
||||
// Remove common separators and normalize
|
||||
final normalized = query.replaceAll(RegExp(r'[,;]'), ' ').trim();
|
||||
final parts = normalized.split(RegExp(r'\s+'));
|
||||
|
||||
|
||||
if (parts.length != 2) return null;
|
||||
|
||||
|
||||
final lat = double.tryParse(parts[0]);
|
||||
final lon = double.tryParse(parts[1]);
|
||||
|
||||
|
||||
if (lat == null || lon == null) return null;
|
||||
|
||||
|
||||
// Basic validation for Earth coordinates
|
||||
if (lat < -90 || lat > 90 || lon < -180 || lon > 180) return null;
|
||||
|
||||
|
||||
return SearchResult(
|
||||
displayName: 'Coordinates: ${lat.toStringAsFixed(6)}, ${lon.toStringAsFixed(6)}',
|
||||
coordinates: LatLng(lat, lon),
|
||||
@@ -51,17 +69,17 @@ class SearchService {
|
||||
type: 'point',
|
||||
);
|
||||
}
|
||||
|
||||
/// Search using Nominatim API
|
||||
Future<List<SearchResult>> _searchNominatim(String query, {LatLngBounds? viewbox}) async {
|
||||
final params = {
|
||||
'q': query,
|
||||
'format': 'json',
|
||||
'limit': _maxResults.toString(),
|
||||
'addressdetails': '1',
|
||||
'extratags': '1',
|
||||
};
|
||||
|
||||
/// Search using Nominatim API with rate limiting and result caching.
|
||||
///
|
||||
/// Nominatim usage policy requires:
|
||||
/// - Max 1 request per second
|
||||
/// - Client-side result caching
|
||||
/// - No auto-complete / typeahead
|
||||
Future<List<SearchResult>> _searchNominatim(String query, {LatLngBounds? viewbox}) async {
|
||||
// Normalize the viewbox first so both the cache key and the request
|
||||
// params use the same effective values (rounded + min-span expanded).
|
||||
String? viewboxParam;
|
||||
if (viewbox != null) {
|
||||
double round1(double v) => (v * 10).round() / 10;
|
||||
var west = round1(viewbox.west);
|
||||
@@ -80,36 +98,83 @@ class SearchService {
|
||||
north = mid + 0.25;
|
||||
}
|
||||
|
||||
params['viewbox'] = '$west,$north,$east,$south';
|
||||
viewboxParam = '$west,$north,$east,$south';
|
||||
}
|
||||
|
||||
final cacheKey = _buildCacheKey(query, viewboxParam);
|
||||
|
||||
// Check cache first (Nominatim policy requires client-side caching)
|
||||
final cached = _resultCache[cacheKey];
|
||||
if (cached != null && !cached.isExpired) {
|
||||
debugPrint('[SearchService] Cache hit for "$query"');
|
||||
return cached.results;
|
||||
}
|
||||
|
||||
final params = {
|
||||
'q': query,
|
||||
'format': 'json',
|
||||
'limit': _maxResults.toString(),
|
||||
'addressdetails': '1',
|
||||
'extratags': '1',
|
||||
};
|
||||
|
||||
if (viewboxParam != null) {
|
||||
params['viewbox'] = viewboxParam;
|
||||
}
|
||||
|
||||
final uri = Uri.parse('$_baseUrl/search').replace(queryParameters: params);
|
||||
|
||||
|
||||
debugPrint('[SearchService] Searching Nominatim: $uri');
|
||||
|
||||
|
||||
// Rate limit: max 1 request/sec per Nominatim policy
|
||||
await ServiceRateLimiter.acquire(ServiceType.nominatim);
|
||||
try {
|
||||
final response = await http.get(
|
||||
uri,
|
||||
headers: {
|
||||
'User-Agent': _userAgent,
|
||||
},
|
||||
).timeout(_timeout);
|
||||
|
||||
final response = await _client.get(uri).timeout(_timeout);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
throw Exception('HTTP ${response.statusCode}: ${response.reasonPhrase}');
|
||||
}
|
||||
|
||||
|
||||
final List<dynamic> jsonResults = json.decode(response.body);
|
||||
final results = jsonResults
|
||||
.map((json) => SearchResult.fromNominatim(json as Map<String, dynamic>))
|
||||
.toList();
|
||||
|
||||
|
||||
// Cache the results
|
||||
_resultCache[cacheKey] = _CachedResult(results);
|
||||
_pruneCache();
|
||||
|
||||
debugPrint('[SearchService] Found ${results.length} results');
|
||||
return results;
|
||||
|
||||
} catch (e) {
|
||||
} catch (e, stackTrace) {
|
||||
debugPrint('[SearchService] Search failed: $e');
|
||||
throw Exception('Search failed: $e');
|
||||
Error.throwWithStackTrace(e, stackTrace);
|
||||
} finally {
|
||||
ServiceRateLimiter.release(ServiceType.nominatim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Build a cache key from the query and the already-normalized viewbox string.
|
||||
///
|
||||
/// The viewbox should be the same `west,north,east,south` string sent to
|
||||
/// Nominatim (after rounding and min-span expansion) so that requests with
|
||||
/// different raw bounds but the same effective viewbox share a cache entry.
|
||||
String _buildCacheKey(String query, String? viewboxParam) {
|
||||
final normalizedQuery = query.trim().toLowerCase();
|
||||
if (viewboxParam == null) return normalizedQuery;
|
||||
return '$normalizedQuery|$viewboxParam';
|
||||
}
|
||||
|
||||
/// Remove expired entries and limit cache size.
|
||||
void _pruneCache() {
|
||||
_resultCache.removeWhere((_, cached) => cached.isExpired);
|
||||
// Limit cache to 50 entries to prevent unbounded growth
|
||||
if (_resultCache.length > 50) {
|
||||
final sortedKeys = _resultCache.keys.toList()
|
||||
..sort((a, b) => _resultCache[a]!.cachedAt.compareTo(_resultCache[b]!.cachedAt));
|
||||
for (final key in sortedKeys.take(_resultCache.length - 50)) {
|
||||
_resultCache.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 179 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user