waiting for ios review
This commit is contained in:
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
This is "SkyContour" (project/code name: sfzenith), a Flutter application targeting iOS, Android, macOS, Linux, Windows, and web platforms. It is a horizon-profiling tool for astrophotography: the user pans the phone camera around the horizon to record azimuth→altitude points and exports them for N.I.N.A. (.hrz) and Stellarium (360° panorama landscape). The authoritative spec is the designer handoff in **docs/** — read docs/README.md first (then SPEC.md, ARCHITECTURE.md, FORMATS.md, design/tokens.json). **docs/SPECIFICATION.md** tracks project-level decisions, current status and the roadmap. The functional prototype is the pure Rust core (`core/`), the wasm-bindgen adapter (`wasm/src/lib.rs`) and the React frontend (`wasm/frontend/`); the Flutter app is a thin native shell that runs the web build in a WebView. App ID on both platforms: `com.sagifer.skycontour` (never change it once published); the visible name comes from `wasm/frontend/src/lib/app.js` (APP_NAME), iOS Info.plist CFBundleDisplayName and Android android:label.
|
This is "SkyContour" (project/code name: sfzenith), a Flutter application targeting iOS, Android, macOS, Linux, Windows, and web platforms. It is a horizon-profiling tool for astrophotography: the user pans the phone camera around the horizon to record azimuth→altitude points and exports them for N.I.N.A. (.hrz) and Stellarium (360° panorama landscape). The authoritative spec is the designer handoff in **docs/** — read docs/README.md first (then SPEC.md, ARCHITECTURE.md, FORMATS.md, design/tokens.json). **docs/SPECIFICATION.md** tracks project-level decisions, current status and the roadmap. The functional prototype is the pure Rust core (`core/`), the wasm-bindgen adapter (`wasm/src/lib.rs`) and the React frontend (`wasm/frontend/`); the Flutter app is a thin native shell that runs the web build in a WebView. App IDs: iOS `com.sagifer.skycontour.ios` (the plain ID is held by a free Personal Team registration), Android `com.sagifer.skycontour` — never change them once published; iOS signing team `8EQZ487TY9` (individual account, not the GARAND DESIGN company team); the visible name comes from `wasm/frontend/src/lib/app.js` (APP_NAME), iOS Info.plist CFBundleDisplayName and Android android:label.
|
||||||
|
|
||||||
## Common Commands
|
## Common Commands
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ npm run dev
|
|||||||
- **wasm/**: thin wasm-bindgen adapter (camera, canvas, orientation glue) + JS-facing wrappers of the core exporters. Profiles cross the boundary as a 360-value Float64Array (index = azimuth degree, measured frame); exporters apply the north offset.
|
- **wasm/**: thin wasm-bindgen adapter (camera, canvas, orientation glue) + JS-facing wrappers of the core exporters. Profiles cross the boundary as a 360-value Float64Array (index = azimuth degree, measured frame); exporters apply the north offset.
|
||||||
- **wasm/frontend/**: Vite + React UI — `src/screens/` (Sites, Setup, Capture, Review, Export, Settings, Calibrate), `src/lib/` (wasm loader, store = localStorage + IndexedDB strips, camera/sensors, survey = capture session + cached wasm `HorizonSurvey`, files = save/share incl. Flutter handlers). Desktop testing: open with `?sim` for a keyboard-driven fake compass (arrow keys), `?skipWelcome` to skip the first-run screen.
|
- **wasm/frontend/**: Vite + React UI — `src/screens/` (Sites, Setup, Capture, Review, Export, Settings, Calibrate), `src/lib/` (wasm loader, store = localStorage + IndexedDB strips, camera/sensors, survey = capture session + cached wasm `HorizonSurvey`, files = save/share incl. Flutter handlers). Desktop testing: open with `?sim` for a keyboard-driven fake compass (arrow keys), `?skipWelcome` to skip the first-run screen.
|
||||||
- **i18n** (`wasm/frontend/src/i18n/`): every UI string goes through `t('key', params)`; English (`locales/en.js`) is the source and fallback; es, ar (RTL), de, hu, pl, fr, it, sk follow the system language, overridable in Settings. Plurals are objects keyed by Intl.PluralRules category. Add a key to **all** locale files and run `npm run i18n:check` (from wasm/frontend/). Native shell strings: tab labels come from the web app; iOS permission prompts live in `ios/Runner/<lang>.lproj/InfoPlist.strings`. Exported files (.hrz, landscape.ini) stay English.
|
- **i18n** (`wasm/frontend/src/i18n/`): every UI string goes through `t('key', params)`; English (`locales/en.js`) is the source and fallback; es, ar (RTL), de, hu, pl, fr, it, sk follow the system language, overridable in Settings. Plurals are objects keyed by Intl.PluralRules category. Add a key to **all** locale files and run `npm run i18n:check` (from wasm/frontend/). Native shell strings: tab labels come from the web app; iOS permission prompts live in `ios/Runner/<lang>.lproj/InfoPlist.strings`. Exported files (.hrz, landscape.ini) stay English.
|
||||||
- **lib/main.dart**: Flutter Android shell — serves `assets/web/` on localhost:8080 in an InAppWebView, grants camera, saves PNGs to the gallery
|
- **lib/main.dart**: Flutter Android shell — serves `assets/web/` on localhost:47391 (`lib/local_server.dart`; the port is part of the storage origin, never change it) in an InAppWebView, recovers server/page after suspension, grants camera, saves PNGs to the gallery
|
||||||
- **test/**: Widget tests using `flutter_test` package
|
- **test/**: Widget tests using `flutter_test` package
|
||||||
- Uses `flutter_lints` for static analysis (configured in `analysis_options.yaml`)
|
- Uses `flutter_lints` for static analysis (configured in `analysis_options.yaml`)
|
||||||
- SDK requirement: Dart ^3.11.1
|
- SDK requirement: Dart ^3.11.1
|
||||||
|
|||||||
@@ -45,9 +45,12 @@ A natív app a webes buildet futtatja WebView-ban; előtte mindig: `./scripts/bu
|
|||||||
./scripts/install_ios.sh # web build + iOS build + telepítés a csatlakoztatott iPhone-ra
|
./scripts/install_ios.sh # web build + iOS build + telepítés a csatlakoztatott iPhone-ra
|
||||||
```
|
```
|
||||||
|
|
||||||
- Aláírás: Personal Team (`FT7JEH2UPE`), app-azonosító mindkét platformon `com.sagifer.skycontour`. Más fióknál: Xcode › Runner › Signing & Capabilities › Team.
|
- Aláírás: egyéni fejlesztői fiók, Team ID `8EQZ487TY9` (Ferenc Sági, Individual – **nem** a céges GARAND DESIGN). App-azonosító: iOS `com.sagifer.skycontour.ios`, Android `com.sagifer.skycontour`.
|
||||||
|
- **App Store-kiadás:** emeld a build-számot a `pubspec.yaml`-ban (`version: 1.0.0+N`), majd `./scripts/ios_release.sh --upload` (ellenőrzés + feltöltés; `--upload` nélkül csak ellenőriz).
|
||||||
|
- A szkript a Flutter által készített `.ipa`-t **helyben újra aláírja**: az Apple felhős aláírója az ékezetes névnél („Sági”) hibás követelményt ír a binárisokba (ITMS-90035, Unicode-normalizálási hiba), ezért saját Distribution tanúsítvánnyal és csapatazonosítóra épülő követelménnyel írunk alá.
|
||||||
|
- Egyszeri beállítás (már megvan): `python3 scripts/asc_signing_setup.py --key-id HGF8KY67BH --issuer <Issuer ID>` – tanúsítvány, App Store-profil és külön kulcskarika (`skycontour-signing`). API-kulcs: `~/.appstoreconnect/private_keys/`, aláíró fájlok: `~/.appstoreconnect/skycontour/` (a repón kívül).
|
||||||
- Első indítás előtt a telefonon: Beállítások › Általános › VPN és eszközkezelés › a fejlesztői profil › Megbízom. iOS 16-tól a Developer Mode is kell (Beállítások › Adatvédelem és biztonság).
|
- Első indítás előtt a telefonon: Beállítások › Általános › VPN és eszközkezelés › a fejlesztői profil › Megbízom. iOS 16-tól a Developer Mode is kell (Beállítások › Adatvédelem és biztonság).
|
||||||
- Ingyenes fióknál az app 7 nap után lejár: futtasd újra a szkriptet.
|
- A fejlesztői telepítés egy évig érvényes (fizetős fiók); a Personal Team-mel 7 nap volt.
|
||||||
- Mentett exportok: Fájlok app › Az iPhone-on › SkyContour.
|
- Mentett exportok: Fájlok app › Az iPhone-on › SkyContour.
|
||||||
|
|
||||||
### Fejlesztői kapcsolók
|
### Fejlesztői kapcsolók
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.example.sfzenith
|
package com.example.sfzenith
|
||||||
|
|
||||||
import android.content.ContentValues
|
import android.content.ContentValues
|
||||||
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
import android.os.Environment
|
import android.os.Environment
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.webkit.MimeTypeMap
|
import android.webkit.MimeTypeMap
|
||||||
@@ -11,6 +13,16 @@ import io.flutter.plugin.common.MethodChannel
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class MainActivity : FlutterActivity() {
|
class MainActivity : FlutterActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
// Opened first from the installer (or adb), Android starts a second copy of
|
||||||
|
// the app from the launcher icon. Close it so the running one comes back.
|
||||||
|
val i = intent
|
||||||
|
if (!isTaskRoot && i != null && i.action == Intent.ACTION_MAIN && i.hasCategory(Intent.CATEGORY_LAUNCHER)) {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||||
super.configureFlutterEngine(flutterEngine)
|
super.configureFlutterEngine(flutterEngine)
|
||||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "sfzenith/files")
|
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "sfzenith/files")
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,8 +8,8 @@
|
|||||||
<meta name="theme-color" content="#0A0D13" />
|
<meta name="theme-color" content="#0A0D13" />
|
||||||
<style>html, body { background: #04060B; }</style>
|
<style>html, body { background: #04060B; }</style>
|
||||||
<title>SkyContour</title>
|
<title>SkyContour</title>
|
||||||
<script type="module" crossorigin src="/assets/index-tqL3FGAB.js"></script>
|
<script type="module" crossorigin src="/assets/index-BCj7raNO.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BkmYwRWO.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-De78_CBu.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ Ez a fájl csak a projekt-szintű döntéseket, az aktuális állapotot és a ny
|
|||||||
4. **Orientáció.** Hosszabb távon kvaternió (ENU). A jelenlegi kód alpha/beta/gamma forgatásmátrixa (`core/src/projection.rs`) már teljes 3D-s, a régi `beta − 90` képlet nincs használatban.
|
4. **Orientáció.** Hosszabb távon kvaternió (ENU). A jelenlegi kód alpha/beta/gamma forgatásmátrixa (`core/src/projection.rs`) már teljes 3D-s, a régi `beta − 90` képlet nincs használatban.
|
||||||
5. **Platform.** A webes UI fut böngészőben és az app WebView-jában is. A Flutter csak vékony natív héj (Android kész). Natív kamera-adapter csak akkor lesz, ha a webes korlátok (pl. expozíció-zár) miatt muszáj. A v1.0 flutter_rust_bridge-terve ezzel **kikerült**.
|
5. **Platform.** A webes UI fut böngészőben és az app WebView-jában is. A Flutter csak vékony natív héj (Android kész). Natív kamera-adapter csak akkor lesz, ha a webes korlátok (pl. expozíció-zár) miatt muszáj. A v1.0 flutter_rust_bridge-terve ezzel **kikerült**.
|
||||||
6. **Fejlesztési mód.** A telefonon felvett session (`session.json` + `sensors.jsonl` + képkockák) asztali böngészőben és unit tesztekben visszajátszható. A felismerés és a varrás finomhangolása így telepítés nélkül megy.
|
6. **Fejlesztési mód.** A telefonon felvett session (`session.json` + `sensors.jsonl` + képkockák) asztali böngészőben és unit tesztekben visszajátszható. A felismerés és a varrás finomhangolása így telepítés nélkül megy.
|
||||||
7. **Név és azonosító** (2026-10-24): az app neve **SkyContour** (a „Horizon(s)” név mindkét áruházban túlzsúfolt, és két közvetlen iOS-versenytárs is használja). App-azonosító iOS-en és Androidon: `com.sagifer.skycontour`. A kódnév (sfzenith) belül marad: Dart-csomag, Rust crate, tárolókulcsok.
|
7. **Név és azonosító** (2026-10-24): az app neve **SkyContour** (a „Horizon(s)” név mindkét áruházban túlzsúfolt, és két közvetlen iOS-versenytárs is használja). App-azonosító: Android `com.sagifer.skycontour`, iOS `com.sagifer.skycontour.ios` (a sima azonosítót egy korábbi ingyenes Personal Team-es telepítés lefoglalta). iOS-aláírás: egyéni fejlesztői fiók, Team ID `8EQZ487TY9`. A kódnév (sfzenith) belül marad: Dart-csomag, Rust crate, tárolókulcsok.
|
||||||
|
|
||||||
## A v1.0-ból érvényben marad
|
## A v1.0-ból érvényben marad
|
||||||
|
|
||||||
- **FOV-források sorrendje**: mért (élő kalibráció két átfedő képből, már működik) → eszköztábla → kézi → alapérték. A forrás a sessionben `device.camera.fovSource` néven tárolódik.
|
- **FOV-források sorrendje**: mért (élő kalibráció két átfedő képből, már működik) → eszköztábla → kézi → alapérték. A forrás a sessionben `device.camera.fovSource` néven tárolódik.
|
||||||
- **Secure origin**: kamera és szenzor csak HTTPS vagy `localhost` alól érhető el. Fejlesztéshez marad a `wasm/serve.py` / Vite basic-ssl; az Android-héj `http://localhost:8080`-at szolgál ki.
|
- **Secure origin**: kamera és szenzor csak HTTPS vagy `localhost` alól érhető el. Fejlesztéshez marad a `wasm/serve.py` / Vite basic-ssl; a natív héj `http://localhost:47391`-et szolgál ki (lib/local_server.dart). A port a tárolási origin része: a helyszínek a localStorage/IndexedDB-ben ehhez kötődnek, kiadás után nem szabad változtatni.
|
||||||
- **iOS 13+**: a `DeviceOrientationEvent.requestPermission()` csak felhasználói gesztusból hívható (a Setup „Start capture” gombján).
|
- **iOS 13+**: a `DeviceOrientationEvent.requestPermission()` csak felhasználói gesztusból hívható (a Setup „Start capture” gombján).
|
||||||
- **Offline működés**: a WMM-együtthatók és a betűtípusok (Barlow, IBM Plex Mono) a buildbe ágyazva, CDN nélkül.
|
- **Offline működés**: a WMM-együtthatók és a betűtípusok (Barlow, IBM Plex Mono) a buildbe ágyazva, CDN nélkül.
|
||||||
- **Csak álló tájolás**, a képernyő ébren tartása felvétel közben.
|
- **Csak álló tájolás**, a képernyő ébren tartása felvétel közben.
|
||||||
|
|||||||
+3
-1
@@ -45,7 +45,9 @@ post_install do |installer|
|
|||||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
|
||||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] += [
|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] += [
|
||||||
'PERMISSION_CAMERA=1',
|
'PERMISSION_CAMERA=1',
|
||||||
'PERMISSION_LOCATION=1',
|
# When-in-use only: PERMISSION_LOCATION=1 would also compile in
|
||||||
|
# requestAlwaysAuthorization, and App Store Connect then asks for
|
||||||
|
# NSLocationAlwaysAndWhenInUseUsageDescription (ITMS-90683).
|
||||||
'PERMISSION_LOCATION_WHENINUSE=1',
|
'PERMISSION_LOCATION_WHENINUSE=1',
|
||||||
'PERMISSION_SENSORS=1',
|
'PERMISSION_SENSORS=1',
|
||||||
'PERMISSION_PHOTOS_ADD_ONLY=1',
|
'PERMISSION_PHOTOS_ADD_ONLY=1',
|
||||||
|
|||||||
+1
-1
@@ -65,6 +65,6 @@ SPEC CHECKSUMS:
|
|||||||
share_plus: eccd7beb7cea61271aeed1800e8ccb2b952c0c7f
|
share_plus: eccd7beb7cea61271aeed1800e8ccb2b952c0c7f
|
||||||
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
||||||
|
|
||||||
PODFILE CHECKSUM: 1b16605139afd04e89e0ef255dccb0721ee7ba35
|
PODFILE CHECKSUM: 17917671543e4a41e7292789614f3f7a7d1a0d9c
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
@@ -516,7 +516,7 @@
|
|||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
@@ -528,14 +528,14 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = FT7JEH2UPE;
|
DEVELOPMENT_TEAM = 8EQZ487TY9;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -552,7 +552,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -570,7 +570,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@@ -586,7 +586,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@@ -646,7 +646,7 @@
|
|||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -699,7 +699,7 @@
|
|||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -711,14 +711,14 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = FT7JEH2UPE;
|
DEVELOPMENT_TEAM = 8EQZ487TY9;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -734,14 +734,14 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = FT7JEH2UPE;
|
DEVELOPMENT_TEAM = 8EQZ487TY9;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour;
|
PRODUCT_BUNDLE_IDENTIFIER = com.sagifer.skycontour.ios;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
+95
-93
@@ -1,100 +1,102 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>SkyContour</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLocalizations</key>
|
||||||
|
<array>
|
||||||
|
<string>en</string>
|
||||||
|
<string>es</string>
|
||||||
|
<string>ar</string>
|
||||||
|
<string>de</string>
|
||||||
|
<string>hu</string>
|
||||||
|
<string>pl</string>
|
||||||
|
<string>fr</string>
|
||||||
|
<string>it</string>
|
||||||
|
<string>sk</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>SkyContour</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>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
<false/>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>NSAllowsLocalNetworking</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>SkyContour</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleLocalizations</key>
|
|
||||||
<array>
|
|
||||||
<string>en</string>
|
|
||||||
<string>es</string>
|
|
||||||
<string>ar</string>
|
|
||||||
<string>de</string>
|
|
||||||
<string>hu</string>
|
|
||||||
<string>pl</string>
|
|
||||||
<string>fr</string>
|
|
||||||
<string>it</string>
|
|
||||||
<string>sk</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>SkyContour</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>LSSupportsOpeningDocumentsInPlace</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSAppTransportSecurity</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSAllowsLocalNetworking</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>The camera photographs the horizon around you to build your horizon profile and panorama.</string>
|
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
|
||||||
<string>Your location is written into the Stellarium landscape so the sky matches your site.</string>
|
|
||||||
<key>NSMotionUsageDescription</key>
|
|
||||||
<string>Compass and tilt tell the app where each photo points.</string>
|
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
||||||
<string>Lets you save panorama images to your photo library.</string>
|
|
||||||
<key>UIApplicationSceneManifest</key>
|
|
||||||
<dict>
|
|
||||||
<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>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
|
||||||
<key>UISceneStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIFileSharingEnabled</key>
|
|
||||||
<true/>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UIRequiresFullScreen</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIStatusBarHidden</key>
|
|
||||||
<false/>
|
|
||||||
<key>UIStatusBarStyle</key>
|
|
||||||
<string>UIStatusBarStyleLightContent</string>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>The camera photographs the horizon around you to build your horizon profile and panorama.</string>
|
||||||
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
|
<string>Your location is written into the Stellarium landscape so the sky matches your site.</string>
|
||||||
|
<key>NSMotionUsageDescription</key>
|
||||||
|
<string>Compass and tilt tell the app where each photo points.</string>
|
||||||
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
<string>Lets you save panorama images to your photo library.</string>
|
||||||
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
<dict>
|
||||||
|
<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>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||||
|
<key>UISceneStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIFileSharingEnabled</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UIRequiresFullScreen</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIStatusBarHidden</key>
|
||||||
|
<false/>
|
||||||
|
<key>UIStatusBarStyle</key>
|
||||||
|
<string>UIStatusBarStyleLightContent</string>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/services.dart' show rootBundle;
|
||||||
|
|
||||||
|
/// Serves the bundled web build (assets/web) on http://localhost:[port].
|
||||||
|
///
|
||||||
|
/// Replaces flutter_inappwebview's InAppLocalhostServer, whose start() never
|
||||||
|
/// completes when the port is taken (the app then stays on a dark screen):
|
||||||
|
/// * binds with `shared: true`, so a second Flutter engine in the same
|
||||||
|
/// process (Android can start a second activity instance) can serve too;
|
||||||
|
/// * retries for a while, then throws, so the shell can show an error;
|
||||||
|
/// * [healthy] / [ensureRunning] detect a socket the OS took away while the
|
||||||
|
/// app was suspended (iOS) and bind again.
|
||||||
|
///
|
||||||
|
/// The port is part of the page origin: localStorage and IndexedDB (the
|
||||||
|
/// user's sites) belong to it. Never change it after release.
|
||||||
|
class LocalServer {
|
||||||
|
LocalServer({this.port = 47391, this.documentRoot = 'assets/web/'});
|
||||||
|
|
||||||
|
final int port;
|
||||||
|
final String documentRoot;
|
||||||
|
HttpServer? _server;
|
||||||
|
|
||||||
|
String get origin => 'http://localhost:$port';
|
||||||
|
|
||||||
|
Future<void> start({Duration timeout = const Duration(seconds: 8)}) async {
|
||||||
|
if (_server != null) return;
|
||||||
|
final deadline = DateTime.now().add(timeout);
|
||||||
|
Object? lastError;
|
||||||
|
while (true) {
|
||||||
|
try {
|
||||||
|
final server = await HttpServer.bind(InternetAddress.loopbackIPv4, port, shared: true);
|
||||||
|
_server = server;
|
||||||
|
server.listen(
|
||||||
|
_handle,
|
||||||
|
onError: (Object _) {},
|
||||||
|
onDone: () {
|
||||||
|
if (identical(_server, server)) _server = null;
|
||||||
|
},
|
||||||
|
cancelOnError: false,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
} catch (e) {
|
||||||
|
lastError = e;
|
||||||
|
if (DateTime.now().isAfter(deadline)) break;
|
||||||
|
await Future<void>.delayed(const Duration(milliseconds: 400));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw Exception('Local server could not use port $port: $lastError');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> stop() async {
|
||||||
|
final s = _server;
|
||||||
|
_server = null;
|
||||||
|
try {
|
||||||
|
await s?.close(force: true);
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// True when index.html can be fetched right now.
|
||||||
|
Future<bool> healthy() async {
|
||||||
|
if (_server == null) return false;
|
||||||
|
final client = HttpClient()..connectionTimeout = const Duration(seconds: 1);
|
||||||
|
try {
|
||||||
|
final req = await client.getUrl(Uri.parse('$origin/index.html')).timeout(const Duration(seconds: 2));
|
||||||
|
final res = await req.close().timeout(const Duration(seconds: 2));
|
||||||
|
await res.drain<void>();
|
||||||
|
return res.statusCode == 200;
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
client.close(force: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Binds again if the server is gone or not answering.
|
||||||
|
Future<void> ensureRunning() async {
|
||||||
|
if (await healthy()) return;
|
||||||
|
await stop();
|
||||||
|
await start();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _handle(HttpRequest request) async {
|
||||||
|
final res = request.response;
|
||||||
|
try {
|
||||||
|
var path = Uri.decodeFull(request.uri.path);
|
||||||
|
if (path.startsWith('/')) path = path.substring(1);
|
||||||
|
if (path.isEmpty || path.endsWith('/')) path += 'index.html';
|
||||||
|
if (path.split('/').contains('..')) {
|
||||||
|
res.statusCode = HttpStatus.forbidden;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final data = await rootBundle.load('$documentRoot$path');
|
||||||
|
res.headers.contentType = _contentType(path);
|
||||||
|
res.headers.set(HttpHeaders.cacheControlHeader, 'no-cache');
|
||||||
|
res.add(data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes));
|
||||||
|
} catch (_) {
|
||||||
|
res.statusCode = HttpStatus.notFound;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
await res.close();
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static ContentType _contentType(String path) {
|
||||||
|
final ext = path.contains('.') ? path.substring(path.lastIndexOf('.') + 1).toLowerCase() : '';
|
||||||
|
switch (ext) {
|
||||||
|
case 'html':
|
||||||
|
return ContentType('text', 'html', charset: 'utf-8');
|
||||||
|
case 'js':
|
||||||
|
case 'mjs':
|
||||||
|
return ContentType('text', 'javascript', charset: 'utf-8');
|
||||||
|
case 'css':
|
||||||
|
return ContentType('text', 'css', charset: 'utf-8');
|
||||||
|
case 'json':
|
||||||
|
case 'webmanifest':
|
||||||
|
return ContentType('application', 'json', charset: 'utf-8');
|
||||||
|
case 'wasm':
|
||||||
|
return ContentType('application', 'wasm');
|
||||||
|
case 'svg':
|
||||||
|
return ContentType('image', 'svg+xml');
|
||||||
|
case 'png':
|
||||||
|
return ContentType('image', 'png');
|
||||||
|
case 'jpg':
|
||||||
|
case 'jpeg':
|
||||||
|
return ContentType('image', 'jpeg');
|
||||||
|
case 'ico':
|
||||||
|
return ContentType('image', 'x-icon');
|
||||||
|
case 'woff':
|
||||||
|
return ContentType('font', 'woff');
|
||||||
|
case 'woff2':
|
||||||
|
return ContentType('font', 'woff2');
|
||||||
|
case 'txt':
|
||||||
|
return ContentType('text', 'plain', charset: 'utf-8');
|
||||||
|
default:
|
||||||
|
return ContentType('application', 'octet-stream');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+100
-13
@@ -11,12 +11,16 @@ import 'package:permission_handler/permission_handler.dart';
|
|||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||||
|
|
||||||
|
import 'local_server.dart';
|
||||||
|
|
||||||
/// SkyContour native shell.
|
/// SkyContour native shell.
|
||||||
///
|
///
|
||||||
/// The whole app is the React + WASM web build bundled under assets/web/
|
/// The whole app is the React + WASM web build bundled under assets/web/
|
||||||
/// (see scripts/build_web.sh). This shell:
|
/// (see scripts/build_web.sh). This shell:
|
||||||
/// * serves that build over http://localhost:8080 (a secure context, so the
|
/// * serves that build over http://localhost (a secure context, so the
|
||||||
/// WebView's camera, motion sensors and geolocation work),
|
/// WebView's camera, motion sensors and geolocation work; see
|
||||||
|
/// local_server.dart) and brings server and page back after the OS
|
||||||
|
/// suspended the app or killed the WebView's process,
|
||||||
/// * asks for the OS camera and location permissions and grants them to the
|
/// * asks for the OS camera and location permissions and grants them to the
|
||||||
/// WebView,
|
/// WebView,
|
||||||
/// * saves export files (Android: Downloads, iOS: Files › SkyContour) and
|
/// * saves export files (Android: Downloads, iOS: Files › SkyContour) and
|
||||||
@@ -81,18 +85,20 @@ class WebShell extends StatefulWidget {
|
|||||||
State<WebShell> createState() => _WebShellState();
|
State<WebShell> createState() => _WebShellState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WebShellState extends State<WebShell> {
|
class _WebShellState extends State<WebShell> with WidgetsBindingObserver {
|
||||||
static const _files = MethodChannel('sfzenith/files');
|
static const _files = MethodChannel('sfzenith/files');
|
||||||
|
|
||||||
final InAppLocalhostServer _server = InAppLocalhostServer(
|
final LocalServer _server = LocalServer();
|
||||||
documentRoot: 'assets/web',
|
|
||||||
port: 8080,
|
|
||||||
);
|
|
||||||
|
|
||||||
InAppWebViewController? _controller;
|
InAppWebViewController? _controller;
|
||||||
bool _ready = false;
|
bool _ready = false;
|
||||||
String? _error;
|
String? _error;
|
||||||
|
|
||||||
|
/// A new key builds a fresh WebView (after its content process died).
|
||||||
|
Key _webKey = UniqueKey();
|
||||||
|
bool _recovering = false;
|
||||||
|
int _loadRetries = 0;
|
||||||
|
|
||||||
/// Selected tab while the bar is shown; null = hidden (survey flow, welcome).
|
/// Selected tab while the bar is shown; null = hidden (survey flow, welcome).
|
||||||
int? _tab;
|
int? _tab;
|
||||||
|
|
||||||
@@ -103,27 +109,79 @@ class _WebShellState extends State<WebShell> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
WidgetsBinding.instance.addObserver(this);
|
||||||
_boot();
|
_boot();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _boot() async {
|
Future<void> _boot() async {
|
||||||
|
if (mounted) setState(() => _error = null);
|
||||||
try {
|
try {
|
||||||
// Ask up front: getUserMedia/geolocation inside the WebView only work
|
// Ask up front: getUserMedia/geolocation inside the WebView only work
|
||||||
// once the app itself holds the OS permissions.
|
// once the app itself holds the OS permissions.
|
||||||
await [Permission.camera, Permission.locationWhenInUse].request();
|
await [Permission.camera, Permission.locationWhenInUse].request();
|
||||||
if (!_server.isRunning()) await _server.start();
|
await _server.start();
|
||||||
if (mounted) setState(() => _ready = true);
|
if (mounted) setState(() => _ready = true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (mounted) setState(() => _error = 'Could not start: $e');
|
if (mounted) setState(() => _error = 'SkyContour could not start.\n\n$e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_server.close();
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
|
_server.stop();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
|
if (state == AppLifecycleState.resumed && _ready) _recover();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Back from the background: iOS may have taken the server's socket and
|
||||||
|
/// killed the page's process while the app was suspended.
|
||||||
|
Future<void> _recover({bool forceNewWebView = false}) async {
|
||||||
|
if (_recovering) return;
|
||||||
|
_recovering = true;
|
||||||
|
try {
|
||||||
|
await _server.ensureRunning();
|
||||||
|
if (forceNewWebView || !await _pageAlive()) _newWebView();
|
||||||
|
if (mounted && _error != null) setState(() => _error = null);
|
||||||
|
} catch (e) {
|
||||||
|
if (mounted) setState(() => _error = 'SkyContour could not start.\n\n$e');
|
||||||
|
} finally {
|
||||||
|
_recovering = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<bool> _pageAlive() async {
|
||||||
|
final c = _controller;
|
||||||
|
if (c == null) return false;
|
||||||
|
try {
|
||||||
|
final n = await c
|
||||||
|
.evaluateJavascript(source: "(document.getElementById('root') || {}).childElementCount || 0")
|
||||||
|
.timeout(const Duration(seconds: 2));
|
||||||
|
return n is num && n > 0;
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _newWebView() {
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() {
|
||||||
|
_controller = null;
|
||||||
|
_webKey = UniqueKey();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The page itself failed to load (server not answering): bind again, retry a few times.
|
||||||
|
void _onMainFrameError() {
|
||||||
|
if (_loadRetries >= 3) return;
|
||||||
|
_loadRetries++;
|
||||||
|
Future<void>.delayed(Duration(milliseconds: 400 * _loadRetries), () => _recover(forceNewWebView: true));
|
||||||
|
}
|
||||||
|
|
||||||
Future<String> _saveOne(_WebFile f) async {
|
Future<String> _saveOne(_WebFile f) async {
|
||||||
final args = {'name': f.name, 'mime': f.mime, 'bytes': f.bytes};
|
final args = {'name': f.name, 'mime': f.mime, 'bytes': f.bytes};
|
||||||
try {
|
try {
|
||||||
@@ -246,7 +304,25 @@ class _WebShellState extends State<WebShell> {
|
|||||||
body = Center(
|
body = Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Text(_error!, textAlign: TextAlign.center),
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(_error!, textAlign: TextAlign.center),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
FilledButton(
|
||||||
|
style: FilledButton.styleFrom(backgroundColor: _accent, foregroundColor: Colors.black),
|
||||||
|
onPressed: () {
|
||||||
|
_loadRetries = 0;
|
||||||
|
if (_ready) {
|
||||||
|
_recover(forceNewWebView: true);
|
||||||
|
} else {
|
||||||
|
_boot();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: const Text('Try again'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (!_ready) {
|
} else if (!_ready) {
|
||||||
@@ -254,11 +330,21 @@ class _WebShellState extends State<WebShell> {
|
|||||||
body = const SizedBox.expand();
|
body = const SizedBox.expand();
|
||||||
} else {
|
} else {
|
||||||
body = InAppWebView(
|
body = InAppWebView(
|
||||||
initialUrlRequest: URLRequest(url: WebUri('http://localhost:8080/index.html$_devQuery')),
|
key: _webKey,
|
||||||
|
initialUrlRequest: URLRequest(url: WebUri('${_server.origin}/index.html$_devQuery')),
|
||||||
initialUserScripts: UnmodifiableListView([
|
initialUserScripts: UnmodifiableListView([
|
||||||
UserScript(source: _insetsScript(), injectionTime: UserScriptInjectionTime.AT_DOCUMENT_START),
|
UserScript(source: _insetsScript(), injectionTime: UserScriptInjectionTime.AT_DOCUMENT_START),
|
||||||
]),
|
]),
|
||||||
onLoadStop: (controller, url) => _pushInsets(),
|
onLoadStop: (controller, url) {
|
||||||
|
_loadRetries = 0;
|
||||||
|
_pushInsets();
|
||||||
|
},
|
||||||
|
onReceivedError: (controller, request, error) {
|
||||||
|
if (request.isForMainFrame ?? true) _onMainFrameError();
|
||||||
|
},
|
||||||
|
// The OS killed the page's process (memory, background): start a fresh WebView.
|
||||||
|
onWebContentProcessDidTerminate: (controller) => _recover(forceNewWebView: true),
|
||||||
|
onRenderProcessGone: (controller, detail) => _recover(forceNewWebView: true),
|
||||||
initialSettings: InAppWebViewSettings(
|
initialSettings: InAppWebViewSettings(
|
||||||
mediaPlaybackRequiresUserGesture: false,
|
mediaPlaybackRequiresUserGesture: false,
|
||||||
allowsInlineMediaPlayback: true,
|
allowsInlineMediaPlayback: true,
|
||||||
@@ -276,6 +362,7 @@ class _WebShellState extends State<WebShell> {
|
|||||||
// Feels like an app, not a page: no pinch zoom.
|
// Feels like an app, not a page: no pinch zoom.
|
||||||
supportZoom: false,
|
supportZoom: false,
|
||||||
builtInZoomControls: false,
|
builtInZoomControls: false,
|
||||||
|
useOnRenderProcessGone: true,
|
||||||
),
|
),
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
_controller = controller;
|
_controller = controller;
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.0+1
|
version: 1.0.0+5
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.1
|
sdk: ^3.11.1
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
"""Minimal App Store Connect API client (JWT with the .p8 key in
|
||||||
|
~/.appstoreconnect/private_keys). Used by the release/metadata scripts."""
|
||||||
|
import base64
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from cryptography.hazmat.primitives import hashes, serialization
|
||||||
|
from cryptography.hazmat.primitives.asymmetric import ec
|
||||||
|
from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature
|
||||||
|
|
||||||
|
API = 'https://api.appstoreconnect.apple.com'
|
||||||
|
KEY_ID = os.environ.get('ASC_KEY_ID', 'HGF8KY67BH')
|
||||||
|
ISSUER = os.environ.get('ASC_ISSUER', '69a6de8c-48b0-47e3-e053-5b8c7c11a4d1')
|
||||||
|
BUNDLE_ID = 'com.sagifer.skycontour.ios'
|
||||||
|
|
||||||
|
|
||||||
|
def _b64url(b):
|
||||||
|
return base64.urlsafe_b64encode(b).rstrip(b'=').decode()
|
||||||
|
|
||||||
|
|
||||||
|
class AscError(RuntimeError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class Asc:
|
||||||
|
def __init__(self, key_id=KEY_ID, issuer=ISSUER):
|
||||||
|
self.key_id, self.issuer = key_id, issuer
|
||||||
|
path = Path.home() / f'.appstoreconnect/private_keys/AuthKey_{key_id}.p8'
|
||||||
|
self.key = serialization.load_pem_private_key(path.read_bytes(), None)
|
||||||
|
self._token, self._exp = None, 0
|
||||||
|
|
||||||
|
def token(self):
|
||||||
|
now = int(time.time())
|
||||||
|
if not self._token or now > self._exp - 60:
|
||||||
|
head = _b64url(json.dumps({'alg': 'ES256', 'kid': self.key_id, 'typ': 'JWT'}).encode())
|
||||||
|
body = _b64url(json.dumps({'iss': self.issuer, 'iat': now, 'exp': now + 1200,
|
||||||
|
'aud': 'appstoreconnect-v1'}).encode())
|
||||||
|
r, s = decode_dss_signature(self.key.sign(f'{head}.{body}'.encode(), ec.ECDSA(hashes.SHA256())))
|
||||||
|
self._token = f'{head}.{body}.{_b64url(r.to_bytes(32, "big") + s.to_bytes(32, "big"))}'
|
||||||
|
self._exp = now + 1200
|
||||||
|
return self._token
|
||||||
|
|
||||||
|
def call(self, method, path, body=None, ok=(200, 201, 204)):
|
||||||
|
url = path if path.startswith('http') else API + path
|
||||||
|
req = urllib.request.Request(url, method=method, data=json.dumps(body).encode() if body is not None else None,
|
||||||
|
headers={'Authorization': f'Bearer {self.token()}',
|
||||||
|
'Content-Type': 'application/json'})
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(req, timeout=120) as r:
|
||||||
|
raw = r.read()
|
||||||
|
return json.loads(raw) if raw else {}
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
if e.code in ok:
|
||||||
|
return {}
|
||||||
|
raise AscError(f'{method} {path} → HTTP {e.code}: {e.read().decode()[:1500]}') from None
|
||||||
|
|
||||||
|
def get(self, path):
|
||||||
|
return self.call('GET', path)
|
||||||
|
|
||||||
|
def all(self, path):
|
||||||
|
"""Follow paging links; returns the concatenated data list."""
|
||||||
|
out, url = [], path
|
||||||
|
while url:
|
||||||
|
res = self.get(url)
|
||||||
|
out += res.get('data', [])
|
||||||
|
url = res.get('links', {}).get('next')
|
||||||
|
return out
|
||||||
|
|
||||||
|
def app(self):
|
||||||
|
apps = self.get(f'/v1/apps?filter[bundleId]={BUNDLE_ID}')['data']
|
||||||
|
if not apps:
|
||||||
|
raise AscError(f'no App Store Connect app for {BUNDLE_ID}')
|
||||||
|
return apps[0]
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""One-time App Store signing setup through the App Store Connect API.
|
||||||
|
|
||||||
|
Why: Apple's cloud-managed distribution signing writes the certificate name
|
||||||
|
into each binary's designated requirement in Unicode-decomposed form
|
||||||
|
("Sági"), while the certificate itself holds the composed form ("Sági").
|
||||||
|
The requirement then never matches and App Store Connect rejects the upload
|
||||||
|
(ITMS-90035). Signing locally with our own distribution certificate and an
|
||||||
|
explicit, ASCII-only requirement avoids that (see scripts/ios_release.sh).
|
||||||
|
|
||||||
|
This script:
|
||||||
|
1. checks the app record and bundle ID exist,
|
||||||
|
2. creates a local key + Apple Distribution certificate (reuses it if present),
|
||||||
|
3. creates an App Store provisioning profile for it,
|
||||||
|
4. puts key + certificate into a dedicated keychain (not the login keychain).
|
||||||
|
|
||||||
|
Secrets stay outside the repo in ~/.appstoreconnect/skycontour/.
|
||||||
|
Usage: python3 scripts/asc_signing_setup.py --key-id KEY --issuer ISSUER
|
||||||
|
"""
|
||||||
|
import argparse
|
||||||
|
import base64
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import secrets
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from cryptography import x509
|
||||||
|
from cryptography.hazmat.primitives import hashes, serialization
|
||||||
|
from cryptography.hazmat.primitives.asymmetric import ec, rsa
|
||||||
|
from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature
|
||||||
|
from cryptography.x509.oid import NameOID
|
||||||
|
|
||||||
|
BUNDLE_ID = 'com.sagifer.skycontour.ios'
|
||||||
|
TEAM_ID = '8EQZ487TY9'
|
||||||
|
API = 'https://api.appstoreconnect.apple.com/v1'
|
||||||
|
HOME = Path.home() / '.appstoreconnect'
|
||||||
|
OUT = HOME / 'skycontour'
|
||||||
|
KEYCHAIN = Path.home() / 'Library/Keychains/skycontour-signing.keychain-db'
|
||||||
|
|
||||||
|
|
||||||
|
def b64url(b):
|
||||||
|
return base64.urlsafe_b64encode(b).rstrip(b'=').decode()
|
||||||
|
|
||||||
|
|
||||||
|
def jwt(key_id, issuer):
|
||||||
|
key = serialization.load_pem_private_key((HOME / f'private_keys/AuthKey_{key_id}.p8').read_bytes(), None)
|
||||||
|
now = int(time.time())
|
||||||
|
head = b64url(json.dumps({'alg': 'ES256', 'kid': key_id, 'typ': 'JWT'}).encode())
|
||||||
|
body = b64url(json.dumps({'iss': issuer, 'iat': now, 'exp': now + 900, 'aud': 'appstoreconnect-v1'}).encode())
|
||||||
|
r, s = decode_dss_signature(key.sign(f'{head}.{body}'.encode(), ec.ECDSA(hashes.SHA256())))
|
||||||
|
return f'{head}.{body}.{b64url(r.to_bytes(32, "big") + s.to_bytes(32, "big"))}'
|
||||||
|
|
||||||
|
|
||||||
|
class Api:
|
||||||
|
def __init__(self, key_id, issuer):
|
||||||
|
self.token = jwt(key_id, issuer)
|
||||||
|
|
||||||
|
def call(self, method, path, body=None):
|
||||||
|
req = urllib.request.Request(API + path, method=method, data=json.dumps(body).encode() if body else None,
|
||||||
|
headers={'Authorization': f'Bearer {self.token}', 'Content-Type': 'application/json'})
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(req, timeout=60) as r:
|
||||||
|
return json.loads(r.read() or b'{}')
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
sys.exit(f'{method} {path} → HTTP {e.code}: {e.read().decode()[:600]}')
|
||||||
|
|
||||||
|
|
||||||
|
def sh(*args, check=True):
|
||||||
|
return subprocess.run(args, check=check, capture_output=True, text=True)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
ap = argparse.ArgumentParser()
|
||||||
|
ap.add_argument('--key-id', required=True)
|
||||||
|
ap.add_argument('--issuer', required=True)
|
||||||
|
a = ap.parse_args()
|
||||||
|
OUT.mkdir(parents=True, exist_ok=True)
|
||||||
|
os.chmod(OUT, 0o700)
|
||||||
|
api = Api(a.key_id, a.issuer)
|
||||||
|
|
||||||
|
# 1. App record + bundle ID
|
||||||
|
bid = [b for b in api.call('GET', f'/bundleIds?filter[identifier]={BUNDLE_ID}&limit=50')['data']
|
||||||
|
if b['attributes']['identifier'] == BUNDLE_ID]
|
||||||
|
if not bid:
|
||||||
|
sys.exit(f'Bundle ID {BUNDLE_ID} is not registered for this team')
|
||||||
|
bundle_id = bid[0]['id']
|
||||||
|
apps = api.call('GET', f'/apps?filter[bundleId]={BUNDLE_ID}')['data']
|
||||||
|
print('app record:', apps[0]['attributes']['name'] if apps else 'MISSING (create it in App Store Connect)')
|
||||||
|
|
||||||
|
# 2. Distribution certificate (reuse ours if the key is still here)
|
||||||
|
key_path, cert_path, meta_path = OUT / 'distribution.key.pem', OUT / 'distribution.cer', OUT / 'meta.json'
|
||||||
|
meta = json.loads(meta_path.read_text()) if meta_path.exists() else {}
|
||||||
|
if key_path.exists() and cert_path.exists() and meta.get('certificateId'):
|
||||||
|
print('reusing local distribution certificate', meta['certificateId'])
|
||||||
|
key = serialization.load_pem_private_key(key_path.read_bytes(), None)
|
||||||
|
cert = x509.load_der_x509_certificate(cert_path.read_bytes())
|
||||||
|
else:
|
||||||
|
key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
|
||||||
|
key_path.write_bytes(key.private_bytes(serialization.Encoding.PEM, serialization.PrivateFormat.PKCS8,
|
||||||
|
serialization.NoEncryption()))
|
||||||
|
os.chmod(key_path, 0o600)
|
||||||
|
csr = (x509.CertificateSigningRequestBuilder()
|
||||||
|
.subject_name(x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, 'SkyContour distribution')]))
|
||||||
|
.sign(key, hashes.SHA256()))
|
||||||
|
res = api.call('POST', '/certificates', {'data': {'type': 'certificates', 'attributes': {
|
||||||
|
'certificateType': 'DISTRIBUTION', 'csrContent': csr.public_bytes(serialization.Encoding.PEM).decode()}}})
|
||||||
|
der = base64.b64decode(res['data']['attributes']['certificateContent'])
|
||||||
|
cert_path.write_bytes(der)
|
||||||
|
cert = x509.load_der_x509_certificate(der)
|
||||||
|
meta['certificateId'] = res['data']['id']
|
||||||
|
print('created distribution certificate', meta['certificateId'], 'expires', cert.not_valid_after_utc.date())
|
||||||
|
|
||||||
|
meta['certificateSha1'] = cert.fingerprint(hashes.SHA1()).hex().upper()
|
||||||
|
meta_path.write_text(json.dumps(meta, indent=2))
|
||||||
|
|
||||||
|
# 3. App Store profile bound to this certificate (reused while it exists)
|
||||||
|
prof = OUT / 'appstore.mobileprovision'
|
||||||
|
if prof.exists() and meta.get('profileId'):
|
||||||
|
print('reusing App Store profile', meta['profileId'])
|
||||||
|
else:
|
||||||
|
res = api.call('POST', '/profiles', {'data': {'type': 'profiles',
|
||||||
|
'attributes': {'name': f'SkyContour App Store {time.strftime("%Y%m%d-%H%M%S")}', 'profileType': 'IOS_APP_STORE'},
|
||||||
|
'relationships': {'bundleId': {'data': {'type': 'bundleIds', 'id': bundle_id}},
|
||||||
|
'certificates': {'data': [{'type': 'certificates', 'id': meta['certificateId']}]}}}})
|
||||||
|
prof.write_bytes(base64.b64decode(res['data']['attributes']['profileContent']))
|
||||||
|
meta['profileId'] = res['data']['id']
|
||||||
|
meta_path.write_text(json.dumps(meta, indent=2))
|
||||||
|
print('created App Store profile', res['data']['attributes']['name'])
|
||||||
|
|
||||||
|
# 4. Dedicated keychain with key + certificate (codesign can use it without prompts)
|
||||||
|
pw_path = OUT / 'keychain.password'
|
||||||
|
if not pw_path.exists():
|
||||||
|
pw_path.write_text(secrets.token_urlsafe(24))
|
||||||
|
os.chmod(pw_path, 0o600)
|
||||||
|
pw = pw_path.read_text().strip()
|
||||||
|
if not KEYCHAIN.exists():
|
||||||
|
sh('security', 'create-keychain', '-p', pw, str(KEYCHAIN))
|
||||||
|
sh('security', 'unlock-keychain', '-p', pw, str(KEYCHAIN))
|
||||||
|
sh('security', 'set-keychain-settings', str(KEYCHAIN)) # no auto-lock
|
||||||
|
# Key and certificate separately: macOS `security` cannot read the modern
|
||||||
|
# (AES/PBKDF2) PKCS#12 files that Python/OpenSSL 3 write by default.
|
||||||
|
(OUT / 'distribution.p12').unlink(missing_ok=True) # left over by an older version
|
||||||
|
if not sh('security', 'find-identity', '-v', '-p', 'codesigning', str(KEYCHAIN)).stdout.count(')') :
|
||||||
|
# `security` wants the traditional "BEGIN RSA PRIVATE KEY" form, not PKCS#8.
|
||||||
|
legacy = OUT / 'distribution.rsa.pem'
|
||||||
|
legacy.write_bytes(key.private_bytes(serialization.Encoding.PEM, serialization.PrivateFormat.TraditionalOpenSSL,
|
||||||
|
serialization.NoEncryption()))
|
||||||
|
os.chmod(legacy, 0o600)
|
||||||
|
try:
|
||||||
|
for path, kind, fmt in ((legacy, 'priv', 'openssl'), (cert_path, 'cert', 'x509')):
|
||||||
|
r = sh('security', 'import', str(path), '-k', str(KEYCHAIN), '-t', kind, '-f', fmt,
|
||||||
|
'-T', '/usr/bin/codesign', check=False)
|
||||||
|
if r.returncode != 0 and 'already exists' not in r.stderr:
|
||||||
|
sys.exit(f'keychain import of {path.name} failed: {r.stderr.strip()}')
|
||||||
|
finally:
|
||||||
|
legacy.unlink(missing_ok=True)
|
||||||
|
r = sh('security', 'set-key-partition-list', '-S', 'apple-tool:,apple:,codesign:', '-s', '-k', pw,
|
||||||
|
str(KEYCHAIN), check=False)
|
||||||
|
if r.returncode != 0:
|
||||||
|
sys.exit('set-key-partition-list failed: ' + r.stderr.strip())
|
||||||
|
listed = sh('security', 'list-keychains', '-d', 'user').stdout.split()
|
||||||
|
listed = [k.strip('"') for k in listed]
|
||||||
|
if str(KEYCHAIN) not in listed:
|
||||||
|
sh('security', 'list-keychains', '-d', 'user', '-s', *listed, str(KEYCHAIN))
|
||||||
|
ident = sh('security', 'find-identity', '-v', '-p', 'codesigning', str(KEYCHAIN)).stdout.strip()
|
||||||
|
print(ident)
|
||||||
|
if meta['certificateSha1'] not in ident:
|
||||||
|
sys.exit('the distribution identity is not usable in the signing keychain')
|
||||||
|
print('signing identity SHA1:', meta['certificateSha1'], '| team', TEAM_ID)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
@@ -23,5 +23,5 @@ echo "==> Done. assets/web/ contents:"
|
|||||||
ls -la assets/web
|
ls -la assets/web
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Flutter will serve this at http://localhost:8080 via InAppLocalhostServer."
|
echo "Flutter will serve this at http://localhost:47391 (lib/local_server.dart)."
|
||||||
echo "Remember to run 'flutter pub get' if pubspec assets changed."
|
echo "Remember to run 'flutter pub get' if pubspec assets changed."
|
||||||
|
|||||||
@@ -51,4 +51,4 @@ echo "==> Installing"
|
|||||||
xcrun devicectl device install app --device "$DEVICE" "$APP"
|
xcrun devicectl device install app --device "$DEVICE" "$APP"
|
||||||
|
|
||||||
echo "==> Launching (first time: trust the developer on the phone, see README)"
|
echo "==> Launching (first time: trust the developer on the phone, see README)"
|
||||||
xcrun devicectl device process launch --device "$DEVICE" com.sagifer.skycontour || true
|
xcrun devicectl device process launch --device "$DEVICE" com.sagifer.skycontour.ios || true
|
||||||
|
|||||||
Executable
+84
@@ -0,0 +1,84 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build the App Store IPA, re-sign it locally and validate (or upload) it.
|
||||||
|
#
|
||||||
|
# Why the re-sign: Apple's cloud-managed distribution signing stores the
|
||||||
|
# certificate name ("Apple Distribution: Ferenc Sági (8EQZ487TY9)") in each
|
||||||
|
# binary's designated requirement in decomposed Unicode ("Sági"); the
|
||||||
|
# certificate holds the composed form, so the requirement never matches and
|
||||||
|
# App Store Connect rejects the build (ITMS-90035). We sign with our own
|
||||||
|
# distribution certificate (scripts/asc_signing_setup.py) and an explicit
|
||||||
|
# ASCII-only requirement keyed on the team ID.
|
||||||
|
#
|
||||||
|
# Usage: ./scripts/ios_release.sh [--upload]
|
||||||
|
# Needs: ~/.appstoreconnect/private_keys/AuthKey_<KEY>.p8 and the setup above.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
KEY_ID="${ASC_KEY_ID:-HGF8KY67BH}"
|
||||||
|
ISSUER="${ASC_ISSUER:-69a6de8c-48b0-47e3-e053-5b8c7c11a4d1}"
|
||||||
|
TEAM_ID="8EQZ487TY9"
|
||||||
|
SIGN_DIR="$HOME/.appstoreconnect/skycontour"
|
||||||
|
KEYCHAIN="$HOME/Library/Keychains/skycontour-signing.keychain-db"
|
||||||
|
|
||||||
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
cd "$ROOT"
|
||||||
|
|
||||||
|
# Non-login shells may lack flutter on PATH: fall back to the SDK recorded by Android tooling.
|
||||||
|
if ! command -v flutter >/dev/null; then
|
||||||
|
FLUTTER_SDK="$(sed -n 's/^flutter.sdk=//p' android/local.properties 2>/dev/null)"
|
||||||
|
[ -x "$FLUTTER_SDK/bin/flutter" ] && export PATH="$FLUTTER_SDK/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -f "$SIGN_DIR/meta.json" ] || { echo "Run scripts/asc_signing_setup.py first." >&2; exit 1; }
|
||||||
|
SHA1="$(python3 -I -c 'import json,sys; print(json.load(open(sys.argv[1]))["certificateSha1"])' "$SIGN_DIR/meta.json")"
|
||||||
|
PROFILE="$SIGN_DIR/appstore.mobileprovision"
|
||||||
|
security unlock-keychain -p "$(cat "$SIGN_DIR/keychain.password")" "$KEYCHAIN"
|
||||||
|
|
||||||
|
echo "==> Web bundle + App Store IPA"
|
||||||
|
./scripts/build_web.sh > /dev/null
|
||||||
|
flutter build ipa --release
|
||||||
|
|
||||||
|
WORK="$(mktemp -d)"
|
||||||
|
trap 'rm -rf "$WORK"' EXIT
|
||||||
|
( cd "$WORK" && unzip -q "$ROOT/build/ios/ipa/SkyContour.ipa" )
|
||||||
|
APP="$WORK/Payload/Runner.app"
|
||||||
|
|
||||||
|
# Same entitlements as Xcode produced (application-identifier, team, beta reports).
|
||||||
|
codesign -d --entitlements :- "$APP" > "$WORK/entitlements.plist" 2>/dev/null
|
||||||
|
cp "$PROFILE" "$APP/embedded.mobileprovision"
|
||||||
|
|
||||||
|
requirement() {
|
||||||
|
echo "designated => anchor apple generic and identifier \"$1\" and certificate leaf[subject.OU] = \"$TEAM_ID\" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */"
|
||||||
|
}
|
||||||
|
|
||||||
|
sign() { # path [entitlements]
|
||||||
|
local id
|
||||||
|
id="$(codesign -dv "$1" 2>&1 | sed -n 's/^Identifier=//p')"
|
||||||
|
codesign --force --sign "$SHA1" --keychain "$KEYCHAIN" --timestamp=none \
|
||||||
|
-r="$(requirement "$id")" ${2:+--entitlements "$2"} "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "==> Re-signing with the local distribution certificate"
|
||||||
|
find "$APP/Frameworks" -maxdepth 1 \( -name '*.framework' -o -name '*.dylib' \) -print0 |
|
||||||
|
while IFS= read -r -d '' f; do sign "$f"; done
|
||||||
|
sign "$APP" "$WORK/entitlements.plist"
|
||||||
|
# --verify also checks each binary against its designated requirement (the ITMS-90035 check).
|
||||||
|
for f in "$APP"/Frameworks/*.framework "$APP"; do
|
||||||
|
if ! out="$(codesign --verify --strict --verbose=2 "$f" 2>&1)" || grep -q 'does not satisfy' <<<"$out"; then
|
||||||
|
echo "signature check failed: $out" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
codesign --verify --strict --deep "$APP"
|
||||||
|
|
||||||
|
OUT="$ROOT/build/ios/ipa/SkyContour-appstore.ipa"
|
||||||
|
rm -f "$OUT"
|
||||||
|
( cd "$WORK" && zip -qry "$OUT" Payload )
|
||||||
|
echo "==> $OUT"
|
||||||
|
|
||||||
|
echo "==> Validating with App Store Connect"
|
||||||
|
xcrun altool --validate-app -f "$OUT" -t ios --apiKey "$KEY_ID" --apiIssuer "$ISSUER"
|
||||||
|
|
||||||
|
if [ "${1:-}" = "--upload" ]; then
|
||||||
|
echo "==> Uploading"
|
||||||
|
xcrun altool --upload-app -f "$OUT" -t ios --apiKey "$KEY_ID" --apiIssuer "$ISSUER"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# App Store listing
|
||||||
|
|
||||||
|
Texts and screenshots for every UI language (en-US, es-ES, ar-SA, de-DE, hu, pl, fr-FR, it, sk).
|
||||||
|
|
||||||
|
| File | What |
|
||||||
|
|---|---|
|
||||||
|
| `metadata.json` | Subtitle, keywords, promotional text, description, screenshot headlines and demo site names per App Store Connect locale |
|
||||||
|
| `scene.py` | Synthetic dusk scene (strip, partial strip, camera frame) and its exact horizon profile |
|
||||||
|
| `make_screenshots.mjs` | Runs the web app in headless Chrome at iPhone 6.9" size in app-shell mode, seeds demo sites, captures 6 screens, frames them with the localized headline (1290×2796) |
|
||||||
|
| `upload_listing.py` | Uploads texts + screenshots via the App Store Connect API (replaces what is there), sets copyright and category, attaches the newest processed build |
|
||||||
|
|
||||||
|
## Regenerate and upload
|
||||||
|
|
||||||
|
```bash
|
||||||
|
W=/tmp/skycontour-store # any work folder
|
||||||
|
python3 store/scene.py $W
|
||||||
|
CH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||||
|
"$CH" --headless=new --hide-scrollbars --default-background-color=00000000 --window-size=3072,1024 --screenshot=$W/strip_full.png file://$W/strip_full.svg
|
||||||
|
"$CH" --headless=new --hide-scrollbars --default-background-color=00000000 --window-size=3072,1024 --screenshot=$W/strip_partial.png file://$W/strip_partial.svg
|
||||||
|
"$CH" --headless=new --hide-scrollbars --window-size=1080,1920 --screenshot=$W/camera.png file://$W/camera.svg
|
||||||
|
ffmpeg -loglevel error -y -loop 1 -i $W/camera.png -r 5 -t 1 -pix_fmt yuv420p $W/camera.y4m
|
||||||
|
|
||||||
|
(cd wasm/frontend && npx vite --port 5199) # in another terminal; do not rebuild wasm meanwhile
|
||||||
|
node store/make_screenshots.mjs 'https://localhost:5199/?sim' $W # or list locales after $W
|
||||||
|
python3 store/upload_listing.py $W # privacy/support URLs default to sagifer.github.io/appdocuments (repo: github.com/sagifer/appdocuments)
|
||||||
|
```
|
||||||
|
|
||||||
|
Not covered by the API and set in App Store Connect by hand: App Privacy answers, age rating, price and availability.
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
// App Store screenshots for every locale in store/metadata.json.
|
||||||
|
//
|
||||||
|
// 1. python3 store/scene.py <work> (synthetic dusk scene + profile)
|
||||||
|
// 2. render the scene SVGs, camera video (see store/README.md)
|
||||||
|
// 3. node store/make_screenshots.mjs <appUrl> <work> [locale…]
|
||||||
|
//
|
||||||
|
// The app runs in headless Chrome at iPhone 6.9" size (430×932 pt @3x) in its
|
||||||
|
// app-shell mode (window.flutter_inappwebview stub), with demo sites seeded
|
||||||
|
// into localStorage / IndexedDB and a fake camera. Each raw screen is then
|
||||||
|
// framed with a localized headline into a 1290×2796 App Store image.
|
||||||
|
import { spawn } from 'node:child_process'
|
||||||
|
import { mkdirSync, readFileSync, writeFileSync, rmSync, existsSync } from 'node:fs'
|
||||||
|
import { join, dirname } from 'node:path'
|
||||||
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
||||||
|
|
||||||
|
const HERE = dirname(fileURLToPath(import.meta.url))
|
||||||
|
const ROOT = join(HERE, '..')
|
||||||
|
const CHROME = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
|
||||||
|
const [appUrl, work, ...only] = process.argv.slice(2)
|
||||||
|
const meta = JSON.parse(readFileSync(join(HERE, 'metadata.json'), 'utf8'))
|
||||||
|
const locales = Object.keys(meta).filter((k) => !k.startsWith('_') && (!only.length || only.includes(k)))
|
||||||
|
const profile = JSON.parse(readFileSync(join(work, 'profile.json'), 'utf8'))
|
||||||
|
const b64 = (f) => readFileSync(join(work, f)).toString('base64')
|
||||||
|
const STRIP_FULL = b64('strip_full.png')
|
||||||
|
const STRIP_PARTIAL = b64('strip_partial.png')
|
||||||
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms))
|
||||||
|
const SHOTS = ['welcome', 'capture', 'nina', 'pano', 'export', 'sites']
|
||||||
|
|
||||||
|
// ---------- Chrome / DevTools plumbing ----------
|
||||||
|
|
||||||
|
async function launch(lang, port) {
|
||||||
|
const profileDir = join(work, `chrome-${lang}`)
|
||||||
|
rmSync(profileDir, { recursive: true, force: true })
|
||||||
|
const proc = spawn(CHROME, [
|
||||||
|
'--headless=new', `--remote-debugging-port=${port}`, `--user-data-dir=${profileDir}`,
|
||||||
|
'--use-fake-device-for-media-stream', '--use-fake-ui-for-media-stream',
|
||||||
|
`--use-file-for-fake-video-capture=${join(work, 'camera.y4m')}`,
|
||||||
|
'--ignore-certificate-errors', `--lang=${lang}`, `--accept-lang=${lang}`, '--no-first-run',
|
||||||
|
'--hide-scrollbars', 'about:blank',
|
||||||
|
], { stdio: 'ignore' })
|
||||||
|
let ws
|
||||||
|
for (let i = 0; i < 60 && !ws; i++) {
|
||||||
|
try {
|
||||||
|
const page = (await (await fetch(`http://127.0.0.1:${port}/json/list`)).json()).find((t) => t.type === 'page')
|
||||||
|
if (page) { ws = new WebSocket(page.webSocketDebuggerUrl); break }
|
||||||
|
} catch { /* starting */ }
|
||||||
|
await sleep(200)
|
||||||
|
}
|
||||||
|
if (!ws) throw new Error('Chrome did not start')
|
||||||
|
if (ws.readyState !== WebSocket.OPEN) await new Promise((r) => ws.addEventListener('open', r))
|
||||||
|
let id = 0
|
||||||
|
const pending = new Map()
|
||||||
|
ws.addEventListener('message', (e) => {
|
||||||
|
const m = JSON.parse(e.data)
|
||||||
|
if (m.id && pending.has(m.id)) {
|
||||||
|
const { resolve, reject } = pending.get(m.id)
|
||||||
|
pending.delete(m.id)
|
||||||
|
m.error ? reject(new Error(m.error.message)) : resolve(m.result)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const send = (method, params = {}) => new Promise((resolve, reject) => {
|
||||||
|
const i = ++id
|
||||||
|
pending.set(i, { resolve, reject })
|
||||||
|
ws.send(JSON.stringify({ id: i, method, params }))
|
||||||
|
})
|
||||||
|
const evaluate = async (expression, userGesture = false) => {
|
||||||
|
const r = await send('Runtime.evaluate', { expression, awaitPromise: true, returnByValue: true, userGesture })
|
||||||
|
if (r.exceptionDetails) throw new Error(r.exceptionDetails.exception?.description || r.exceptionDetails.text)
|
||||||
|
return r.result.value
|
||||||
|
}
|
||||||
|
const close = async () => {
|
||||||
|
ws.close()
|
||||||
|
const exited = new Promise((r) => proc.once('exit', r))
|
||||||
|
proc.kill()
|
||||||
|
await Promise.race([exited, sleep(5000)])
|
||||||
|
try { rmSync(profileDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 }) } catch { /* leftover temp profile */ }
|
||||||
|
}
|
||||||
|
return { send, evaluate, close }
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- demo data ----------
|
||||||
|
|
||||||
|
function demoSites(names) {
|
||||||
|
const now = Date.now()
|
||||||
|
const iso = (dt) => new Date(now - dt).toISOString()
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
id: 'demoA', name: names[0], createdAt: iso(9e8), updatedAt: iso(1e5), source: 'survey',
|
||||||
|
location: { latDeg: 47.4979, lonDeg: 19.0402, elevM: 112, accuracyM: 4 }, status: 'complete',
|
||||||
|
frames: 24, cells: Array(24).fill(true), profile, coverage: Array(360).fill(1),
|
||||||
|
marginDeg: 2, northOffsetDeg: 0, edits: [], exported: { nina: true, stellarium: true }, hasStrip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'demoB', name: names[1], createdAt: iso(3e8), updatedAt: iso(2e5), source: 'survey',
|
||||||
|
location: { latDeg: 46.9012, lonDeg: 18.0457, elevM: 412, accuracyM: 6 }, status: 'in-progress',
|
||||||
|
frames: 14, cells: Array.from({ length: 24 }, (_, i) => i < 14), profile,
|
||||||
|
coverage: Array.from({ length: 360 }, (_, d) => (d < 210 ? 1 : 0)),
|
||||||
|
marginDeg: 2, northOffsetDeg: 0, edits: [], exported: { nina: false, stellarium: false }, hasStrip: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
const seedScript = (sites) => `(async () => {
|
||||||
|
const blob = (b64) => new Blob([Uint8Array.from(atob(b64), (c) => c.charCodeAt(0))], { type: 'image/png' })
|
||||||
|
const db = await new Promise((res, rej) => {
|
||||||
|
const r = indexedDB.open('sfzenith', 1)
|
||||||
|
r.onupgradeneeded = () => r.result.createObjectStore('strips')
|
||||||
|
r.onsuccess = () => res(r.result); r.onerror = () => rej(r.error)
|
||||||
|
})
|
||||||
|
await new Promise((res, rej) => {
|
||||||
|
const t = db.transaction('strips', 'readwrite')
|
||||||
|
t.objectStore('strips').put(blob('${STRIP_FULL}'), 'demoA')
|
||||||
|
t.objectStore('strips').put(blob('${STRIP_PARTIAL}'), 'demoB')
|
||||||
|
t.oncomplete = res; t.onerror = () => rej(t.error)
|
||||||
|
})
|
||||||
|
db.close()
|
||||||
|
localStorage.setItem('sfz.sites.v1', ${JSON.stringify(JSON.stringify(sites))})
|
||||||
|
localStorage.setItem('sfz.settings.v1', JSON.stringify({ welcomed: true, autoCapture: true, fovDeg: null, author: '' }))
|
||||||
|
return true
|
||||||
|
})()`
|
||||||
|
|
||||||
|
// ---------- raw app screens ----------
|
||||||
|
|
||||||
|
async function rawScreens(locale, port) {
|
||||||
|
const m = meta[locale]
|
||||||
|
const out = join(work, locale)
|
||||||
|
mkdirSync(out, { recursive: true })
|
||||||
|
const b = await launch(m.app, port)
|
||||||
|
const { send, evaluate } = b
|
||||||
|
const shot = async (name) => {
|
||||||
|
const r = await send('Page.captureScreenshot', { format: 'png' })
|
||||||
|
writeFileSync(join(out, `raw-${name}.png`), Buffer.from(r.data, 'base64'))
|
||||||
|
}
|
||||||
|
const waitFor = async (expr, ms = 20000) => {
|
||||||
|
const t0 = Date.now()
|
||||||
|
while (Date.now() - t0 < ms) {
|
||||||
|
if (await evaluate(expr).catch(() => false)) return
|
||||||
|
await sleep(150)
|
||||||
|
}
|
||||||
|
throw new Error(`${locale}: timeout waiting for ${expr}`)
|
||||||
|
}
|
||||||
|
const click = (sel, i = 0) => evaluate(`(() => { const el = document.querySelectorAll(${JSON.stringify(sel)})[${i}]; if (!el) throw new Error('no ${sel}'); el.click(); return true })()`, true)
|
||||||
|
try {
|
||||||
|
await send('Page.enable')
|
||||||
|
await send('Runtime.enable')
|
||||||
|
await send('Emulation.setDeviceMetricsOverride', { width: 430, height: 932, deviceScaleFactor: 3, mobile: true })
|
||||||
|
await send('Emulation.setTouchEmulationEnabled', { enabled: true })
|
||||||
|
await send('Browser.grantPermissions', { origin: new URL(appUrl).origin, permissions: ['geolocation', 'videoCapture', 'sensors'] })
|
||||||
|
// App-shell mode: the page sees the Flutter bridge and the system bar insets.
|
||||||
|
await send('Page.addScriptToEvaluateOnNewDocument', { source: `
|
||||||
|
window.flutter_inappwebview = { callHandler: () => Promise.resolve(undefined) };
|
||||||
|
// documentElement does not exist yet at document start.
|
||||||
|
new MutationObserver((_, obs) => {
|
||||||
|
if (!document.documentElement) return;
|
||||||
|
document.documentElement.style.setProperty('--safe-top', '59px');
|
||||||
|
document.documentElement.style.setProperty('--safe-bottom', '34px');
|
||||||
|
obs.disconnect();
|
||||||
|
}).observe(document, { childList: true });` })
|
||||||
|
|
||||||
|
await send('Page.navigate', { url: appUrl })
|
||||||
|
await waitFor(`!!document.querySelector('.btn-primary')`)
|
||||||
|
await sleep(1500)
|
||||||
|
await shot('welcome')
|
||||||
|
|
||||||
|
await evaluate(seedScript(demoSites(m.sites)))
|
||||||
|
await send('Page.navigate', { url: appUrl })
|
||||||
|
await waitFor(`document.querySelectorAll('.site-card').length === 2`)
|
||||||
|
await sleep(1200)
|
||||||
|
// Sites with the bottom 83 pt left for the native tab bar drawn in the frame.
|
||||||
|
await evaluate(`document.documentElement.style.setProperty('--safe-bottom', '83px')`)
|
||||||
|
await sleep(300)
|
||||||
|
await shot('sites')
|
||||||
|
await evaluate(`document.documentElement.style.setProperty('--safe-bottom', '34px')`)
|
||||||
|
|
||||||
|
await click('.site-card', 0) // complete site → Review
|
||||||
|
await waitFor(`!!document.querySelector('.slider')`, 30000)
|
||||||
|
await sleep(800)
|
||||||
|
await shot('nina')
|
||||||
|
|
||||||
|
await click('.segmented button', 1) // Panorama tab
|
||||||
|
await waitFor(`!!document.querySelector('.pano-zoom canvas')`)
|
||||||
|
await sleep(800)
|
||||||
|
await click('.segmented button', 3) // Paint sky
|
||||||
|
await sleep(200)
|
||||||
|
await evaluate(`(() => { const c = document.querySelector('.pano-zoom canvas'); const r = c.getBoundingClientRect();
|
||||||
|
c.dispatchEvent(new PointerEvent('pointermove', { clientX: r.left + r.width * 0.73, clientY: r.top + r.height * 0.3, bubbles: true })); return true })()`)
|
||||||
|
await sleep(400)
|
||||||
|
await shot('pano')
|
||||||
|
|
||||||
|
await click('.screen-actions .btn-primary') // Export
|
||||||
|
await waitFor(`!!document.querySelector('.format-card')`)
|
||||||
|
await sleep(1200)
|
||||||
|
await shot('export')
|
||||||
|
|
||||||
|
await evaluate(`window.__sfzNav('sites')`)
|
||||||
|
await waitFor(`document.querySelectorAll('.site-card').length === 2`)
|
||||||
|
const idx = await evaluate(`[...document.querySelectorAll('.site-card')].findIndex(c => c.querySelector('.badge-amber'))`)
|
||||||
|
await click('.site-card', idx) // in-progress site → Capture
|
||||||
|
await waitFor(`!!document.querySelector('.cap-panel') && !document.querySelector('.cap-start')`, 30000)
|
||||||
|
await sleep(1500)
|
||||||
|
// Simulated compass (?sim): turn to 204°, the next empty cell is at 217.5°.
|
||||||
|
await evaluate(`(() => { for (let i = 0; i < 68; i++) window.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' })); return true })()`)
|
||||||
|
await sleep(2000)
|
||||||
|
await shot('capture')
|
||||||
|
} finally {
|
||||||
|
await b.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- App Store frames ----------
|
||||||
|
|
||||||
|
async function importLocale(app) {
|
||||||
|
return (await import(pathToFileURL(join(ROOT, `wasm/frontend/src/i18n/locales/${app}.js`)).href)).default
|
||||||
|
}
|
||||||
|
|
||||||
|
const fontDir = pathToFileURL(join(ROOT, 'wasm/frontend/node_modules/@fontsource/barlow/files')).href
|
||||||
|
|
||||||
|
function frameHtml({ raw, caption, rtl, tabs }) {
|
||||||
|
const W = 1290, H = 2796, scale = 0.79
|
||||||
|
const sw = Math.round(1290 * scale), sh = Math.round(2796 * scale)
|
||||||
|
const left = Math.round((W - sw) / 2), top = H - sh - 60
|
||||||
|
const px = (v) => Math.round(v * 3 * scale) // app points → frame pixels
|
||||||
|
const tabBar = tabs ? `
|
||||||
|
<div class="tabbar" style="height:${px(83)}px">
|
||||||
|
${tabs.map((t, i) => `<div class="tab${i === 0 ? ' on' : ''}">
|
||||||
|
<div class="pill" style="width:${px(58)}px;height:${px(30)}px;border-radius:${px(15)}px">${t.icon}</div>
|
||||||
|
<div class="lbl" style="font-size:${px(11)}px;margin-top:${px(3)}px">${t.label}</div></div>`).join('')}
|
||||||
|
</div>` : ''
|
||||||
|
return `<!doctype html><html dir="${rtl ? 'rtl' : 'ltr'}"><head><meta charset="utf-8"><style>
|
||||||
|
@font-face { font-family: Barlow; font-weight: 700; src: url('${fontDir}/barlow-latin-700-normal.woff2') format('woff2'); }
|
||||||
|
@font-face { font-family: Barlow; font-weight: 700; src: url('${fontDir}/barlow-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-024F; }
|
||||||
|
html, body { margin: 0; width: ${W}px; height: ${H}px; overflow: hidden; }
|
||||||
|
body { background: radial-gradient(120% 70% at 70% 0%, #1B2B4A 0%, #0B1222 45%, #04060B 100%); font-family: Barlow, 'Geeza Pro', system-ui, sans-serif; }
|
||||||
|
.stars { position: absolute; inset: 0; background-image:
|
||||||
|
radial-gradient(2px 2px at 120px 160px, #fff8, transparent), radial-gradient(2px 2px at 980px 90px, #fff9, transparent),
|
||||||
|
radial-gradient(1.5px 1.5px at 400px 320px, #fff6, transparent), radial-gradient(2px 2px at 1180px 420px, #fff7, transparent),
|
||||||
|
radial-gradient(1.5px 1.5px at 760px 250px, #fff5, transparent), radial-gradient(2.5px 2.5px at 230px 470px, #FFE9C7aa, transparent); }
|
||||||
|
h1 { position: absolute; left: 90px; right: 90px; top: 150px; margin: 0; color: #E8ECF2; font-weight: 700;
|
||||||
|
font-size: 92px; line-height: 1.12; text-align: center; letter-spacing: -0.01em; }
|
||||||
|
h1 em { color: #F5B544; font-style: normal; }
|
||||||
|
.device { position: absolute; left: ${left - 18}px; top: ${top - 18}px; width: ${sw + 36}px; height: ${sh + 36}px;
|
||||||
|
border-radius: 120px; background: #1A2130; box-shadow: 0 40px 120px #000a, inset 0 0 0 3px #2B3446; }
|
||||||
|
.screen { position: absolute; left: ${left}px; top: ${top}px; width: ${sw}px; height: ${sh}px; border-radius: 104px; overflow: hidden; background: #000; }
|
||||||
|
.screen img { width: 100%; height: 100%; display: block; }
|
||||||
|
.status { position: absolute; left: 0; right: 0; top: 0; height: ${px(54)}px; display: flex; align-items: center;
|
||||||
|
justify-content: space-between; padding: 0 ${px(34)}px; color: #fff; font: 600 ${px(17)}px -apple-system, system-ui, sans-serif; direction: ltr; }
|
||||||
|
.island { position: absolute; left: 50%; top: ${px(11)}px; width: ${px(125)}px; height: ${px(37)}px; margin-left: -${px(62.5)}px; border-radius: ${px(19)}px; background: #000; }
|
||||||
|
.home { position: absolute; left: 50%; bottom: ${px(8)}px; width: ${px(140)}px; height: ${px(5)}px; margin-left: -${px(70)}px; border-radius: 9px; background: #fff; opacity: .85; }
|
||||||
|
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; background: #0A0D13; border-top: 2px solid #1E2634; display: flex; padding-top: ${px(8)}px; box-sizing: border-box; }
|
||||||
|
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; color: #93A0B4; font-family: system-ui, sans-serif; font-weight: 600; }
|
||||||
|
.tab .pill { display: flex; align-items: center; justify-content: center; }
|
||||||
|
.tab.on { color: #F5B544; } .tab.on .pill { background: #2A2312; }
|
||||||
|
.tab svg { width: ${px(22)}px; height: ${px(22)}px; }
|
||||||
|
</style></head><body><div class="stars"></div>
|
||||||
|
<h1>${caption}</h1>
|
||||||
|
<div class="device"></div>
|
||||||
|
<div class="screen"><img src="${raw}">
|
||||||
|
<div class="status"><span>9:41</span><span style="display:flex;gap:${px(6)}px;align-items:center">
|
||||||
|
<svg width="${px(18)}" height="${px(12)}" viewBox="0 0 18 12"><g fill="#fff"><rect x="0" y="8" width="3" height="4" rx="1"/><rect x="5" y="5.5" width="3" height="6.5" rx="1"/><rect x="10" y="3" width="3" height="9" rx="1"/><rect x="15" y="0" width="3" height="12" rx="1"/></g></svg>
|
||||||
|
<svg width="${px(16)}" height="${px(12)}" viewBox="0 0 16 12"><path d="M8 11.5 5.6 9a3.4 3.4 0 0 1 4.8 0zM3.4 6.8a6.6 6.6 0 0 1 9.2 0l-1.4 1.4a4.6 4.6 0 0 0-6.4 0zM1 4.4a10 10 0 0 1 14 0l-1.4 1.4a8 8 0 0 0-11.2 0z" fill="#fff"/></svg>
|
||||||
|
<svg width="${px(27)}" height="${px(13)}" viewBox="0 0 27 13"><rect x=".5" y=".5" width="23" height="12" rx="3.5" fill="none" stroke="#fff" opacity=".45"/><rect x="2" y="2" width="20" height="9" rx="2" fill="#fff"/><rect x="24.5" y="4" width="2" height="5" rx="1" fill="#fff" opacity=".45"/></svg>
|
||||||
|
</span></div>
|
||||||
|
<div class="island"></div>
|
||||||
|
${tabBar}
|
||||||
|
<div class="home"></div>
|
||||||
|
</div></body></html>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tab icons approximating the app's CupertinoIcons (square_stack_3d_up, plus_circle, slider_horizontal_3).
|
||||||
|
const TAB_ICONS = [
|
||||||
|
'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"><path d="M12 3 3 7.5 12 12l9-4.5z"/><path d="M3 12l9 4.5 9-4.5"/><path d="M3 16.5 12 21l9-4.5"/></svg>',
|
||||||
|
'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></svg>',
|
||||||
|
'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><path d="M3 6h18M3 12h18M3 18h18"/><circle cx="15" cy="6" r="2" fill="#0A0D13"/><circle cx="8" cy="12" r="2" fill="#0A0D13"/><circle cx="17" cy="18" r="2" fill="#0A0D13"/></svg>',
|
||||||
|
]
|
||||||
|
|
||||||
|
async function frames(locale) {
|
||||||
|
const m = meta[locale]
|
||||||
|
const msgs = await importLocale(m.app)
|
||||||
|
const out = join(work, locale)
|
||||||
|
const rtl = m.app === 'ar'
|
||||||
|
for (const [i, name] of SHOTS.entries()) {
|
||||||
|
const raw = join(out, `raw-${name}.png`)
|
||||||
|
if (!existsSync(raw)) continue
|
||||||
|
const tabs = name === 'sites'
|
||||||
|
? ['sites', 'new', 'settings'].map((k, j) => ({ label: msgs[`tab.${k}`], icon: TAB_ICONS[j] }))
|
||||||
|
: null
|
||||||
|
const tabsOrdered = tabs && rtl ? [...tabs] : tabs // dir=rtl on <html> mirrors the flex row
|
||||||
|
const html = join(out, `frame-${name}.html`)
|
||||||
|
writeFileSync(html, frameHtml({ raw: pathToFileURL(raw).href, caption: m.captions[i], rtl, tabs: tabsOrdered }))
|
||||||
|
const png = join(out, `${String(i + 1).padStart(2, '0')}-${name}.png`)
|
||||||
|
await new Promise((res, rej) => {
|
||||||
|
const p = spawn(CHROME, ['--headless=new', '--hide-scrollbars', '--allow-file-access-from-files',
|
||||||
|
'--force-device-scale-factor=1', '--window-size=1290,2796', `--screenshot=${png}`, pathToFileURL(html).href], { stdio: 'ignore' })
|
||||||
|
p.on('exit', (c) => (c === 0 ? res() : rej(new Error(`frame render failed: ${png}`))))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let port = 9400
|
||||||
|
for (const locale of locales) {
|
||||||
|
process.stdout.write(`${locale}: screens… `)
|
||||||
|
await rawScreens(locale, port++)
|
||||||
|
process.stdout.write('frames… ')
|
||||||
|
await frames(locale)
|
||||||
|
console.log('done')
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
{
|
||||||
|
"_comment": "App Store listing per App Store Connect locale. Limits: subtitle 30, keywords 100, promotionalText 170, description 4000 characters. 'captions' are the screenshot headlines (welcome, capture, nina, pano, export, sites); 'sites' are the demo site names in the screenshots.",
|
||||||
|
"en-US": {
|
||||||
|
"app": "en",
|
||||||
|
"subtitle": "Horizon for NINA & Stellarium",
|
||||||
|
"keywords": "horizon,astrophotography,telescope,obstruction,tree,hrz,landscape,astronomy,observatory,mount,sky",
|
||||||
|
"promotionalText": "Turn once around your telescope and get a custom horizon for N.I.N.A. and a Stellarium landscape. No tripod, no tape measure, no guesswork.",
|
||||||
|
"description": "SkyContour maps the trees, rooftops and hills around your telescope and turns them into an artificial horizon your astronomy software understands.\n\nStand where your telescope stands, hold your phone upright and turn once around. SkyContour takes the photos automatically, stitches them into a 360° panorama and finds the edge between sky and obstruction.\n\nSurvey in daylight or at dusk: the app needs a bright sky to find the edge.\n\nWHAT YOU GET\n• N.I.N.A. custom horizon (.hrz) with an adjustable safety margin, so targets stay clear of tree tips\n• Stellarium landscape: a 360° photo panorama with transparent sky, or just the outline\n• Your site's location written into the Stellarium landscape\n\nMADE FOR THE FIELD\n• Guided capture: a target dot shows where to point next, and frames are taken when the phone is steady\n• Review the horizon as a chart and as a panorama, and paint sky or ground with your finger where branches or wires fool the detection\n• North offset to correct the compass\n• One-time camera field-of-view calibration for accurate stitching\n• Import an existing .hrz file\n• Dark interface for use next to the telescope at dusk\n• Works offline. Your photos and locations stay on your phone; nothing is uploaded.\n\nShare or save the files, then load the .hrz in N.I.N.A. (Options › General › Astrometry › Custom Horizon) or install the .zip in Stellarium (Sky and viewing options › Landscape).",
|
||||||
|
"captions": [
|
||||||
|
"Your horizon, traced in one turn",
|
||||||
|
"Turn once around. Frames are taken automatically",
|
||||||
|
"Exact custom horizon for N.I.N.A.",
|
||||||
|
"Fix the sky edge with a fingertip",
|
||||||
|
"N.I.N.A. .hrz and Stellarium landscape in one tap",
|
||||||
|
"Every observing site, always at hand"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Backyard pier",
|
||||||
|
"Dark-sky site"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"es-ES": {
|
||||||
|
"app": "es",
|
||||||
|
"subtitle": "Horizonte para NINA/Stellarium",
|
||||||
|
"keywords": "horizonte,astrofotografía,telescopio,obstáculo,árbol,hrz,paisaje,astronomía,observatorio,cielo",
|
||||||
|
"promotionalText": "Da una vuelta alrededor de tu telescopio y obtén un horizonte personalizado para N.I.N.A. y un paisaje de Stellarium. Sin trípode, sin cinta métrica, sin conjeturas.",
|
||||||
|
"description": "SkyContour registra los árboles, tejados y colinas alrededor de tu telescopio y los convierte en un horizonte artificial que tu software de astronomía entiende.\n\nColócate donde está tu telescopio, sujeta el teléfono en vertical y gira una vuelta completa. SkyContour toma las fotos automáticamente, las une en un panorama de 360° y encuentra el borde entre el cielo y los obstáculos.\n\nHaz la medición de día o al atardecer: la app necesita un cielo claro para encontrar el borde.\n\nLO QUE OBTIENES\n• Horizonte personalizado de N.I.N.A. (.hrz) con margen de seguridad ajustable, para que los objetivos queden lejos de las copas de los árboles\n• Paisaje de Stellarium: un panorama fotográfico de 360° con cielo transparente, o solo el contorno\n• La ubicación de tu lugar, guardada en el paisaje de Stellarium\n\nPENSADA PARA EL CAMPO\n• Captura guiada: un punto indica hacia dónde apuntar y las fotos se toman cuando el teléfono está quieto\n• Revisa el horizonte como gráfico y como panorama, y pinta cielo o suelo con el dedo donde las ramas o los cables confundan la detección\n• Desfase del norte para corregir la brújula\n• Calibración única del campo de visión de la cámara para una unión precisa\n• Importa un archivo .hrz existente\n• Interfaz oscura para usarla junto al telescopio al anochecer\n• Funciona sin conexión. Tus fotos y ubicaciones se quedan en tu teléfono; no se sube nada.\n\nComparte o guarda los archivos y carga el .hrz en N.I.N.A. (Options › General › Astrometry › Custom Horizon) o instala el .zip en Stellarium (Opciones de cielo y visualización › Paisaje).",
|
||||||
|
"captions": [
|
||||||
|
"Tu horizonte, trazado en una vuelta",
|
||||||
|
"Da una vuelta: las fotos se toman solas",
|
||||||
|
"Horizonte personalizado exacto para N.I.N.A.",
|
||||||
|
"Corrige el borde del cielo con el dedo",
|
||||||
|
".hrz de N.I.N.A. y paisaje de Stellarium al instante",
|
||||||
|
"Todos tus lugares de observación, a mano"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Pilar del jardín",
|
||||||
|
"Cielo oscuro"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ar-SA": {
|
||||||
|
"app": "ar",
|
||||||
|
"subtitle": "أفق لـ NINA و Stellarium",
|
||||||
|
"keywords": "أفق,تصوير فلكي,تلسكوب,عوائق,أشجار,hrz,فلك,مرصد,سماء,بانوراما",
|
||||||
|
"promotionalText": "استدر دورة واحدة حول تلسكوبك واحصل على أفق مخصّص لـ N.I.N.A. ومشهد لـ Stellarium. بلا حامل ثلاثي، بلا شريط قياس، بلا تخمين.",
|
||||||
|
"description": "يرسم SkyContour الأشجار وأسطح المنازل والتلال حول تلسكوبك ويحوّلها إلى أفق اصطناعي يفهمه برنامج الفلك لديك.\n\nقف حيث يقف تلسكوبك، وأمسك الهاتف قائمًا، واستدر دورة كاملة. يلتقط SkyContour الصور تلقائيًا، ويدمجها في بانوراما بزاوية 360°، ويكتشف الحافة بين السماء والعوائق.\n\nقِس في ضوء النهار أو عند الغسق: يحتاج التطبيق إلى سماء ساطعة ليجد الحد.\n\nما تحصل عليه\n• أفق مخصّص لـ N.I.N.A. (ملف .hrz) مع هامش أمان قابل للتعديل لإبقاء الأهداف بعيدة عن قمم الأشجار\n• مشهد Stellarium: بانوراما صور بزاوية 360° مع سماء شفافة، أو المخطط فقط\n• موقع مكان الرصد مكتوب في مشهد Stellarium\n\nمصمَّم للعمل الميداني\n• تصوير موجَّه: نقطة توضّح أين توجّه الهاتف، وتُلتقط الصور عندما يكون الهاتف ثابتًا\n• راجع الأفق كمخطط وكبانوراما، ولوّن السماء أو الأرض بإصبعك حيث تُربك الأغصان أو الأسلاك الاكتشاف\n• إزاحة الشمال لتصحيح البوصلة\n• معايرة لمرة واحدة لمجال رؤية الكاميرا لدمج دقيق\n• استيراد ملف .hrz موجود\n• واجهة داكنة للاستخدام بجانب التلسكوب عند الغسق\n• يعمل دون اتصال. تبقى صورك ومواقعك على هاتفك، ولا يُرفع أي شيء.\n\nشارك الملفات أو احفظها، ثم حمّل ملف .hrz في N.I.N.A. (Options › General › Astrometry › Custom Horizon) أو ثبّت ملف .zip في Stellarium (خيارات السماء والعرض › المشهد).",
|
||||||
|
"captions": [
|
||||||
|
"أفقك، مرسوم في دورة واحدة",
|
||||||
|
"استدر دورة واحدة وتُلتقط الصور تلقائيًا",
|
||||||
|
"أفق مخصّص دقيق لـ N.I.N.A.",
|
||||||
|
"صحّح حافة السماء بلمسة إصبع",
|
||||||
|
"ملف .hrz لـ N.I.N.A. ومشهد Stellarium بلمسة",
|
||||||
|
"كل مواقع الرصد في متناول يدك"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"منصة الحديقة",
|
||||||
|
"موقع السماء المظلمة"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"de-DE": {
|
||||||
|
"app": "de",
|
||||||
|
"subtitle": "Horizont für NINA & Stellarium",
|
||||||
|
"keywords": "Horizont,Astrofotografie,Teleskop,Hindernis,Baum,hrz,Landschaft,Astronomie,Sternwarte,Himmel",
|
||||||
|
"promotionalText": "Einmal ums Teleskop drehen und du hast einen Custom Horizon für N.I.N.A. und eine Stellarium-Landschaft. Ohne Stativ, ohne Maßband, ohne Raten.",
|
||||||
|
"description": "SkyContour erfasst die Bäume, Dächer und Hügel rund um dein Teleskop und macht daraus einen künstlichen Horizont, den deine Astronomie-Software versteht.\n\nStell dich dorthin, wo dein Teleskop steht, halte das Telefon aufrecht und dreh dich einmal im Kreis. SkyContour nimmt die Fotos automatisch auf, setzt sie zu einem 360°-Panorama zusammen und findet die Kante zwischen Himmel und Hindernis.\n\nMiss bei Tageslicht oder in der Dämmerung: Die App braucht einen hellen Himmel, um die Kante zu finden.\n\nDAS BEKOMMST DU\n• N.I.N.A. Custom Horizon (.hrz) mit einstellbarem Sicherheitsabstand, damit Ziele nicht an Baumspitzen hängen bleiben\n• Stellarium-Landschaft: ein 360°-Fotopanorama mit transparentem Himmel oder nur der Umriss\n• Die Position deines Standorts in der Stellarium-Landschaft\n\nGEMACHT FÜR DRAUSSEN\n• Geführte Aufnahme: ein Punkt zeigt, wohin als Nächstes, und die Bilder entstehen, sobald das Telefon ruhig ist\n• Prüfe den Horizont als Diagramm und als Panorama und male Himmel oder Boden mit dem Finger, wo Äste oder Leitungen die Erkennung täuschen\n• Nordversatz zur Korrektur des Kompasses\n• Einmalige Kalibrierung des Kamera-Bildwinkels für genaues Zusammensetzen\n• Import vorhandener .hrz-Dateien\n• Dunkle Oberfläche für den Einsatz am Teleskop in der Dämmerung\n• Funktioniert offline. Deine Fotos und Standorte bleiben auf deinem Telefon; nichts wird hochgeladen.\n\nTeile oder speichere die Dateien und lade die .hrz in N.I.N.A. (Options › General › Astrometry › Custom Horizon) oder installiere die .zip in Stellarium (Himmels- und Ansichtsoptionen › Landschaft).",
|
||||||
|
"captions": [
|
||||||
|
"Dein Horizont, mit einer Drehung erfasst",
|
||||||
|
"Einmal drehen, die Bilder entstehen automatisch",
|
||||||
|
"Genauer Custom Horizon für N.I.N.A.",
|
||||||
|
"Himmelskante mit dem Finger korrigieren",
|
||||||
|
"N.I.N.A.-.hrz und Stellarium-Landschaft per Tipp",
|
||||||
|
"Alle Beobachtungsplätze immer zur Hand"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Säule im Garten",
|
||||||
|
"Dunkler Standort"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hu": {
|
||||||
|
"app": "hu",
|
||||||
|
"subtitle": "Horizont: NINA és Stellarium",
|
||||||
|
"keywords": "horizont,asztrofotó,távcső,akadály,fa,hrz,tájkép,csillagászat,obszervatórium,égbolt,mechanika",
|
||||||
|
"promotionalText": "Fordulj körbe egyszer a távcsöved mellett, és kész az egyéni horizont a N.I.N.A.-hoz meg a Stellarium-tájkép. Állvány, mérőszalag és találgatás nélkül.",
|
||||||
|
"description": "A SkyContour felméri a távcsöved körüli fákat, háztetőket és dombokat, és olyan mesterséges horizontot készít belőlük, amit a csillagászati szoftvered megért.\n\nÁllj oda, ahol a távcsöved áll, tartsd a telefont függőlegesen, és fordulj körbe egyszer. A SkyContour magától készíti a képeket, 360°-os panorámává fűzi őket, és megtalálja a határt az ég és az akadályok között.\n\nNappal vagy szürkületben mérj: az appnak világos égre van szüksége, hogy megtalálja a határt.\n\nAMIT KAPSZ\n• N.I.N.A. egyéni horizont (.hrz) állítható biztonsági ráhagyással, hogy a célpontok távol maradjanak a fák csúcsától\n• Stellarium-tájkép: 360°-os fotópanoráma átlátszó éggel, vagy csak a körvonal\n• A helyszíned koordinátái a Stellarium-tájképben\n\nTEREPRE TERVEZVE\n• Vezetett felvétel: egy pont mutatja, merre célozz, és a kép akkor készül el, amikor a telefon nyugalomban van\n• Nézd át a horizontot diagramként és panorámaként, és fesd át ujjal az eget vagy a talajt, ahol ágak vagy vezetékek megtévesztik a felismerést\n• Észak-eltolás az iránytű javítására\n• A kamera látószögének egyszeri kalibrálása a pontos illesztéshez\n• Meglévő .hrz fájl importálása\n• Sötét felület a távcső melletti használathoz szürkületben\n• Offline is működik. A fotóid és helyszíneid a telefonodon maradnak, semmi nem kerül feltöltésre.\n\nOszd meg vagy mentsd el a fájlokat, majd töltsd be a .hrz-t a N.I.N.A.-ba (Options › General › Astrometry › Custom Horizon), vagy telepítsd a .zip-et a Stellariumban (Égbolt és nézet beállításai › Tájkép).",
|
||||||
|
"captions": [
|
||||||
|
"A horizontod egyetlen fordulattal",
|
||||||
|
"Fordulj körbe, a képek maguktól készülnek",
|
||||||
|
"Pontos egyéni horizont a N.I.N.A.-hoz",
|
||||||
|
"Javítsd az éghatárt az ujjaddal",
|
||||||
|
"N.I.N.A. .hrz és Stellarium-tájkép egy koppintással",
|
||||||
|
"Minden észlelőhelyed kéznél"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Kerti oszlop",
|
||||||
|
"Sötét égbolt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pl": {
|
||||||
|
"app": "pl",
|
||||||
|
"subtitle": "Horyzont dla NINA i Stellarium",
|
||||||
|
"keywords": "horyzont,astrofotografia,teleskop,przeszkoda,drzewa,hrz,krajobraz,astronomia,obserwatorium,niebo",
|
||||||
|
"promotionalText": "Obróć się raz wokół teleskopu, a dostaniesz własny horyzont dla N.I.N.A. i krajobraz Stellarium. Bez statywu, bez miarki, bez zgadywania.",
|
||||||
|
"description": "SkyContour odwzorowuje drzewa, dachy i wzgórza wokół twojego teleskopu i zamienia je w sztuczny horyzont, który rozumie twoje oprogramowanie astronomiczne.\n\nStań tam, gdzie stoi teleskop, trzymaj telefon pionowo i obróć się raz dookoła. SkyContour sam robi zdjęcia, łączy je w panoramę 360° i znajduje granicę między niebem a przeszkodami.\n\nMierz za dnia lub o zmierzchu: aplikacja potrzebuje jasnego nieba, aby znaleźć krawędź.\n\nCO OTRZYMUJESZ\n• Własny horyzont N.I.N.A. (.hrz) z regulowanym marginesem bezpieczeństwa, aby cele omijały wierzchołki drzew\n• Krajobraz Stellarium: panorama zdjęć 360° z przezroczystym niebem albo sam kontur\n• Lokalizacja miejsca zapisana w krajobrazie Stellarium\n\nSTWORZONY DO PRACY W TERENIE\n• Prowadzone nagrywanie: punkt pokazuje, gdzie celować, a zdjęcie powstaje, gdy telefon jest nieruchomy\n• Przeglądaj horyzont jako wykres i jako panoramę, a niebo lub grunt maluj palcem tam, gdzie gałęzie lub przewody mylą wykrywanie\n• Przesunięcie północy do korekty kompasu\n• Jednorazowa kalibracja pola widzenia aparatu dla dokładnego łączenia\n• Import istniejącego pliku .hrz\n• Ciemny interfejs do pracy przy teleskopie o zmierzchu\n• Działa offline. Zdjęcia i lokalizacje zostają w telefonie; nic nie jest wysyłane.\n\nUdostępnij lub zapisz pliki, a potem wczytaj .hrz w N.I.N.A. (Options › General › Astrometry › Custom Horizon) lub zainstaluj .zip w Stellarium (Opcje nieba i widoku › Krajobraz).",
|
||||||
|
"captions": [
|
||||||
|
"Twój horyzont w jednym obrocie",
|
||||||
|
"Obróć się raz, zdjęcia wykonują się same",
|
||||||
|
"Dokładny własny horyzont dla N.I.N.A.",
|
||||||
|
"Popraw granicę nieba palcem",
|
||||||
|
".hrz dla N.I.N.A. i krajobraz Stellarium jednym dotknięciem",
|
||||||
|
"Wszystkie miejsca obserwacji pod ręką"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Słupek w ogrodzie",
|
||||||
|
"Ciemne niebo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fr-FR": {
|
||||||
|
"app": "fr",
|
||||||
|
"subtitle": "Horizon pour NINA & Stellarium",
|
||||||
|
"keywords": "horizon,astrophotographie,télescope,obstacle,arbre,hrz,paysage,astronomie,observatoire,ciel",
|
||||||
|
"promotionalText": "Faites un tour autour de votre télescope et obtenez un horizon personnalisé pour N.I.N.A. et un paysage Stellarium. Sans trépied, sans mètre, sans approximation.",
|
||||||
|
"description": "SkyContour relève les arbres, les toits et les collines autour de votre télescope et en fait un horizon artificiel que votre logiciel d’astronomie comprend.\n\nPlacez-vous à l’emplacement du télescope, tenez le téléphone droit et faites un tour complet. SkyContour prend les photos automatiquement, les assemble en un panorama à 360° et trouve la limite entre le ciel et les obstacles.\n\nFaites le relevé de jour ou au crépuscule : l’app a besoin d’un ciel clair pour trouver la limite.\n\nCE QUE VOUS OBTENEZ\n• Horizon personnalisé N.I.N.A. (.hrz) avec une marge de sécurité réglable, pour que les cibles évitent la cime des arbres\n• Paysage Stellarium : un panorama photo à 360° avec ciel transparent, ou seulement le contour\n• La position de votre site inscrite dans le paysage Stellarium\n\nCONÇU POUR LE TERRAIN\n• Capture guidée : un point indique où viser, et la photo est prise quand le téléphone est stable\n• Vérifiez l’horizon en graphique et en panorama, et peignez le ciel ou le sol du doigt là où des branches ou des câbles trompent la détection\n• Décalage du nord pour corriger la boussole\n• Calibration unique du champ de vision de la caméra pour un assemblage précis\n• Import d’un fichier .hrz existant\n• Interface sombre pour l’utiliser près du télescope au crépuscule\n• Fonctionne hors ligne. Vos photos et positions restent sur votre téléphone ; rien n’est envoyé.\n\nPartagez ou enregistrez les fichiers, puis chargez le .hrz dans N.I.N.A. (Options › General › Astrometry › Custom Horizon) ou installez le .zip dans Stellarium (Options du ciel et de la vue › Paysage).",
|
||||||
|
"captions": [
|
||||||
|
"Votre horizon, tracé en un tour",
|
||||||
|
"Faites un tour : les photos se prennent seules",
|
||||||
|
"Horizon personnalisé précis pour N.I.N.A.",
|
||||||
|
"Corrigez la limite du ciel du bout du doigt",
|
||||||
|
".hrz N.I.N.A. et paysage Stellarium en un geste",
|
||||||
|
"Tous vos sites d’observation, toujours à portée"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Pilier du jardin",
|
||||||
|
"Ciel noir"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"it": {
|
||||||
|
"app": "it",
|
||||||
|
"subtitle": "Orizzonte NINA e Stellarium",
|
||||||
|
"keywords": "orizzonte,astrofotografia,telescopio,ostacolo,alberi,hrz,paesaggio,astronomia,osservatorio,cielo",
|
||||||
|
"promotionalText": "Fai un giro intorno al telescopio e ottieni un orizzonte personalizzato per N.I.N.A. e un paesaggio per Stellarium. Senza treppiede, senza metro, senza tentativi.",
|
||||||
|
"description": "SkyContour rileva gli alberi, i tetti e le colline intorno al tuo telescopio e li trasforma in un orizzonte artificiale che il tuo software di astronomia comprende.\n\nMettiti dove si trova il telescopio, tieni il telefono in verticale e fai un giro completo. SkyContour scatta le foto automaticamente, le unisce in un panorama a 360° e trova il bordo tra cielo e ostacoli.\n\nFai il rilievo di giorno o al crepuscolo: l’app ha bisogno di un cielo chiaro per trovare il confine.\n\nCOSA OTTIENI\n• Orizzonte personalizzato N.I.N.A. (.hrz) con margine di sicurezza regolabile, così i bersagli restano lontani dalle cime degli alberi\n• Paesaggio Stellarium: un panorama fotografico a 360° con cielo trasparente, oppure solo il contorno\n• La posizione del tuo luogo scritta nel paesaggio di Stellarium\n\nPENSATA PER IL CAMPO\n• Ripresa guidata: un punto indica dove puntare e la foto viene scattata quando il telefono è fermo\n• Controlla l’orizzonte come grafico e come panorama, e dipingi cielo o suolo con il dito dove rami o cavi ingannano il rilevamento\n• Scostamento del nord per correggere la bussola\n• Calibrazione una tantum del campo visivo della fotocamera per un’unione precisa\n• Importazione di un file .hrz esistente\n• Interfaccia scura per l’uso accanto al telescopio al crepuscolo\n• Funziona offline. Foto e posizioni restano sul telefono; non viene caricato nulla.\n\nCondividi o salva i file, poi carica il .hrz in N.I.N.A. (Options › General › Astrometry › Custom Horizon) o installa lo .zip in Stellarium (Opzioni cielo e visualizzazione › Paesaggio).",
|
||||||
|
"captions": [
|
||||||
|
"Il tuo orizzonte, tracciato in un giro",
|
||||||
|
"Fai un giro: le foto si scattano da sole",
|
||||||
|
"Orizzonte personalizzato preciso per N.I.N.A.",
|
||||||
|
"Correggi il bordo del cielo con un dito",
|
||||||
|
".hrz per N.I.N.A. e paesaggio Stellarium con un tocco",
|
||||||
|
"Tutti i tuoi luoghi di osservazione a portata di mano"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Pilastro in giardino",
|
||||||
|
"Cielo buio"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sk": {
|
||||||
|
"app": "sk",
|
||||||
|
"subtitle": "Horizont pre NINA a Stellarium",
|
||||||
|
"keywords": "horizont,astrofotografia,ďalekohľad,prekážka,stromy,hrz,krajina,astronómia,observatórium,obloha",
|
||||||
|
"promotionalText": "Otoč sa raz okolo ďalekohľadu a získaš vlastný horizont pre N.I.N.A. aj krajinu pre Stellarium. Bez statívu, bez metra, bez hádania.",
|
||||||
|
"description": "SkyContour zmapuje stromy, strechy a kopce okolo tvojho ďalekohľadu a premení ich na umelý horizont, ktorému rozumie tvoj astronomický softvér.\n\nPostav sa tam, kde stojí ďalekohľad, drž telefón zvisle a raz sa otoč dokola. SkyContour sám nasníma fotky, spojí ich do 360° panorámy a nájde hranicu medzi oblohou a prekážkami.\n\nMeraj cez deň alebo za súmraku: aplikácia potrebuje svetlú oblohu, aby našla hranicu.\n\nČO ZÍSKAŠ\n• Vlastný horizont N.I.N.A. (.hrz) s nastaviteľnou bezpečnostnou rezervou, aby sa ciele vyhli vrcholom stromov\n• Krajina Stellarium: 360° fotografická panoráma s priehľadnou oblohou alebo len obrys\n• Poloha miesta zapísaná do krajiny Stellarium\n\nNAVRHNUTÝ DO TERÉNU\n• Vedené snímanie: bod ukazuje, kam mieriť, a snímka sa urobí, keď je telefón v pokoji\n• Skontroluj horizont ako graf aj ako panorámu a prstom domaľuj oblohu alebo terén tam, kde konáre či drôty pomýlia rozpoznávanie\n• Posun severu na opravu kompasu\n• Jednorazová kalibrácia zorného poľa kamery pre presné spájanie\n• Import existujúceho súboru .hrz\n• Tmavé rozhranie na použitie pri ďalekohľade za súmraku\n• Funguje offline. Fotky a polohy zostávajú v telefóne; nič sa neodosiela.\n\nZdieľaj alebo ulož súbory a potom načítaj .hrz v N.I.N.A. (Options › General › Astrometry › Custom Horizon) alebo nainštaluj .zip v Stellariu (Možnosti oblohy a zobrazenia › Krajina).",
|
||||||
|
"captions": [
|
||||||
|
"Tvoj horizont jedným otočením",
|
||||||
|
"Otoč sa raz dokola, snímky sa robia samé",
|
||||||
|
"Presný vlastný horizont pre N.I.N.A.",
|
||||||
|
"Oprav okraj oblohy prstom",
|
||||||
|
".hrz pre N.I.N.A. a krajina Stellarium jedným ťuknutím",
|
||||||
|
"Všetky pozorovacie miesta vždy po ruke"
|
||||||
|
],
|
||||||
|
"sites": [
|
||||||
|
"Stĺp v záhrade",
|
||||||
|
"Tmavá obloha"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
1. SCREEN RECORDING
|
||||||
|
A screen recording from an iPhone on the latest iOS is attached in App Review Information (Attachment) and to our reply in App Review. It starts on the Home Screen by launching the app and shows the typical flow: site list, new survey with camera capture (outdoors, in daylight), review of the detected horizon (chart and panorama), and export of the files. The app has no accounts, no login, no user-generated content shared with others, and no paid content.
|
||||||
|
|
||||||
|
2. PURPOSE AND AUDIENCE
|
||||||
|
SkyContour is a tool for amateur astronomers and astrophotographers. Trees and buildings around a backyard telescope hide part of the sky; imaging software needs to know this local horizon to plan which targets are actually visible and when. Measuring it by hand takes hours. SkyContour does it in a few minutes: the user turns once around with the phone camera, the app finds the sky edge in the photos and exports it as (a) a N.I.N.A. custom horizon file (.hrz, plain-text azimuth/altitude pairs used by the popular N.I.N.A. imaging software to limit target altitudes) and (b) a Stellarium landscape (.zip, a 360-degree panorama with transparent sky for the free planetarium program Stellarium).
|
||||||
|
|
||||||
|
3. HOW TO USE / TEST
|
||||||
|
No login and no setup are needed.
|
||||||
|
IMPORTANT: please test the survey in daylight (or at dusk), outdoors or at a window with an open view. The app detects the edge between the bright sky and dark trees or roofs; in the dark or indoors there is no edge to detect. The starry artwork on the start screen only illustrates where the exported files are used (at night, with a telescope); the measurement itself is done by day. The app says this on the start screen and before each capture.
|
||||||
|
- Survey: Get started > tab "New survey" > allow camera and location (location is only written into the Stellarium file) > "Start capture". Hold the phone upright and turn slowly in place; a dot shows where to point next and frames are taken automatically when it is in the circle ("Auto on"). Tap "Finish" at any time; a partial turn is fine for testing.
|
||||||
|
- Review: the detected sky edge is drawn on the panorama; "Paint sky"/"Paint ground" correct it; "Safety margin" and "North offset" adjust the result.
|
||||||
|
- Export: choose NINA .hrz and/or Stellarium panorama, then Save (Files > On My iPhone > SkyContour) or Share.
|
||||||
|
- Without a survey: in Safari open https://sagifer.github.io/appdocuments/skycontour/sample/backyard-pier.txt, Share > Save to Files, then in the app Sites tab > "Import existing .hrz" > pick the file. Review and the NINA export then work the same way.
|
||||||
|
|
||||||
|
4. EXTERNAL SERVICES
|
||||||
|
None. The app makes no network requests: no servers, accounts, analytics, ads, payment or AI services. All processing (image stitching, sky detection, file generation) runs on the device. Device features used: camera, motion sensors (heading and tilt), location when in use.
|
||||||
|
|
||||||
|
5. REGIONAL DIFFERENCES
|
||||||
|
None. The app works the same in all regions. The interface is localized into English, Spanish, Arabic, German, Hungarian, Polish, French, Italian and Slovak; exported files are always in the same format.
|
||||||
|
|
||||||
|
6. REGULATED INDUSTRY / THIRD-PARTY MATERIAL
|
||||||
|
Not applicable. The app is not in a regulated industry and contains no protected third-party content. All artwork is original; the bundled fonts Barlow and IBM Plex Mono are open source (SIL Open Font License).
|
||||||
|
|
||||||
|
Privacy policy: https://sagifer.github.io/appdocuments/skycontour/privacy.html
|
||||||
|
Support: https://sagifer.github.io/appdocuments/skycontour/support.html
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
Hello,
|
||||||
|
|
||||||
|
Thank you for the review. Please find the requested information below; the same text is now also in the Notes field of App Review Information. The screen recording is attached to this message.
|
||||||
|
|
||||||
|
1. SCREEN RECORDING
|
||||||
|
A screen recording from an iPhone on the latest iOS is attached in App Review Information (Attachment) and to our reply in App Review. It starts on the Home Screen by launching the app and shows the typical flow: site list, new survey with camera capture (outdoors, in daylight), review of the detected horizon (chart and panorama), and export of the files. The app has no accounts, no login, no user-generated content shared with others, and no paid content.
|
||||||
|
|
||||||
|
2. PURPOSE AND AUDIENCE
|
||||||
|
SkyContour is a tool for amateur astronomers and astrophotographers. Trees and buildings around a backyard telescope hide part of the sky; imaging software needs to know this local horizon to plan which targets are actually visible and when. Measuring it by hand takes hours. SkyContour does it in a few minutes: the user turns once around with the phone camera, the app finds the sky edge in the photos and exports it as (a) a N.I.N.A. custom horizon file (.hrz, plain-text azimuth/altitude pairs used by the popular N.I.N.A. imaging software to limit target altitudes) and (b) a Stellarium landscape (.zip, a 360-degree panorama with transparent sky for the free planetarium program Stellarium).
|
||||||
|
|
||||||
|
3. HOW TO USE / TEST
|
||||||
|
No login and no setup are needed.
|
||||||
|
IMPORTANT: please test the survey in daylight (or at dusk), outdoors or at a window with an open view. The app detects the edge between the bright sky and dark trees or roofs; in the dark or indoors there is no edge to detect. The starry artwork on the start screen only illustrates where the exported files are used (at night, with a telescope); the measurement itself is done by day. The app says this on the start screen and before each capture.
|
||||||
|
- Survey: Get started > tab "New survey" > allow camera and location (location is only written into the Stellarium file) > "Start capture". Hold the phone upright and turn slowly in place; a dot shows where to point next and frames are taken automatically when it is in the circle ("Auto on"). Tap "Finish" at any time; a partial turn is fine for testing.
|
||||||
|
- Review: the detected sky edge is drawn on the panorama; "Paint sky"/"Paint ground" correct it; "Safety margin" and "North offset" adjust the result.
|
||||||
|
- Export: choose NINA .hrz and/or Stellarium panorama, then Save (Files > On My iPhone > SkyContour) or Share.
|
||||||
|
- Without a survey: in Safari open https://sagifer.github.io/appdocuments/skycontour/sample/backyard-pier.txt, Share > Save to Files, then in the app Sites tab > "Import existing .hrz" > pick the file. Review and the NINA export then work the same way.
|
||||||
|
|
||||||
|
4. EXTERNAL SERVICES
|
||||||
|
None. The app makes no network requests: no servers, accounts, analytics, ads, payment or AI services. All processing (image stitching, sky detection, file generation) runs on the device. Device features used: camera, motion sensors (heading and tilt), location when in use.
|
||||||
|
|
||||||
|
5. REGIONAL DIFFERENCES
|
||||||
|
None. The app works the same in all regions. The interface is localized into English, Spanish, Arabic, German, Hungarian, Polish, French, Italian and Slovak; exported files are always in the same format.
|
||||||
|
|
||||||
|
6. REGULATED INDUSTRY / THIRD-PARTY MATERIAL
|
||||||
|
Not applicable. The app is not in a regulated industry and contains no protected third-party content. All artwork is original; the bundled fonts Barlow and IBM Plex Mono are open source (SIL Open Font License).
|
||||||
|
|
||||||
|
Privacy policy: https://sagifer.github.io/appdocuments/skycontour/privacy.html
|
||||||
|
Support: https://sagifer.github.io/appdocuments/skycontour/support.html
|
||||||
|
|
||||||
|
Best regards,
|
||||||
|
Ferenc Sagi
|
||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
"""Synthetic dusk scene for the App Store screenshots.
|
||||||
|
|
||||||
|
Writes SVGs (rendered to PNG by make_screenshots.mjs) in the app's strip
|
||||||
|
geometry — 3072×1024 px, azimuth 0…360 left to right, altitude +90…−30 top to
|
||||||
|
bottom — plus the exact horizon profile of the scene.
|
||||||
|
|
||||||
|
python3 store/scene.py <out_dir>
|
||||||
|
"""
|
||||||
|
import json
|
||||||
|
import math
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
W, H = 3072, 1024
|
||||||
|
TOP, BOTTOM = 90.0, -30.0
|
||||||
|
PHOTO_TOP, PHOTO_BOTTOM = 44.0, -22.0 # what 24 frames at +10° tilt cover
|
||||||
|
|
||||||
|
|
||||||
|
def X(az):
|
||||||
|
return az / 360 * W
|
||||||
|
|
||||||
|
|
||||||
|
def Y(alt):
|
||||||
|
return (TOP - alt) / (TOP - BOTTOM) * H
|
||||||
|
|
||||||
|
|
||||||
|
def bump(az, c, w, h):
|
||||||
|
d = (az - c + 540) % 360 - 180
|
||||||
|
return h * math.exp(-(d / w) ** 2)
|
||||||
|
|
||||||
|
|
||||||
|
def fir(az, c, w, h):
|
||||||
|
"""Fir tree: triangle with three branch tiers."""
|
||||||
|
d = abs((az - c + 540) % 360 - 180)
|
||||||
|
if d > w:
|
||||||
|
return -90
|
||||||
|
t = 1 - d / w
|
||||||
|
tier = 0.18 * h * (1 - ((t * 3) % 1))
|
||||||
|
return h * t - tier + 2
|
||||||
|
|
||||||
|
|
||||||
|
def alt_at(az):
|
||||||
|
a = 3.2 + 1.4 * math.sin(math.radians(az) * 3) + 0.8 * math.sin(math.radians(az) * 7 + 1)
|
||||||
|
a += 0.35 * math.sin(az * 2.3) + 0.25 * math.sin(az * 5.7) # grass / shrubs
|
||||||
|
# house (roof peak at 49°, chimney at 54°)
|
||||||
|
if 38 <= az <= 60:
|
||||||
|
roof = 15 - abs(az - 49) * (6 / 11)
|
||||||
|
a = max(a, 9, roof)
|
||||||
|
if 53 <= az <= 55:
|
||||||
|
a = max(a, 16.5)
|
||||||
|
# deciduous trees
|
||||||
|
canopy = max(bump(az, 112, 9, 26), bump(az, 100, 6, 21), bump(az, 127, 6, 18), bump(az, 138, 4, 13))
|
||||||
|
if canopy > 4:
|
||||||
|
canopy += 0.9 * math.sin(az * 11) + 0.6 * math.sin(az * 23)
|
||||||
|
a = max(a, canopy)
|
||||||
|
# fir trees
|
||||||
|
for c, w, h in ((205, 5, 22), (214, 4, 17), (224, 6, 25), (232, 3.5, 15)):
|
||||||
|
a = max(a, fir(az, c, w, h))
|
||||||
|
# distant tree line and a poplar
|
||||||
|
if 280 <= az <= 330:
|
||||||
|
a = max(a, 8.5 + 1.5 * math.sin(az * 0.9) + 0.8 * math.sin(az * 4.1))
|
||||||
|
a = max(a, bump(az, 346, 1.4, 20))
|
||||||
|
return a
|
||||||
|
|
||||||
|
|
||||||
|
def silhouette_path(az_max=360.0):
|
||||||
|
pts = []
|
||||||
|
n = int(az_max * 10)
|
||||||
|
for i in range(n + 1):
|
||||||
|
az = i / 10
|
||||||
|
pts.append(f'{X(az):.1f},{Y(alt_at(az)):.1f}')
|
||||||
|
return f'M0,{Y(PHOTO_BOTTOM):.1f} L' + ' L'.join(pts) + f' L{X(az_max):.1f},{Y(PHOTO_BOTTOM):.1f} Z'
|
||||||
|
|
||||||
|
|
||||||
|
def scene_svg(az_max=360.0, view=None, size=(W, H)):
|
||||||
|
vb = view or (0, 0, W, H)
|
||||||
|
band = f'<rect x="0" y="{Y(PHOTO_TOP):.1f}" width="{X(az_max):.1f}" height="{Y(PHOTO_BOTTOM) - Y(PHOTO_TOP):.1f}"/>'
|
||||||
|
house = (f'<rect x="{X(43):.1f}" y="{Y(6.2):.1f}" width="{X(46) - X(43):.1f}" height="{Y(3) - Y(6.2):.1f}" fill="#E8A447" opacity="0.85"/>'
|
||||||
|
f'<rect x="{X(51):.1f}" y="{Y(5.8):.1f}" width="{X(53.5) - X(51):.1f}" height="{Y(3.2) - Y(5.8):.1f}" fill="#E8A447" opacity="0.22"/>')
|
||||||
|
return f'''<svg xmlns="http://www.w3.org/2000/svg" width="{size[0]}" height="{size[1]}" viewBox="{' '.join(f'{v:.1f}' for v in vb)}" preserveAspectRatio="none">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="sky" x1="0" y1="{Y(PHOTO_TOP):.1f}" x2="0" y2="{Y(0):.1f}" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#4C6C96"/><stop offset="0.65" stop-color="#93ABC6"/><stop offset="1" stop-color="#C9D6E2"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="ground" x1="0" y1="{Y(26):.1f}" x2="0" y2="{Y(PHOTO_BOTTOM):.1f}" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="#0E160D"/><stop offset="1" stop-color="#151A10"/>
|
||||||
|
</linearGradient>
|
||||||
|
<filter id="grain" x="0" y="0" width="100%" height="100%">
|
||||||
|
<feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="7" result="n"/>
|
||||||
|
<feColorMatrix in="n" type="matrix" values="0 0 0 0 0.10 0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0.35 0"/>
|
||||||
|
<feComposite in2="SourceGraphic" operator="in"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="band">{band}</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g clip-path="url(#band)">
|
||||||
|
<rect x="0" y="0" width="{W}" height="{H}" fill="url(#sky)"/>
|
||||||
|
<path d="{silhouette_path(min(az_max + 1, 360))}" fill="url(#ground)"/>
|
||||||
|
<path d="{silhouette_path(min(az_max + 1, 360))}" fill="#000" filter="url(#grain)"/>
|
||||||
|
{house}
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
out = Path(sys.argv[1])
|
||||||
|
out.mkdir(parents=True, exist_ok=True)
|
||||||
|
(out / 'strip_full.svg').write_text(scene_svg())
|
||||||
|
(out / 'strip_partial.svg').write_text(scene_svg(az_max=210))
|
||||||
|
# Portrait camera frame: 39° × 64°, centred on azimuth 205°, altitude +10°.
|
||||||
|
hfov, vfov, az0, alt0 = 39.0, 64.0, 205.0, 10.0
|
||||||
|
view = (X(az0 - hfov / 2), Y(alt0 + vfov / 2), X(hfov), Y(alt0 - vfov / 2) - Y(alt0 + vfov / 2))
|
||||||
|
(out / 'camera.svg').write_text(scene_svg(view=view, size=(1080, 1920)))
|
||||||
|
# Exact profile, as the app derives it: highest edge within ±0.5° per degree.
|
||||||
|
profile = [round(max(alt_at(d + k / 10) for k in range(-5, 6)), 2) for d in range(360)]
|
||||||
|
(out / 'profile.json').write_text(json.dumps(profile))
|
||||||
|
print('scene written to', out, '| max altitude', max(profile))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Upload the App Store listing (texts + screenshots) from store/metadata.json.
|
||||||
|
|
||||||
|
python3 store/upload_listing.py <screenshots_dir> [--locales en-US hu ...] [--texts-only]
|
||||||
|
[--privacy-url URL] [--support-url URL] [--marketing-url URL]
|
||||||
|
|
||||||
|
<screenshots_dir>/<locale>/0N-*.png are the 1290×2796 images made by
|
||||||
|
make_screenshots.mjs. Re-running replaces the screenshots and texts.
|
||||||
|
Works on the version in "Prepare for Submission".
|
||||||
|
"""
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import urllib.request
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'scripts'))
|
||||||
|
from asc_api import Asc, AscError # noqa: E402
|
||||||
|
|
||||||
|
HERE = Path(__file__).resolve().parent
|
||||||
|
DISPLAY_TYPE = 'APP_IPHONE_67' # 6.7"/6.9" iPhone, 1290×2796
|
||||||
|
EDITABLE = {'PREPARE_FOR_SUBMISSION', 'DEVELOPER_REJECTED', 'REJECTED', 'METADATA_REJECTED'}
|
||||||
|
|
||||||
|
|
||||||
|
def find(items, **attrs):
|
||||||
|
return next((i for i in items if all(i['attributes'].get(k) == v for k, v in attrs.items())), None)
|
||||||
|
|
||||||
|
|
||||||
|
def upsert_localization(a, kind, parent_rel, parent_id, existing, locale, fields):
|
||||||
|
loc = find(existing, locale=locale)
|
||||||
|
fields = {k: v for k, v in fields.items() if v is not None}
|
||||||
|
if loc:
|
||||||
|
a.call('PATCH', f'/v1/{kind}/{loc["id"]}', {'data': {'type': kind, 'id': loc['id'], 'attributes': fields}})
|
||||||
|
return loc['id']
|
||||||
|
res = a.call('POST', f'/v1/{kind}', {'data': {'type': kind, 'attributes': {'locale': locale, **fields},
|
||||||
|
'relationships': {parent_rel: {'data': {'type': parent_rel + 's' if not parent_rel.endswith('s') else parent_rel, 'id': parent_id}}}}})
|
||||||
|
return res['data']['id']
|
||||||
|
|
||||||
|
|
||||||
|
def upload_screenshot(a, set_id, path):
|
||||||
|
data = path.read_bytes()
|
||||||
|
res = a.call('POST', '/v1/appScreenshots', {'data': {'type': 'appScreenshots',
|
||||||
|
'attributes': {'fileName': path.name, 'fileSize': len(data)},
|
||||||
|
'relationships': {'appScreenshotSet': {'data': {'type': 'appScreenshotSets', 'id': set_id}}}}})
|
||||||
|
shot = res['data']
|
||||||
|
for op in shot['attributes']['uploadOperations']:
|
||||||
|
chunk = data[op['offset']:op['offset'] + op['length']]
|
||||||
|
req = urllib.request.Request(op['url'], data=chunk, method=op['method'],
|
||||||
|
headers={h['name']: h['value'] for h in op.get('requestHeaders', [])})
|
||||||
|
urllib.request.urlopen(req, timeout=180).read()
|
||||||
|
a.call('PATCH', f'/v1/appScreenshots/{shot["id"]}', {'data': {'type': 'appScreenshots', 'id': shot['id'],
|
||||||
|
'attributes': {'uploaded': True, 'sourceFileChecksum': hashlib.md5(data).hexdigest()}}})
|
||||||
|
return shot['id']
|
||||||
|
|
||||||
|
|
||||||
|
def screenshots(a, vloc_id, files):
|
||||||
|
sets = a.all(f'/v1/appStoreVersionLocalizations/{vloc_id}/appScreenshotSets')
|
||||||
|
s = next((x for x in sets if x['attributes']['screenshotDisplayType'] == DISPLAY_TYPE), None)
|
||||||
|
if s:
|
||||||
|
for old in a.all(f'/v1/appScreenshotSets/{s["id"]}/appScreenshots'):
|
||||||
|
a.call('DELETE', f'/v1/appScreenshots/{old["id"]}')
|
||||||
|
set_id = s['id']
|
||||||
|
else:
|
||||||
|
set_id = a.call('POST', '/v1/appScreenshotSets', {'data': {'type': 'appScreenshotSets',
|
||||||
|
'attributes': {'screenshotDisplayType': DISPLAY_TYPE},
|
||||||
|
'relationships': {'appStoreVersionLocalization': {'data': {'type': 'appStoreVersionLocalizations', 'id': vloc_id}}}}})['data']['id']
|
||||||
|
ids = [upload_screenshot(a, set_id, f) for f in files]
|
||||||
|
a.call('PATCH', f'/v1/appScreenshotSets/{set_id}/relationships/appScreenshots',
|
||||||
|
{'data': [{'type': 'appScreenshots', 'id': i} for i in ids]})
|
||||||
|
return len(ids)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
ap = argparse.ArgumentParser()
|
||||||
|
ap.add_argument('shots')
|
||||||
|
ap.add_argument('--locales', nargs='*')
|
||||||
|
ap.add_argument('--privacy-url', default='https://sagifer.github.io/appdocuments/skycontour/privacy.html')
|
||||||
|
ap.add_argument('--support-url', default='https://sagifer.github.io/appdocuments/skycontour/support.html')
|
||||||
|
ap.add_argument('--marketing-url')
|
||||||
|
ap.add_argument('--texts-only', action='store_true', help='leave screenshots and build untouched')
|
||||||
|
ap.add_argument('--copyright', default='© 2026 Ferenc Sági')
|
||||||
|
args = ap.parse_args()
|
||||||
|
meta = {k: v for k, v in json.loads((HERE / 'metadata.json').read_text()).items() if not k.startswith('_')}
|
||||||
|
locales = args.locales or list(meta)
|
||||||
|
|
||||||
|
a = Asc()
|
||||||
|
app = a.app()
|
||||||
|
version = next(v for v in a.all(f'/v1/apps/{app["id"]}/appStoreVersions')
|
||||||
|
if v['attributes']['appStoreState'] in EDITABLE)
|
||||||
|
info = next(i for i in a.all(f'/v1/apps/{app["id"]}/appInfos')
|
||||||
|
if (i['attributes'].get('appStoreState') or i['attributes'].get('state')) in EDITABLE | {'PREPARE_FOR_SUBMISSION'})
|
||||||
|
print(f'version {version["attributes"]["versionString"]} ({version["attributes"]["appStoreState"]})')
|
||||||
|
|
||||||
|
# Version-level fields and category.
|
||||||
|
a.call('PATCH', f'/v1/appStoreVersions/{version["id"]}', {'data': {'type': 'appStoreVersions', 'id': version['id'],
|
||||||
|
'attributes': {'copyright': args.copyright}}})
|
||||||
|
a.call('PATCH', f'/v1/appInfos/{info["id"]}', {'data': {'type': 'appInfos', 'id': info['id'], 'relationships': {
|
||||||
|
'primaryCategory': {'data': {'type': 'appCategories', 'id': 'UTILITIES'}},
|
||||||
|
'secondaryCategory': {'data': {'type': 'appCategories', 'id': 'EDUCATION'}}}}})
|
||||||
|
|
||||||
|
iloc = a.all(f'/v1/appInfos/{info["id"]}/appInfoLocalizations')
|
||||||
|
for locale in locales:
|
||||||
|
m = meta[locale]
|
||||||
|
upsert_localization(a, 'appInfoLocalizations', 'appInfo', info['id'], iloc, locale,
|
||||||
|
{'name': 'SkyContour', 'subtitle': m['subtitle'], 'privacyPolicyUrl': args.privacy_url})
|
||||||
|
# Adding an app-info language also creates the version's localization: list it afresh.
|
||||||
|
vloc = a.all(f'/v1/appStoreVersions/{version["id"]}/appStoreVersionLocalizations')
|
||||||
|
vid = upsert_localization(a, 'appStoreVersionLocalizations', 'appStoreVersion', version['id'], vloc, locale,
|
||||||
|
{'description': m['description'], 'keywords': m['keywords'],
|
||||||
|
'promotionalText': m['promotionalText'], 'supportUrl': args.support_url,
|
||||||
|
'marketingUrl': args.marketing_url})
|
||||||
|
files = sorted((Path(args.shots) / locale).glob('0*.png'))
|
||||||
|
n = screenshots(a, vid, files) if files and not args.texts_only else 0
|
||||||
|
print(f'{locale:6} texts ok, {n} screenshots')
|
||||||
|
|
||||||
|
if args.texts_only:
|
||||||
|
return
|
||||||
|
# Newest processed build on the version.
|
||||||
|
builds = [b for b in a.all(f'/v1/builds?filter[app]={app["id"]}&filter[processingState]=VALID&sort=-uploadedDate&limit=10')]
|
||||||
|
if builds:
|
||||||
|
b = builds[0]
|
||||||
|
try:
|
||||||
|
a.call('PATCH', f'/v1/appStoreVersions/{version["id"]}/relationships/build',
|
||||||
|
{'data': {'type': 'builds', 'id': b['id']}})
|
||||||
|
print('build attached:', b['attributes']['version'])
|
||||||
|
except AscError as e:
|
||||||
|
print('build not attached yet:', str(e)[:200])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { Component } from 'react'
|
||||||
|
import { t } from '../i18n'
|
||||||
|
import { errText } from '../lib/wasm'
|
||||||
|
|
||||||
|
// A render error would otherwise unmount the whole app and leave a dark,
|
||||||
|
// empty screen (and the global error banner with it): show it with a reload.
|
||||||
|
export default class ErrorBoundary extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props)
|
||||||
|
this.state = { error: null }
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromError(error) {
|
||||||
|
return { error }
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
if (!this.state.error) return this.props.children
|
||||||
|
return (
|
||||||
|
<div className="crash" role="alert">
|
||||||
|
<strong>{t('app.crashed')}</strong>
|
||||||
|
<span className="small">{errText(this.state.error)}</span>
|
||||||
|
<button className="btn btn-primary" onClick={() => location.reload()}>{t('app.reload')}</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,6 +56,14 @@ export const IconCompass = icon(
|
|||||||
20,
|
20,
|
||||||
1.8,
|
1.8,
|
||||||
)
|
)
|
||||||
|
export const IconSun = icon(
|
||||||
|
<>
|
||||||
|
<circle cx="12" cy="12" r="4" />
|
||||||
|
<path d="M12 2.5v2.5M12 19v2.5M2.5 12H5M19 12h2.5M5.3 5.3l1.8 1.8M16.9 16.9l1.8 1.8M5.3 18.7l1.8-1.8M16.9 7.1l1.8-1.8" />
|
||||||
|
</>,
|
||||||
|
20,
|
||||||
|
1.8,
|
||||||
|
)
|
||||||
export const IconClose = icon(<path d="M6 6l12 12M18 6L6 18" />, 20, 2)
|
export const IconClose = icon(<path d="M6 6l12 12M18 6L6 18" />, 20, 2)
|
||||||
export const IconUndo = icon(
|
export const IconUndo = icon(
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'تعذّر تحميل المحرّك: {error}',
|
'app.engineError': 'تعذّر تحميل المحرّك: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'حدث خطأ ما.',
|
||||||
|
|
||||||
|
'app.reload': 'إعادة التحميل',
|
||||||
|
|
||||||
'welcome.tagline': 'تتبّع الأشجار وأسطح المنازل حول تلسكوبك',
|
'welcome.tagline': 'تتبّع الأشجار وأسطح المنازل حول تلسكوبك',
|
||||||
'welcome.formats': 'NINA .HRZ · مشهد Stellarium',
|
'welcome.formats': 'NINA .HRZ · مشهد Stellarium',
|
||||||
|
'welcome.daylight': 'قِس في ضوء النهار',
|
||||||
'welcome.start': 'ابدأ',
|
'welcome.start': 'ابدأ',
|
||||||
'welcome.sceneLabel': 'حديقة ليلية فيها منزل وأشجار وتلسكوب تحت سماء مرصّعة بالنجوم؛ خطّ كهرماني متقطّع يتتبّع الأفق فوق الأسطح وقمم الأشجار',
|
'welcome.sceneLabel': 'حديقة ليلية فيها منزل وأشجار وتلسكوب تحت سماء مرصّعة بالنجوم؛ خطّ كهرماني متقطّع يتتبّع الأفق فوق الأسطح وقمم الأشجار',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'الإعدادات',
|
'sites.settings': 'الإعدادات',
|
||||||
'sites.count': 'المواقع · {count}',
|
'sites.count': 'المواقع · {count}',
|
||||||
'sites.emptyTitle': 'لا توجد مواقع بعد',
|
'sites.emptyTitle': 'لا توجد مواقع بعد',
|
||||||
'sites.emptyHint': 'قف حيث يقف تلسكوبك وابدأ مسحًا.',
|
'sites.emptyHint': 'قف حيث يقف تلسكوبك وابدأ مسحًا في ضوء النهار.',
|
||||||
'sites.emptyHintApp': 'اضغط «{tab}» في الأسفل، أو استورد ملف \u200E.hrz من NINA بالزر في الأعلى.',
|
'sites.emptyHintApp': 'اضغط «{tab}» في الأسفل، أو استورد ملف \u200E.hrz من NINA بالزر في الأعلى.',
|
||||||
'sites.newSurvey': 'مسح جديد للأفق',
|
'sites.newSurvey': 'مسح جديد للأفق',
|
||||||
'sites.import': 'استيراد ملف \u200E.hrz موجود',
|
'sites.import': 'استيراد ملف \u200E.hrz موجود',
|
||||||
@@ -59,6 +64,8 @@ export default {
|
|||||||
'setup.northTitle': 'الشمال من البوصلة',
|
'setup.northTitle': 'الشمال من البوصلة',
|
||||||
'setup.northHint': 'لم يُطبَّق الانحراف المغناطيسي بعد: صحّح الشمال بالإزاحة في شاشة المراجعة',
|
'setup.northHint': 'لم يُطبَّق الانحراف المغناطيسي بعد: صحّح الشمال بالإزاحة في شاشة المراجعة',
|
||||||
'setup.howTo': 'طريقة التصوير',
|
'setup.howTo': 'طريقة التصوير',
|
||||||
|
'setup.daylightTitle': 'قِس في ضوء النهار',
|
||||||
|
'setup.daylightHint': 'يبحث التطبيق عن الحد بين السماء الساطعة والأشجار أو الأسطح الداكنة. في الظلام لا يوجد حد يمكن العثور عليه: قِس نهارًا أو عند الغسق.',
|
||||||
'setup.skyNotNeeded': 'لا حاجة للسماء',
|
'setup.skyNotNeeded': 'لا حاجة للسماء',
|
||||||
'setup.illustration': 'استدر دورة كاملة في مكانك والهاتف قائم؛ يُصوَّر فقط شريط حول الأفق',
|
'setup.illustration': 'استدر دورة كاملة في مكانك والهاتف قائم؛ يُصوَّر فقط شريط حول الأفق',
|
||||||
'setup.step1': 'قف حيث يقف التلسكوب.',
|
'setup.step1': 'قف حيث يقف التلسكوب.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Die Rechen-Engine konnte nicht geladen werden: {error}',
|
'app.engineError': 'Die Rechen-Engine konnte nicht geladen werden: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Etwas ist schiefgelaufen.',
|
||||||
|
|
||||||
|
'app.reload': 'Neu laden',
|
||||||
|
|
||||||
'welcome.tagline': 'Erfasse die Bäume und Dächer rund um dein Teleskop',
|
'welcome.tagline': 'Erfasse die Bäume und Dächer rund um dein Teleskop',
|
||||||
'welcome.formats': 'NINA .HRZ · STELLARIUM-LANDSCHAFT',
|
'welcome.formats': 'NINA .HRZ · STELLARIUM-LANDSCHAFT',
|
||||||
|
'welcome.daylight': 'Bei Tageslicht messen',
|
||||||
'welcome.start': 'Los geht’s',
|
'welcome.start': 'Los geht’s',
|
||||||
'welcome.sceneLabel': 'Nächtlicher Garten mit Haus, Bäumen und Teleskop unter Sternenhimmel; eine gestrichelte bernsteinfarbene Linie folgt dem Horizont über Dächern und Baumkronen',
|
'welcome.sceneLabel': 'Nächtlicher Garten mit Haus, Bäumen und Teleskop unter Sternenhimmel; eine gestrichelte bernsteinfarbene Linie folgt dem Horizont über Dächern und Baumkronen',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Einstellungen',
|
'sites.settings': 'Einstellungen',
|
||||||
'sites.count': 'Standorte · {count}',
|
'sites.count': 'Standorte · {count}',
|
||||||
'sites.emptyTitle': 'Noch keine Standorte',
|
'sites.emptyTitle': 'Noch keine Standorte',
|
||||||
'sites.emptyHint': 'Stell dich dorthin, wo dein Teleskop steht, und starte eine Messung.',
|
'sites.emptyHint': 'Stell dich dorthin, wo dein Teleskop steht, und starte bei Tageslicht eine Messung.',
|
||||||
'sites.emptyHintApp': 'Tippe unten auf „{tab}“ oder importiere eine NINA-.hrz mit der Schaltfläche oben.',
|
'sites.emptyHintApp': 'Tippe unten auf „{tab}“ oder importiere eine NINA-.hrz mit der Schaltfläche oben.',
|
||||||
'sites.newSurvey': 'Neue Horizontmessung',
|
'sites.newSurvey': 'Neue Horizontmessung',
|
||||||
'sites.import': 'Vorhandene .hrz importieren',
|
'sites.import': 'Vorhandene .hrz importieren',
|
||||||
@@ -53,6 +58,8 @@ export default {
|
|||||||
'setup.northTitle': 'Norden vom Kompass',
|
'setup.northTitle': 'Norden vom Kompass',
|
||||||
'setup.northHint': 'Die Deklination wird noch nicht berücksichtigt: korrigiere Norden mit dem Versatz in der Prüfung',
|
'setup.northHint': 'Die Deklination wird noch nicht berücksichtigt: korrigiere Norden mit dem Versatz in der Prüfung',
|
||||||
'setup.howTo': 'So wird aufgenommen',
|
'setup.howTo': 'So wird aufgenommen',
|
||||||
|
'setup.daylightTitle': 'Bei Tageslicht messen',
|
||||||
|
'setup.daylightHint': 'Die App sucht die Kante zwischen hellem Himmel und dunklen Bäumen oder Dächern. Im Dunkeln gibt es keine Kante: Miss tagsüber oder in der Dämmerung.',
|
||||||
'setup.skyNotNeeded': 'Himmel nicht nötig',
|
'setup.skyNotNeeded': 'Himmel nicht nötig',
|
||||||
'setup.illustration': 'Dreh dich einmal auf der Stelle und halte das Telefon aufrecht; fotografiert wird nur ein Band um den Horizont',
|
'setup.illustration': 'Dreh dich einmal auf der Stelle und halte das Telefon aufrecht; fotografiert wird nur ein Band um den Horizont',
|
||||||
'setup.step1': 'Stell dich dorthin, wo das Teleskop steht.',
|
'setup.step1': 'Stell dich dorthin, wo das Teleskop steht.',
|
||||||
|
|||||||
@@ -19,9 +19,14 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Could not load the engine: {error}',
|
'app.engineError': 'Could not load the engine: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Something went wrong.',
|
||||||
|
|
||||||
|
'app.reload': 'Reload',
|
||||||
|
|
||||||
// Welcome
|
// Welcome
|
||||||
'welcome.tagline': 'Trace the trees and rooftops around your telescope',
|
'welcome.tagline': 'Trace the trees and rooftops around your telescope',
|
||||||
'welcome.formats': 'NINA .HRZ · STELLARIUM LANDSCAPE',
|
'welcome.formats': 'NINA .HRZ · STELLARIUM LANDSCAPE',
|
||||||
|
'welcome.daylight': 'Survey in daylight',
|
||||||
'welcome.start': 'Get started',
|
'welcome.start': 'Get started',
|
||||||
'welcome.sceneLabel': 'Night garden with a house, trees and a telescope under a starry sky; a dashed amber line traces the horizon over the rooftops and treetops',
|
'welcome.sceneLabel': 'Night garden with a house, trees and a telescope under a starry sky; a dashed amber line traces the horizon over the rooftops and treetops',
|
||||||
|
|
||||||
@@ -30,7 +35,7 @@ export default {
|
|||||||
'sites.settings': 'Settings',
|
'sites.settings': 'Settings',
|
||||||
'sites.count': 'Sites · {count}',
|
'sites.count': 'Sites · {count}',
|
||||||
'sites.emptyTitle': 'No sites yet',
|
'sites.emptyTitle': 'No sites yet',
|
||||||
'sites.emptyHint': 'Stand where your telescope stands and start a survey.',
|
'sites.emptyHint': 'Stand where your telescope stands and start a survey in daylight.',
|
||||||
'sites.emptyHintApp': 'Tap “{tab}” below, or import a NINA .hrz with the button above.',
|
'sites.emptyHintApp': 'Tap “{tab}” below, or import a NINA .hrz with the button above.',
|
||||||
'sites.newSurvey': 'New horizon survey',
|
'sites.newSurvey': 'New horizon survey',
|
||||||
'sites.import': 'Import existing .hrz',
|
'sites.import': 'Import existing .hrz',
|
||||||
@@ -59,6 +64,8 @@ export default {
|
|||||||
'setup.northTitle': 'North from compass',
|
'setup.northTitle': 'North from compass',
|
||||||
'setup.northHint': 'Declination is not applied yet: correct north with the offset in Review',
|
'setup.northHint': 'Declination is not applied yet: correct north with the offset in Review',
|
||||||
'setup.howTo': 'How to capture',
|
'setup.howTo': 'How to capture',
|
||||||
|
'setup.daylightTitle': 'Survey in daylight',
|
||||||
|
'setup.daylightHint': 'The app finds the edge between bright sky and dark trees or roofs. In the dark there is no edge to find: survey by day or at dusk.',
|
||||||
'setup.skyNotNeeded': 'sky not needed',
|
'setup.skyNotNeeded': 'sky not needed',
|
||||||
'setup.illustration': 'Turn once around in place, holding the phone upright; only a band around the horizon is photographed',
|
'setup.illustration': 'Turn once around in place, holding the phone upright; only a band around the horizon is photographed',
|
||||||
'setup.step1': 'Stand where the telescope stands.',
|
'setup.step1': 'Stand where the telescope stands.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'No se pudo cargar el motor: {error}',
|
'app.engineError': 'No se pudo cargar el motor: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Algo salió mal.',
|
||||||
|
|
||||||
|
'app.reload': 'Recargar',
|
||||||
|
|
||||||
'welcome.tagline': 'Traza los árboles y tejados alrededor de tu telescopio',
|
'welcome.tagline': 'Traza los árboles y tejados alrededor de tu telescopio',
|
||||||
'welcome.formats': 'NINA .HRZ · PAISAJE DE STELLARIUM',
|
'welcome.formats': 'NINA .HRZ · PAISAJE DE STELLARIUM',
|
||||||
|
'welcome.daylight': 'Mide con luz de día',
|
||||||
'welcome.start': 'Empezar',
|
'welcome.start': 'Empezar',
|
||||||
'welcome.sceneLabel': 'Jardín nocturno con una casa, árboles y un telescopio bajo un cielo estrellado; una línea ámbar discontinua sigue el horizonte sobre los tejados y las copas de los árboles',
|
'welcome.sceneLabel': 'Jardín nocturno con una casa, árboles y un telescopio bajo un cielo estrellado; una línea ámbar discontinua sigue el horizonte sobre los tejados y las copas de los árboles',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Ajustes',
|
'sites.settings': 'Ajustes',
|
||||||
'sites.count': 'Lugares · {count}',
|
'sites.count': 'Lugares · {count}',
|
||||||
'sites.emptyTitle': 'Aún no hay lugares',
|
'sites.emptyTitle': 'Aún no hay lugares',
|
||||||
'sites.emptyHint': 'Colócate donde está tu telescopio e inicia un estudio.',
|
'sites.emptyHint': 'Colócate donde está tu telescopio e inicia un estudio de día.',
|
||||||
'sites.emptyHintApp': 'Toca «{tab}» abajo o importa un .hrz de NINA con el botón de arriba.',
|
'sites.emptyHintApp': 'Toca «{tab}» abajo o importa un .hrz de NINA con el botón de arriba.',
|
||||||
'sites.newSurvey': 'Nuevo estudio del horizonte',
|
'sites.newSurvey': 'Nuevo estudio del horizonte',
|
||||||
'sites.import': 'Importar un .hrz existente',
|
'sites.import': 'Importar un .hrz existente',
|
||||||
@@ -53,6 +58,8 @@ export default {
|
|||||||
'setup.northTitle': 'Norte de la brújula',
|
'setup.northTitle': 'Norte de la brújula',
|
||||||
'setup.northHint': 'La declinación aún no se aplica: corrige el norte con el desfase en la revisión',
|
'setup.northHint': 'La declinación aún no se aplica: corrige el norte con el desfase en la revisión',
|
||||||
'setup.howTo': 'Cómo capturar',
|
'setup.howTo': 'Cómo capturar',
|
||||||
|
'setup.daylightTitle': 'Mide con luz de día',
|
||||||
|
'setup.daylightHint': 'La app busca el borde entre el cielo claro y los árboles o tejados oscuros. A oscuras no hay borde que encontrar: mide de día o al atardecer.',
|
||||||
'setup.skyNotNeeded': 'el cielo no hace falta',
|
'setup.skyNotNeeded': 'el cielo no hace falta',
|
||||||
'setup.illustration': 'Gira una vez sobre ti mismo con el teléfono vertical; solo se fotografía una franja alrededor del horizonte',
|
'setup.illustration': 'Gira una vez sobre ti mismo con el teléfono vertical; solo se fotografía una franja alrededor del horizonte',
|
||||||
'setup.step1': 'Colócate donde está el telescopio.',
|
'setup.step1': 'Colócate donde está el telescopio.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Impossible de charger le moteur : {error}',
|
'app.engineError': 'Impossible de charger le moteur : {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Un problème est survenu.',
|
||||||
|
|
||||||
|
'app.reload': 'Recharger',
|
||||||
|
|
||||||
'welcome.tagline': 'Tracez les arbres et les toits autour de votre télescope',
|
'welcome.tagline': 'Tracez les arbres et les toits autour de votre télescope',
|
||||||
'welcome.formats': 'NINA .HRZ · PAYSAGE STELLARIUM',
|
'welcome.formats': 'NINA .HRZ · PAYSAGE STELLARIUM',
|
||||||
|
'welcome.daylight': 'Mesurez en plein jour',
|
||||||
'welcome.start': 'Commencer',
|
'welcome.start': 'Commencer',
|
||||||
'welcome.sceneLabel': 'Jardin de nuit avec une maison, des arbres et un télescope sous un ciel étoilé ; une ligne ambre en pointillés suit l’horizon au-dessus des toits et des arbres',
|
'welcome.sceneLabel': 'Jardin de nuit avec une maison, des arbres et un télescope sous un ciel étoilé ; une ligne ambre en pointillés suit l’horizon au-dessus des toits et des arbres',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Réglages',
|
'sites.settings': 'Réglages',
|
||||||
'sites.count': 'Sites · {count}',
|
'sites.count': 'Sites · {count}',
|
||||||
'sites.emptyTitle': 'Aucun site pour l’instant',
|
'sites.emptyTitle': 'Aucun site pour l’instant',
|
||||||
'sites.emptyHint': 'Placez-vous à l’emplacement de votre télescope et lancez un relevé.',
|
'sites.emptyHint': 'Placez-vous à l’emplacement de votre télescope et lancez un relevé en plein jour.',
|
||||||
'sites.emptyHintApp': 'Touchez « {tab} » en bas, ou importez un .hrz NINA avec le bouton en haut.',
|
'sites.emptyHintApp': 'Touchez « {tab} » en bas, ou importez un .hrz NINA avec le bouton en haut.',
|
||||||
'sites.newSurvey': 'Nouveau relevé d’horizon',
|
'sites.newSurvey': 'Nouveau relevé d’horizon',
|
||||||
'sites.import': 'Importer un .hrz existant',
|
'sites.import': 'Importer un .hrz existant',
|
||||||
@@ -53,6 +58,8 @@ export default {
|
|||||||
'setup.northTitle': 'Nord donné par la boussole',
|
'setup.northTitle': 'Nord donné par la boussole',
|
||||||
'setup.northHint': 'La déclinaison n’est pas encore appliquée : corrigez le nord avec le décalage dans la vérification',
|
'setup.northHint': 'La déclinaison n’est pas encore appliquée : corrigez le nord avec le décalage dans la vérification',
|
||||||
'setup.howTo': 'Comment capturer',
|
'setup.howTo': 'Comment capturer',
|
||||||
|
'setup.daylightTitle': 'Mesurez en plein jour',
|
||||||
|
'setup.daylightHint': 'L’app cherche la limite entre le ciel clair et les arbres ou toits sombres. Dans le noir, il n’y a aucune limite à trouver : mesurez de jour ou au crépuscule.',
|
||||||
'setup.skyNotNeeded': 'ciel inutile',
|
'setup.skyNotNeeded': 'ciel inutile',
|
||||||
'setup.illustration': 'Faites un tour sur vous-même en tenant le téléphone droit ; seule une bande autour de l’horizon est photographiée',
|
'setup.illustration': 'Faites un tour sur vous-même en tenant le téléphone droit ; seule une bande autour de l’horizon est photographiée',
|
||||||
'setup.step1': 'Placez-vous à l’emplacement du télescope.',
|
'setup.step1': 'Placez-vous à l’emplacement du télescope.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Nem sikerült betölteni a motort: {error}',
|
'app.engineError': 'Nem sikerült betölteni a motort: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Valami hiba történt.',
|
||||||
|
|
||||||
|
'app.reload': 'Újratöltés',
|
||||||
|
|
||||||
'welcome.tagline': 'Rajzold körbe a fákat és háztetőket a távcsöved körül',
|
'welcome.tagline': 'Rajzold körbe a fákat és háztetőket a távcsöved körül',
|
||||||
'welcome.formats': 'NINA .HRZ · STELLARIUM TÁJKÉP',
|
'welcome.formats': 'NINA .HRZ · STELLARIUM TÁJKÉP',
|
||||||
|
'welcome.daylight': 'Nappal mérj',
|
||||||
'welcome.start': 'Kezdjük',
|
'welcome.start': 'Kezdjük',
|
||||||
'welcome.sceneLabel': 'Éjszakai kert házzal, fákkal és távcsővel a csillagos ég alatt; szaggatott borostyánszínű vonal követi a horizontot a háztetők és fák fölött',
|
'welcome.sceneLabel': 'Éjszakai kert házzal, fákkal és távcsővel a csillagos ég alatt; szaggatott borostyánszínű vonal követi a horizontot a háztetők és fák fölött',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Beállítások',
|
'sites.settings': 'Beállítások',
|
||||||
'sites.count': 'Helyszínek · {count}',
|
'sites.count': 'Helyszínek · {count}',
|
||||||
'sites.emptyTitle': 'Még nincs helyszín',
|
'sites.emptyTitle': 'Még nincs helyszín',
|
||||||
'sites.emptyHint': 'Állj oda, ahol a távcsöved áll, és indíts egy felmérést.',
|
'sites.emptyHint': 'Állj oda, ahol a távcsöved áll, és indíts egy felmérést nappal.',
|
||||||
'sites.emptyHintApp': 'Koppints lent az „{tab}” fülre, vagy importálj egy NINA .hrz fájlt a fenti gombbal.',
|
'sites.emptyHintApp': 'Koppints lent az „{tab}” fülre, vagy importálj egy NINA .hrz fájlt a fenti gombbal.',
|
||||||
'sites.newSurvey': 'Új horizontfelmérés',
|
'sites.newSurvey': 'Új horizontfelmérés',
|
||||||
'sites.import': 'Meglévő .hrz importálása',
|
'sites.import': 'Meglévő .hrz importálása',
|
||||||
@@ -53,6 +58,8 @@ export default {
|
|||||||
'setup.northTitle': 'Észak az iránytűből',
|
'setup.northTitle': 'Észak az iránytűből',
|
||||||
'setup.northHint': 'A deklinációt még nem számolja az app: az északot a Review képernyőn az eltolással igazítsd',
|
'setup.northHint': 'A deklinációt még nem számolja az app: az északot a Review képernyőn az eltolással igazítsd',
|
||||||
'setup.howTo': 'Így készül a felvétel',
|
'setup.howTo': 'Így készül a felvétel',
|
||||||
|
'setup.daylightTitle': 'Nappal mérj',
|
||||||
|
'setup.daylightHint': 'Az app a világos ég és a sötét fák, tetők határát keresi. Sötétben nincs mit megtalálnia: mérj nappal vagy szürkületben.',
|
||||||
'setup.skyNotNeeded': 'az ég nem kell',
|
'setup.skyNotNeeded': 'az ég nem kell',
|
||||||
'setup.illustration': 'Fordulj körbe egy helyben, a telefont függőlegesen tartva; csak a horizont körüli sáv kerül a képekre',
|
'setup.illustration': 'Fordulj körbe egy helyben, a telefont függőlegesen tartva; csak a horizont körüli sáv kerül a képekre',
|
||||||
'setup.step1': 'Állj oda, ahol a távcső áll.',
|
'setup.step1': 'Állj oda, ahol a távcső áll.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Impossibile caricare il motore: {error}',
|
'app.engineError': 'Impossibile caricare il motore: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Qualcosa è andato storto.',
|
||||||
|
|
||||||
|
'app.reload': 'Ricarica',
|
||||||
|
|
||||||
'welcome.tagline': 'Traccia gli alberi e i tetti intorno al tuo telescopio',
|
'welcome.tagline': 'Traccia gli alberi e i tetti intorno al tuo telescopio',
|
||||||
'welcome.formats': 'NINA .HRZ · PAESAGGIO STELLARIUM',
|
'welcome.formats': 'NINA .HRZ · PAESAGGIO STELLARIUM',
|
||||||
|
'welcome.daylight': 'Misura con la luce del giorno',
|
||||||
'welcome.start': 'Inizia',
|
'welcome.start': 'Inizia',
|
||||||
'welcome.sceneLabel': 'Giardino notturno con una casa, alberi e un telescopio sotto un cielo stellato; una linea ambra tratteggiata segue l’orizzonte sopra i tetti e le chiome degli alberi',
|
'welcome.sceneLabel': 'Giardino notturno con una casa, alberi e un telescopio sotto un cielo stellato; una linea ambra tratteggiata segue l’orizzonte sopra i tetti e le chiome degli alberi',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Impostazioni',
|
'sites.settings': 'Impostazioni',
|
||||||
'sites.count': 'Luoghi · {count}',
|
'sites.count': 'Luoghi · {count}',
|
||||||
'sites.emptyTitle': 'Ancora nessun luogo',
|
'sites.emptyTitle': 'Ancora nessun luogo',
|
||||||
'sites.emptyHint': 'Mettiti dove si trova il tuo telescopio e avvia un rilievo.',
|
'sites.emptyHint': 'Mettiti dove si trova il tuo telescopio e avvia un rilievo di giorno.',
|
||||||
'sites.emptyHintApp': 'Tocca «{tab}» in basso oppure importa un .hrz di NINA con il pulsante in alto.',
|
'sites.emptyHintApp': 'Tocca «{tab}» in basso oppure importa un .hrz di NINA con il pulsante in alto.',
|
||||||
'sites.newSurvey': 'Nuovo rilievo dell’orizzonte',
|
'sites.newSurvey': 'Nuovo rilievo dell’orizzonte',
|
||||||
'sites.import': 'Importa un .hrz esistente',
|
'sites.import': 'Importa un .hrz esistente',
|
||||||
@@ -53,6 +58,8 @@ export default {
|
|||||||
'setup.northTitle': 'Nord dalla bussola',
|
'setup.northTitle': 'Nord dalla bussola',
|
||||||
'setup.northHint': 'La declinazione non è ancora applicata: correggi il nord con lo scostamento nella revisione',
|
'setup.northHint': 'La declinazione non è ancora applicata: correggi il nord con lo scostamento nella revisione',
|
||||||
'setup.howTo': 'Come riprendere',
|
'setup.howTo': 'Come riprendere',
|
||||||
|
'setup.daylightTitle': 'Misura con la luce del giorno',
|
||||||
|
'setup.daylightHint': 'L’app cerca il confine tra il cielo chiaro e gli alberi o i tetti scuri. Al buio non c’è nessun confine da trovare: misura di giorno o al crepuscolo.',
|
||||||
'setup.skyNotNeeded': 'il cielo non serve',
|
'setup.skyNotNeeded': 'il cielo non serve',
|
||||||
'setup.illustration': 'Fai un giro su te stesso tenendo il telefono in verticale; viene fotografata solo una fascia intorno all’orizzonte',
|
'setup.illustration': 'Fai un giro su te stesso tenendo il telefono in verticale; viene fotografata solo una fascia intorno all’orizzonte',
|
||||||
'setup.step1': 'Mettiti dove si trova il telescopio.',
|
'setup.step1': 'Mettiti dove si trova il telescopio.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Nie udało się wczytać silnika: {error}',
|
'app.engineError': 'Nie udało się wczytać silnika: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Coś poszło nie tak.',
|
||||||
|
|
||||||
|
'app.reload': 'Wczytaj ponownie',
|
||||||
|
|
||||||
'welcome.tagline': 'Obrysuj drzewa i dachy wokół swojego teleskopu',
|
'welcome.tagline': 'Obrysuj drzewa i dachy wokół swojego teleskopu',
|
||||||
'welcome.formats': 'NINA .HRZ · KRAJOBRAZ STELLARIUM',
|
'welcome.formats': 'NINA .HRZ · KRAJOBRAZ STELLARIUM',
|
||||||
|
'welcome.daylight': 'Mierz za dnia',
|
||||||
'welcome.start': 'Zaczynamy',
|
'welcome.start': 'Zaczynamy',
|
||||||
'welcome.sceneLabel': 'Nocny ogród z domem, drzewami i teleskopem pod rozgwieżdżonym niebem; przerywana bursztynowa linia biegnie wzdłuż horyzontu nad dachami i koronami drzew',
|
'welcome.sceneLabel': 'Nocny ogród z domem, drzewami i teleskopem pod rozgwieżdżonym niebem; przerywana bursztynowa linia biegnie wzdłuż horyzontu nad dachami i koronami drzew',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Ustawienia',
|
'sites.settings': 'Ustawienia',
|
||||||
'sites.count': 'Miejsca · {count}',
|
'sites.count': 'Miejsca · {count}',
|
||||||
'sites.emptyTitle': 'Brak miejsc',
|
'sites.emptyTitle': 'Brak miejsc',
|
||||||
'sites.emptyHint': 'Stań tam, gdzie stoi twój teleskop, i rozpocznij pomiar.',
|
'sites.emptyHint': 'Stań tam, gdzie stoi twój teleskop, i rozpocznij pomiar za dnia.',
|
||||||
'sites.emptyHintApp': 'Dotknij „{tab}” na dole albo zaimportuj plik .hrz z NINA przyciskiem u góry.',
|
'sites.emptyHintApp': 'Dotknij „{tab}” na dole albo zaimportuj plik .hrz z NINA przyciskiem u góry.',
|
||||||
'sites.newSurvey': 'Nowy pomiar horyzontu',
|
'sites.newSurvey': 'Nowy pomiar horyzontu',
|
||||||
'sites.import': 'Importuj istniejący .hrz',
|
'sites.import': 'Importuj istniejący .hrz',
|
||||||
@@ -59,6 +64,8 @@ export default {
|
|||||||
'setup.northTitle': 'Północ z kompasu',
|
'setup.northTitle': 'Północ z kompasu',
|
||||||
'setup.northHint': 'Deklinacja nie jest jeszcze uwzględniana: popraw północ przesunięciem w przeglądzie',
|
'setup.northHint': 'Deklinacja nie jest jeszcze uwzględniana: popraw północ przesunięciem w przeglądzie',
|
||||||
'setup.howTo': 'Jak wykonać pomiar',
|
'setup.howTo': 'Jak wykonać pomiar',
|
||||||
|
'setup.daylightTitle': 'Mierz za dnia',
|
||||||
|
'setup.daylightHint': 'Aplikacja szuka krawędzi między jasnym niebem a ciemnymi drzewami lub dachami. W ciemności nie ma czego znaleźć: mierz w dzień lub o zmierzchu.',
|
||||||
'setup.skyNotNeeded': 'niebo zbędne',
|
'setup.skyNotNeeded': 'niebo zbędne',
|
||||||
'setup.illustration': 'Obróć się raz w miejscu, trzymając telefon pionowo; fotografowany jest tylko pas wokół horyzontu',
|
'setup.illustration': 'Obróć się raz w miejscu, trzymając telefon pionowo; fotografowany jest tylko pas wokół horyzontu',
|
||||||
'setup.step1': 'Stań tam, gdzie stoi teleskop.',
|
'setup.step1': 'Stań tam, gdzie stoi teleskop.',
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ export default {
|
|||||||
|
|
||||||
'app.engineError': 'Nepodarilo sa načítať výpočtové jadro: {error}',
|
'app.engineError': 'Nepodarilo sa načítať výpočtové jadro: {error}',
|
||||||
|
|
||||||
|
'app.crashed': 'Niečo sa pokazilo.',
|
||||||
|
|
||||||
|
'app.reload': 'Znova načítať',
|
||||||
|
|
||||||
'welcome.tagline': 'Obkresli stromy a strechy okolo svojho ďalekohľadu',
|
'welcome.tagline': 'Obkresli stromy a strechy okolo svojho ďalekohľadu',
|
||||||
'welcome.formats': 'NINA .HRZ · KRAJINA STELLARIUM',
|
'welcome.formats': 'NINA .HRZ · KRAJINA STELLARIUM',
|
||||||
|
'welcome.daylight': 'Meraj za denného svetla',
|
||||||
'welcome.start': 'Začať',
|
'welcome.start': 'Začať',
|
||||||
'welcome.sceneLabel': 'Nočná záhrada s domom, stromami a ďalekohľadom pod hviezdnou oblohou; prerušovaná jantárová čiara sleduje horizont nad strechami a korunami stromov',
|
'welcome.sceneLabel': 'Nočná záhrada s domom, stromami a ďalekohľadom pod hviezdnou oblohou; prerušovaná jantárová čiara sleduje horizont nad strechami a korunami stromov',
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ export default {
|
|||||||
'sites.settings': 'Nastavenia',
|
'sites.settings': 'Nastavenia',
|
||||||
'sites.count': 'Miesta · {count}',
|
'sites.count': 'Miesta · {count}',
|
||||||
'sites.emptyTitle': 'Zatiaľ žiadne miesta',
|
'sites.emptyTitle': 'Zatiaľ žiadne miesta',
|
||||||
'sites.emptyHint': 'Postav sa tam, kde stojí tvoj ďalekohľad, a začni meranie.',
|
'sites.emptyHint': 'Postav sa tam, kde stojí tvoj ďalekohľad, a začni meranie cez deň.',
|
||||||
'sites.emptyHintApp': 'Ťukni dole na „{tab}“ alebo importuj súbor .hrz z NINA tlačidlom hore.',
|
'sites.emptyHintApp': 'Ťukni dole na „{tab}“ alebo importuj súbor .hrz z NINA tlačidlom hore.',
|
||||||
'sites.newSurvey': 'Nové meranie horizontu',
|
'sites.newSurvey': 'Nové meranie horizontu',
|
||||||
'sites.import': 'Importovať existujúci .hrz',
|
'sites.import': 'Importovať existujúci .hrz',
|
||||||
@@ -59,6 +64,8 @@ export default {
|
|||||||
'setup.northTitle': 'Sever z kompasu',
|
'setup.northTitle': 'Sever z kompasu',
|
||||||
'setup.northHint': 'Deklinácia sa zatiaľ neuplatňuje: sever oprav posunom pri kontrole',
|
'setup.northHint': 'Deklinácia sa zatiaľ neuplatňuje: sever oprav posunom pri kontrole',
|
||||||
'setup.howTo': 'Ako snímať',
|
'setup.howTo': 'Ako snímať',
|
||||||
|
'setup.daylightTitle': 'Meraj za denného svetla',
|
||||||
|
'setup.daylightHint': 'Aplikácia hľadá hranicu medzi svetlou oblohou a tmavými stromami či strechami. V tme nemá čo nájsť: meraj cez deň alebo za súmraku.',
|
||||||
'setup.skyNotNeeded': 'obloha nie je potrebná',
|
'setup.skyNotNeeded': 'obloha nie je potrebná',
|
||||||
'setup.illustration': 'Raz sa otoč na mieste a drž telefón zvisle; fotí sa len pás okolo horizontu',
|
'setup.illustration': 'Raz sa otoč na mieste a drž telefón zvisle; fotí sa len pás okolo horizontu',
|
||||||
'setup.step1': 'Postav sa tam, kde stojí ďalekohľad.',
|
'setup.step1': 'Postav sa tam, kde stojí ďalekohľad.',
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ import '@fontsource/ibm-plex-mono/400.css'
|
|||||||
import '@fontsource/ibm-plex-mono/500.css'
|
import '@fontsource/ibm-plex-mono/500.css'
|
||||||
import './styles.css'
|
import './styles.css'
|
||||||
import App from './App.jsx'
|
import App from './App.jsx'
|
||||||
|
import ErrorBoundary from './components/ErrorBoundary'
|
||||||
|
|
||||||
createRoot(document.getElementById('root')).render(
|
createRoot(document.getElementById('root')).render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<App />
|
<ErrorBoundary>
|
||||||
|
<App />
|
||||||
|
</ErrorBoundary>
|
||||||
</StrictMode>,
|
</StrictMode>,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
import { IconBack, IconPin, IconCompass, IconChevronRight } from '../components/Icons'
|
import { IconBack, IconPin, IconCompass, IconChevronRight, IconSun } from '../components/Icons'
|
||||||
import { latText, lonText } from '../lib/format'
|
import { latText, lonText } from '../lib/format'
|
||||||
import { startCamera, startOrientation } from '../lib/camera'
|
import { startCamera, startOrientation } from '../lib/camera'
|
||||||
import { errText } from '../lib/wasm'
|
import { errText } from '../lib/wasm'
|
||||||
@@ -109,6 +109,13 @@ export default function Setup({ suggestedName, onBack, onStart }) {
|
|||||||
|
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||||
<span className="overline">{t('setup.howTo')}</span>
|
<span className="overline">{t('setup.howTo')}</span>
|
||||||
|
<div className="daylight-card" role="note">
|
||||||
|
<IconSun size={24} style={{ color: 'var(--accent)', flex: 'none' }} />
|
||||||
|
<div>
|
||||||
|
<span className="strong">{t('setup.daylightTitle')}</span>
|
||||||
|
<span className="small">{t('setup.daylightHint')}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<svg viewBox="0 0 350 120" width="100%" role="img" style={{ display: 'block' }}
|
<svg viewBox="0 0 350 120" width="100%" role="img" style={{ display: 'block' }}
|
||||||
aria-label={t('setup.illustration')}>
|
aria-label={t('setup.illustration')}>
|
||||||
<ellipse cx="175" cy="66" rx="150" ry="34" fill="none" stroke="#263042" strokeWidth="22" />
|
<ellipse cx="175" cy="66" rx="150" ry="34" fill="none" stroke="#263042" strokeWidth="22" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
import AppIcon from '../components/AppIcon'
|
import AppIcon from '../components/AppIcon'
|
||||||
import { IconChevronRight } from '../components/Icons'
|
import { IconChevronRight, IconSun } from '../components/Icons'
|
||||||
import { t } from '../i18n'
|
import { t } from '../i18n'
|
||||||
import { APP_NAME } from '../lib/app'
|
import { APP_NAME } from '../lib/app'
|
||||||
|
|
||||||
@@ -143,6 +143,7 @@ export default function Welcome({ onStart }) {
|
|||||||
<p style={{ margin: 0, maxWidth: 280, fontSize: 17, lineHeight: 1.4, color: 'var(--text2)' }}>
|
<p style={{ margin: 0, maxWidth: 280, fontSize: 17, lineHeight: 1.4, color: 'var(--text2)' }}>
|
||||||
{t('welcome.tagline')}
|
{t('welcome.tagline')}
|
||||||
</p>
|
</p>
|
||||||
|
<span className="daylight-pill"><IconSun size={16} />{t('welcome.daylight')}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
position: 'absolute', left: 20, right: 20, bottom: 'calc(var(--safe-bottom) + 24px)',
|
position: 'absolute', left: 20, right: 20, bottom: 'calc(var(--safe-bottom) + 24px)',
|
||||||
|
|||||||
@@ -199,6 +199,24 @@ button:disabled { cursor: default; opacity: 0.45; }
|
|||||||
font-size: 13px; line-height: 1.35; padding: 10px 12px; border-radius: 12px;
|
font-size: 13px; line-height: 1.35; padding: 10px 12px; border-radius: 12px;
|
||||||
background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--text);
|
background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--text);
|
||||||
}
|
}
|
||||||
|
.crash {
|
||||||
|
min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 14px;
|
||||||
|
padding: calc(var(--safe-top, 0px) + 24px) 24px calc(var(--safe-bottom, 0px) + 24px); text-align: center;
|
||||||
|
}
|
||||||
|
.crash strong { font-size: 20px; }
|
||||||
|
.crash .small { font-size: 13px; color: var(--muted); word-break: break-word; }
|
||||||
|
.daylight-card {
|
||||||
|
display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px;
|
||||||
|
background: var(--warn-bg); border: 1px solid var(--warn-border);
|
||||||
|
}
|
||||||
|
.daylight-card > div { display: flex; flex-direction: column; gap: 3px; }
|
||||||
|
.daylight-card .strong { font-size: 15px; font-weight: 600; color: var(--accent); }
|
||||||
|
.daylight-card .small { font-size: 13px; line-height: 1.4; color: var(--text2); }
|
||||||
|
.daylight-pill {
|
||||||
|
display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
|
||||||
|
font-size: 14px; font-weight: 600; color: var(--accent);
|
||||||
|
background: rgba(10, 13, 19, 0.6); border: 1px solid var(--warn-border);
|
||||||
|
}
|
||||||
.notice.error { background: #2A1410; border-color: #5A2A1E; }
|
.notice.error { background: #2A1410; border-color: #5A2A1E; }
|
||||||
|
|
||||||
.chip {
|
.chip {
|
||||||
|
|||||||
Reference in New Issue
Block a user