Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b77d513a1 | ||
|
|
a733f87cba | ||
|
|
d0993d71ad | ||
|
|
b5f4ebfa16 | ||
|
|
f1dc2a1dff | ||
|
|
7d18f5089d | ||
|
|
900850f1a9 | ||
|
|
d30e918704 | ||
|
|
736882b1bd | ||
|
|
7a6b8207e1 | ||
|
|
1dab289a8f | ||
|
|
11324d6ece | ||
|
|
3818deacec | ||
|
|
2325a89629 | ||
|
|
d23b515003 | ||
|
|
5b43aa3c3d | ||
|
|
0b8aadc911 | ||
|
|
63bd330b81 | ||
|
|
af81a9a23a | ||
|
|
b6f405010e | ||
|
|
7ad56a3d3e | ||
|
|
f11c8b1174 | ||
|
|
860cc9af13 | ||
|
|
11b013134c | ||
|
|
269a277103 | ||
|
|
01522177f3 | ||
|
|
76fdecaccd | ||
|
|
5595bd70df | ||
|
|
7260d62662 | ||
|
|
a6473d2adf | ||
|
|
d631050d0d | ||
|
|
5d4ab56ed8 | ||
|
|
7b9f01b870 | ||
|
|
690c0db1bb | ||
|
|
019de0a0d6 | ||
|
|
3c11971227 | ||
|
|
af43d15d63 | ||
|
|
75e5d449b3 | ||
|
|
e58d9194a5 | ||
|
|
a84907925a | ||
|
|
12380d75ab | ||
|
|
43cd7f3908 | ||
|
|
7389a549cd | ||
|
|
17c9564fbd | ||
|
|
398c87020b | ||
|
|
35577f8fa6 | ||
|
|
4ef4081b52 | ||
|
|
3c08c08edc | ||
|
|
419899fd3b | ||
|
|
d3154ea5a0 | ||
|
|
782ad3d24a | ||
|
|
fdf38893ea | ||
|
|
bfd50cdf62 | ||
|
|
e277757410 | ||
|
|
268888ff95 | ||
|
|
17fbd99469 | ||
|
|
e09048a3b3 | ||
|
|
2d1759f560 | ||
|
|
ed470b98fe | ||
|
|
43ae482eb3 | ||
|
|
1ef26f4d79 | ||
|
|
7b5e324779 | ||
|
|
55db65df1d | ||
|
|
7216521a43 | ||
|
|
841b7e9bfc | ||
|
|
a78d30c778 | ||
|
|
31456658f2 | ||
|
|
81ff4593ae | ||
|
|
4fe2486539 | ||
|
|
278b115944 | ||
|
|
b86a904a0a | ||
|
|
1f8fd4b8d0 | ||
|
|
fbbe884b27 | ||
|
|
7fa42e6785 | ||
|
|
a128a47328 | ||
|
|
09d066216a | ||
|
|
4b6a2def2d | ||
|
|
47952f78e5 | ||
|
|
31b0f8a4bf | ||
|
|
4ebbf0d691 | ||
|
|
163a0e5e88 | ||
|
|
0be7d77a49 | ||
|
|
e6ad9d0991 | ||
|
|
c908342167 | ||
|
|
1f094bf922 | ||
|
|
bed1b70504 | ||
|
|
7bc8c17c0a | ||
|
|
99833a0b8c | ||
|
|
18e79b36fd |
No files matched your search
@@ -138,6 +138,8 @@ jobs:
|
||||
build/lists-ui-test/
|
||||
build/sync-review-ui-test/
|
||||
build/data-back-ui-test/
|
||||
build/leaderboard-ui-test/
|
||||
build/practice-images-ui-test/
|
||||
retention-days: 7
|
||||
|
||||
- name: Check out sync test server
|
||||
|
||||
@@ -40,7 +40,9 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/ziran-packages
|
||||
- name: Install signing and test dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y python3-cryptography python3-fonttools
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y python3-cryptography python3-fonttools
|
||||
.github/scripts/install-apt-packages.sh .github/apt/test-packages.txt
|
||||
- name: Build independent packages and check signatures
|
||||
run: |
|
||||
make package-version-test
|
||||
@@ -49,6 +51,8 @@ jobs:
|
||||
make package-upload-test
|
||||
make cells build-laws
|
||||
python3 tests/package_release_test.py
|
||||
- name: Run new packages in the last released app
|
||||
run: python3 tests/package_compat_test.py --skip-forward
|
||||
- name: Configure publisher
|
||||
id: publisher
|
||||
env:
|
||||
|
||||
@@ -100,6 +100,9 @@ jobs:
|
||||
- name: Require Visual Tests
|
||||
run: make visual-test
|
||||
|
||||
- name: Run Packages Across App Versions
|
||||
run: make package-compat-test
|
||||
|
||||
- name: Save Visual Test Evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -123,6 +126,8 @@ jobs:
|
||||
build/lists-ui-test/
|
||||
build/sync-review-ui-test/
|
||||
build/data-back-ui-test/
|
||||
build/leaderboard-ui-test/
|
||||
build/practice-images-ui-test/
|
||||
retention-days: 7
|
||||
|
||||
build-web:
|
||||
@@ -351,7 +356,7 @@ jobs:
|
||||
- name: Build Linux AppImage
|
||||
env:
|
||||
APPIMAGE_EXTRACT_AND_RUN: "1"
|
||||
RAY_RAYLIB_CONFIG: -DSUPPORT_SCREEN_CAPTURE=0 -DSUPPORT_COMPRESSION_API=0 -DSUPPORT_AUTOMATION_EVENTS=0 -DSUPPORT_CLIPBOARD_IMAGE=0 -DSUPPORT_FILEFORMAT_BMP=0 -DSUPPORT_FILEFORMAT_GIF=0 -DSUPPORT_FILEFORMAT_QOI=0 -DSUPPORT_FILEFORMAT_DDS=0 -DSUPPORT_FILEFORMAT_TTF=0
|
||||
RAY_RAYLIB_CONFIG: -DSUPPORT_SCREEN_CAPTURE=0 -DSUPPORT_COMPRESSION_API=0 -DSUPPORT_AUTOMATION_EVENTS=0 -DSUPPORT_CLIPBOARD_IMAGE=0 -DSUPPORT_FILEFORMAT_BMP=0 -DSUPPORT_FILEFORMAT_GIF=0 -DSUPPORT_FILEFORMAT_QOI=0 -DSUPPORT_FILEFORMAT_DDS=0 -DSUPPORT_FILEFORMAT_TTF=1
|
||||
run: |
|
||||
set -euo pipefail
|
||||
RAY_SDL_INCLUDE_DIR="$(pkg-config --variable=includedir sdl2 | sed 's,/SDL2$,,')"
|
||||
@@ -381,6 +386,13 @@ jobs:
|
||||
app_pid=$!
|
||||
for _ in $(seq 1 30); do
|
||||
if xwininfo -tree -root | grep -q 'Inner Breeze'; then
|
||||
sleep 3
|
||||
# A build without TrueType support draws a pixel font.
|
||||
if grep -q 'Font is not supported' /tmp/inbe-appimage.log; then
|
||||
echo "AppImage could not load its fonts"
|
||||
cat /tmp/inbe-appimage.log || true
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
if ! kill -0 "$app_pid" >/dev/null 2>&1; then
|
||||
@@ -887,6 +899,16 @@ jobs:
|
||||
done < <(scripts/list-expected-release-assets.sh "$VERSION")
|
||||
exit "$missing"
|
||||
|
||||
- name: Require a Passing Phone Check for a New Version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION=$(python3 scripts/check-version.py --print-version)
|
||||
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
||||
echo "v$VERSION is already tagged; no new version to check"
|
||||
exit 0
|
||||
fi
|
||||
python3 scripts/check-phone-check.py "$VERSION"
|
||||
|
||||
- name: Create and Push Tag If Version Is New
|
||||
id: tag_version
|
||||
env:
|
||||
@@ -960,6 +982,17 @@ jobs:
|
||||
arch="${arch%.rpm}"
|
||||
channels+=("--channel" "rpm-$arch=$rpm")
|
||||
done
|
||||
# Directly installed APKs update themselves from these channels;
|
||||
# the Google Play build updates through the store.
|
||||
while IFS= read -r apk; do
|
||||
abi="$(basename "$apk" .apk)"
|
||||
abi="${abi#inbe-$VERSION}"
|
||||
case "$abi" in
|
||||
-gplay) continue ;;
|
||||
"") channels+=("--channel" "android=$apk") ;;
|
||||
*) channels+=("--channel" "android$abi=$apk") ;;
|
||||
esac
|
||||
done < <(find build/release -maxdepth 2 -name "inbe-$VERSION*.apk" | sort)
|
||||
if [ ${#channels[@]} -eq 0 ]; then
|
||||
echo "no release artifacts found for the appcast"
|
||||
exit 1
|
||||
|
||||
@@ -13,6 +13,25 @@
|
||||
The canonical macros are `APP_VERSION_STRING`, `APP_VERSION_MAJOR`,
|
||||
`APP_VERSION_MINOR`, and `APP_VERSION_PATCH`; do not create aliases.
|
||||
Only the GitHub Actions release workflow creates or pushes release tags.
|
||||
- A new version publishes only with a passing phone check of its exact
|
||||
sources: build the APK from the committed release, run
|
||||
`make phone-check APK=...` with the development Moto connected through the
|
||||
ThinkPad, and commit `releases/phone-checks/VERSION.json`. Changes to app
|
||||
sources after the check require a new one.
|
||||
- Packages declare the oldest host interface they run on (`host_api` per app
|
||||
in `apps/versions.json`); the host runs `oldest_host_api` to `host_api`.
|
||||
Raise `host_api` when the host interface changes and `oldest_host_api` only
|
||||
when it can no longer run older packages. `make package-compat-test` runs
|
||||
the node's packages in this build and new packages in the last release.
|
||||
- Goal (owner, 2026-10-11): every app updates through its own package
|
||||
without a new APK. Work toward it in small steps alongside requested work;
|
||||
discuss larger moves with the owner first. Put app screens, rules and text
|
||||
in `apps/<app>/`, not in the host under `src/`. Habits and Practices still
|
||||
draw compiled host screens (see [docs/cells.md](docs/cells.md)); when work
|
||||
touches one, prefer moving it into its package. Keep the host interface
|
||||
small and generic (storage, network, locale, platform effects), because
|
||||
each new host call needs an APK before a package can use it. Apps share
|
||||
data only through the host interface, never another app's internals.
|
||||
- Translate changed strings in every affected locale; no English placeholders.
|
||||
- `make locale-translated-test` fails on any locale string that still equals
|
||||
its English text. Translate it; add it to `tests/locale_same_as_english.txt`
|
||||
|
||||
@@ -1,4 +1,48 @@
|
||||
# Changelog
|
||||
## [2.1.30] - 2026-10-11
|
||||
### Fixed
|
||||
- Long menus, such as the colour theme, scroll by touch and open at your choice.
|
||||
- With a menu open, tapping the navigation closes it and switches screens in one tap.
|
||||
- Menus stay above the navigation instead of hiding their last options behind it.
|
||||
- Web: the app is sharp on high-density screens instead of magnified and blurry.
|
||||
### Changed
|
||||
- Icons are sharper on the web.
|
||||
|
||||
## [2.1.29] - 2026-10-11
|
||||
### Fixed
|
||||
- Scrolling Lumi's commands keeps the keyboard open.
|
||||
- New habits show each colour choice in its own colour.
|
||||
- Leaving Wim Hof no longer freezes the app for a few seconds.
|
||||
- The app no longer freezes just after launch while it checks for app updates.
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much is in view.
|
||||
- Apps rearranges to fill the window's width.
|
||||
|
||||
## [2.1.28] - 2026-10-10
|
||||
### Added
|
||||
- Connect a phone and a computer by QR code in Profile.
|
||||
- Leaderboard is its own app.
|
||||
- Profile > Data shows each sync node's storage.
|
||||
### Changed
|
||||
- Profile holds your account, data and Telegram; Settings holds device preferences.
|
||||
- Diary shows bold text as bold.
|
||||
- On desktop, a minimized practice opens in its own window.
|
||||
### Fixed
|
||||
- Linux: text uses Inner Breeze's fonts again.
|
||||
- Smoother minimized breathing count.
|
||||
- The desktop close prompt shows above Apps.
|
||||
|
||||
## [2.1.27] - 2026-10-10
|
||||
### Added
|
||||
- End a held breath from the minimized practice window with Breath or a double tap.
|
||||
- Lumi feedback includes the app version, device and system.
|
||||
### Fixed
|
||||
- Picture-in-picture opens when you leave Inbe during a practice and returns to it.
|
||||
- Lumi keeps answers that arrive during picture-in-picture.
|
||||
- Lumi says whether feedback reached the developer and keeps it to retry.
|
||||
- Feedback saved by older versions is now sent.
|
||||
- Fix a startup crash on 32-bit Android phones.
|
||||
|
||||
## [2.1.26] - 2026-10-09
|
||||
### Added
|
||||
- Detach a running practice into its own resizable desktop window.
|
||||
|
||||
@@ -393,14 +393,22 @@ IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
|
||||
IMAGE_FILES += $(wildcard assets/social/*.png)
|
||||
IMAGE_FILES += $(wildcard assets/profile-pictures/*.png)
|
||||
IMAGE_FILES += $(KRYON_DIR)/icons/ui.png $(KRYON_DIR)/icons/pfp.png
|
||||
CELL_BUNDLES := $(addprefix $(BUILD_DIR)/cells/,lists.zib habits.zib practices.zib diary.zib lumi.zib)
|
||||
CELL_BUNDLES := $(addprefix $(BUILD_DIR)/cells/,lists.zib habits.zib practices.zib diary.zib lumi.zib leaderboard.zib)
|
||||
INBE_BUNDLE := $(BUILD_DIR)/inbe.zib
|
||||
INBE_FULL_BUNDLE := $(BUILD_DIR)/inbe-full.zib
|
||||
CELL_SOURCES := $(shell find apps src/cells -name '*.zi' | LC_ALL=C sort) src/core/types.zi src/core/breath_timing.zi $(wildcard src/practices/patterns/*rules.zi) src/practices/patterns/patterns_clock.zi src/practices/patterns/patterns_types.zi src/practices/sun_salutation/sun_salutation_rules.zi src/practices/meditation/meditation_timing.zi
|
||||
CELL_RESOURCES := $(shell rg --files assets/habits assets/lists assets/diary assets/lumi assets/mcp 2>/dev/null)
|
||||
WIDGET_SCHEMAS := $(addprefix $(KRYON_DIR)/src/ui/,session.zi geometry.zi drawing_props.zi text_props.zi image_props.zi button_props.zi control_props.zi text_input.zi text_input_props.zi scroll.zi scroll_props.zi semantic.zi text_align.zi checkbox_props.zi toggle_props.zi tab_bar_props.zi box_props.zi) $(addprefix src/cells/,diary_ui_types.zi inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi)
|
||||
src/cells/widget_codec.zi: scripts/generate-widget-codecs.py $(WIDGET_SCHEMAS)
|
||||
python3 scripts/generate-widget-codecs.py
|
||||
# App records cross the bundle boundary with codecs generated by Kryon's
|
||||
# generator on top of Kryon's own widget codec.
|
||||
APP_CODEC_SCHEMAS := $(KRYON_DIR)/scripts/generate-widget-codecs.py $(KRYON_DIR)/src/backend/widget_codec.zi $(addprefix src/cells/,diary_ui_types.zi inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi leaderboard_ui_types.zi)
|
||||
src/cells/app_codec.zi: scripts/generate-app-codec.py $(APP_CODEC_SCHEMAS)
|
||||
python3 scripts/generate-app-codec.py
|
||||
|
||||
.PHONY: app-codec-check
|
||||
app-codec-check:
|
||||
python3 scripts/generate-app-codec.py --check
|
||||
|
||||
test: app-codec-check
|
||||
|
||||
.PHONY: cells
|
||||
cells: $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE)
|
||||
@@ -506,7 +514,9 @@ KRYON_RAYLIB_AUDIO_PERIODS ?= 2
|
||||
endif
|
||||
KRYON_RAYLIB_AUDIO_PERIOD_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES)),-DAUDIO_DEVICE_PERIOD_SIZE_IN_FRAMES=$(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES),)
|
||||
KRYON_RAYLIB_AUDIO_PERIODS_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIODS)),-DAUDIO_DEVICE_PERIODS=$(KRYON_RAYLIB_AUDIO_PERIODS),)
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0 $(KRYON_RAYLIB_AUDIO_PERIOD_CONFIG) $(KRYON_RAYLIB_AUDIO_PERIODS_CONFIG)
|
||||
# Inbe's fonts are TrueType and OpenType files, so every host keeps TTF
|
||||
# support; without it raylib draws its fallback pixel font.
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=% -DSUPPORT_FILEFORMAT_TTF=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0 -DSUPPORT_FILEFORMAT_TTF=1 $(KRYON_RAYLIB_AUDIO_PERIOD_CONFIG) $(KRYON_RAYLIB_AUDIO_PERIODS_CONFIG)
|
||||
COMMON_CFLAGS := -Wall -Wextra -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DNATIVE_WINDOW_HAVE_SDL -DKRYON_WITH_SYNC=1
|
||||
CFLAGS := $(COMMON_CFLAGS) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
NATIVE_SYSTEM_LDLIBS := $(KRYON_NOTIFICATION_LDLIBS) -lz -lm -lpthread -latomic $(if $(filter linux,$(NATIVE_PLATFORM)),-ldl -lrt,) $(SYSTEM_THEME_LDLIBS)
|
||||
@@ -615,7 +625,7 @@ WEB_TARGET := $(WEB_DIST_DIR)/index.html
|
||||
WEB_APP_SCRIPT := <script>window.__inbeRenderer="canvas";window.__inbeLoadApp("index.js?v=$(WEB_CACHE_BUSTER)")</script>
|
||||
WEB_JS_TARGET := $(WEB_DIST_DIR)/index.js
|
||||
WEB_BOOT_JS := src/web_boot.js
|
||||
WEB_HOST_JS := src/web_host.js scripts/browser_network.js scripts/telegram_host.js
|
||||
WEB_HOST_JS := src/web_host.js scripts/telegram_host.js
|
||||
# Kryon's canvas hosts are Ziran modules on Ziran's web bridge; its runtime is the only JS they need.
|
||||
WEB_CANVAS_HOST_JS := $(ZIRAN_DIR)/web/ziran_web.js
|
||||
WEB_HOST_JS += $(WEB_CANVAS_HOST_JS)
|
||||
@@ -698,11 +708,6 @@ $(KRYON_LIBRARY_BUILD_DIR)/libkryon.a: $(KRYON_UI_ZI) $(KRYON_DIR)/src/ui/module
|
||||
ZIRAN_DIR=$(abspath $(ZIRAN_DIR)) ZIRAN_BUILD_DIR=$(ZIRAN_BUILD_DIR) \
|
||||
$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a
|
||||
|
||||
.PHONY: uri-link-test
|
||||
uri-link-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
python3 tests/uri_host_zi_test.py $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
.PHONY: frame-activity-test
|
||||
frame-activity-test: $(ZI2C_BIN)
|
||||
@sh tests/frame_activity_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
@@ -795,20 +800,6 @@ sync-retry-zi-test: build-laws $(ZI2C_BIN)
|
||||
|
||||
test: sync-retry-zi-test
|
||||
|
||||
.PHONY: sync-crypto-zi-test
|
||||
sync-crypto-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/sync_crypto_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: sync-crypto-zi-test
|
||||
|
||||
.PHONY: sync-account-crypto-zi-test
|
||||
sync-account-crypto-zi-test: $(ZI2C_BIN) $(LIBOQS_A)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/sync_account_crypto_zi_test.sh $(ZIRAN_BUILD_DIR)/bin $(LIBOQS_A)
|
||||
|
||||
test: sync-account-crypto-zi-test
|
||||
|
||||
# Exercise the packaged Ziran crypto API against the exact archive used by
|
||||
# Inbe, including ML-KEM round trips, tampering and short-buffer rejection.
|
||||
.PHONY: liboqs-crypto-test
|
||||
@@ -950,7 +941,7 @@ native-text-pixels-test: $(TARGET)
|
||||
sh $(KRYON_DIR)/tests/raylib_text_pixels_test.sh
|
||||
|
||||
# Run every visual suite and retain a receipt even when an earlier suite fails.
|
||||
VISUAL_TEST_TARGETS := native-screenshot-test native-text-pixels-test native-zoom-test native-visual-test launcher-ui-test settings-sidebar-ui-test startup-quit-ui-test locale-render-ui-test lumi-ui-test lumi-history-ui-test habits-cards-ui-test lists-ui-test sync-review-ui-test data-back-ui-test
|
||||
VISUAL_TEST_TARGETS := practice-images-ui-test leaderboard-ui-test native-screenshot-test native-text-pixels-test native-zoom-test native-visual-test launcher-ui-test settings-sidebar-ui-test startup-quit-ui-test locale-render-ui-test lumi-ui-test lumi-history-ui-test habits-cards-ui-test lists-ui-test sync-review-ui-test data-back-ui-test
|
||||
visual-test: $(TARGET) $(INBE_FULL_BUNDLE)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
-u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER YUE_DESKTOP_RECOVERY=0 \
|
||||
@@ -998,6 +989,7 @@ $(KRY_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(KRY_GEN_DIR) $(ZI_SRCS)
|
||||
@@ -1012,6 +1004,7 @@ $(WEB_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(WEB_GEN_DIR) $(ZI_SRCS) $(KRYON_DIR)/src/backend/canvas_raster.zi $(KRYON_DIR)/src/backend/canvas_audio.zi $(KRYON_DIR)/src/backend/page_route.zi
|
||||
@@ -1031,6 +1024,7 @@ $(WINDOWS_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODU
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(WINDOWS_GEN_DIR) $(ZI_SRCS)
|
||||
@@ -1058,6 +1052,7 @@ zi-c-plan9: $(KRY_GEN_STAMP)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--include-dir build/packages/kryon/include --include-dir src \
|
||||
--include-dir $(KRY_GEN_DIR) --include-dir vendor-builds/sqlite \
|
||||
@@ -1288,6 +1283,11 @@ hooks-install:
|
||||
embedded-image-assets-check: $(EMBEDDED_ASSETS_C)
|
||||
bash ./tests/embedded_image_assets_test.sh
|
||||
|
||||
# An icon from a Kryon sheet Inbe does not ship shows "Missing image".
|
||||
.PHONY: icon-sheets-check
|
||||
icon-sheets-check: $(PACKAGES_MK)
|
||||
python3 tests/icon_sheets_test.py $(KRYON_DIR)/src/ui/icon.zi
|
||||
|
||||
.PHONY: habits-cards-ui-test
|
||||
habits-cards-ui-test: $(TARGET)
|
||||
bash tests/habits_cards_ui_test.sh "$(abspath $(TARGET))"
|
||||
@@ -1301,7 +1301,7 @@ storage-literals-check:
|
||||
python3 tests/storage_literals_test.py
|
||||
bash ./scripts/check-storage-literals.sh
|
||||
|
||||
test: clean-text-api-check package-check secret-check storage-literals-check font-bundle-check audio-test-fixture-check embedded-image-assets-check
|
||||
test: clean-text-api-check package-check secret-check storage-literals-check font-bundle-check audio-test-fixture-check embedded-image-assets-check icon-sheets-check
|
||||
test: screenshot-scene-test
|
||||
|
||||
.PHONY: screenshot-scene-test
|
||||
@@ -1619,59 +1619,6 @@ android-text-input-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: android-text-input-zi-test
|
||||
|
||||
.PHONY: window-close-host-test
|
||||
window-close-host-test: $(ZI2C_BIN)
|
||||
@mkdir -p $(BUILD_DIR)/window-close-host-test/c
|
||||
@$(ZI2C_BIN) --define PLATFORM_DESKTOP \
|
||||
--define NATIVE_WINDOW_HAVE_SDL \
|
||||
--entry window_close_behavior:main --root tests \
|
||||
--module-path src -o $(BUILD_DIR)/window-close-host-test/c \
|
||||
tests/window_close_behavior.zi
|
||||
@$(CC) -std=c11 -O2 -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/window-close-host-test/c \
|
||||
$(BUILD_DIR)/window-close-host-test/c/*.c \
|
||||
$(RAY_SDL_LDLIBS) -o $(BUILD_DIR)/window-close-host-test/test
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
$(BUILD_DIR)/window-close-host-test/test
|
||||
|
||||
test: window-close-host-test
|
||||
|
||||
.PHONY: activity-host-test
|
||||
activity-host-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
DBUS_SESSION_BUS_ADDRESS=invalid: \
|
||||
sh tests/activity_host_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: activity-host-test
|
||||
|
||||
.PHONY: audio-picker-host-test
|
||||
audio-picker-host-test: $(ZI2C_BIN)
|
||||
@mkdir -p $(BUILD_DIR)/audio-picker-host-test/c
|
||||
@cp tests/support/audio_picker_zenity.sh \
|
||||
$(BUILD_DIR)/audio-picker-host-test/zenity
|
||||
@chmod +x $(BUILD_DIR)/audio-picker-host-test/zenity
|
||||
@$(ZI2C_BIN) --no-main --define PLATFORM_DESKTOP --root src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/audio-picker-host-test/c \
|
||||
src/platform/audio_picker_host.zi
|
||||
@$(CC) -std=c11 -D_DEFAULT_SOURCE -Wall -Wextra -Werror \
|
||||
-Wno-unused-function -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/audio-picker-host-test/c \
|
||||
tests/audio_picker_host_test.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/*.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/platform/audio_picker_host.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/platform/file_picker.c \
|
||||
-o $(BUILD_DIR)/audio-picker-host-test/test
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
PATH="$(abspath $(BUILD_DIR)/audio-picker-host-test)" \
|
||||
$(abspath $(BUILD_DIR)/audio-picker-host-test/test)
|
||||
|
||||
.PHONY: file-picker-zi-test
|
||||
file-picker-zi-test: $(ZI2C_BIN)
|
||||
@sh tests/file_picker_zi_test.sh $(abspath $(dir $(ZI2C_BIN)))
|
||||
|
||||
test: audio-picker-host-test file-picker-zi-test
|
||||
|
||||
.PHONY: main-platform-zi-test
|
||||
main-platform-zi-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@RAY_LDLIBS='$(RAY_LDLIBS)' sh tests/main_platform_zi_test.sh \
|
||||
@@ -1700,17 +1647,12 @@ update-transport-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: plan9-host-zi-test android-jni-zi-test update-transport-zi-test
|
||||
|
||||
.PHONY: secondary-window-host-test
|
||||
secondary-window-host-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@sh tests/secondary_window_host_zi_test.sh \
|
||||
$(abspath $(dir $(ZI2C_BIN))) $(abspath $(RAYLIB_A))
|
||||
|
||||
.PHONY: raylib-log-host-test
|
||||
raylib-log-host-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@mkdir -p $(BUILD_DIR)/raylib-log-host-test/c
|
||||
@$(ZI2C_BIN) --define PLATFORM_DESKTOP \
|
||||
--entry raylib_log_behavior:main --root tests \
|
||||
--module-path src --module-path $(ZIRAN_DIR)/std \
|
||||
--module-path src --module-path $(KRYON_DIR)/src/backend --module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/raylib-log-host-test/c tests/raylib_log_behavior.zi
|
||||
@$(CC) -std=c11 -O2 -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/raylib-log-host-test/c \
|
||||
@@ -1784,13 +1726,6 @@ android-import-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: android-import-zi-test
|
||||
|
||||
.PHONY: android-runtime-assets-zi-test
|
||||
android-runtime-assets-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/android_runtime_assets_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: android-runtime-assets-zi-test
|
||||
|
||||
.PHONY: android-lifecycle-zi-test
|
||||
android-lifecycle-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
@@ -3067,12 +3002,40 @@ app-click-block-zi-test: $(ZI2C_BIN)
|
||||
data-back-ui-test: $(TARGET)
|
||||
@sh tests/data_back_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: leaderboard-ui-test
|
||||
leaderboard-ui-test: $(TARGET)
|
||||
@sh tests/leaderboard_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
# Missing practice pictures fail the visual gate in CI and releases.
|
||||
.PHONY: practice-images-ui-test
|
||||
practice-images-ui-test: $(TARGET)
|
||||
@sh tests/practice_images_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
test: app-click-block-zi-test
|
||||
|
||||
.PHONY: package-release-test
|
||||
package-release-test: cells $(ZIRAN_BUILD_DIR)/libziran.a
|
||||
python3 tests/package_release_test.py
|
||||
|
||||
# This build runs the packages the node serves, and the last released app runs
|
||||
# each new package that declares a host interface it has.
|
||||
.PHONY: package-compat-test
|
||||
package-compat-test: $(TARGET) $(CELL_BUNDLES) $(INBE_BUNDLE)
|
||||
python3 tests/package_compat_test.py $(abspath $(TARGET))
|
||||
|
||||
.PHONY: phone-check-gate-test
|
||||
phone-check-gate-test:
|
||||
python3 tests/phone_check_gate_test.py
|
||||
|
||||
test: phone-check-gate-test
|
||||
|
||||
# Check an exact APK on the development Moto and record the release receipt:
|
||||
# make phone-check APK=path/to/inbe.apk
|
||||
.PHONY: phone-check
|
||||
phone-check:
|
||||
@test -n "$(APK)" || { echo "Set APK=path/to/inbe.apk"; exit 1; }
|
||||
python3 scripts/phone-check.py "$(APK)" --record
|
||||
|
||||
test: package-release-test
|
||||
|
||||
.PHONY: app-preferences-sync-test
|
||||
@@ -3126,7 +3089,7 @@ device-key-wasm-test: $(ZI2C_BIN)
|
||||
test: device-key-test
|
||||
web-smoke-test web-canvas-smoke-test: device-key-wasm-test
|
||||
|
||||
.PHONY: telegram-authorization-test telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
|
||||
.PHONY: telegram-authorization-test telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test storage-delegate-test lumi-delegate-scope-test
|
||||
|
||||
telegram-bridge-test:
|
||||
@sh tests/telegram_bridge_test.sh
|
||||
@@ -3158,16 +3121,13 @@ lumi-authorization-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
delegate-account-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/delegate_account_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
delegate-secret-cleanup-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/delegate_secret_cleanup_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
storage-delegate-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/storage_delegate_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
lumi-delegate-scope-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/lumi_delegate_scope_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
telegram-authorization-test: telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
|
||||
telegram-authorization-test: telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test storage-delegate-test lumi-delegate-scope-test
|
||||
|
||||
test: telegram-authorization-test
|
||||
|
||||
@@ -3176,3 +3136,28 @@ android-geometry-probe-test:
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS sh tests/android_geometry_probe_test.sh
|
||||
|
||||
test: android-geometry-probe-test
|
||||
|
||||
.PHONY: lumi-feedback-delivery-test
|
||||
lumi-feedback-delivery-test: $(ZIRAN_BIN) $(LIBOQS_A) | build-laws
|
||||
@sh tests/lumi_feedback_delivery_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
test: lumi-feedback-delivery-test
|
||||
|
||||
.PHONY: diary-spelling-test diary-history-test
|
||||
diary-spelling-test: $(ZIRAN_BIN) $(LIBOQS_A) | build-laws
|
||||
@sh tests/diary_spelling_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
diary-history-test: $(ZI2C_BIN)
|
||||
@sh tests/diary_history_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: diary-spelling-test diary-history-test
|
||||
|
||||
# Lumi reports name the device, system and version (no identifiers).
|
||||
.PHONY: device-info-test
|
||||
device-info-test: $(ZIRAN_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY $(ZIRAN_BIN) build --target=c --define PLATFORM_DESKTOP --root tests \
|
||||
--module-path src --module-path build/packages/ziran/std --entry device_info_behavior:Main --exe \
|
||||
-o build/device-info-test tests/device_info_behavior.zi
|
||||
@build/device-info-test/device_info_behavior
|
||||
|
||||
test: device-info-test
|
||||
@@ -1,5 +1,30 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.9] - 2026-10-11
|
||||
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much of the page is in view.
|
||||
|
||||
## [1.1.8] - 2026-10-10
|
||||
|
||||
### Added
|
||||
- Correct the spelling of an entry with one button. Inner Breeze sends the entry to the Waozi node, which returns it with only misspelled words corrected. It uses the same daily online allowance as Lumi.
|
||||
- Undo and redo buttons, so a correction or any other change can be taken back.
|
||||
|
||||
### Changed
|
||||
- A title bar shows the date in the middle, between the previous and next day. Today and the calendar sit together on the left, and the entry's tools are compact buttons on the right, leaving more room for writing.
|
||||
- The entry reaches the bottom of the screen; a notice takes room below it only while it is shown.
|
||||
|
||||
## [1.1.7] - 2026-10-10
|
||||
|
||||
### Changed
|
||||
- When a photo is not on this device, for example because your sync node does not store photos, the entry shows where the photo is instead of an empty space.
|
||||
|
||||
## [1.1.6] - 2026-10-10
|
||||
|
||||
### Changed
|
||||
- Show **bold** text as bold. The ** marks appear only on the line you are editing, so you can still change them.
|
||||
|
||||
## [1.1.5] - 2026-10-10
|
||||
### Changed
|
||||
- Save your writing quietly, without a "Waiting to save…" note below the entry.
|
||||
|
||||
+196
-40
@@ -10,6 +10,10 @@
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
#import "drawing_props"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "text_align"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "byte_text_linux"
|
||||
@@ -20,6 +24,8 @@
|
||||
#import, file "../../src/cells/diary_ui_types.zi";
|
||||
|
||||
using ImageFit;
|
||||
using TextAlign;
|
||||
using TextWrap;
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
host_api :: #system_library "host_api";
|
||||
@@ -30,6 +36,15 @@ state: DiaryMessage;
|
||||
frame: DiaryUiFrame;
|
||||
pending: bool;
|
||||
|
||||
DIARY_PREVIOUS_ICON :: "S1.8rr:M15 5L8 12L15 19"
|
||||
DIARY_NEXT_ICON :: "S1.8rr:M9 5L16 12L9 19"
|
||||
DIARY_CALENDAR_ICON :: "S1.6rr:M4 5H20V20H4ZM4 10H20M8 3V7M16 3V7"
|
||||
DIARY_TIME_ICON :: "S1.6rr:M21 12C21 16.97 16.97 21 12 21C7.03 21 3 16.97 3 12C3 7.03 7.03 3 12 3C16.97 3 21 7.03 21 12ZM12 7V12L15.5 14"
|
||||
DIARY_PHOTO_ICON :: "S1.6rr:M3 5H21V19H3ZM3 16L8 11L13 16L16 13L21 18M17.5 8.5C17.5 9.33 16.83 10 16 10C15.17 10 14.5 9.33 14.5 8.5C14.5 7.67 15.17 7 16 7C16.83 7 17.5 7.67 17.5 8.5Z"
|
||||
DIARY_UNDO_ICON :: "S1.8rr:M9 14L4 9L9 4M4 9H14C17.31 9 20 11.69 20 15C20 18.31 17.31 21 14 21H11"
|
||||
DIARY_REDO_ICON :: "S1.8rr:M15 14L20 9L15 4M20 9H10C6.69 9 4 11.69 4 15C4 18.31 6.69 21 10 21H13"
|
||||
DIARY_SPELLING_ICON :: "S2rr:M3 14L7.5 3L12 14M4.8 10H10.2M12 17L15.5 20.5L21.5 13"
|
||||
|
||||
DiaryObserve :: () -> DiaryUiFrame {
|
||||
return ReadDiaryUiHost()
|
||||
}
|
||||
@@ -38,6 +53,53 @@ DiarySaveDue :: () -> bool {
|
||||
return frame.now >= frame.save_at
|
||||
}
|
||||
|
||||
// Markdown bold reads as bold text. Its ** markers stay in the entry but are
|
||||
// hidden, except on the lines holding the caret or a selection, where they
|
||||
// can be edited directly.
|
||||
DIARY_EMPHASIS_MAX :: 256
|
||||
emphasis_hidden: [DIARY_EMPHASIS_MAX * 2]TextRange;
|
||||
emphasis_strong: [DIARY_EMPHASIS_MAX]TextRange;
|
||||
emphasis_hidden_count: s32;
|
||||
emphasis_strong_count: s32;
|
||||
|
||||
DiaryEmphasis :: (value: string, cursor: s32, anchor: s32, editing: bool) {
|
||||
emphasis_hidden_count = 0
|
||||
emphasis_strong_count = 0
|
||||
first := ifx cursor < anchor then cursor else anchor
|
||||
last := ifx cursor < anchor then anchor else cursor
|
||||
line: s32 = 0
|
||||
while line <= cast(s32)value.count && emphasis_strong_count < DIARY_EMPHASIS_MAX {
|
||||
end := line
|
||||
while end < cast(s32)value.count && value[end] != cast(u8)10 { end += 1 }
|
||||
active := editing && last >= line && first <= end
|
||||
at := line
|
||||
while at + 1 < end && emphasis_strong_count < DIARY_EMPHASIS_MAX {
|
||||
if value[at] != cast(u8)42 || value[at + 1] != cast(u8)42 {
|
||||
at += 1
|
||||
continue
|
||||
}
|
||||
close := at + 2
|
||||
while close + 1 < end && (value[close] != cast(u8)42 || value[close + 1] != cast(u8)42) {
|
||||
close += 1
|
||||
}
|
||||
if close + 1 >= end {
|
||||
break
|
||||
}
|
||||
if close > at + 2 {
|
||||
emphasis_strong[emphasis_strong_count] = TextRange.{.start = at + 2, .end = close}
|
||||
emphasis_strong_count += 1
|
||||
if !active {
|
||||
emphasis_hidden[emphasis_hidden_count] = TextRange.{.start = at, .end = at + 2}
|
||||
emphasis_hidden[emphasis_hidden_count + 1] = TextRange.{.start = close, .end = close + 2}
|
||||
emphasis_hidden_count += 2
|
||||
}
|
||||
}
|
||||
at = close + 2
|
||||
}
|
||||
line = end + 1
|
||||
}
|
||||
}
|
||||
|
||||
DateTitle :: (year: s32, month: s32, day: s32) -> string {
|
||||
if month < 1 || month > 12 { return "" }
|
||||
keys: [12]string = .["habit_month_1", "habit_month_2", "habit_month_3",
|
||||
@@ -65,6 +127,15 @@ DateTitle :: (year: s32, month: s32, day: s32) -> string {
|
||||
return BuilderFinish(title)
|
||||
}
|
||||
|
||||
HasWords :: (text: string) -> bool {
|
||||
for byte: text {
|
||||
if byte != cast(u8)32 && byte != cast(u8)10 && byte != cast(u8)13 && byte != cast(u8)9 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Scale :: (value: s32) -> s32 {
|
||||
return cast(s32)(cast(float32)value * frame.scale)
|
||||
}
|
||||
@@ -74,20 +145,37 @@ FinishView :: () -> DiaryMessage {
|
||||
return state
|
||||
}
|
||||
|
||||
DiaryAction :: ( id: s32, label: string, bounds: Rectangle, enabled: bool = true) {
|
||||
// A button with an icon shows only the icon; its label names it for
|
||||
// accessibility.
|
||||
DiaryAction :: ( id: s32, label: string, bounds: Rectangle, enabled: bool = true,
|
||||
icon: string = "", selected: bool = false, loading: bool = false) {
|
||||
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
|
||||
.label = label, .disabled = !enabled, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
.label = label, .disabled = !enabled, .selected = selected, .loading = loading,
|
||||
.icon_shape = icon, .icon_only = icon != "", .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)(ifx icon != "" then ButtonEmphasisGhost else ButtonEmphasisSoft)}) != 0 {
|
||||
// Photos, undo, redo and spelling are host effects.
|
||||
frame.focused = false
|
||||
if id == 29005 {
|
||||
frame.photo_requested = true
|
||||
frame.focused = false
|
||||
return
|
||||
}
|
||||
if id == 29014 {
|
||||
frame.undo_requested = true
|
||||
return
|
||||
}
|
||||
if id == 29015 {
|
||||
frame.redo_requested = true
|
||||
return
|
||||
}
|
||||
if id == 29016 {
|
||||
frame.spelling_requested = true
|
||||
return
|
||||
}
|
||||
state.action = DIARY_CONTROL
|
||||
state.control = id
|
||||
pending = true
|
||||
frame.scroll = 0
|
||||
frame.focused = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,24 +185,70 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame, today: Date) -> Dia
|
||||
column := CenteredColumnFor(frame.width, Scale(640), Scale(16))
|
||||
left := cast(float32)column.x
|
||||
width := cast(float32)column.width
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left, cast(float32)Scale(24),
|
||||
width, cast(float32)Scale(40)}, .text = DateTitle(state.year, state.month, state.day), .font = frame.font})
|
||||
part := (width - cast(float32)Scale(12)) / 3.0
|
||||
compact := frame.height < Scale(480)
|
||||
top := cast(float32)(ifx compact then Scale(44) else Scale(76))
|
||||
DiaryAction(29001, "‹", Rectangle.{left, top, part, cast(float32)Scale(44)})
|
||||
DiaryAction(29004, DiaryLocaleHost("diary_today"), Rectangle.{left + part + cast(float32)Scale(6),
|
||||
top, part, cast(float32)Scale(44)})
|
||||
DiaryAction(29002, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
|
||||
top, part, cast(float32)Scale(44)},
|
||||
top := cast(float32)(ifx compact then Scale(4) else Scale(12))
|
||||
control := cast(float32)Scale(44)
|
||||
gap := cast(float32)Scale(8)
|
||||
|
||||
// Title bar: the selected date, centered between the previous and next day.
|
||||
DiaryAction(29001, "‹", Rectangle.{left, top, control, control}, true, DIARY_PREVIOUS_ICON)
|
||||
DiaryAction(29002, "›", Rectangle.{left + width - control, top, control, control},
|
||||
OnOrBefore(Next(Date.{state.year, state.month, state.day}, 1), today) &&
|
||||
!OnOrBefore(today, Date.{state.year, state.month, state.day}))
|
||||
!OnOrBefore(today, Date.{state.year, state.month, state.day}),
|
||||
DIARY_NEXT_ICON)
|
||||
title := DateTitle(state.year, state.month, state.day)
|
||||
title_strong: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)title.count}]
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left + control + gap, top,
|
||||
width - 2.0 * (control + gap), control}, .text = title,
|
||||
.font = frame.font + Scale(4), .strong = title_strong[:],
|
||||
.align = cast(TextAlign)TextAlignCenter, .vertical_align = cast(TextAlign)TextAlignCenter,
|
||||
.wrap = cast(TextWrap)TextWrapNone})
|
||||
|
||||
// Tools: Today and the calendar move between days; undo, redo, spelling,
|
||||
// the time and photos change the entry. Today narrows on phones so every
|
||||
// icon keeps its target.
|
||||
tools := top + control + gap
|
||||
tool_gap := cast(float32)Scale(4)
|
||||
tool := control
|
||||
today_width := width - 6.0 * tool - 5.0 * tool_gap - gap
|
||||
if today_width < cast(float32)Scale(64) {
|
||||
// The narrowest phones keep Today readable with smaller icon targets.
|
||||
today_width = cast(float32)Scale(64)
|
||||
tool = (width - today_width - gap - 5.0 * tool_gap) / 6.0
|
||||
}
|
||||
if today_width > cast(float32)Scale(128) {
|
||||
today_width = cast(float32)Scale(128)
|
||||
}
|
||||
DiaryAction(29004, DiaryLocaleHost("diary_today"), Rectangle.{left, tools, today_width, control})
|
||||
DiaryAction(29003, DiaryLocaleHost("tab_diary_calendar"),
|
||||
Rectangle.{left, top + cast(float32)Scale(52), width, cast(float32)Scale(44)})
|
||||
Rectangle.{left + today_width + gap, tools, tool, control},
|
||||
true, DIARY_CALENDAR_ICON, state.calendar)
|
||||
editable := !state.load_error && state.year > 0
|
||||
if !state.calendar {
|
||||
idle := editable && !frame.spelling_busy
|
||||
DiaryAction(29014, DiaryLocaleHost("diary_undo"),
|
||||
Rectangle.{left + width - 5.0 * tool - 4.0 * tool_gap, tools, tool, control},
|
||||
idle && frame.can_undo, DIARY_UNDO_ICON)
|
||||
DiaryAction(29015, DiaryLocaleHost("diary_redo"),
|
||||
Rectangle.{left + width - 4.0 * tool - 3.0 * tool_gap, tools, tool, control},
|
||||
idle && frame.can_redo, DIARY_REDO_ICON)
|
||||
DiaryAction(29016, DiaryLocaleHost("diary_check_spelling"),
|
||||
Rectangle.{left + width - 3.0 * tool - 2.0 * tool_gap, tools, tool, control},
|
||||
idle && HasWords(state.text), DIARY_SPELLING_ICON, false, frame.spelling_busy)
|
||||
DiaryAction(29013, DiaryLocaleHost("diary_insert_time"),
|
||||
Rectangle.{left + width - 2.0 * tool - tool_gap, tools, tool, control},
|
||||
!frame.spelling_busy, DIARY_TIME_ICON)
|
||||
DiaryAction(29005, DiaryLocaleHost("diary_attach_photo"),
|
||||
Rectangle.{left + width - tool, tools, tool, control},
|
||||
true, DIARY_PHOTO_ICON)
|
||||
}
|
||||
content := tools + control + cast(float32)Scale(12)
|
||||
content_height := cast(float32)(frame.height - frame.bottom) - content - cast(float32)Scale(16)
|
||||
|
||||
if state.calendar {
|
||||
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)290300,
|
||||
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
|
||||
cast(float32)(frame.height - frame.bottom - Scale(200))},
|
||||
.bounds = Rectangle.{left, content, width, content_height},
|
||||
.content_height = Scale(344), .scroll_offset = frame.calendar_scroll})
|
||||
frame.calendar_scroll = scroll.scroll_offset
|
||||
if !scroll.opened {
|
||||
@@ -152,29 +286,26 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame, today: Date) -> Dia
|
||||
End(frame.session)
|
||||
return FinishView()
|
||||
}
|
||||
editor_height := frame.height - frame.bottom - cast(s32)top - Scale(236)
|
||||
// The editor reaches the bottom; a notice takes room below it only while
|
||||
// it is shown.
|
||||
notice := frame.photo_error || state.load_error || frame.spelling_notice != ""
|
||||
notice_room := ifx notice then Scale(60) else 0
|
||||
editor_height := cast(s32)content_height - notice_room
|
||||
if editor_height < Scale(120) {
|
||||
editor_height = Scale(120)
|
||||
}
|
||||
page := Scroll(frame.session, ScrollProps.{.key = cast(u64)290301,
|
||||
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
|
||||
cast(float32)(frame.height - frame.bottom - cast(s32)top - Scale(120))},
|
||||
.content_height = editor_height + Scale(104) +
|
||||
(ifx state.photo_count > 0 then Scale(380) else 0), .scroll_offset = frame.page_scroll})
|
||||
.bounds = Rectangle.{left, content, width, content_height},
|
||||
.content_height = editor_height + notice_room +
|
||||
(ifx state.photo_count > 0 then Scale(392) else 0), .scroll_offset = frame.page_scroll})
|
||||
frame.page_scroll = page.scroll_offset
|
||||
if !page.opened {
|
||||
return FinishView()
|
||||
}
|
||||
DiaryAction(29013, DiaryLocaleHost("diary_insert_time"),
|
||||
Rectangle.{left, page.content.y, (width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
|
||||
DiaryAction(29005, DiaryLocaleHost("diary_attach_photo"),
|
||||
Rectangle.{left + (width + cast(float32)Scale(8)) / 2.0, page.content.y,
|
||||
(width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
|
||||
area: TextAreaProps
|
||||
area.key = cast(u64)290200
|
||||
area.focus_id = 29020
|
||||
area.bounds = Rectangle.{left, page.content.y + cast(float32)Scale(56), width,
|
||||
cast(float32)editor_height}
|
||||
area.bounds = Rectangle.{left, page.content.y, width, cast(float32)editor_height}
|
||||
area.value = state.text
|
||||
area.label = DiaryLocaleHost("tab_diary")
|
||||
area.wrap = true
|
||||
@@ -183,10 +314,15 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame, today: Date) -> Dia
|
||||
area.scroll_y = frame.scroll
|
||||
area.focused = frame.focused
|
||||
area.selecting = frame.selecting
|
||||
area.read_only = state.load_error || state.year < 1
|
||||
// The entry waits while its spelling is checked, so the correction
|
||||
// always applies to the text that was sent.
|
||||
area.read_only = !editable || frame.spelling_busy
|
||||
area.max_bytes = 2147483646
|
||||
area.max_codepoints = 2147483646
|
||||
area.input = frame.input
|
||||
DiaryEmphasis(state.text, state.cursor, state.anchor, frame.focused && !area.read_only)
|
||||
area.hidden = emphasis_hidden[:emphasis_hidden_count]
|
||||
area.strong = emphasis_strong[:emphasis_strong_count]
|
||||
edited := TextArea(frame.session, area)
|
||||
state.cursor = edited.cursor
|
||||
state.anchor = edited.anchor
|
||||
@@ -206,21 +342,41 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame, today: Date) -> Dia
|
||||
frame.clipboard_text = edited.clipboard_text
|
||||
}
|
||||
|
||||
if frame.photo_error || state.load_error {
|
||||
status := ifx frame.photo_error then "diary_photo_error" else "diary_read_error"
|
||||
if notice {
|
||||
status := frame.spelling_notice
|
||||
if state.load_error {
|
||||
status = "diary_read_error"
|
||||
}
|
||||
if frame.photo_error {
|
||||
status = "diary_photo_error"
|
||||
}
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left,
|
||||
area.bounds.y + area.bounds.height + cast(float32)Scale(12), width, cast(float32)Scale(40)},
|
||||
.text = DiaryLocaleHost(status), .font = frame.font})
|
||||
}
|
||||
if state.photo_count > 0 {
|
||||
photo_top := area.bounds.y + area.bounds.height + cast(float32)Scale(60)
|
||||
path: Vec(u8)
|
||||
BuilderPrint(*path, "diary/photos/%.%", state.photo_file, frame.photo_format)
|
||||
image := BuilderFinish(path)
|
||||
Image(frame.session, ImageProps.{.asset_path = image,
|
||||
.alt_text = state.photo_name,
|
||||
.bounds = Rectangle.{left, photo_top, width, cast(float32)Scale(240)},
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
photo_top := area.bounds.y + area.bounds.height + cast(float32)(notice_room + Scale(12))
|
||||
photo_bounds := Rectangle.{left, photo_top, width, cast(float32)Scale(240)}
|
||||
if frame.photo_format.count > 0 {
|
||||
path: Vec(u8)
|
||||
BuilderPrint(*path, "diary/photos/%.%", state.photo_file, frame.photo_format)
|
||||
image := BuilderFinish(path)
|
||||
Image(frame.session, ImageProps.{.asset_path = image,
|
||||
.alt_text = state.photo_name,
|
||||
.bounds = photo_bounds,
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
} else {
|
||||
// The entry names a photo whose bytes are not on this device, for
|
||||
// example when a sync node keeps photos off. The entry still works.
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)29011, .bounds = photo_bounds,
|
||||
.fill = Color.{156, 156, 156, 36}, .radius = cast(float32)Scale(12)})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)29012,
|
||||
.text = DiaryLocaleHost("diary_photo_unavailable"),
|
||||
.bounds = Rectangle.{left + cast(float32)Scale(16), photo_top,
|
||||
width - cast(float32)Scale(32), cast(float32)Scale(240)},
|
||||
.font = frame.font, .align = cast(TextAlign)TextAlignCenter,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
Text(frame.session, TextProps.{.text = state.photo_name,
|
||||
.bounds = Rectangle.{left, photo_top + cast(float32)Scale(248), width,
|
||||
cast(float32)Scale(32)}, .font = frame.font})
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.0.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -1,5 +1,46 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.29] - 2026-10-11
|
||||
|
||||
- Bring Lumi 1.3.9, Diary 1.1.9, Lists 1.0.5 and Leaderboard 1.0.1.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.28] - 2026-10-11
|
||||
|
||||
- Bring Lumi's message selection with copy and delete.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.27] - 2026-10-11
|
||||
|
||||
- Bring Lumi's chat that loads older messages as you scroll up.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.26] - 2026-10-10
|
||||
|
||||
- Bring Diary's title bar, undo and redo, and spelling correction, and Lumi's typing dots.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.25] - 2026-10-10
|
||||
|
||||
- Open Leaderboard as its own app.
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [2.1.24] - 2026-10-10
|
||||
|
||||
- Remove the text of practice window buttons that are no longer shown.
|
||||
|
||||
## [2.1.23] - 2026-10-10
|
||||
|
||||
- Translate the descriptions in Lumi's command list.
|
||||
|
||||
## [2.1.22] - 2026-10-10
|
||||
|
||||
- Say which app, device and system details Lumi feedback includes before you send it.
|
||||
|
||||
## [2.1.21] - 2026-10-10
|
||||
|
||||
- Explain when approved Lumi feedback is still waiting to send and when the developer inbox has received it.
|
||||
|
||||
## [2.1.20] - 2026-10-09
|
||||
|
||||
- Customize each app in Appearance using live KSS editing, inspection, undo, and reset to defaults.
|
||||
|
||||
+7
-2
@@ -1,5 +1,6 @@
|
||||
// The portable root owns app selection and unified navigation policy.
|
||||
// Its assets contain Lumi, Habits and Practices as recommended cells.
|
||||
// Its assets contain Lumi, Habits and Practices as recommended cells, and
|
||||
// Lists, Diary and Leaderboard as optional ones.
|
||||
#import, file "../../src/cells/inbe_types.zi";
|
||||
#import, file "inbe_view.zi";
|
||||
#import, file "../../src/cells/module_types.zi";
|
||||
@@ -16,6 +17,9 @@ InbeAppForScreen :: (screen: s32) -> s32 {
|
||||
if screen == ScreenDiary {
|
||||
return APP_DIARY
|
||||
}
|
||||
if screen == ScreenLeaderboard {
|
||||
return APP_LEADERBOARD
|
||||
}
|
||||
if screen == ScreenEList {
|
||||
return APP_LISTS
|
||||
}
|
||||
@@ -62,7 +66,8 @@ InbeApply :: (message: InbeMessage) -> InbeMessage {
|
||||
}
|
||||
if message.action == INBE_TOGGLE_APP {
|
||||
if message.app != APP_LISTS && message.app != APP_HABITS &&
|
||||
message.app != APP_PRACTICE && message.app != APP_DIARY && message.app != APP_LUMI {
|
||||
message.app != APP_PRACTICE && message.app != APP_DIARY && message.app != APP_LUMI &&
|
||||
message.app != APP_LEADERBOARD {
|
||||
message.succeeded = false
|
||||
return message
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.1] - 2026-10-11
|
||||
|
||||
- Scrollbars use your theme's colours and show how much of the list is in view.
|
||||
|
||||
## [1.0.0] - 2026-10-10
|
||||
|
||||
- Rank yourself with your friends for Wim Hof, breathing patterns, meditation and Sun Salutation.
|
||||
- Sort by current streak, or by average hold in Wim Hof and average time in meditation.
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
@@ -0,0 +1,34 @@
|
||||
// Leaderboard ranks you with your friends for each practice. The unified
|
||||
// host fetches friend results, keeps them for offline use and ranks rows.
|
||||
#import, file "../../src/cells/leaderboard_types.zi";
|
||||
#import, file "../../src/cells/module_types.zi";
|
||||
#import, file "../../src/core/types.zi";
|
||||
#import, file "leaderboard_view.zi";
|
||||
host_api :: #system_library "host_api";
|
||||
ReadLeaderboardHost :: () -> LeaderboardMessage #foreign host_api;
|
||||
WriteLeaderboardHost :: (message: LeaderboardMessage) #foreign host_api;
|
||||
|
||||
LeaderboardApply :: (message: LeaderboardMessage) -> LeaderboardMessage {
|
||||
message.succeeded = true
|
||||
if message.action == LEADERBOARD_ROUTE {
|
||||
message.succeeded = message.screen == ScreenLeaderboard
|
||||
} else if message.action == LEADERBOARD_FRAME {
|
||||
message = LeaderboardView(message)
|
||||
} else {
|
||||
message.succeeded = false
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
#program_export "LeaderboardMain"
|
||||
Main :: () -> s32 {
|
||||
message := ReadLeaderboardHost()
|
||||
if message.abi != MODULE_ABI {
|
||||
return -1
|
||||
}
|
||||
if message.action == MODULE_IDENTIFY {
|
||||
return MODULE_LEADERBOARD
|
||||
}
|
||||
WriteLeaderboardHost(LeaderboardApply(message))
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
// Leaderboard owns its screen composition; the host supplies ranked rows,
|
||||
// prepared once when results arrive, and ordinary Kryon widget effects.
|
||||
#import "session"
|
||||
#import "geometry"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "drawing_props"
|
||||
#import "text_props"
|
||||
#import "text_align"
|
||||
#import "text_widget"
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
#import "scroll_props"
|
||||
#import "scroll_widget"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "tree"
|
||||
#import, file "../../src/cells/leaderboard_ui_types.zi";
|
||||
#import, file "../../src/cells/leaderboard_types.zi";
|
||||
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
using TextAlign;
|
||||
using TextWrap;
|
||||
host_api :: #system_library "host_api";
|
||||
ReadLeaderboardUiHost :: () -> LeaderboardUiFrame #foreign host_api;
|
||||
WriteLeaderboardUiHost :: (frame: LeaderboardUiFrame) #foreign host_api;
|
||||
ReadLeaderboardRowHost :: (index: s32) -> LeaderboardUiRow #foreign host_api;
|
||||
LeaderboardLocaleHost :: (key: string) -> string #foreign host_api;
|
||||
frame: LeaderboardUiFrame;
|
||||
state: LeaderboardMessage;
|
||||
|
||||
// Wim Hof, breathing patterns, meditation and Sun Salutation, as in Practice.
|
||||
PRACTICE_COUNT :: 4
|
||||
PracticeAt :: (index: s32) -> s32 {
|
||||
ids: [PRACTICE_COUNT]s32 = .[0, 3, 1, 2]
|
||||
return ids[index]
|
||||
}
|
||||
|
||||
PracticeLabel :: (practice: s32) -> string {
|
||||
if practice == 1 { return LeaderboardLocaleHost("exercise_meditation") }
|
||||
if practice == 2 { return LeaderboardLocaleHost("exercise_sun_salutation") }
|
||||
if practice == 3 { return LeaderboardLocaleHost("exercise_patterns") }
|
||||
return LeaderboardLocaleHost("exercise_wim_hof")
|
||||
}
|
||||
|
||||
Scale :: (pixels: s32) -> s32 {
|
||||
return cast(s32)(cast(float32)pixels * frame.scale)
|
||||
}
|
||||
|
||||
Bounds :: (x: s32, y: s32, width: s32, height: s32) -> Rectangle {
|
||||
return Rectangle.{cast(float32)x, cast(float32)y,
|
||||
cast(float32)width, cast(float32)height}
|
||||
}
|
||||
|
||||
Finish :: () -> LeaderboardMessage {
|
||||
WriteLeaderboardUiHost(frame)
|
||||
state.succeeded = true
|
||||
return state
|
||||
}
|
||||
|
||||
Cell :: (key: u64, x: s32, y: s32, width: s32, height: s32, text: string) {
|
||||
Text(frame.session, TextProps.{.key = key, .bounds = Bounds(x, y, width, height),
|
||||
.text = text, .font = frame.font, .wrap = cast(TextWrap)TextWrapNone,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
|
||||
LeaderboardView :: (message: LeaderboardMessage) -> LeaderboardMessage {
|
||||
frame = ReadLeaderboardUiHost()
|
||||
state = message
|
||||
x := Scale(16)
|
||||
width := frame.width - x * 2
|
||||
y := Scale(12)
|
||||
|
||||
// Every practice stays visible: two per row on phones, four when wide.
|
||||
per_row: s32 = ifx width >= Scale(600) then PRACTICE_COUNT else 2
|
||||
gap := Scale(8)
|
||||
choice_width := (width - gap * (per_row - 1)) / per_row
|
||||
for index: cast(s32)0..PRACTICE_COUNT - 1 {
|
||||
practice := PracticeAt(index)
|
||||
chosen := practice == state.practice
|
||||
choice_x := x + (index % per_row) * (choice_width + gap)
|
||||
choice_y := y + (index / per_row) * (Scale(40) + gap)
|
||||
if Button(frame.session, ButtonProps.{.id = 7100 + index,
|
||||
.bounds = Bounds(choice_x, choice_y, choice_width, Scale(40)),
|
||||
.label = PracticeLabel(practice), .selected = chosen, .fit_content = true,
|
||||
.tone = cast(ButtonTone)(ifx chosen then ButtonToneAccent else ButtonToneNeutral),
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 && !chosen {
|
||||
state.practice = practice
|
||||
state.metric = LEADERBOARD_STREAK
|
||||
state.refresh = true
|
||||
frame.scroll = 0
|
||||
return Finish()
|
||||
}
|
||||
}
|
||||
y += (PRACTICE_COUNT / per_row) * (Scale(40) + gap) + Scale(8)
|
||||
|
||||
// The name column is wider when only the streak is ranked.
|
||||
columns: s32 = ifx state.has_average then 3 else 2
|
||||
name_width := ifx state.has_average then width / 2 else (width * 2) / 3
|
||||
value_width := ifx state.has_average then (width - name_width) / 2 else width - name_width
|
||||
average_label := ifx state.practice == 1 then "profile_metric_avg_time" else "profile_metric_avg_hold"
|
||||
labels: [3]string = .[LeaderboardLocaleHost("profile_friends_title"),
|
||||
LeaderboardLocaleHost("profile_metric_streak"), LeaderboardLocaleHost(average_label)]
|
||||
header_x := x
|
||||
for column: cast(s32)0..columns - 1 {
|
||||
column_width := ifx column == 0 then name_width else ifx column == columns - 1 then x + width - header_x else value_width
|
||||
metric := column - 1
|
||||
active := column > 0 && state.metric == metric
|
||||
if Button(frame.session, ButtonProps.{.id = 7110 + column,
|
||||
.bounds = Bounds(header_x, y, column_width, Scale(36)),
|
||||
.label = labels[column], .disabled = column == 0, .selected = active,
|
||||
.fit_content = true,
|
||||
.tone = cast(ButtonTone)(ifx active then ButtonToneAccent else ButtonToneNeutral),
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 &&
|
||||
column > 0 && !active {
|
||||
state.metric = metric
|
||||
return Finish()
|
||||
}
|
||||
header_x += column_width
|
||||
}
|
||||
y += Scale(44)
|
||||
|
||||
if state.row_count == 0 {
|
||||
key := ifx state.loading then "profile_updating_status" else "profile_no_leaderboard_data"
|
||||
Text(frame.session, TextProps.{.key = cast(u64)7120,
|
||||
.bounds = Bounds(x, y, width, Scale(32)), .text = LeaderboardLocaleHost(key),
|
||||
.font = frame.font, .wrap = cast(TextWrap)TextWrapAuto})
|
||||
return Finish()
|
||||
}
|
||||
|
||||
row_height := Scale(40)
|
||||
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)7130,
|
||||
.bounds = Bounds(x, y, width, frame.height - frame.bottom - y - Scale(8)),
|
||||
.content_height = state.row_count * row_height, .scroll_offset = frame.scroll})
|
||||
frame.scroll = scroll.scroll_offset
|
||||
if !scroll.opened {
|
||||
return Finish()
|
||||
}
|
||||
row_y := cast(s32)scroll.content.y
|
||||
left := cast(s32)scroll.content.x
|
||||
for index: cast(s32)0..state.row_count - 1 {
|
||||
// Rows outside the viewport are not read from the host.
|
||||
if row_y + row_height > cast(s32)scroll.viewport.y &&
|
||||
row_y < cast(s32)(scroll.viewport.y + scroll.viewport.height) {
|
||||
row := ReadLeaderboardRowHost(index)
|
||||
key := cast(u64)(7200 + index * 4)
|
||||
if row.own || index % 2 == 1 {
|
||||
Box(frame.session, BoxProps.{.key = key, .bounds = Bounds(left, row_y, width, row_height),
|
||||
.fill = ifx row.own then Color.{156, 188, 143, 64} else Color.{156, 156, 156, 24},
|
||||
.radius = cast(float32)Scale(8)})
|
||||
}
|
||||
name: Vec(u8)
|
||||
BuilderPrint(*name, "%. %", row.rank, row.name)
|
||||
pad := Scale(8)
|
||||
Cell(key + 1, left + pad, row_y, name_width - pad * 2, row_height, BuilderFinish(name))
|
||||
Cell(key + 2, left + name_width + pad, row_y, value_width - pad, row_height, row.streak)
|
||||
if state.has_average {
|
||||
Cell(key + 3, left + name_width + value_width + pad, row_y,
|
||||
width - name_width - value_width - pad, row_height, row.average)
|
||||
}
|
||||
}
|
||||
row_y += row_height
|
||||
}
|
||||
End(frame.session)
|
||||
return Finish()
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.5] - 2026-10-11
|
||||
|
||||
- Scrollbars use your theme's colours and show how much of the list is in view.
|
||||
- Scrolling while you type a new item keeps the keyboard open.
|
||||
|
||||
## [1.0.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.0.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.9] - 2026-10-11
|
||||
### Fixed
|
||||
- Scrolling the command list keeps the keyboard open.
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much of the chat is in view.
|
||||
|
||||
## [1.3.8] - 2026-10-11
|
||||
### Added
|
||||
- Select messages like in Telegram: hold a message to select it, then tap or drag across others; dragging to the top or bottom of the chat scrolls it, through older messages too. Checkmarks show what is selected, and a bar over the top of the chat shows how many, with copy and delete.
|
||||
### Changed
|
||||
- Lumi's typing dots appear after a short pause, as a person reads before typing.
|
||||
- Feedback shows only its card with Yes and No, without a second copy of the question.
|
||||
|
||||
## [1.3.7] - 2026-10-11
|
||||
### Changed
|
||||
- Like Telegram, the chat shows your newest messages and loads older ones as you scroll up, right away while the newest do not fill the screen.
|
||||
|
||||
## [1.3.6] - 2026-10-10
|
||||
### Added
|
||||
- While Lumi is answering, three dots show in its bubble where the answer will appear.
|
||||
|
||||
## [1.3.5] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.3.4] - 2026-10-10
|
||||
### Added
|
||||
- Tap the / button or type / to see Lumi's commands, as in Telegram. The list narrows as you type; tap a command or press Enter to use it, and commands that need text wait for it in the message box.
|
||||
### Changed
|
||||
- Send with an arrow button.
|
||||
|
||||
## [1.3.3] - 2026-10-10
|
||||
### Fixed
|
||||
- Open the chat without a pause by preparing command suggestions only while you type.
|
||||
|
||||
+4
-4
@@ -137,8 +137,10 @@ LumiRespond :: (input: string) {
|
||||
if PerformLumiActionHost(action) {
|
||||
SetLumiHabitChoiceHost(false)
|
||||
SetLumiDiaryChoiceHost(false)
|
||||
if action.kind == LUMI_SHOW_PROGRESS || action.kind == LUMI_SHOW_DONATIONS {
|
||||
// These tools already appended their typed card to the chat.
|
||||
if action.kind == LUMI_SHOW_PROGRESS || action.kind == LUMI_SHOW_DONATIONS ||
|
||||
action.kind == LUMI_REPORT_FEEDBACK {
|
||||
// These tools already appended their typed card to the chat;
|
||||
// the feedback card with Yes and No is the whole answer.
|
||||
return
|
||||
}
|
||||
reply = "lumi_opened"
|
||||
@@ -156,8 +158,6 @@ LumiRespond :: (input: string) {
|
||||
reply = "lumi_practice_started"
|
||||
} else if action.kind == LUMI_WRITE_DIARY {
|
||||
reply = "lumi_diary_saved"
|
||||
} else if action.kind == LUMI_REPORT_FEEDBACK {
|
||||
reply = "lumi_feedback_confirm"
|
||||
}
|
||||
} else {
|
||||
reply = "lumi_unavailable"
|
||||
|
||||
+558
-22
@@ -13,6 +13,10 @@
|
||||
#import "control_props"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "checkbox_props"
|
||||
#import "checkbox_widget"
|
||||
#import "press_props"
|
||||
#import "press_widget"
|
||||
#import "scroll_props"
|
||||
#import "scroll_widget"
|
||||
#import "tree"
|
||||
@@ -23,11 +27,13 @@
|
||||
#import, file "../../src/cells/lumi_types.zi";
|
||||
#import, file "../../src/cells/lumi_ui_types.zi";
|
||||
#import, file "../../src/cells/lumi_chart.zi";
|
||||
#import, file "command_text.zi";
|
||||
#import, file "engine.zi";
|
||||
#import, file "message_text.zi";
|
||||
|
||||
using ImageFit;
|
||||
using TextWrap;
|
||||
using TextAlign;
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
host_api :: #system_library "host_api";
|
||||
@@ -39,6 +45,7 @@ ReadLumiSuggestionHabitHost :: (index: s32) -> LumiTask #foreign host_api;
|
||||
LumiViewLocaleHost :: (key: string) -> string #foreign host_api;
|
||||
LumiFeedbackChoiceHost :: (id: string, action: s32) -> bool #foreign host_api;
|
||||
LumiLoadOlderHost :: () -> bool #foreign host_api;
|
||||
LumiDeleteRowHost :: (index: s32) -> bool #foreign host_api;
|
||||
LumiFirstVisibleRowHost :: (scroll: s32) -> s32 #foreign host_api;
|
||||
LumiRowOffsetHost :: (index: s32) -> s32 #foreign host_api;
|
||||
ReadLumiDonationHost :: (coin: s32) -> LumiDonation #foreign host_api;
|
||||
@@ -70,6 +77,295 @@ candidate_ready: s32;
|
||||
// Reading a command takes many text matches, so typing reads one per frame.
|
||||
LUMI_CANDIDATES_PER_FRAME :: 1
|
||||
|
||||
// Typing "/" lists Lumi's commands as in Telegram. The list matches the
|
||||
// command menu of Lumi's Telegram bot, without its Telegram-only commands.
|
||||
LumiMenuCommand :: struct {
|
||||
name: string
|
||||
description: string
|
||||
// These commands insert "/name " for the text instead of sending.
|
||||
needs_text: bool
|
||||
requirement: s32
|
||||
// Shown only while Lumi waits for a Diary text or a habit name.
|
||||
choice_only: bool
|
||||
}
|
||||
|
||||
LUMI_MENU_COMMANDS :: 16
|
||||
menu_revision: s64 = -1;
|
||||
menu_commands: [LUMI_MENU_COMMANDS]LumiMenuCommand;
|
||||
menu_scroll: s32;
|
||||
focus_request: s32;
|
||||
// Telegram-style selection: hold a message to select it, then tap messages
|
||||
// or drag across them; dragging near the chat's top or bottom scrolls it.
|
||||
// Rows are counted from the newest message, which older messages loading
|
||||
// above do not change, so a sweep can keep going up through the history.
|
||||
// The greeting above every message is kept apart.
|
||||
LUMI_SELECT_MAX :: 4096
|
||||
selecting: bool;
|
||||
selected: [LUMI_SELECT_MAX]bool;
|
||||
greeting_selected: bool;
|
||||
selected_count: s32;
|
||||
sweeping: bool;
|
||||
// The row the sweep began on, counted from the newest message; -1 is the
|
||||
// greeting.
|
||||
sweep_anchor: s32;
|
||||
sweep_value: bool;
|
||||
// Where the pointer is during a sweep, for scrolling at the chat's edges.
|
||||
sweep_pointer_y: float32;
|
||||
sweep_seen: bool;
|
||||
confirm_delete: bool;
|
||||
// Copied text waits until the composer has written its own clipboard state.
|
||||
pending_copy: string;
|
||||
copy_pending: bool;
|
||||
LUMI_CLOSE_ICON :: "S1.8rr:M6 6L18 18M18 6L6 18"
|
||||
LUMI_COPY_ICON :: "S1.6rr:M9 9H20V20H9ZM15 5V4H4V15H5"
|
||||
LUMI_DELETE_ICON :: "S1.6rr:M3 6H21M9 6V3H15V6M5 6L6 21H18L19 6M10 10V17M14 10V17"
|
||||
|
||||
// A row's place counted from the newest message; the greeting is -1.
|
||||
RowSlot :: (index: s32) -> s32 {
|
||||
if index <= 0 {
|
||||
return -1
|
||||
}
|
||||
return frame.chat_count - 1 - index
|
||||
}
|
||||
|
||||
SlotRow :: (slot: s32) -> s32 {
|
||||
if slot < 0 {
|
||||
return 0
|
||||
}
|
||||
return frame.chat_count - 1 - slot
|
||||
}
|
||||
|
||||
IsSelected :: (index: s32) -> bool {
|
||||
slot := RowSlot(index)
|
||||
if slot < 0 {
|
||||
return greeting_selected
|
||||
}
|
||||
return slot < LUMI_SELECT_MAX && selected[slot]
|
||||
}
|
||||
|
||||
SelectionClear :: () {
|
||||
for index: cast(s32)0..LUMI_SELECT_MAX - 1 {
|
||||
selected[index] = false
|
||||
}
|
||||
greeting_selected = false
|
||||
selected_count = 0
|
||||
selecting = false
|
||||
sweeping = false
|
||||
confirm_delete = false
|
||||
}
|
||||
|
||||
SelectionSet :: (index: s32, value: bool) {
|
||||
if index < 0 || index >= frame.chat_count || IsSelected(index) == value {
|
||||
return
|
||||
}
|
||||
slot := RowSlot(index)
|
||||
if slot < 0 {
|
||||
greeting_selected = value
|
||||
} else if slot < LUMI_SELECT_MAX {
|
||||
selected[slot] = value
|
||||
} else {
|
||||
return
|
||||
}
|
||||
selected_count += ifx value then 1 else -1
|
||||
}
|
||||
|
||||
// A press began on a row: it selects or clears that row, and dragging then
|
||||
// gives every row it sweeps over the same state.
|
||||
SweepStart :: (index: s32, value: bool) {
|
||||
sweeping = true
|
||||
sweep_anchor = RowSlot(index)
|
||||
sweep_value = value
|
||||
SelectionSet(index, value)
|
||||
}
|
||||
|
||||
SweepTo :: (index: s32) {
|
||||
if index < 0 {
|
||||
index = 0
|
||||
}
|
||||
if index >= frame.chat_count {
|
||||
index = frame.chat_count - 1
|
||||
}
|
||||
anchor := SlotRow(sweep_anchor)
|
||||
first := ifx index < anchor then index else anchor
|
||||
last := ifx index < anchor then anchor else index
|
||||
for row: first..last {
|
||||
SelectionSet(row, sweep_value)
|
||||
}
|
||||
}
|
||||
|
||||
// The template with its %d replaced by the count.
|
||||
CountText :: (template: string, count: s32) -> string {
|
||||
out: Vec(u8)
|
||||
at: s64 = 0
|
||||
while at < template.count {
|
||||
if at + 1 < template.count && template[at] == cast(u8)37 && template[at + 1] == cast(u8)100 {
|
||||
BuilderPrint(*out, "%", count)
|
||||
at += 2
|
||||
} else {
|
||||
BuilderPrint(*out, "%", template[at:at + 1])
|
||||
at += 1
|
||||
}
|
||||
}
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
SelectedText :: () -> string {
|
||||
out: Vec(u8)
|
||||
written: s32 = 0
|
||||
for index: cast(s32)0..frame.chat_count - 1 {
|
||||
if !IsSelected(index) {
|
||||
continue
|
||||
}
|
||||
if written > 0 {
|
||||
BuilderPrint(*out, "\n\n")
|
||||
}
|
||||
BuilderPrint(*out, "%", ReadLumiChatRowHost(index).text)
|
||||
written += 1
|
||||
}
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
// The bar replacing the top of the chat while messages are selected: close,
|
||||
// the count, then copy and delete, with delete asking first.
|
||||
SelectionBar :: (x: s32, top: s32, width: s32) {
|
||||
control := Scale(44)
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300369,
|
||||
.bounds = Bounds(x - Scale(16), 0, width + Scale(32), top + control + Scale(8)),
|
||||
.fill = frame.background})
|
||||
if confirm_delete {
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300370,
|
||||
.bounds = Bounds(x, top, width - Scale(216), control),
|
||||
.text = LumiViewLocaleHost("lumi_delete_confirm"), .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapAuto, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
if Button(frame.session, ButtonProps.{.id = 30020,
|
||||
.bounds = Bounds(x + width - Scale(208), top, Scale(100), control),
|
||||
.label = LumiViewLocaleHost("cancel_button"), .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
confirm_delete = false
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30021,
|
||||
.bounds = Bounds(x + width - Scale(100), top, Scale(100), control),
|
||||
.label = LumiViewLocaleHost("delete_button"), .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneDanger, .emphasis = cast(ButtonEmphasis)ButtonEmphasisFilled}) != 0 {
|
||||
// From the last row back, so earlier rows keep their indices.
|
||||
index := frame.chat_count - 1
|
||||
while index >= 0 {
|
||||
if IsSelected(index) {
|
||||
unused LumiDeleteRowHost(index)
|
||||
}
|
||||
index -= 1
|
||||
}
|
||||
SelectionClear()
|
||||
}
|
||||
return
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30022, .bounds = Bounds(x, top, control, control),
|
||||
.label = LumiViewLocaleHost("lumi_cancel_selection"), .icon_shape = LUMI_CLOSE_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
SelectionClear()
|
||||
return
|
||||
}
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300371,
|
||||
.bounds = Bounds(x + control + Scale(8), top + Scale(6), Scale(150), control - Scale(12)),
|
||||
.fill = Color.{156, 188, 143, 48}, .radius = cast(float32)(control - Scale(12)) / 2.0})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300372,
|
||||
.bounds = Bounds(x + control + Scale(8), top, Scale(150), control),
|
||||
.text = CountText(LumiViewLocaleHost("lumi_selected_count"), selected_count), .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapNone, .align = cast(TextAlign)TextAlignCenter,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
if Button(frame.session, ButtonProps.{.id = 30023,
|
||||
.bounds = Bounds(x + width - 2 * control - Scale(4), top, control, control),
|
||||
.label = LumiViewLocaleHost("lumi_copy"), .icon_shape = LUMI_COPY_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
pending_copy = SelectedText()
|
||||
copy_pending = true
|
||||
SelectionClear()
|
||||
return
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30024,
|
||||
.bounds = Bounds(x + width - control, top, control, control),
|
||||
.label = LumiViewLocaleHost("delete_button"), .icon_shape = LUMI_DELETE_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneDanger, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
confirm_delete = true
|
||||
}
|
||||
}
|
||||
// A rounded square with a slash, and a paper plane, in Kryon's 24 x 24 icon
|
||||
// shape format.
|
||||
LUMI_COMMANDS_ICON :: "S1.8rr:M7 3H17C19.2091 3 21 4.79086 21 7V17C21 19.2091 19.2091 21 17 21H7C4.79086 21 3 19.2091 3 17V7C3 4.79086 4.79086 3 7 3Z|S1.8rr:M14.5 7.5L9.5 16.5"
|
||||
LUMI_SEND_ICON :: "F:M3.4 20.6L21.2 12.9C21.94 12.58 21.94 11.42 21.2 11.1L3.4 3.4C2.66 3.08 1.9 3.8 2.14 4.57L4.2 11L13 12L4.2 13L2.14 19.43C1.9 20.2 2.66 20.92 3.4 20.6Z"
|
||||
|
||||
MenuCommands :: (revision: s64) -> []LumiMenuCommand {
|
||||
if revision != menu_revision {
|
||||
menu_revision = revision
|
||||
table: [LUMI_MENU_COMMANDS]LumiMenuCommand = .[
|
||||
LumiMenuCommand.{.name = "/help", .description = LumiViewLocaleHost("lumi_command_help")},
|
||||
LumiMenuCommand.{.name = "/todo", .description = LumiViewLocaleHost("lumi_add"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/done", .description = LumiViewLocaleHost("lumi_complete"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/reopen", .description = LumiViewLocaleHost("lumi_reopen"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/lists", .description = LumiViewLocaleHost("lumi_open_lists"),
|
||||
.requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/habit", .description = LumiViewLocaleHost("lumi_complete_habit"),
|
||||
.requirement = LUMI_HABITS},
|
||||
LumiMenuCommand.{.name = "/habits", .description = LumiViewLocaleHost("lumi_open_habits"),
|
||||
.requirement = LUMI_HABITS},
|
||||
LumiMenuCommand.{.name = "/journal", .description = LumiViewLocaleHost("lumi_write_diary"),
|
||||
.requirement = LUMI_DIARY},
|
||||
LumiMenuCommand.{.name = "/diary", .description = LumiViewLocaleHost("lumi_open_diary"),
|
||||
.requirement = LUMI_DIARY},
|
||||
LumiMenuCommand.{.name = "/meditate", .description = LumiViewLocaleHost("lumi_start_meditation"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/whm", .description = LumiViewLocaleHost("lumi_start_whm"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/practices", .description = LumiViewLocaleHost("lumi_open_practices"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/progress", .description = LumiViewLocaleHost("lumi_show_progress"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/feedback", .description = LumiViewLocaleHost("lumi_command_feedback"),
|
||||
.needs_text = true},
|
||||
LumiMenuCommand.{.name = "/donate", .description = LumiViewLocaleHost("lumi_show_donations")},
|
||||
LumiMenuCommand.{.name = "/cancel", .description = LumiViewLocaleHost("cancel_button"),
|
||||
.choice_only = true}]
|
||||
menu_commands = table
|
||||
}
|
||||
return menu_commands[:]
|
||||
}
|
||||
|
||||
// A draft of "/" and a command name opens the list; a space closes it,
|
||||
// since the command then takes its text.
|
||||
MenuOpen :: (value: string) -> bool {
|
||||
if value.count == 0 || value[0] != cast(u8)47 {
|
||||
return false
|
||||
}
|
||||
for byte: value {
|
||||
if CommandSpace(byte) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
CommandText :: (command: LumiMenuCommand) -> string {
|
||||
if !command.needs_text {
|
||||
return command.name
|
||||
}
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "% ", command.name)
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
FillDraft :: (text: string) {
|
||||
frame.value = text
|
||||
frame.cursor = cast(s32)text.count
|
||||
frame.anchor = frame.cursor
|
||||
frame.input_scroll = 0
|
||||
frame.selecting = false
|
||||
frame.preferred_x_valid = false
|
||||
frame.focused = true
|
||||
}
|
||||
|
||||
// Interpretation depends on the draft and translated command set. Cursor
|
||||
// blinking, scrolling and unchanged frames reuse the result, while sending
|
||||
// still validates the request against the current tools in LumiRespond.
|
||||
@@ -116,13 +412,7 @@ Suggestion :: (id: s32, text: string, bounds: Rectangle, label: string = "") ->
|
||||
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
|
||||
.label = ifx label.count > 0 then label else text, .pill = true, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
frame.value = text
|
||||
frame.cursor = cast(s32)text.count
|
||||
frame.anchor = frame.cursor
|
||||
frame.input_scroll = 0
|
||||
frame.selecting = false
|
||||
frame.preferred_x_valid = false
|
||||
frame.focused = true
|
||||
FillDraft(text)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -238,6 +528,60 @@ DonationCard :: (index: s32, x: s32, y: s32, width: s32) {
|
||||
}
|
||||
}
|
||||
|
||||
// Lumi's bubble with three dots that brighten and rise in turn, where its
|
||||
// answer will appear.
|
||||
TypingDots :: (x: s32, top: s32) {
|
||||
left := x + Scale(48)
|
||||
Image(frame.session, ImageProps.{.key = cast(u64)300380,
|
||||
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
|
||||
.bounds = Bounds(x, top + Scale(16), Scale(40), Scale(40)),
|
||||
.source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300381,
|
||||
.bounds = Bounds(left, top, Scale(96), Scale(60)),
|
||||
.fill = Color.{156, 156, 156, 24}, .radius = cast(float32)Scale(16)})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300382,
|
||||
.bounds = Bounds(left + Scale(14), top + Scale(8), Scale(68), Scale(20)),
|
||||
.text = "Lumi", .font = Scale(12)})
|
||||
for dot: cast(s32)0..2 {
|
||||
phase := frame.now * 1.4 - cast(float64)dot * 0.2
|
||||
phase = phase - cast(float64)cast(s64)phase
|
||||
if phase < 0.0 {
|
||||
phase += 1.0
|
||||
}
|
||||
level := ifx phase < 0.5 then phase * 2.0 else (1.0 - phase) * 2.0
|
||||
size := Scale(8)
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)(300383 + dot),
|
||||
.bounds = Bounds(left + Scale(16) + dot * Scale(14),
|
||||
top + Scale(38) - cast(s32)(level * cast(float64)Scale(4)), size, size),
|
||||
.fill = Color.{170, 170, 170, cast(u8)(90.0 + 165.0 * level)},
|
||||
.radius = cast(float32)size / 2.0})
|
||||
}
|
||||
}
|
||||
|
||||
// A row's press: a hold starts selecting, and while selecting a press starts
|
||||
// a sweep that follows the pointer, even off the row and past the chat.
|
||||
RowPress :: (index: s32, bounds: Rectangle, content_y: float32) {
|
||||
key := ifx index == 0 then 0 else RowSlot(index) + 1
|
||||
press := Press(frame.session, PressProps.{.key = cast(u64)(410000 + key), .bounds = bounds,
|
||||
.label = LumiViewLocaleHost("lumi_message"), .now = frame.now, .capture = selecting})
|
||||
if !selecting && press.held {
|
||||
selecting = true
|
||||
confirm_delete = false
|
||||
SweepStart(index, true)
|
||||
} else if selecting && press.down && !sweeping {
|
||||
SweepStart(index, !IsSelected(index))
|
||||
}
|
||||
if sweeping && press.down {
|
||||
sweep_seen = true
|
||||
sweep_pointer_y = press.y
|
||||
SweepTo(LumiFirstVisibleRowHost(cast(s32)(press.y - content_y)))
|
||||
}
|
||||
if press.released {
|
||||
sweeping = false
|
||||
}
|
||||
}
|
||||
|
||||
LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> LumiMessage {
|
||||
frame = ReadLumiUiHost()
|
||||
column := CenteredColumnFor(frame.width, Scale(720), Scale(16))
|
||||
@@ -254,6 +598,44 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
footer := frame.height - frame.bottom - Scale(16) - input_height
|
||||
suggestions_top := footer - Scale(ifx LumiTrim(frame.value).count > 0 then 46 else 0)
|
||||
history_top := Scale(12)
|
||||
menu := MenuCommands(revision)
|
||||
menu_matches: [LUMI_MENU_COMMANDS]s32
|
||||
menu_count: s32 = 0
|
||||
// Enter chooses the exact command, otherwise the first one listed.
|
||||
menu_target: s32 = -1
|
||||
if MenuOpen(frame.value) {
|
||||
for index: cast(s32)0..LUMI_MENU_COMMANDS - 1 {
|
||||
command := menu[index]
|
||||
if (command.requirement != 0 && (frame.available_apps & command.requirement) == 0) ||
|
||||
(command.choice_only && !frame.choosing_habit && !frame.choosing_diary) ||
|
||||
!LumiStarts(command.name, frame.value) {
|
||||
continue
|
||||
}
|
||||
if menu_target < 0 || LumiEqual(command.name, frame.value) {
|
||||
menu_target = menu_count
|
||||
}
|
||||
menu_matches[menu_count] = index
|
||||
menu_count += 1
|
||||
}
|
||||
}
|
||||
menu_row := Scale(44)
|
||||
menu_height := menu_count * menu_row
|
||||
// Four and a half rows show that a longer list scrolls.
|
||||
if menu_height > menu_row * 9 / 2 {
|
||||
menu_height = menu_row * 9 / 2
|
||||
}
|
||||
if menu_count > 0 && footer - Scale(8) - menu_height - history_top < Scale(68) {
|
||||
menu_height = footer - Scale(8) - history_top - Scale(68)
|
||||
if menu_height < menu_row {
|
||||
menu_height = menu_row
|
||||
}
|
||||
}
|
||||
menu_top := footer - Scale(8) - menu_height
|
||||
if menu_count > 0 {
|
||||
suggestions_top = menu_top
|
||||
} else {
|
||||
menu_scroll = 0
|
||||
}
|
||||
chat_height := suggestions_top - history_top - Scale(8)
|
||||
if chat_height < Scale(60) {
|
||||
chat_height = Scale(60)
|
||||
@@ -261,11 +643,20 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
if frame.follow_end {
|
||||
frame.scroll = 1000000
|
||||
}
|
||||
// While Lumi answers, its typing dots follow the last message after a
|
||||
// short pause.
|
||||
typing := frame.waiting && !frame.typing_pause
|
||||
typing_height := ifx typing then Scale(70) else 0
|
||||
history := Scroll(frame.session, ScrollProps.{.key = cast(u64)300100,
|
||||
.bounds = Bounds(x, history_top, width, chat_height),
|
||||
.content_height = frame.history_height, .scroll_offset = frame.scroll, .scale = frame.scale})
|
||||
.content_height = frame.history_height + typing_height, .scroll_offset = frame.scroll, .scale = frame.scale})
|
||||
frame.scroll = history.scroll_offset
|
||||
frame.follow_end = history.scroll_offset == history.max_scroll
|
||||
// Older messages load when the chat reaches its top, and at once while
|
||||
// the loaded ones do not fill the chat, which then cannot scroll.
|
||||
load_older := frame.has_older &&
|
||||
(history.max_scroll <= 0 || (!frame.follow_end && frame.scroll <= Scale(96)))
|
||||
anchor_drawn := false
|
||||
if history.opened {
|
||||
first := LumiFirstVisibleRowHost(history.scroll_offset)
|
||||
top := cast(s32)history.content.y + LumiRowOffsetHost(first)
|
||||
@@ -277,7 +668,20 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
row_height := row.height
|
||||
bubble_width := width - Scale(ifx row.user then 60 else 80)
|
||||
left := x + Scale(48)
|
||||
if !row.user {
|
||||
// The whole row takes holds and sweeps; its buttons sit above it.
|
||||
RowPress(index, Bounds(x, top, width, row_height - Scale(10)), history.content.y)
|
||||
if RowSlot(index) == sweep_anchor {
|
||||
anchor_drawn = true
|
||||
}
|
||||
if selecting {
|
||||
checked := IsSelected(index)
|
||||
toggled := Checkbox(frame.session, CheckboxProps.{.key = cast(u64)(420000 + RowSlot(index) + 1),
|
||||
.bounds = Bounds(x + Scale(8), top + (row_height - Scale(10)) / 2 - Scale(12), Scale(24), Scale(24)),
|
||||
.label = LumiViewLocaleHost("lumi_message"), .checked = checked})
|
||||
if toggled.changed {
|
||||
SelectionSet(index, toggled.checked)
|
||||
}
|
||||
} else if !row.user {
|
||||
Image(frame.session, ImageProps.{.key = cast(u64)(300400 + index * 4),
|
||||
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
|
||||
.bounds = Bounds(x, top + row_height - Scale(54), Scale(40), Scale(40)),
|
||||
@@ -300,7 +704,7 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
props := TextProps.{.key = cast(u64)(300403 + index * 4),
|
||||
.bounds = Bounds(left + Scale(14), top + text_top,
|
||||
bubble_width - Scale(28), text_height),
|
||||
.text = row.text, .font = frame.font, .selectable = true,
|
||||
.text = row.text, .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapAuto}
|
||||
if !row.user {
|
||||
formatted := ReplyText(index, row.text)
|
||||
@@ -328,8 +732,52 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
}
|
||||
top += row_height
|
||||
}
|
||||
if typing {
|
||||
TypingDots(x, cast(s32)history.content.y + frame.history_height)
|
||||
}
|
||||
// Scrolling can carry the row the sweep began on out of view; its
|
||||
// press stays registered so the sweep goes on.
|
||||
if sweeping && !anchor_drawn {
|
||||
anchor := SlotRow(sweep_anchor)
|
||||
if anchor >= 0 && anchor < frame.chat_count {
|
||||
anchor_top := cast(s32)history.content.y + LumiRowOffsetHost(anchor)
|
||||
RowPress(anchor, Bounds(x, anchor_top, width,
|
||||
ReadLumiChatRowHost(anchor).height - Scale(10)), history.content.y)
|
||||
}
|
||||
}
|
||||
End(frame.session)
|
||||
}
|
||||
// Dragging near the chat's top or bottom scrolls it, faster nearer the
|
||||
// edge, so a sweep can reach every message.
|
||||
if sweeping && sweep_seen {
|
||||
edge := cast(float32)Scale(56)
|
||||
top_edge := cast(float32)Scale(60) + edge
|
||||
bottom_edge := cast(float32)(history_top + chat_height) - edge
|
||||
if sweep_pointer_y < top_edge {
|
||||
step := cast(s32)((top_edge - sweep_pointer_y) / 3.0) + Scale(4)
|
||||
if step > Scale(40) {
|
||||
step = Scale(40)
|
||||
}
|
||||
frame.scroll -= step
|
||||
if frame.scroll < 0 {
|
||||
frame.scroll = 0
|
||||
}
|
||||
frame.follow_end = false
|
||||
} else if sweep_pointer_y > bottom_edge {
|
||||
step := cast(s32)((sweep_pointer_y - bottom_edge) / 3.0) + Scale(4)
|
||||
if step > Scale(40) {
|
||||
step = Scale(40)
|
||||
}
|
||||
frame.scroll += step
|
||||
}
|
||||
}
|
||||
sweep_seen = false
|
||||
if selecting && selected_count <= 0 && !sweeping {
|
||||
SelectionClear()
|
||||
}
|
||||
if selecting {
|
||||
SelectionBar(x, Scale(12), width)
|
||||
}
|
||||
typed := LumiTrim(frame.value)
|
||||
candidates: [20]string = .[commands.start_whm, commands.complete_habit,
|
||||
commands.start_meditation, commands.start_sun, commands.start_patterns,
|
||||
@@ -342,8 +790,9 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
LUMI_LISTS, LUMI_HABITS, LUMI_PRACTICES, LUMI_DIARY, 0, 0, 0, 0, 0, LUMI_DIARY, LUMI_PRACTICES, 0]
|
||||
suggestion_count: s32 = 0
|
||||
selected: bool
|
||||
limit: s32 = 2
|
||||
chip_width := (width - Scale(8)) / limit
|
||||
// The command list replaces the suggestion chips while it is open.
|
||||
limit: s32 = ifx menu_count > 0 then 0 else 2
|
||||
chip_width := (width - Scale(8)) / 2
|
||||
action := DraftIntent(typed, commands, revision)
|
||||
if action.kind == 0 && frame.choosing_habit {
|
||||
action = LumiAction.{.kind = LUMI_COMPLETE_HABIT, .title = typed}
|
||||
@@ -411,13 +860,79 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
Bounds(x + suggestion_count * (chip_width + Scale(8)), suggestions_top, chip_width, Scale(36))) || selected
|
||||
suggestion_count += 1
|
||||
}
|
||||
chosen: s32 = -1
|
||||
if menu_count > 0 {
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)360000,
|
||||
.bounds = Bounds(x, menu_top, width, menu_height),
|
||||
.fill = Color.{156, 156, 156, 24}, .radius = cast(float32)Scale(12)})
|
||||
menu_list := Scroll(frame.session, ScrollProps.{.key = cast(u64)360001,
|
||||
.bounds = Bounds(x, menu_top, width, menu_height),
|
||||
.content_height = menu_count * menu_row, .scroll_offset = menu_scroll, .scale = frame.scale})
|
||||
menu_scroll = menu_list.scroll_offset
|
||||
if menu_list.opened {
|
||||
name_width := Scale(104)
|
||||
for row: cast(s32)0..menu_count - 1 {
|
||||
top := cast(s32)menu_list.content.y + row * menu_row
|
||||
if top + menu_row < menu_top || top > menu_top + menu_height {
|
||||
continue
|
||||
}
|
||||
index := menu_matches[row]
|
||||
command := menu[index]
|
||||
key := 360100 + index * 4
|
||||
if row == menu_target {
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)key,
|
||||
.bounds = Bounds(x, top, width, menu_row),
|
||||
.fill = Color.{156, 188, 143, 48}, .radius = cast(float32)Scale(12)})
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 360200 + index,
|
||||
.bounds = Bounds(x, top, width, menu_row), .invisible = true,
|
||||
.label = command.description}) != 0 {
|
||||
chosen = index
|
||||
}
|
||||
strong: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)command.name.count}]
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(key + 1),
|
||||
.bounds = Bounds(x + Scale(16), top, name_width, menu_row),
|
||||
.text = command.name, .font = frame.font, .strong = strong[:],
|
||||
.wrap = cast(TextWrap)TextWrapNone, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
// Long translations wrap to a second line on narrow phones.
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(key + 2),
|
||||
.bounds = Bounds(x + Scale(16) + name_width, top,
|
||||
width - Scale(32) - name_width, menu_row),
|
||||
.text = command.description, .font = Scale(14),
|
||||
.wrap = cast(TextWrap)TextWrapAuto, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
End(frame.session)
|
||||
}
|
||||
}
|
||||
// As in Telegram, an empty draft offers the command button and a draft
|
||||
// offers Send. A pending answer keeps Send visible as its progress.
|
||||
show_commands := LumiTrim(frame.value).count == 0 && !frame.waiting
|
||||
if show_commands && Button(frame.session, ButtonProps.{.id = 30012,
|
||||
.bounds = Bounds(x + width - Scale(48), footer, Scale(48), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_commands"), .icon_shape = LUMI_COMMANDS_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
FillDraft("/")
|
||||
selected = true
|
||||
}
|
||||
// The command button and the list keep typing in the draft, as Telegram
|
||||
// does, rather than leaving the focus on the pressed button. Apps built
|
||||
// before Kryon's focus fix give the focus back to that button on the
|
||||
// next frame, so the request lasts two frames.
|
||||
if selected || chosen >= 0 {
|
||||
focus_request = 2
|
||||
}
|
||||
field_input := frame.input
|
||||
if focus_request > 0 {
|
||||
field_input.focus = true
|
||||
focus_request -= 1
|
||||
}
|
||||
field := TextArea(frame.session, TextAreaProps.{.key = cast(u64)300200, .focus_id = 30010,
|
||||
.bounds = Bounds(x, footer, width - Scale(80), input_height),
|
||||
.bounds = Bounds(x, footer, width - Scale(56), input_height),
|
||||
.value = frame.value, .placeholder = LumiViewLocaleHost("lumi_placeholder"), .label = "Lumi",
|
||||
.cursor = frame.cursor, .anchor = frame.anchor, .scroll_y = frame.input_scroll,
|
||||
.selecting = frame.selecting, .preferred_x = frame.preferred_x,
|
||||
.preferred_x_valid = frame.preferred_x_valid, .wrap = true,
|
||||
.focused = frame.focused, .input = frame.input, .max_bytes = LUMI_INPUT_MAX - 1,
|
||||
.focused = frame.focused, .input = field_input, .max_bytes = LUMI_INPUT_MAX - 1,
|
||||
.max_codepoints = LUMI_INPUT_MAX - 1})
|
||||
if !selected {
|
||||
if field.edit.changed && field.edit.start >= 0 && field.edit.end >= field.edit.start &&
|
||||
@@ -441,17 +956,38 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
}
|
||||
frame.clipboard_write = field.clipboard_write
|
||||
frame.clipboard_text = field.clipboard_text
|
||||
send := Button(frame.session, ButtonProps.{.id = 30011,
|
||||
.bounds = Bounds(x + width - Scale(72), footer, Scale(72), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_send"), .disabled = frame.waiting,
|
||||
.loading = frame.waiting, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0
|
||||
if !frame.waiting && (send || field.committed) && LumiTrim(frame.value).count > 0 && !selected {
|
||||
if copy_pending {
|
||||
frame.clipboard_write = true
|
||||
frame.clipboard_text = pending_copy
|
||||
copy_pending = false
|
||||
}
|
||||
send := !show_commands && Button(frame.session, ButtonProps.{.id = 30011,
|
||||
.bounds = Bounds(x + width - Scale(48), footer, Scale(48), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_send"), .icon_shape = LUMI_SEND_ICON, .icon_only = true,
|
||||
.disabled = frame.waiting, .loading = frame.waiting, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0
|
||||
if chosen < 0 && field.committed && !send && menu_target >= 0 && !frame.waiting && !selected {
|
||||
chosen = menu_matches[menu_target]
|
||||
}
|
||||
submit := ""
|
||||
if chosen >= 0 {
|
||||
// A command that needs text, or one chosen while Lumi is answering,
|
||||
// waits in the draft.
|
||||
text := CommandText(menu[chosen])
|
||||
if menu[chosen].needs_text || frame.waiting {
|
||||
FillDraft(text)
|
||||
} else {
|
||||
submit = text
|
||||
}
|
||||
} else if !frame.waiting && (send || field.committed) && LumiTrim(frame.value).count > 0 && !selected {
|
||||
submit = frame.value
|
||||
}
|
||||
if submit.count > 0 {
|
||||
message.action = LUMI_SEND
|
||||
// The host owns the draft buffer. Keep the submitted text before
|
||||
// WriteLumiUiHost clears that buffer for the next message.
|
||||
submitted: Vec(u8)
|
||||
BuilderPrint(*submitted, "%", frame.value)
|
||||
BuilderPrint(*submitted, "%", submit)
|
||||
message.input = BuilderFinish(submitted)
|
||||
frame.value = ""
|
||||
frame.cursor = 0
|
||||
@@ -463,7 +999,7 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
frame.follow_end = true
|
||||
}
|
||||
WriteLumiUiHost(frame)
|
||||
if message.action != LUMI_SEND && frame.has_older && !frame.follow_end && frame.scroll <= Scale(96) {
|
||||
if message.action != LUMI_SEND && load_older {
|
||||
unused LumiLoadOlderHost()
|
||||
}
|
||||
return message
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.1.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"inbe.practices",
|
||||
"inbe.lists",
|
||||
"inbe.diary",
|
||||
"inbe.lumi"
|
||||
"inbe.lumi",
|
||||
"inbe.leaderboard"
|
||||
]
|
||||
}
|
||||
]
|
||||
+33
-19
@@ -1,42 +1,56 @@
|
||||
{
|
||||
"host_api": 4,
|
||||
"host_api": 7,
|
||||
"oldest_host_api": 5,
|
||||
"module_api": 2,
|
||||
"apps": {
|
||||
"inbe": {
|
||||
"id": "inbe",
|
||||
"version": "2.1.20",
|
||||
"sequence": 17,
|
||||
"bundled": true
|
||||
"version": "2.1.29",
|
||||
"sequence": 26,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"habits": {
|
||||
"id": "inbe.habits",
|
||||
"version": "1.0.3",
|
||||
"sequence": 4,
|
||||
"bundled": true
|
||||
"version": "1.0.4",
|
||||
"sequence": 5,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"practices": {
|
||||
"id": "inbe.practices",
|
||||
"version": "1.1.3",
|
||||
"sequence": 5,
|
||||
"bundled": true
|
||||
"version": "1.1.4",
|
||||
"sequence": 6,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"lists": {
|
||||
"id": "inbe.lists",
|
||||
"version": "1.0.3",
|
||||
"sequence": 4,
|
||||
"bundled": true
|
||||
"version": "1.0.5",
|
||||
"sequence": 6,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"diary": {
|
||||
"id": "inbe.diary",
|
||||
"version": "1.1.5",
|
||||
"sequence": 7,
|
||||
"bundled": true
|
||||
"version": "1.1.9",
|
||||
"sequence": 11,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"lumi": {
|
||||
"id": "inbe.lumi",
|
||||
"version": "1.3.3",
|
||||
"sequence": 10,
|
||||
"bundled": true
|
||||
"version": "1.3.9",
|
||||
"sequence": 16,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"leaderboard": {
|
||||
"id": "inbe.leaderboard",
|
||||
"version": "1.0.1",
|
||||
"sequence": 2,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,8 @@ tokens {
|
||||
review-added: #17663a;
|
||||
review-removed: #b3261e;
|
||||
review-changed: #805000;
|
||||
storage-warning: #a36200;
|
||||
storage-full: #b3261e;
|
||||
launcher-canvas: #14202b;
|
||||
launcher-panel: #1d2c39;
|
||||
launcher-hover: #293d4c;
|
||||
@@ -37,6 +39,15 @@ Text.review-detail {
|
||||
Text.review-heading {
|
||||
foreground: text;
|
||||
}
|
||||
Text.storage-detail {
|
||||
foreground: muted;
|
||||
}
|
||||
Text.storage-warning {
|
||||
foreground: storage-warning;
|
||||
}
|
||||
Text.storage-full {
|
||||
foreground: storage-full;
|
||||
}
|
||||
|
||||
Text.practice-heading {
|
||||
foreground: text;
|
||||
|
||||
+47
-13
@@ -1,14 +1,16 @@
|
||||
# Inner Breeze cell packages
|
||||
|
||||
Inner Breeze has a root package and five cells, including Lumi.
|
||||
Inner Breeze has a root package and six cells, including Lumi and Leaderboard.
|
||||
The interface calls these Apps and presents them in one sidebar settings list.
|
||||
All five cells ship with the app and can be added to the sidebar offline.
|
||||
All six cells ship with the app and can be added to the sidebar offline.
|
||||
Leaderboard is installed for every profile but is not pinned by default.
|
||||
Selections are stored per app and synced with the account. Lumi always ships with
|
||||
Inner Breeze. Her selection controls her sidebar shortcut, while her harness and
|
||||
tools remain available.
|
||||
The root contains shared fonts, translations, themes and icons; Practices owns
|
||||
its images and sounds. Each feature can add private package resources under
|
||||
`assets/lumi/`, `assets/habits/`, `assets/practices/`, `assets/lists/` or `assets/diary/`.
|
||||
`assets/lumi/`, `assets/habits/`, `assets/practices/`, `assets/lists/`, `assets/diary/`
|
||||
or `assets/leaderboard/`.
|
||||
The cell picker, Lists and Diary editor/calendar compose the
|
||||
standard Kryon widgets inside their ZIBs. Raylib, Android and canvas bind the
|
||||
same typed render effects to their normal widgets. File dialogs, persistence,
|
||||
@@ -70,6 +72,13 @@ app effects; no database pointers or arbitrary code cross the cell boundary.
|
||||
Lumi can open Settings or Appearance, change the app theme with `/theme forest`
|
||||
(or another published theme name), and choose light, dark or system mode.
|
||||
These actions use the same validation, persistence and refresh path as Settings.
|
||||
Bug reports and suggestions still require the feedback card's Yes. The first
|
||||
acknowledgement means the report is queued on this device; delivery requires an
|
||||
Inner Breeze account and internet access. Lumi confirms receipt by the private
|
||||
developer inbox only after Daochi returns the matching report ID. A failed or
|
||||
invalid acknowledgement leaves the approved report queued for retry and adds a
|
||||
failure notice once, including across restarts. Inbox receipt does not mean a
|
||||
developer has reviewed the report or started a fix.
|
||||
Lumi can display typed chart and donation cards alongside text replies. Ask
|
||||
`/progress sessions 7`, `/progress meditation 30`, `/progress retention 7`, or
|
||||
`/progress habits 7` (1–31 days including today). Charts use the active account's
|
||||
@@ -95,9 +104,9 @@ Enable chat / Disable chat control preserves the agent and saved conversation.
|
||||
|
||||
`make cells` produces:
|
||||
|
||||
- `build/inbe.zib`, containing `cells/lumi.zib`, `cells/habits.zib` and `cells/practices.zib`.
|
||||
- Independent `build/cells/{lumi,habits,practices,lists,diary}.zib` files.
|
||||
- `build/inbe-full.zib`, a local development and test bundle containing all five.
|
||||
- `build/inbe.zib`, containing every cell under `cells/`.
|
||||
- Independent `build/cells/{lumi,habits,practices,lists,diary,leaderboard}.zib` files.
|
||||
- `build/inbe-full.zib`, a local development and test bundle containing all six.
|
||||
|
||||
Native and browser builds embed the base root. Android stores `inbe.zib`
|
||||
once in APK assets and opens its bytes through the NDK asset manager. Each
|
||||
@@ -148,7 +157,12 @@ Downloads use the Daochi release v2 endpoints on `https://api.waozi.xyz`:
|
||||
`/api/v2/packages/{app_id}/{sha256}.zib`. IDs are `inbe`, `inbe.habits`,
|
||||
`inbe.practices`, `inbe.lists`, `inbe.diary` and `inbe.lumi`.
|
||||
|
||||
Automatic updates default on and check daily for the root and selected apps.
|
||||
Automatic updates default on and check daily for the root and selected apps,
|
||||
once after a start when the last check is an hour old, and ten minutes after
|
||||
a sync reports a newer root package (`package_sequence` in sync replies).
|
||||
A downloaded package proves itself by running ten seconds after a start; one
|
||||
that three starts in a row never proved is set aside for the bundled package
|
||||
and is not downloaded again until a different release arrives.
|
||||
The cell picker includes an automatic-update switch and a manual check button.
|
||||
Turning the switch off cancels active and queued automatic work; manual
|
||||
installation and checking remain available. No automatic network checks run
|
||||
@@ -178,6 +192,19 @@ Packaged resource and translation changes also trigger only the package workflow
|
||||
`make package-version-test` checks every module's numeric changelog, ledger,
|
||||
sequence and bundled status before publishing.
|
||||
|
||||
Hosts and packages agree on interfaces, not exact versions. Every package
|
||||
declares the oldest host interface it needs (`host_api` in its ledger entry),
|
||||
and the host runs packages from `oldest_host_api` to its own `host_api`.
|
||||
Records between them match fields by name, so a field one side lacks keeps its
|
||||
zero value and an unknown field is ignored. Update checks send the host's
|
||||
interfaces and a stable device bucket; the node answers with the newest
|
||||
release that fits, so apps that keep an older host still receive the packages
|
||||
built for it. `package-release.py --rollout PERCENT --rollout-hours HOURS`
|
||||
stages changed releases to that share of devices first; the node releases them
|
||||
to everyone when the time runs out. `make package-compat-test` runs the
|
||||
packages the node serves in the current build, and runs each new package that
|
||||
declares an older interface in the last released app.
|
||||
|
||||
## Publishing configuration
|
||||
|
||||
The `Cell packages` GitHub Actions workflow builds and verifies package releases
|
||||
@@ -186,9 +213,9 @@ configured. Incomplete configuration produces downloadable build artifacts
|
||||
without claiming publication. When only the signing configuration is present,
|
||||
the archived artifacts include signed releases ready to import on the node.
|
||||
|
||||
1. Register the six app IDs and an active Ed25519 publisher key in Daochi.
|
||||
2. Add the public key to `apps/publishers.json`, scoped to the six app IDs:
|
||||
`[{"key_id":"<registered ID>","public_key":"<64 lowercase hex digits>","app_ids":["inbe","inbe.habits","inbe.practices","inbe.lists","inbe.diary","inbe.lumi"]}]`.
|
||||
1. Register the seven app IDs and an active Ed25519 publisher key in Daochi.
|
||||
2. Add the public key to `apps/publishers.json`, scoped to the seven app IDs:
|
||||
`[{"key_id":"<registered ID>","public_key":"<64 lowercase hex digits>","app_ids":["inbe","inbe.habits","inbe.practices","inbe.lists","inbe.diary","inbe.lumi","inbe.leaderboard"]}]`.
|
||||
3. Configure repository secrets `INBE_PACKAGE_SIGNING_KEY` (PEM Ed25519 key)
|
||||
and `INBE_NODE_SSH_KEY` (deployment SSH key), plus
|
||||
`INBE_NODE_KNOWN_HOSTS`, `INBE_NODE_SSH_TARGET` and
|
||||
@@ -222,9 +249,9 @@ suspended, revoked and node-restricted registrations are not replaced. Repeating
|
||||
the preparation retains the registry protocol version and existing scopes while
|
||||
updating the app's client version.
|
||||
|
||||
The wrapper release workflow requires public pins covering all six app IDs,
|
||||
The wrapper release workflow requires public pins covering all seven app IDs,
|
||||
so each included cell has a configured publisher for its updates.
|
||||
The public pin `inbe-2026-10` covers the root and all five apps. The private
|
||||
The public pin `inbe-2026-10` covers the root and all six apps. The private
|
||||
signing key is kept in an ignored local backup and is excluded from every
|
||||
package artifact. Optional production installation requires registering this
|
||||
public key on the node and publishing the signed packages. Automatic server
|
||||
@@ -233,7 +260,7 @@ configuration above; a checked build does not establish that configuration.
|
||||
|
||||
## Account app choices
|
||||
|
||||
Sync v6 uses `private.inbe.v1.app-preferences`. Each of the five `app_used_*`
|
||||
Sync v6 uses `private.inbe.v1.app-preferences`. Each of the six `app_used_*`
|
||||
keys is a separate timestamped record, including explicit zero values for
|
||||
removals. Independent changes merge without overwriting unrelated selections.
|
||||
Pending local choices win equal timestamps; newer remote choices win.
|
||||
@@ -287,6 +314,13 @@ to native host capabilities still require a wrapper release.
|
||||
|
||||
## Verification
|
||||
|
||||
A new app version is published only with a passing phone check of its
|
||||
exact sources. `make phone-check APK=...` installs that APK on the development
|
||||
Moto, runs the Wim Hof session for a minute while it reads SurfaceFlinger's
|
||||
frame times, checks resuming from the background and records
|
||||
`releases/phone-checks/VERSION.json`; the Release workflow refuses a new tag
|
||||
without it or when app sources changed after it.
|
||||
|
||||
Harmony Projects shows this wrapper release, every cell version and its Moto
|
||||
screenshots. Harmony's `make inbe-release-verify` checks the latest published
|
||||
APK on the development Moto and writes private evidence under
|
||||
|
||||
+13
-2
@@ -56,8 +56,8 @@ android {
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
||||
versionCode 163
|
||||
versionName "2.1.26"
|
||||
versionCode 167
|
||||
versionName "2.1.30"
|
||||
manifestPlaceholders = [
|
||||
inbeAppLabel: "Inner Breeze",
|
||||
inbeUsesCleartextTraffic: "false"
|
||||
@@ -87,17 +87,25 @@ android {
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
buildConfigField "boolean", "GPLAY", "false"
|
||||
// Direct APK installs update themselves; F-Droid updates through its store.
|
||||
buildConfigField "boolean", "SELF_UPDATE", project.hasProperty('fDroidBuild') ? "false" : "true"
|
||||
buildConfigField "String", "UPDATE_FEED", '"https://github.com/waozixyz/inbe/releases/latest/download/appcast.json"'
|
||||
}
|
||||
gplay {
|
||||
initWith release
|
||||
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
|
||||
matchingFallbacks = ['release']
|
||||
buildConfigField "boolean", "GPLAY", "true"
|
||||
buildConfigField "boolean", "SELF_UPDATE", "false"
|
||||
buildConfigField "String", "UPDATE_FEED", '""'
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
signingConfig signingConfigs.debug
|
||||
buildConfigField "boolean", "GPLAY", "false"
|
||||
// Debug builds update only from a test feed: -Papp.updateFeed=URL.
|
||||
buildConfigField "boolean", "SELF_UPDATE", project.hasProperty('app.updateFeed') ? "true" : "false"
|
||||
buildConfigField "String", "UPDATE_FEED", '"' + (project.findProperty('app.updateFeed') ?: '') + '"'
|
||||
manifestPlaceholders.inbeAppLabel = "Inner Breeze Debug"
|
||||
manifestPlaceholders.inbeUsesCleartextTraffic = "true"
|
||||
}
|
||||
@@ -219,6 +227,9 @@ dependencies {
|
||||
implementation 'androidx.core:core:1.12.0'
|
||||
implementation 'androidx.health.connect:connect-client:1.1.0'
|
||||
implementation 'org.unifiedpush.android:connector:3.3.3-rc1'
|
||||
// QR code scanning. ZXing core 3.3 keeps Android 5 supported.
|
||||
implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false }
|
||||
implementation 'com.google.zxing:core:3.3.0'
|
||||
gplayImplementation platform('com.google.firebase:firebase-bom:34.18.0')
|
||||
gplayImplementation 'com.google.firebase:firebase-messaging'
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.test.InstrumentationTestCase;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class AppUpdateTest extends InstrumentationTestCase {
|
||||
public void testOnlyNewerNumericReleasesUpdate() {
|
||||
assertTrue(AppUpdate.newer("2.1.29", "2.1.28"));
|
||||
assertTrue(AppUpdate.newer("2.2.0", "2.1.99"));
|
||||
assertTrue(AppUpdate.newer("10.0.0", "9.9.9"));
|
||||
assertTrue(AppUpdate.newer("2.1.28.1", "2.1.28"));
|
||||
assertFalse(AppUpdate.newer("2.1.28", "2.1.28"));
|
||||
assertFalse(AppUpdate.newer("2.1.27", "2.1.28"));
|
||||
assertFalse(AppUpdate.newer("2.1.x", "2.1.28"));
|
||||
assertFalse(AppUpdate.newer("2.1.29-beta", "2.1.28"));
|
||||
assertFalse(AppUpdate.newer("", "2.1.28"));
|
||||
}
|
||||
|
||||
public void testPicksThePreferredAbiThenTheUniversalApk() throws Exception {
|
||||
JSONObject channels = new JSONObject("{\"android\":{\"url\":\"u\"},"
|
||||
+ "\"android-arm64-v8a\":{\"url\":\"a64\"},\"android-armeabi-v7a\":{\"url\":\"a32\"},"
|
||||
+ "\"appimage-amd64\":{\"url\":\"linux\"}}");
|
||||
assertEquals("a64", AppUpdate.channel(channels, new String[] {"arm64-v8a", "armeabi-v7a"}).getString("url"));
|
||||
assertEquals("a32", AppUpdate.channel(channels, new String[] {"armeabi-v7a", "armeabi"}).getString("url"));
|
||||
assertEquals("u", AppUpdate.channel(channels, new String[] {"x86_64"}).getString("url"));
|
||||
assertNull(AppUpdate.channel(new JSONObject("{\"appimage-amd64\":{}}"), new String[] {"x86_64"}));
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,40 @@ public class LumiKeyboardTest extends InstrumentationTestCase {
|
||||
SystemClock.sleep(500);
|
||||
}
|
||||
|
||||
private void drag(int startX, int startY, int endX, int endY) {
|
||||
long now = SystemClock.uptimeMillis();
|
||||
MotionEvent down = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, startX, startY, 0);
|
||||
getInstrumentation().sendPointerSync(down);
|
||||
down.recycle();
|
||||
for (int step = 1; step <= 8; step++) {
|
||||
float x = startX + (endX - startX) * step / 8.0f;
|
||||
float y = startY + (endY - startY) * step / 8.0f;
|
||||
MotionEvent move = MotionEvent.obtain(now, SystemClock.uptimeMillis(),
|
||||
MotionEvent.ACTION_MOVE, x, y, 0);
|
||||
getInstrumentation().sendPointerSync(move);
|
||||
move.recycle();
|
||||
SystemClock.sleep(40);
|
||||
}
|
||||
MotionEvent up = MotionEvent.obtain(now, SystemClock.uptimeMillis(),
|
||||
MotionEvent.ACTION_UP, endX, endY, 0);
|
||||
getInstrumentation().sendPointerSync(up);
|
||||
up.recycle();
|
||||
SystemClock.sleep(700);
|
||||
}
|
||||
|
||||
private void acknowledge(TextInputView input) throws Exception {
|
||||
Field revision = TextInputView.class.getDeclaredField("revision");
|
||||
revision.setAccessible(true);
|
||||
Field acknowledged = TextInputView.class.getDeclaredField("acknowledgedRevision");
|
||||
acknowledged.setAccessible(true);
|
||||
long sent = revision.getLong(input);
|
||||
long deadline = SystemClock.uptimeMillis() + 7000;
|
||||
while (acknowledged.getLong(input) < sent && SystemClock.uptimeMillis() < deadline) {
|
||||
SystemClock.sleep(100);
|
||||
}
|
||||
assertEquals("Native widget did not acknowledge the IME edit", sent, acknowledged.getLong(input));
|
||||
}
|
||||
|
||||
public void testFirstFocusSwipeTextReachesNativeLumi() throws Exception {
|
||||
Intent launch = new Intent(getInstrumentation().getTargetContext(), MainActivity.class);
|
||||
launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
@@ -82,6 +116,21 @@ public class LumiKeyboardTest extends InstrumentationTestCase {
|
||||
assertTrue("Lumi did not regain the editor", input.hasFocus());
|
||||
assertEquals("Dismissal changed the draft", "hello 水😀", input.getText().toString());
|
||||
});
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
InputConnection connection = input.onCreateInputConnection(new EditorInfo());
|
||||
connection.setSelection(0, input.length());
|
||||
connection.commitText("/", 1);
|
||||
});
|
||||
acknowledge(input);
|
||||
awaitKeyboard(activity, true);
|
||||
drag(195, 620, 195, 520);
|
||||
awaitKeyboard(activity, true);
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
assertTrue("Scrolling commands dropped Lumi's editor", input.hasFocus());
|
||||
assertEquals("Scrolling commands changed the draft", "/", input.getText().toString());
|
||||
});
|
||||
getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
|
||||
awaitKeyboard(activity, false);
|
||||
assertFalse(activity.isFinishing());
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class PixelLumiKeyboardTest extends InstrumentationTestCase {
|
||||
assertEquals("Shell keyboard gesture failed", "", output.toString("UTF-8").trim());
|
||||
}
|
||||
|
||||
private void focus(MainActivity activity) {
|
||||
private int[] focusPoint(MainActivity activity) {
|
||||
int[] location = new int[2];
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
WindowInsets insets = activity.getWindow().getDecorView().getRootWindowInsets();
|
||||
@@ -67,6 +67,11 @@ public class PixelLumiKeyboardTest extends InstrumentationTestCase {
|
||||
location[0] = activity.getWindow().getDecorView().getWidth() / 5;
|
||||
location[1] = activity.getWindow().getDecorView().getHeight() - bottom - Math.round(92 * density);
|
||||
});
|
||||
return location;
|
||||
}
|
||||
|
||||
private void focus(MainActivity activity) {
|
||||
int[] location = focusPoint(activity);
|
||||
long start = SystemClock.uptimeMillis();
|
||||
pointer(MotionEvent.ACTION_DOWN, start, location[0], location[1]);
|
||||
SystemClock.sleep(250);
|
||||
@@ -74,6 +79,25 @@ public class PixelLumiKeyboardTest extends InstrumentationTestCase {
|
||||
SystemClock.sleep(1500);
|
||||
}
|
||||
|
||||
private void swipeCommands(MainActivity activity, int[] field) throws Exception {
|
||||
float density = activity.getResources().getDisplayMetrics().density;
|
||||
int start_y = field[1] - Math.round(80 * density);
|
||||
int end_y = field[1] - Math.round(300 * density);
|
||||
String command = "input touchscreen swipe " + field[0] + " " + start_y + " " +
|
||||
field[0] + " " + end_y + " 400";
|
||||
ParcelFileDescriptor pipe = getInstrumentation().getUiAutomation().executeShellCommand(command);
|
||||
try (InputStream stream = new ParcelFileDescriptor.AutoCloseInputStream(pipe)) {
|
||||
byte[] buffer = new byte[1024];
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
int count;
|
||||
while ((count = stream.read(buffer)) != -1) {
|
||||
output.write(buffer, 0, count);
|
||||
}
|
||||
assertEquals("Command scroll failed", "", output.toString("UTF-8").trim());
|
||||
}
|
||||
SystemClock.sleep(1500);
|
||||
}
|
||||
|
||||
private void openLumi(MainActivity activity) {
|
||||
int[] point = new int[2];
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
@@ -136,6 +160,55 @@ public class PixelLumiKeyboardTest extends InstrumentationTestCase {
|
||||
assertEquals("Native Lumi did not apply the keyboard edit", sent.getLong(input), accepted.getLong(input));
|
||||
}
|
||||
|
||||
public void testCommandScrollKeepsKeyboardOnPixel() throws Exception {
|
||||
assertEquals("This check is only for the authorized Pixel", "Pixel 3a", Build.MODEL);
|
||||
AccessibilityServiceInfo service = getInstrumentation().getUiAutomation().getServiceInfo();
|
||||
service.flags |= AccessibilityServiceInfo.FLAG_RETRIEVE_INTERACTIVE_WINDOWS;
|
||||
getInstrumentation().getUiAutomation().setServiceInfo(service);
|
||||
Intent launch = new Intent(getInstrumentation().getTargetContext(), MainActivity.class);
|
||||
launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
MainActivity activity = (MainActivity)getInstrumentation().startActivitySync(launch);
|
||||
Field ready = MainActivity.class.getDeclaredField("firstFrameReady");
|
||||
ready.setAccessible(true);
|
||||
long deadline = SystemClock.uptimeMillis() + 15000;
|
||||
while (!ready.getBoolean(activity) && SystemClock.uptimeMillis() < deadline) {
|
||||
SystemClock.sleep(100);
|
||||
}
|
||||
assertTrue("Native first frame did not finish", ready.getBoolean(activity));
|
||||
openLumi(activity);
|
||||
int[] field = focusPoint(activity);
|
||||
focus(activity);
|
||||
Field fieldAccessor = MainActivity.class.getDeclaredField("textInputView");
|
||||
fieldAccessor.setAccessible(true);
|
||||
TextInputView input = (TextInputView)fieldAccessor.get(activity);
|
||||
String[] original = new String[1];
|
||||
InputConnection[] connection = new InputConnection[1];
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
assertTrue("Lumi did not focus its editor", input.hasFocus());
|
||||
original[0] = input.getText().toString();
|
||||
connection[0] = input.onCreateInputConnection(new EditorInfo());
|
||||
connection[0].setSelection(0, input.length());
|
||||
connection[0].commitText("/", 1);
|
||||
});
|
||||
acknowledged(input);
|
||||
assertNotNull("Command list did not keep Gboard open", key("w"));
|
||||
try {
|
||||
swipeCommands(activity, field);
|
||||
assertNotNull("Scrolling commands closed Gboard", key("w"));
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
assertTrue("Scrolling commands dropped Lumi's editor", input.hasFocus());
|
||||
assertEquals("Scrolling commands changed the draft", "/", input.getText().toString());
|
||||
});
|
||||
} finally {
|
||||
getInstrumentation().runOnMainSync(() -> {
|
||||
InputConnection current = input.onCreateInputConnection(new EditorInfo());
|
||||
current.setSelection(0, input.length());
|
||||
current.commitText(original[0], 1);
|
||||
});
|
||||
acknowledged(input);
|
||||
}
|
||||
}
|
||||
|
||||
public void testGboardSwipeAndReopeningOnPixel() throws Exception {
|
||||
assertEquals("This check is only for the authorized Pixel", "Pixel 3a", Build.MODEL);
|
||||
AccessibilityServiceInfo service = getInstrumentation().getUiAutomation().getServiceInfo();
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Google Play updates the app; it never installs packages itself. -->
|
||||
<uses-permission
|
||||
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
|
||||
tools:node="remove" />
|
||||
<application>
|
||||
<service
|
||||
android:name="xyz.waozi.inbe.PushServiceImpl"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
<uses-sdk tools:overrideLibrary="androidx.health.connect.client" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<!-- Direct APK installs offer their own updates through Android's installer. -->
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
@@ -96,6 +98,10 @@
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<receiver
|
||||
android:name="xyz.waozi.inbe.AppUpdateReceiver"
|
||||
android:exported="false" />
|
||||
|
||||
<receiver
|
||||
android:name="xyz.waozi.inbe.StartPracticeWidget"
|
||||
android:exported="false"
|
||||
@@ -131,5 +137,12 @@
|
||||
<action android:name="org.unifiedpush.android.connector.PUSH_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!-- The QR scanner follows how the device is held; ZXing's own
|
||||
manifest locks it to landscape. -->
|
||||
<activity
|
||||
android:name="com.journeyapps.barcodescanner.CaptureActivity"
|
||||
android:screenOrientation="fullSensor"
|
||||
tools:replace="screenOrientation" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -25,6 +25,7 @@ set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
|
||||
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
|
||||
set(SQLITE_AMALGAMATION_H "${SQLITE_BUILD_DIR}/sqlite3.h")
|
||||
include("${KRYON_DIR}/cmake/KryonAndroid.cmake")
|
||||
kryon_android_reproducible_paths("${REPO_ROOT}")
|
||||
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "" FORCE)
|
||||
set(OQS_USE_OPENSSL OFF CACHE BOOL "" FORCE)
|
||||
set(OQS_MINIMAL_BUILD "SIG_ml_dsa_44;KEM_ml_kem_768" CACHE STRING "" FORCE)
|
||||
@@ -84,9 +85,10 @@ file(GLOB_RECURSE APP_ZIRAN_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/*.zi")
|
||||
file(GLOB_RECURSE APP_LIBRARY_ZIRAN_SOURCES CONFIGURE_DEPENDS
|
||||
"${KRYON_DIR}/src/ui/*.zi" "${KRYON_DIR}/src/backend/*.zi"
|
||||
"${REPO_ROOT}/build/packages/kss/src/*.zi" "${REPO_ROOT}/build/packages/oqs/src/*.zi" "${REPO_ROOT}/build/packages/game2d/src/*.zi"
|
||||
"${REPO_ROOT}/build/packages/qrcode/src/*.zi"
|
||||
"${ZIRAN_DIR}/std/*.zi" "${REPO_ROOT}/build/packages/daochi-client/*.zi")
|
||||
set(APP_ZIRAN_DEFINES --define ANDROID_BUILD)
|
||||
set(APP_ZIRAN_CHECK_DEFINES "ANDROID_BUILD")
|
||||
set(APP_ZIRAN_DEFINES --define ANDROID_BUILD --define KRYON_ANDROID_HOST)
|
||||
set(APP_ZIRAN_CHECK_DEFINES "ANDROID_BUILD KRYON_ANDROID_HOST")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND APP_ZIRAN_DEFINES --define ANDROID_DEBUG)
|
||||
string(APPEND APP_ZIRAN_CHECK_DEFINES " ANDROID_DEBUG")
|
||||
|
||||
@@ -0,0 +1,361 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.Signature;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import org.json.JSONObject;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
/** APKs installed straight from the GitHub release update themselves: once a
|
||||
* day the release feed is read in the background and a newer APK for this
|
||||
* device is downloaded and verified. The next start offers it through
|
||||
* Android's own installer. Store builds (Google Play, F-Droid) leave this
|
||||
* off with BuildConfig.SELF_UPDATE and keep updating through their store. */
|
||||
final class AppUpdate {
|
||||
private static final String TAG = "InbeUpdate";
|
||||
private static final long CHECK_INTERVAL_MS = 24L * 60 * 60 * 1000;
|
||||
private static final long OFFER_INTERVAL_MS = 24L * 60 * 60 * 1000;
|
||||
private static final long FEED_LIMIT = 65536;
|
||||
private static final long APK_LIMIT = 256L * 1024 * 1024;
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
private AppUpdate() {}
|
||||
|
||||
static SharedPreferences preferences(Context context) {
|
||||
return context.getSharedPreferences("app-updates", Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
/** Offers a verified update from an earlier start, or checks for one. A
|
||||
* start that opens a practice is never interrupted. */
|
||||
static void onStart(Activity activity, boolean practice) {
|
||||
if (!BuildConfig.SELF_UPDATE || BuildConfig.UPDATE_FEED.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Context context = activity.getApplicationContext();
|
||||
SharedPreferences preferences = preferences(context);
|
||||
long now = System.currentTimeMillis();
|
||||
File ready = readyUpdate(context);
|
||||
if (ready != null) {
|
||||
if (!practice && now - preferences.getLong("offered_at", 0) >= OFFER_INTERVAL_MS) {
|
||||
preferences.edit().putLong("offered_at", now).apply();
|
||||
new Thread(() -> install(context, ready), "inbe-update-install").start();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (now - preferences.getLong("checked_at", 0) < CHECK_INTERVAL_MS) {
|
||||
return;
|
||||
}
|
||||
preferences.edit().putLong("checked_at", now).apply();
|
||||
new Thread(() -> {
|
||||
try {
|
||||
check(context);
|
||||
} catch (Exception error) {
|
||||
Log.w(TAG, "Update check failed", error);
|
||||
}
|
||||
}, "inbe-update-check").start();
|
||||
}
|
||||
|
||||
/** Release versions are numeric x.y.z; a missing part counts as zero. */
|
||||
static boolean newer(String candidate, String installed) {
|
||||
String[] left = candidate.split("\\.");
|
||||
String[] right = installed.split("\\.");
|
||||
for (int index = 0; index < Math.max(left.length, right.length); index++) {
|
||||
long a = index < left.length ? parsePart(left[index]) : 0;
|
||||
long b = index < right.length ? parsePart(right[index]) : 0;
|
||||
if (a < 0 || b < 0) {
|
||||
return false;
|
||||
}
|
||||
if (a != b) {
|
||||
return a > b;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static long parsePart(String part) {
|
||||
if (part.isEmpty() || part.length() > 9 || !part.matches("[0-9]+")) {
|
||||
return -1;
|
||||
}
|
||||
return Long.parseLong(part);
|
||||
}
|
||||
|
||||
/** The APK built for this device's preferred ABI, else the universal one. */
|
||||
static JSONObject channel(JSONObject channels, String[] abis) {
|
||||
for (String abi : abis) {
|
||||
JSONObject entry = channels.optJSONObject("android-" + abi);
|
||||
if (entry != null) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
return channels.optJSONObject("android");
|
||||
}
|
||||
|
||||
private static void check(Context context) throws Exception {
|
||||
JSONObject feed = new JSONObject(new String(fetch(BuildConfig.UPDATE_FEED, FEED_LIMIT, null),
|
||||
StandardCharsets.UTF_8));
|
||||
String version = feed.getString("version");
|
||||
PackageInfo installed = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
|
||||
if (installed.versionName == null || !newer(version, installed.versionName)) {
|
||||
return;
|
||||
}
|
||||
JSONObject entry = channel(feed.getJSONObject("channels"), Build.SUPPORTED_ABIS);
|
||||
if (entry == null) {
|
||||
return;
|
||||
}
|
||||
String hash = entry.getString("sha256");
|
||||
long size = entry.getLong("size");
|
||||
String url = entry.getString("url");
|
||||
if (!hash.matches("[0-9a-f]{64}") || size <= 0 || size > APK_LIMIT ||
|
||||
!(url.startsWith("https://") || (BuildConfig.DEBUG && url.startsWith("http://")))) {
|
||||
throw new IOException("Invalid release feed entry");
|
||||
}
|
||||
File directory = directory(context);
|
||||
if (size > directory.getUsableSpace()) {
|
||||
throw new IOException("Not enough space for the update");
|
||||
}
|
||||
File apk = new File(directory, hash + ".apk");
|
||||
File part = new File(directory, hash + ".part");
|
||||
synchronized (LOCK) {
|
||||
try (OutputStream output = new FileOutputStream(part)) {
|
||||
fetch(url, size, output);
|
||||
}
|
||||
if (part.length() != size || !hash.equals(sha256(part))) {
|
||||
part.delete();
|
||||
throw new IOException("The downloaded APK differs from the release feed");
|
||||
}
|
||||
long code;
|
||||
try {
|
||||
code = verify(context, part);
|
||||
} catch (Exception error) {
|
||||
part.delete();
|
||||
throw error;
|
||||
}
|
||||
if (!part.renameTo(apk)) {
|
||||
part.delete();
|
||||
throw new IOException("Could not keep the verified update");
|
||||
}
|
||||
clearOthers(directory, apk);
|
||||
preferences(context).edit().putString("ready_hash", hash).putLong("ready_code", code)
|
||||
.putString("ready_version", version).remove("offered_at").apply();
|
||||
}
|
||||
Log.i(TAG, "Update " + version + " is verified and will be offered on the next start");
|
||||
}
|
||||
|
||||
/** Returns the verified APK from an earlier check while it is still newer. */
|
||||
private static File readyUpdate(Context context) {
|
||||
SharedPreferences preferences = preferences(context);
|
||||
String hash = preferences.getString("ready_hash", "");
|
||||
if (hash.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
File apk = new File(directory(context), hash + ".apk");
|
||||
long code = verify(context, apk);
|
||||
if (code == preferences.getLong("ready_code", -1) && hash.equals(sha256(apk))) {
|
||||
return apk;
|
||||
}
|
||||
} catch (Exception error) {
|
||||
Log.i(TAG, "The kept update is no longer usable", error);
|
||||
}
|
||||
forget(context);
|
||||
return null;
|
||||
}
|
||||
|
||||
static void forget(Context context) {
|
||||
preferences(context).edit().remove("ready_hash").remove("ready_code").remove("ready_version")
|
||||
.remove("offered_at").apply();
|
||||
try {
|
||||
clearOthers(directory(context), null);
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
/** The APK must be this app, newer than it and signed by the same key. */
|
||||
private static long verify(Context context, File apk) throws Exception {
|
||||
if (!apk.isFile()) {
|
||||
throw new IOException("No update file");
|
||||
}
|
||||
PackageManager manager = context.getPackageManager();
|
||||
int flags = Build.VERSION.SDK_INT >= 28
|
||||
? PackageManager.GET_SIGNING_CERTIFICATES : PackageManager.GET_SIGNATURES;
|
||||
PackageInfo current = manager.getPackageInfo(context.getPackageName(), flags);
|
||||
PackageInfo candidate = manager.getPackageArchiveInfo(apk.getAbsolutePath(), flags);
|
||||
if (candidate == null || !context.getPackageName().equals(candidate.packageName)) {
|
||||
throw new IOException("The update is not this app");
|
||||
}
|
||||
long code = versionCode(candidate);
|
||||
if (code <= versionCode(current)) {
|
||||
throw new IOException("The update is not newer than this app");
|
||||
}
|
||||
Set<String> expected = signers(current);
|
||||
Set<String> actual = signers(candidate);
|
||||
// Android refuses an update signed by another key in any case; older
|
||||
// versions may not report an archive's signers, newer ones must match.
|
||||
if (expected.isEmpty() || (!actual.isEmpty() && !expected.equals(actual)) ||
|
||||
(Build.VERSION.SDK_INT >= 28 && actual.isEmpty())) {
|
||||
throw new IOException("The update is signed by another key");
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static long versionCode(PackageInfo info) {
|
||||
return Build.VERSION.SDK_INT >= 28 ? info.getLongVersionCode() : info.versionCode;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static Set<String> signers(PackageInfo info) throws Exception {
|
||||
Signature[] signatures;
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
signatures = info.signingInfo == null ? null : info.signingInfo.getApkContentsSigners();
|
||||
} else {
|
||||
signatures = info.signatures;
|
||||
}
|
||||
Set<String> values = new HashSet<>();
|
||||
if (signatures != null) {
|
||||
for (Signature signature : signatures) {
|
||||
values.add(hex(MessageDigest.getInstance("SHA-256").digest(signature.toByteArray())));
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
private static void install(Context context, File apk) {
|
||||
synchronized (LOCK) {
|
||||
PackageInstaller installer = context.getPackageManager().getPackageInstaller();
|
||||
int session = -1;
|
||||
try {
|
||||
if (!installer.getMySessions().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
PackageInstaller.SessionParams parameters = new PackageInstaller.SessionParams(
|
||||
PackageInstaller.SessionParams.MODE_FULL_INSTALL);
|
||||
parameters.setAppPackageName(context.getPackageName());
|
||||
parameters.setSize(apk.length());
|
||||
session = installer.createSession(parameters);
|
||||
try (PackageInstaller.Session open = installer.openSession(session)) {
|
||||
try (InputStream input = new FileInputStream(apk);
|
||||
OutputStream output = open.openWrite("base.apk", 0, apk.length())) {
|
||||
copy(input, output, apk.length());
|
||||
open.fsync(output);
|
||||
}
|
||||
Intent callback = new Intent(context, AppUpdateReceiver.class)
|
||||
.setAction(context.getPackageName() + ".APP_UPDATE_RESULT");
|
||||
int flags = PendingIntent.FLAG_UPDATE_CURRENT;
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
flags |= PendingIntent.FLAG_MUTABLE;
|
||||
}
|
||||
PendingIntent reply = PendingIntent.getBroadcast(context, session, callback, flags);
|
||||
open.commit(reply.getIntentSender());
|
||||
session = -1;
|
||||
}
|
||||
} catch (Exception error) {
|
||||
Log.w(TAG, "Could not start the update installation", error);
|
||||
} finally {
|
||||
if (session >= 0) {
|
||||
installer.abandonSession(session);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] fetch(String address, long limit, OutputStream sink) throws IOException {
|
||||
HttpURLConnection connection = (HttpURLConnection)new URL(address).openConnection();
|
||||
connection.setConnectTimeout(15000);
|
||||
connection.setReadTimeout(30000);
|
||||
connection.setInstanceFollowRedirects(true);
|
||||
connection.setRequestProperty("User-Agent", "Inner-Breeze/" + BuildConfig.VERSION_NAME);
|
||||
try {
|
||||
int code = connection.getResponseCode();
|
||||
if (code != 200) {
|
||||
throw new IOException("Update download answered " + code);
|
||||
}
|
||||
try (InputStream input = connection.getInputStream()) {
|
||||
if (sink != null) {
|
||||
copy(input, sink, limit);
|
||||
return null;
|
||||
}
|
||||
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
|
||||
copy(input, buffer, limit);
|
||||
return buffer.toByteArray();
|
||||
}
|
||||
} finally {
|
||||
connection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
private static void copy(InputStream input, OutputStream output, long limit) throws IOException {
|
||||
byte[] buffer = new byte[65536];
|
||||
long total = 0;
|
||||
int count;
|
||||
while ((count = input.read(buffer)) != -1) {
|
||||
total += count;
|
||||
if (total > limit) {
|
||||
throw new IOException("Update download exceeds its size");
|
||||
}
|
||||
output.write(buffer, 0, count);
|
||||
}
|
||||
}
|
||||
|
||||
private static String sha256(File file) throws Exception {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-256");
|
||||
byte[] buffer = new byte[65536];
|
||||
try (InputStream input = new FileInputStream(file)) {
|
||||
int count;
|
||||
while ((count = input.read(buffer)) != -1) {
|
||||
digest.update(buffer, 0, count);
|
||||
}
|
||||
}
|
||||
return hex(digest.digest());
|
||||
}
|
||||
|
||||
private static String hex(byte[] bytes) {
|
||||
StringBuilder text = new StringBuilder();
|
||||
for (byte value : bytes) {
|
||||
text.append(String.format(Locale.ROOT, "%02x", value & 255));
|
||||
}
|
||||
return text.toString();
|
||||
}
|
||||
|
||||
private static File directory(Context context) throws IOException {
|
||||
File directory = new File(context.getFilesDir(), "app-updates");
|
||||
if (!directory.isDirectory() && !directory.mkdirs()) {
|
||||
throw new IOException("Update storage unavailable");
|
||||
}
|
||||
return directory;
|
||||
}
|
||||
|
||||
private static void clearOthers(File directory, File keep) {
|
||||
File[] files = directory.listFiles();
|
||||
if (files == null) {
|
||||
return;
|
||||
}
|
||||
for (File file : files) {
|
||||
if (keep == null || !file.equals(keep)) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.util.Log;
|
||||
|
||||
/** Android's answer to an update installation. Confirmation goes to
|
||||
* Android's own installer screen; a finished or refused installation drops
|
||||
* the kept APK so it is not offered again. */
|
||||
public final class AppUpdateReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
int status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE);
|
||||
if (status == PackageInstaller.STATUS_PENDING_USER_ACTION) {
|
||||
Intent confirm = intent.getParcelableExtra(Intent.EXTRA_INTENT);
|
||||
if (confirm != null) {
|
||||
confirm.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
try {
|
||||
context.startActivity(confirm);
|
||||
} catch (RuntimeException error) {
|
||||
Log.w("InbeUpdate", "Android's installer is unavailable", error);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (status == PackageInstaller.STATUS_SUCCESS) {
|
||||
AppUpdate.forget(context);
|
||||
return;
|
||||
}
|
||||
// A cancelled confirmation keeps the update for the next day's offer.
|
||||
if (status != PackageInstaller.STATUS_FAILURE_ABORTED) {
|
||||
Log.w("InbeUpdate", "Android did not install the update: " +
|
||||
intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE));
|
||||
AppUpdate.forget(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ final class HttpTransport {
|
||||
final URL url;
|
||||
final int capacity;
|
||||
final int timeout;
|
||||
final long deadline;
|
||||
final Map<String, String> headers = new LinkedHashMap<>();
|
||||
volatile HttpURLConnection connection;
|
||||
volatile Future<?> worker;
|
||||
@@ -46,6 +47,7 @@ final class HttpTransport {
|
||||
this.url = url;
|
||||
this.capacity = capacity;
|
||||
this.timeout = timeout;
|
||||
this.deadline = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,10 +61,15 @@ final class HttpTransport {
|
||||
synchronized int create(byte[] methodBytes, byte[] urlBytes, int capacity, int timeout) {
|
||||
if (closed || methodBytes == null || urlBytes == null || methodBytes.length < 1 ||
|
||||
methodBytes.length > 31 || urlBytes.length < 1 || urlBytes.length >= 2048 ||
|
||||
capacity < 1 || capacity > LIMIT || timeout < 1 || timeout > 900000 ||
|
||||
transfers.size() >= 8) {
|
||||
capacity < 1 || capacity > LIMIT || timeout < 1 || timeout > 900000) {
|
||||
return 0;
|
||||
}
|
||||
if (transfers.size() >= 8) {
|
||||
reclaimUncollected();
|
||||
if (transfers.size() >= 8) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
try {
|
||||
String method = text(methodBytes);
|
||||
URL url = new URL(text(urlBytes));
|
||||
@@ -127,12 +134,13 @@ final class HttpTransport {
|
||||
}
|
||||
|
||||
private void expire(int id, Transfer transfer) {
|
||||
// Also reclaim completed responses whose native caller lost its JNI
|
||||
// attachment or stopped polling. A handle never outlives its deadline.
|
||||
if (!transfers.remove(id, transfer)) {
|
||||
return;
|
||||
}
|
||||
// The deadline bounds the exchange, not its collection. A completed
|
||||
// response waits for the caller, which does not poll while paused,
|
||||
// in picture-in-picture or during a practice.
|
||||
synchronized (transfer) {
|
||||
if (transfer.state >= 0 || !transfers.remove(id, transfer)) {
|
||||
return;
|
||||
}
|
||||
transfer.cancelled = true;
|
||||
transfer.state = 0;
|
||||
transfer.response = null;
|
||||
@@ -140,6 +148,23 @@ final class HttpTransport {
|
||||
stop(transfer);
|
||||
}
|
||||
|
||||
// Free the slots of completed responses left uncollected past their
|
||||
// deadline, so a caller that lost its JNI handle cannot exhaust them.
|
||||
private void reclaimUncollected() {
|
||||
long now = System.nanoTime();
|
||||
for (Map.Entry<Integer, Transfer> entry : transfers.entrySet()) {
|
||||
Transfer transfer = entry.getValue();
|
||||
synchronized (transfer) {
|
||||
if (transfer.state < 0 || now - transfer.deadline < 0 ||
|
||||
!transfers.remove(entry.getKey(), transfer)) {
|
||||
continue;
|
||||
}
|
||||
transfer.cancelled = true;
|
||||
transfer.response = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void stop(Transfer transfer) {
|
||||
Future<?> worker = transfer.worker;
|
||||
if (worker != null) {
|
||||
@@ -164,7 +189,7 @@ final class HttpTransport {
|
||||
connection.setInstanceFollowRedirects(false);
|
||||
connection.setUseCaches(false);
|
||||
connection.setConnectTimeout(Math.min(15000, transfer.timeout));
|
||||
connection.setReadTimeout(Math.min(30000, transfer.timeout));
|
||||
connection.setReadTimeout(transfer.timeout);
|
||||
connection.setRequestMethod(transfer.method);
|
||||
// System HTTPS trust and hostname verification are left intact.
|
||||
for (Map.Entry<String, String> header : transfer.headers.entrySet()) {
|
||||
|
||||
@@ -64,6 +64,10 @@ public class MainActivity extends NativeActivity {
|
||||
private boolean pictureWindowEntering;
|
||||
private boolean activityStopped;
|
||||
private int pictureWindowGeneration;
|
||||
// Flips each time the floating window opens back into the app, so native
|
||||
// shows the practice instead of the page behind its in-app window. It is
|
||||
// static because native state also outlives a recreated activity.
|
||||
private static int pictureWindowReturns;
|
||||
|
||||
// Called by the native frame thread. A volatile snapshot avoids changing
|
||||
// practice state from Android's UI callbacks.
|
||||
@@ -87,8 +91,9 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
|
||||
private void refreshPictureWindowState() {
|
||||
pictureWindowGeneration = (pictureWindowGeneration + 1) & 0x1fffffff;
|
||||
pictureWindowState = (pictureWindowGeneration << 2) | (supportsPictureWindow() ? 1 : 0)
|
||||
pictureWindowGeneration = (pictureWindowGeneration + 1) & 0x0fffffff;
|
||||
pictureWindowState = (pictureWindowGeneration << 3) | ((pictureWindowReturns & 1) << 2)
|
||||
| (supportsPictureWindow() ? 1 : 0)
|
||||
| (Build.VERSION.SDK_INT >= 26 && isInPictureInPictureMode()
|
||||
&& !activityStopped ? 2 : 0);
|
||||
}
|
||||
@@ -102,8 +107,10 @@ public class MainActivity extends NativeActivity {
|
||||
return params.build();
|
||||
}
|
||||
|
||||
public void updatePictureWindow(boolean enabled, boolean requested) {
|
||||
if (enabled == pictureWindowEnabled && !requested) {
|
||||
// Leaving the app opens the floating window on its own; nothing in the
|
||||
// app asks for it.
|
||||
public void updatePictureWindow(boolean enabled) {
|
||||
if (enabled == pictureWindowEnabled) {
|
||||
return;
|
||||
}
|
||||
pictureWindowEnabled = enabled;
|
||||
@@ -112,25 +119,12 @@ public class MainActivity extends NativeActivity {
|
||||
return;
|
||||
}
|
||||
setPictureInPictureParams(pictureWindowParams());
|
||||
if (requested && enabled) {
|
||||
enterPictureWindow(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void enterPictureWindow(boolean explicit) {
|
||||
private void enterPictureWindow() {
|
||||
if (!supportsPictureWindow() || !pictureWindowEnabled ||
|
||||
isInPictureInPictureMode() || isFinishing()) {
|
||||
return;
|
||||
}
|
||||
if (!allowsPictureWindow()) {
|
||||
if (explicit) {
|
||||
Intent settings = new Intent("android.settings.PICTURE_IN_PICTURE_SETTINGS",
|
||||
Uri.parse("package:" + getPackageName()));
|
||||
if (settings.resolveActivity(getPackageManager()) != null) {
|
||||
startActivity(settings);
|
||||
}
|
||||
}
|
||||
isInPictureInPictureMode() || isFinishing() || !allowsPictureWindow()) {
|
||||
return;
|
||||
}
|
||||
pictureWindowEntering = true;
|
||||
@@ -147,8 +141,11 @@ public class MainActivity extends NativeActivity {
|
||||
@Override
|
||||
protected void onUserLeaveHint() {
|
||||
super.onUserLeaveHint();
|
||||
if (Build.VERSION.SDK_INT >= 26 && Build.VERSION.SDK_INT < 31) {
|
||||
enterPictureWindow(false);
|
||||
// Android 12 enters on its own only when the next activity resumes
|
||||
// while this one pauses, as the stock launcher does. Leaving for a
|
||||
// third-party launcher or another app comes here instead.
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
enterPictureWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +153,11 @@ public class MainActivity extends NativeActivity {
|
||||
public void onPictureInPictureModeChanged(boolean visible, Configuration configuration) {
|
||||
super.onPictureInPictureModeChanged(visible, configuration);
|
||||
pictureWindowEntering = false;
|
||||
// Closing the floating window stops the activity first; opening it
|
||||
// back into the app leaves the activity started.
|
||||
if (!visible && !activityStopped) {
|
||||
pictureWindowReturns++;
|
||||
}
|
||||
refreshPictureWindowState();
|
||||
requestInsetRefresh();
|
||||
syncLifecycleState("onPictureInPictureModeChanged");
|
||||
@@ -234,6 +236,7 @@ public class MainActivity extends NativeActivity {
|
||||
private static final String TAG = "MainActivity";
|
||||
private static final int REQUEST_IMPORT_ZIP = 1001;
|
||||
private static final int REQUEST_POST_NOTIFICATIONS = 1002;
|
||||
private static final int REQUEST_QR_SCAN = 1003;
|
||||
private static final int REQUEST_HEALTH_CONNECT = HealthConnectExport.REQUEST_CODE;
|
||||
private static final String DOWNLOAD_CHANNEL_ID = "runtime_downloads";
|
||||
private static final int DOWNLOAD_NOTIFICATION_ID = 2001;
|
||||
@@ -258,6 +261,7 @@ public class MainActivity extends NativeActivity {
|
||||
private boolean notificationPermissionRequestInFlight = false;
|
||||
private int lastDeleteRepeatCount = -1;
|
||||
private int pendingImportKind = 0;
|
||||
private int pendingQrScanKind = 5;
|
||||
String lastHealthConnectPath = null;
|
||||
private boolean pendingStartPractice = false;
|
||||
private int pendingStartPracticeId = -1;
|
||||
@@ -549,6 +553,30 @@ public class MainActivity extends NativeActivity {
|
||||
return SyncNetwork.webSocketWait(TAG, urlText, headers);
|
||||
}
|
||||
|
||||
// Scans a QR code with ZXing's camera screen. The text returns through the
|
||||
// import result channel under `kind`.
|
||||
public void openQrScanner(final String prompt, final int kind) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
com.google.zxing.integration.android.IntentIntegrator integrator =
|
||||
new com.google.zxing.integration.android.IntentIntegrator(MainActivity.this);
|
||||
integrator.setDesiredBarcodeFormats(com.google.zxing.integration.android.IntentIntegrator.QR_CODE);
|
||||
integrator.setPrompt(prompt == null ? "" : prompt);
|
||||
integrator.setBeepEnabled(false);
|
||||
integrator.setOrientationLocked(false);
|
||||
integrator.setRequestCode(REQUEST_QR_SCAN);
|
||||
pendingQrScanKind = kind;
|
||||
integrator.initiateScan();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to open QR scanner", e);
|
||||
nativeImportCancelled(kind);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openImportPicker(final String mimeTypesCsv, final int kind) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@@ -795,6 +823,18 @@ public class MainActivity extends NativeActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode == REQUEST_QR_SCAN) {
|
||||
com.google.zxing.integration.android.IntentResult scanned =
|
||||
com.google.zxing.integration.android.IntentIntegrator.parseActivityResult(resultCode, data);
|
||||
String contents = scanned == null ? null : scanned.getContents();
|
||||
if (contents == null || contents.isEmpty()) {
|
||||
nativeImportCancelled(pendingQrScanKind);
|
||||
} else {
|
||||
nativeImportSelectedFile(pendingQrScanKind, contents);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode != REQUEST_IMPORT_ZIP) return;
|
||||
|
||||
if (resultCode != RESULT_OK || data == null || data.getData() == null) {
|
||||
@@ -939,6 +979,11 @@ public class MainActivity extends NativeActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/** Called from Kryon's file_export: share bytes as a file. */
|
||||
public void shareFile(byte[] data, String filename, String mimeType, String title) {
|
||||
ShareHelper.shareFile(this, data, filename, mimeType, title);
|
||||
}
|
||||
|
||||
public void copyTextAndShowToast(final String text, final String toastText) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@@ -995,6 +1040,7 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
// Widget/tile/shortcut launch: the intent that started this activity.
|
||||
handleStartPracticeIntent(getIntent());
|
||||
AppUpdate.onStart(this, getIntent() != null && ACTION_START_PRACTICE.equals(getIntent().getAction()));
|
||||
handleAudioE2EIntent(getIntent());
|
||||
handleDebugDonationReminderIntent(getIntent());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Added
|
||||
---
|
||||
- End a held breath from the minimized practice window with Breath or a double tap.
|
||||
- Lumi feedback includes the app version, device and system.
|
||||
Fixed
|
||||
---
|
||||
- Picture-in-picture opens when you leave Inbe during a practice and returns to it.
|
||||
- Lumi keeps answers that arrive during picture-in-picture.
|
||||
- Lumi says whether feedback reached the developer and keeps it to retry.
|
||||
- Feedback saved by older versions is now sent.
|
||||
- Fix a startup crash on 32-bit Android phones.
|
||||
@@ -0,0 +1,15 @@
|
||||
Added
|
||||
---
|
||||
- Connect a phone and a computer by QR code in Profile.
|
||||
- Leaderboard is its own app.
|
||||
- Profile > Data shows each sync node's storage.
|
||||
Changed
|
||||
---
|
||||
- Profile holds your account, data and Telegram; Settings holds device preferences.
|
||||
- Diary shows bold text as bold.
|
||||
- On desktop, a minimized practice opens in its own window.
|
||||
Fixed
|
||||
---
|
||||
- Linux: text uses Inner Breeze's fonts again.
|
||||
- Smoother minimized breathing count.
|
||||
- The desktop close prompt shows above Apps.
|
||||
@@ -0,0 +1,10 @@
|
||||
Fixed
|
||||
---
|
||||
- Scrolling Lumi's commands keeps the keyboard open.
|
||||
- New habits show each colour choice in its own colour.
|
||||
- Leaving Wim Hof no longer freezes the app for a few seconds.
|
||||
- The app no longer freezes just after launch while it checks for app updates.
|
||||
Changed
|
||||
---
|
||||
- Scrollbars use your theme's colours and show how much is in view.
|
||||
- Apps rearranges to fill the window's width.
|
||||
@@ -0,0 +1,9 @@
|
||||
Fixed
|
||||
---
|
||||
- Long menus, such as the colour theme, scroll by touch and open at your choice.
|
||||
- With a menu open, tapping the navigation closes it and switches screens in one tap.
|
||||
- Menus stay above the navigation instead of hiding their last options behind it.
|
||||
- Web: the app is sharp on high-density screens instead of magnified and blurry.
|
||||
Changed
|
||||
---
|
||||
- Icons are sharper on the web.
|
||||
+199
-18
@@ -100,9 +100,6 @@ Odchozi
|
||||
[profile_no_leaderboard_data]
|
||||
Zadna data zebricku
|
||||
---
|
||||
[profile_practice_label]
|
||||
Cviceni
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Moje návyky
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Data
|
||||
[profile_data_management_body]
|
||||
Import, export a úložiště
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Zobrazit žebříček a aktuální sérii
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Zatím bez umístění
|
||||
---
|
||||
[appearance_style_label]
|
||||
Styl
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Dnešní limit online dotazů je vyčerpán. Místní příkazy aplikace stále
|
||||
[lumi_developer_reply]
|
||||
Odpověď vývojáře:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Zpětná vazba byla uložena pro vývojáře.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Zobrazit pokrok
|
||||
@@ -2358,7 +2345,7 @@ V tomto období není zaznamenána žádná aktivita.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Odeslat tuto zpětnou vazbu vývojáři?
|
||||
Odeslat tuto zpětnou vazbu vývojáři? Přiloží se verze aplikace, model zařízení a verze systému.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Ano
|
||||
[lumi_feedback_no]
|
||||
Ne
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Příkazy
|
||||
---
|
||||
[lumi_command_help]
|
||||
Ukázat, co Lumi umí
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Poslat zpětnou vazbu vývojáři
|
||||
---
|
||||
[lumi_telegram]
|
||||
Zprávy z Telegramu
|
||||
@@ -2655,10 +2651,195 @@ Poslední známé cvičení · čekání na aktualizace
|
||||
Čekání na zařízení, kde cvičení probíhá
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Oddělit okno cvičení
|
||||
[lumi_feedback_delivered]
|
||||
Schránka vývojáře přijala vaši zpětnou vazbu.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Vrátit okno do aplikace
|
||||
[lumi_feedback_unavailable]
|
||||
Doručení do schránky vývojáře není potvrzeno. Vaše zpětná vazba zůstává uložená v tomto zařízení a odeslání se zkusí znovu.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
Synchronizační uzel nemá místo pro tyto změny, proto se nesynchronizují. Vypni pro něj nahrávání fotek v Profil › Data.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Úložiště uzlů
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Místo, které tvůj účet zabírá na každém uzlu, se kterým se synchronizuješ.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
Používá se
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
Využití se zobrazí po příští synchronizaci s tímto uzlem.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
Využito %s z %s
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
Využito %s · bez limitu
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Téměř plné. Až se zaplní, změny se sem přestanou synchronizovat.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Téměř plné. Nejrychleji ho plní fotky; vypni nahrávání fotek, aby se záznamy dál synchronizovaly.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Pro nejnovější změny není místo, proto se do tohoto uzlu nesynchronizují.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Pro nejnovější změny není místo, proto se do tohoto uzlu nesynchronizují. Vypni níže nahrávání fotek, aby se synchronizovalo vše ostatní.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Fotky a videa z tohoto zařízení zaberou na uzlu asi %s.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Nahrávat fotky a videa
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Fotky se do tohoto uzlu synchronizují spolu se záznamy v deníku.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Fotky zůstanou v tomto zařízení. Záznamy se dál synchronizují a ostatní zařízení ukážou, kde fotka je.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Nahrávání fotek pro tento uzel se nepodařilo změnit.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Na %s není místo pro tuto fotku. Vypni nahrávání fotek v Profil › Data.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Tato fotka není v tomto zařízení. Zůstává v zařízení nebo uzlu, který fotky uchovává.
|
||||
---
|
||||
[device_link_title]
|
||||
Připojit zařízení
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Přidejte k tomuto účtu další telefon nebo počítač pomocí QR kódu.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Používáte Inner Breeze už na jiném zařízení? Připojte toto pomocí QR kódu.
|
||||
---
|
||||
[device_link_show]
|
||||
Zobrazit kód
|
||||
---
|
||||
[device_link_scan]
|
||||
Naskenovat kód
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
Na novém zařízení otevřete Profil, potom Připojit zařízení, klepněte na Naskenovat kód a namiřte fotoaparát sem.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Na telefonu, který už váš účet používá, otevřete Profil, potom Připojit zařízení, klepněte na Naskenovat kód a namiřte fotoaparát sem.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Namiřte fotoaparát na kód na druhém zařízení
|
||||
---
|
||||
[device_link_compare]
|
||||
Zkontrolujte, že druhé zařízení ukazuje stejné číslo, a pak připojte.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
Na druhém zařízení zkontrolujte toto číslo a klepněte na Připojit.
|
||||
---
|
||||
[device_link_ask]
|
||||
Připojit druhé zařízení k vašemu účtu?
|
||||
---
|
||||
[device_link_connect]
|
||||
Připojit
|
||||
---
|
||||
[device_link_working]
|
||||
Připojování…
|
||||
---
|
||||
[device_link_connected]
|
||||
Zařízení připojeno.
|
||||
---
|
||||
[device_link_failed]
|
||||
Zařízení se nepodařilo připojit. Zkuste to znovu.
|
||||
---
|
||||
[device_link_offline]
|
||||
Synchronizační server je nedostupný. Zkontrolujte připojení a zkuste to znovu.
|
||||
---
|
||||
[device_link_expired]
|
||||
Platnost kódu vypršela. Zobrazte nový.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
To není připojovací kód Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Toto zařízení zatím nemá účet ke sdílení. Zobrazte kód zde.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Zpět do Aplikací
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Zpět
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Znovu
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Opravit pravopis
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Nenalezeny žádné pravopisné chyby.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Pravopis teď nelze zkontrolovat. Zkuste to později.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Dnešní limit online dotazů je vyčerpán. Zkuste to zítra.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Pro opravu pravopisu se přihlaste k účtu.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Tento záznam je příliš dlouhý na kontrolu najednou.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
Vybráno: %d
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Kopírovat
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Zrušit výběr
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Smazat vybrané zprávy?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Zpráva v chatu
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Ausgehend
|
||||
[profile_no_leaderboard_data]
|
||||
Keine Bestenlistendaten
|
||||
---
|
||||
[profile_practice_label]
|
||||
Praxis
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Meine Gewohnheiten
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Daten
|
||||
[profile_data_management_body]
|
||||
Import, Export und Speicher
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Rangliste und aktuelle Serie ansehen
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Noch keine Platzierung
|
||||
---
|
||||
[appearance_style_label]
|
||||
Stil
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Dein Online-Kontingent für heute ist aufgebraucht. Lokale App-Befehle funktioni
|
||||
[lumi_developer_reply]
|
||||
Antwort vom Entwickler:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Dein Feedback wurde für den Entwickler gespeichert.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Fortschritt anzeigen
|
||||
@@ -2358,7 +2345,7 @@ Keine aufgezeichnete Aktivität in diesem Zeitraum.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Dieses Feedback an den Entwickler senden?
|
||||
Dieses Feedback an den Entwickler senden? App-Version, Gerätemodell und Systemversion werden mitgesendet.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Ja
|
||||
[lumi_feedback_no]
|
||||
Nein
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Befehle
|
||||
---
|
||||
[lumi_command_help]
|
||||
Zeigen, was Lumi kann
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Feedback an den Entwickler senden
|
||||
---
|
||||
[lumi_telegram]
|
||||
Telegram-Eingabe
|
||||
@@ -2655,10 +2651,195 @@ Letzte bekannte Sitzung · warte auf Aktualisierung
|
||||
Warte auf das Gerät mit der laufenden Sitzung
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Übungsfenster ablösen
|
||||
[lumi_feedback_delivered]
|
||||
Dein Feedback ist im Entwicklereingang angekommen.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Fenster in die App zurückholen
|
||||
[lumi_feedback_unavailable]
|
||||
Die Zustellung an den Entwicklereingang ist nicht bestätigt. Dein Feedback bleibt auf diesem Gerät gespeichert und der Versand wird erneut versucht.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
Der Sync-Knoten hat keinen Platz für diese Änderungen, daher werden sie nicht synchronisiert. Schalte den Foto-Upload für ihn unter Profil › Daten aus.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Knotenspeicher
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Speicher, den dein Konto auf jedem Knoten belegt, mit dem du synchronisierst.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
In Verwendung
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
Die Nutzung erscheint nach der nächsten Synchronisierung mit diesem Knoten.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s von %s belegt
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s belegt · kein Limit
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Fast voll. Ist er voll, werden Änderungen hier nicht mehr synchronisiert.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Fast voll. Fotos füllen ihn am schnellsten; schalte den Foto-Upload aus, damit deine Einträge weiter synchronisiert werden.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Kein Platz für die neuesten Änderungen, daher werden sie nicht mit diesem Knoten synchronisiert.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Kein Platz für die neuesten Änderungen, daher werden sie nicht mit diesem Knoten synchronisiert. Schalte unten den Foto-Upload aus, damit alles andere synchronisiert wird.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Fotos und Videos von diesem Gerät belegen auf einem Knoten etwa %s.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Fotos und Videos hochladen
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Fotos werden mit deinen Tagebucheinträgen auf diesen Knoten synchronisiert.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Fotos bleiben auf diesem Gerät. Einträge werden weiter synchronisiert, und andere Geräte zeigen, wo ein Foto ist.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Der Foto-Upload für diesen Knoten konnte nicht geändert werden.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Auf %s ist kein Platz für dieses Foto. Schalte den Foto-Upload unter Profil › Daten aus.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Dieses Foto ist nicht auf diesem Gerät. Es bleibt auf dem Gerät oder Knoten, der Fotos speichert.
|
||||
---
|
||||
[device_link_title]
|
||||
Gerät verbinden
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Füge diesem Konto mit einem QR-Code ein weiteres Telefon oder einen Computer hinzu.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Nutzt du Inner Breeze schon auf einem anderen Gerät? Verbinde dieses mit einem QR-Code.
|
||||
---
|
||||
[device_link_show]
|
||||
Code zeigen
|
||||
---
|
||||
[device_link_scan]
|
||||
Code scannen
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
Öffne auf dem neuen Gerät Profil und dann Gerät verbinden, tippe auf Code scannen und richte die Kamera hierher.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Öffne auf einem Telefon, das dein Konto schon nutzt, Profil und dann Gerät verbinden, tippe auf Code scannen und richte die Kamera hierher.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Richte die Kamera auf den Code auf dem anderen Gerät
|
||||
---
|
||||
[device_link_compare]
|
||||
Prüfe, ob das andere Gerät dieselbe Zahl zeigt, und verbinde dann.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
Prüfe auf dem anderen Gerät diese Zahl und tippe auf Verbinden.
|
||||
---
|
||||
[device_link_ask]
|
||||
Das andere Gerät mit deinem Konto verbinden?
|
||||
---
|
||||
[device_link_connect]
|
||||
Verbinden
|
||||
---
|
||||
[device_link_working]
|
||||
Wird verbunden…
|
||||
---
|
||||
[device_link_connected]
|
||||
Gerät verbunden.
|
||||
---
|
||||
[device_link_failed]
|
||||
Das Gerät konnte nicht verbunden werden. Versuche es erneut.
|
||||
---
|
||||
[device_link_offline]
|
||||
Der Sync-Server ist nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.
|
||||
---
|
||||
[device_link_expired]
|
||||
Der Code ist abgelaufen. Zeige einen neuen.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Das ist kein Verbindungscode von Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Dieses Gerät hat noch kein Konto zum Teilen. Zeige stattdessen hier einen Code.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Zurück zu Apps
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Rückgängig
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Wiederholen
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Rechtschreibung korrigieren
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Keine Rechtschreibfehler gefunden.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Die Rechtschreibung kann gerade nicht geprüft werden. Versuche es später noch einmal.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Dein Online-Kontingent für heute ist aufgebraucht. Versuche es morgen noch einmal.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Melde dich bei einem Konto an, um die Rechtschreibung zu korrigieren.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Dieser Eintrag ist zu lang, um ihn auf einmal zu prüfen.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d ausgewählt
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Kopieren
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Auswahl aufheben
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Ausgewählte Nachrichten löschen?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Chatnachricht
|
||||
---
|
||||
+199
-18
@@ -49,12 +49,6 @@ Data
|
||||
[profile_data_management_body]
|
||||
Import, export, and storage
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
See rankings and your current streak
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
No rank yet
|
||||
---
|
||||
[tab_habits]
|
||||
Habits
|
||||
---
|
||||
@@ -136,9 +130,6 @@ Outgoing
|
||||
[profile_no_leaderboard_data]
|
||||
No leaderboard data
|
||||
---
|
||||
[profile_practice_label]
|
||||
Practice
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
@@ -2321,10 +2312,6 @@ You’ve used today’s online allowance. Local app commands still work.
|
||||
[lumi_developer_reply]
|
||||
Developer reply:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Saved your feedback for the developer.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Show progress
|
||||
@@ -2357,7 +2344,7 @@ No recorded activity in this period.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Send this feedback to the developer?
|
||||
Send this feedback to the developer? It includes your app version, device model and system version.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2367,6 +2354,15 @@ Yes
|
||||
[lumi_feedback_no]
|
||||
No
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Commands
|
||||
---
|
||||
[lumi_command_help]
|
||||
Show what Lumi can do
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Send feedback to the developer
|
||||
---
|
||||
[lumi_telegram]
|
||||
Telegram input
|
||||
@@ -2654,10 +2650,195 @@ Last known session · awaiting updates
|
||||
Waiting for the running device
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Detach practice window
|
||||
[lumi_feedback_delivered]
|
||||
The developer inbox received your feedback.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Return window to app
|
||||
[lumi_feedback_unavailable]
|
||||
Delivery to the developer inbox is not confirmed. Your feedback is saved on this device and will retry.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
The sync node has no room for these changes, so they are not syncing. Turn off photo upload for it in Profile › Data.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Node storage
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Space your account uses on each node you sync with.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
In use
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
Usage appears after the next sync with this node.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s of %s used
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s used · no limit
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Almost full. Changes stop syncing here when it is full.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Almost full. Photos fill it fastest; turn off photo upload to keep your entries syncing.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
No room for the latest changes, so they are not syncing to this node.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
No room for the latest changes, so they are not syncing to this node. Turn off photo upload below to sync everything else.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Photos and videos from this device take about %s on a node.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Upload photos and videos
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Photos sync to this node with your Diary entries.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Photos stay on this device. Entries still sync, and other devices show where a photo is.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Could not change photo upload for this node.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
No room on %s for this photo. Turn off photo upload in Profile › Data.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
This photo is not on this device. It stays on the device or node that keeps photos.
|
||||
---
|
||||
[device_link_title]
|
||||
Connect a device
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Add another phone or computer to this account with a QR code.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Already use Inner Breeze on another device? Connect this one with a QR code.
|
||||
---
|
||||
[device_link_show]
|
||||
Show code
|
||||
---
|
||||
[device_link_scan]
|
||||
Scan code
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
On the new device, open Profile, then Connect a device, tap Scan code and point the camera here.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
On a phone that already uses your account, open Profile, then Connect a device, tap Scan code and point the camera here.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Point the camera at the code on the other device
|
||||
---
|
||||
[device_link_compare]
|
||||
Check that the other device shows the same number, then connect.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
On the other device, check this number and tap Connect.
|
||||
---
|
||||
[device_link_ask]
|
||||
Connect the other device to your account?
|
||||
---
|
||||
[device_link_connect]
|
||||
Connect
|
||||
---
|
||||
[device_link_working]
|
||||
Connecting…
|
||||
---
|
||||
[device_link_connected]
|
||||
Device connected.
|
||||
---
|
||||
[device_link_failed]
|
||||
Could not connect the device. Try again.
|
||||
---
|
||||
[device_link_offline]
|
||||
Could not reach the sync server. Check your connection and try again.
|
||||
---
|
||||
[device_link_expired]
|
||||
The code expired. Show a new one.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
That is not an Inner Breeze connection code.
|
||||
---
|
||||
[device_link_no_account]
|
||||
This device has no account to share yet. Show a code here instead.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Back to Apps
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Undo
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Redo
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Correct spelling
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
No spelling mistakes found.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Could not check spelling right now. Try again later.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
You’ve used today’s online allowance. Try again tomorrow.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Sign in to an account to correct spelling.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
This entry is too long to check at once.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d selected
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Copy
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Cancel selection
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Delete the selected messages?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Chat message
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Salientes
|
||||
[profile_no_leaderboard_data]
|
||||
Sin datos de clasificacion
|
||||
---
|
||||
[profile_practice_label]
|
||||
Practica
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Mis hábitos
|
||||
---
|
||||
@@ -1929,12 +1926,6 @@ Datos
|
||||
[profile_data_management_body]
|
||||
Importación, exportación y almacenamiento
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Ver la clasificación y tu racha actual
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Aún sin clasificación
|
||||
---
|
||||
[appearance_style_label]
|
||||
Estilo
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Has agotado tu cuota en línea de hoy. Los comandos locales de la app siguen fun
|
||||
[lumi_developer_reply]
|
||||
Respuesta del desarrollador:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Guardé tus comentarios para el desarrollador.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Mostrar progreso
|
||||
@@ -2358,7 +2345,7 @@ No hay actividad registrada en este período.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
¿Enviar estos comentarios al desarrollador?
|
||||
¿Enviar estos comentarios al desarrollador? Incluyen la versión de la app, el modelo del dispositivo y la versión del sistema.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Sí
|
||||
[lumi_feedback_no]
|
||||
No, gracias
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Comandos
|
||||
---
|
||||
[lumi_command_help]
|
||||
Mostrar lo que Lumi puede hacer
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Enviar comentarios al desarrollador
|
||||
---
|
||||
[lumi_telegram]
|
||||
Mensajes desde Telegram
|
||||
@@ -2655,10 +2651,195 @@ En pausa en otro dispositivo
|
||||
Esperando al dispositivo con la sesión en curso
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Separar la ventana de práctica
|
||||
[lumi_feedback_delivered]
|
||||
El buzón del desarrollador recibió tus comentarios.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Devolver la ventana a la aplicación
|
||||
[lumi_feedback_unavailable]
|
||||
No se ha confirmado la entrega al buzón del desarrollador. Tus comentarios están guardados en este dispositivo y se volverá a intentar el envío.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
El nodo de sincronización no tiene espacio para estos cambios, así que no se sincronizan. Desactiva la subida de fotos para él en Perfil › Datos.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Almacenamiento en nodos
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Espacio que usa tu cuenta en cada nodo con el que sincronizas.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
En uso
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
El uso aparecerá tras la próxima sincronización con este nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s de %s usados
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s usados · sin límite
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Casi lleno. Cuando se llene, los cambios dejarán de sincronizarse aquí.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Casi lleno. Las fotos lo llenan más rápido; desactiva la subida de fotos para que tus entradas sigan sincronizándose.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
No hay espacio para los últimos cambios, así que no se sincronizan con este nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
No hay espacio para los últimos cambios, así que no se sincronizan con este nodo. Desactiva abajo la subida de fotos para sincronizar todo lo demás.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Las fotos y los vídeos de este dispositivo ocupan unos %s en un nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Subir fotos y vídeos
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Las fotos se sincronizan con este nodo junto con tus entradas del diario.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Las fotos se quedan en este dispositivo. Las entradas se siguen sincronizando y los demás dispositivos muestran dónde hay una foto.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
No se pudo cambiar la subida de fotos para este nodo.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
No hay espacio en %s para esta foto. Desactiva la subida de fotos en Perfil › Datos.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Esta foto no está en este dispositivo. Se guarda en el dispositivo o nodo que conserva las fotos.
|
||||
---
|
||||
[device_link_title]
|
||||
Conectar un dispositivo
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Añade otro teléfono u ordenador a esta cuenta con un código QR.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
¿Ya usas Inner Breeze en otro dispositivo? Conecta este con un código QR.
|
||||
---
|
||||
[device_link_show]
|
||||
Mostrar código
|
||||
---
|
||||
[device_link_scan]
|
||||
Escanear código
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
En el nuevo dispositivo, abre Perfil y luego Conectar un dispositivo, toca Escanear código y apunta la cámara aquí.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
En un teléfono que ya usa tu cuenta, abre Perfil y luego Conectar un dispositivo, toca Escanear código y apunta la cámara aquí.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Apunta la cámara al código del otro dispositivo
|
||||
---
|
||||
[device_link_compare]
|
||||
Comprueba que el otro dispositivo muestra el mismo número y luego conecta.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
En el otro dispositivo, comprueba este número y toca Conectar.
|
||||
---
|
||||
[device_link_ask]
|
||||
¿Conectar el otro dispositivo a tu cuenta?
|
||||
---
|
||||
[device_link_connect]
|
||||
Conectar
|
||||
---
|
||||
[device_link_working]
|
||||
Conectando…
|
||||
---
|
||||
[device_link_connected]
|
||||
Dispositivo conectado.
|
||||
---
|
||||
[device_link_failed]
|
||||
No se pudo conectar el dispositivo. Inténtalo de nuevo.
|
||||
---
|
||||
[device_link_offline]
|
||||
No se pudo contactar con el servidor de sincronización. Revisa tu conexión e inténtalo de nuevo.
|
||||
---
|
||||
[device_link_expired]
|
||||
El código caducó. Muestra uno nuevo.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Ese no es un código de conexión de Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Este dispositivo aún no tiene una cuenta que compartir. Muestra un código aquí.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Volver a Aplicaciones
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Deshacer
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Rehacer
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Corregir ortografía
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
No se encontraron errores de ortografía.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
No se pudo revisar la ortografía ahora. Inténtalo más tarde.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Has agotado tu cuota en línea de hoy. Inténtalo mañana.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Inicia sesión en una cuenta para corregir la ortografía.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Esta entrada es demasiado larga para revisarla de una vez.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d seleccionados
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Copiar
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Cancelar selección
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
¿Eliminar los mensajes seleccionados?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Mensaje del chat
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Envoyees
|
||||
[profile_no_leaderboard_data]
|
||||
Aucune donnee de classement
|
||||
---
|
||||
[profile_practice_label]
|
||||
Pratique
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Mes habitudes
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Données
|
||||
[profile_data_management_body]
|
||||
Importation, exportation et stockage
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Voir le classement et votre série actuelle
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Pas encore de classement
|
||||
---
|
||||
[appearance_style_label]
|
||||
Style
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Vous avez utilisé votre quota en ligne du jour. Les commandes locales de l’ap
|
||||
[lumi_developer_reply]
|
||||
Réponse du développeur :
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Tes commentaires ont été enregistrés pour le développeur.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Afficher les progrès
|
||||
@@ -2358,7 +2345,7 @@ Aucune activité enregistrée sur cette période.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Envoyer ces commentaires au développeur ?
|
||||
Envoyer ces commentaires au développeur ? Ils incluent la version de l’app, le modèle de l’appareil et la version du système.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Oui
|
||||
[lumi_feedback_no]
|
||||
Non
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Commandes
|
||||
---
|
||||
[lumi_command_help]
|
||||
Voir ce que Lumi sait faire
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Envoyer un avis au développeur
|
||||
---
|
||||
[lumi_telegram]
|
||||
Messages depuis Telegram
|
||||
@@ -2655,10 +2651,195 @@ Dernière séance connue · en attente de mises à jour
|
||||
En attente de l’appareil où la séance est en cours
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Détacher la fenêtre de pratique
|
||||
[lumi_feedback_delivered]
|
||||
La boîte du développeur a reçu votre retour.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Ramener la fenêtre dans l’application
|
||||
[lumi_feedback_unavailable]
|
||||
La livraison à la boîte du développeur n’est pas confirmée. Votre retour reste enregistré sur cet appareil et l’envoi sera réessayé.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
Le nœud de synchronisation n’a pas de place pour ces modifications, elles ne se synchronisent donc pas. Désactive l’envoi de photos pour ce nœud dans Profil › Données.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Stockage des nœuds
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Espace utilisé par ton compte sur chaque nœud avec lequel tu synchronises.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
Utilisé
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
L’utilisation s’affichera après la prochaine synchronisation avec ce nœud.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s utilisés sur %s
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s utilisés · sans limite
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Presque plein. Une fois plein, les modifications ne s’y synchronisent plus.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Presque plein. Les photos le remplissent le plus vite ; désactive l’envoi de photos pour que tes entrées continuent à se synchroniser.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Pas de place pour les dernières modifications, elles ne se synchronisent donc pas avec ce nœud.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Pas de place pour les dernières modifications, elles ne se synchronisent donc pas avec ce nœud. Désactive l’envoi de photos ci-dessous pour synchroniser tout le reste.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Les photos et vidéos de cet appareil occupent environ %s sur un nœud.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Envoyer les photos et vidéos
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Les photos se synchronisent avec ce nœud en même temps que tes entrées du journal.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Les photos restent sur cet appareil. Les entrées continuent à se synchroniser et les autres appareils indiquent où se trouve une photo.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Impossible de modifier l’envoi de photos pour ce nœud.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Pas de place sur %s pour cette photo. Désactive l’envoi de photos dans Profil › Données.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Cette photo n’est pas sur cet appareil. Elle reste sur l’appareil ou le nœud qui garde les photos.
|
||||
---
|
||||
[device_link_title]
|
||||
Connecter un appareil
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Ajoutez un autre téléphone ou ordinateur à ce compte avec un code QR.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Vous utilisez déjà Inner Breeze sur un autre appareil ? Connectez celui-ci avec un code QR.
|
||||
---
|
||||
[device_link_show]
|
||||
Afficher le code
|
||||
---
|
||||
[device_link_scan]
|
||||
Scanner le code
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
Sur le nouvel appareil, ouvrez Profil puis Connecter un appareil, touchez Scanner le code et pointez la caméra ici.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Sur un téléphone qui utilise déjà votre compte, ouvrez Profil puis Connecter un appareil, touchez Scanner le code et pointez la caméra ici.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Pointez la caméra vers le code de l'autre appareil
|
||||
---
|
||||
[device_link_compare]
|
||||
Vérifiez que l'autre appareil affiche le même nombre, puis connectez.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
Sur l'autre appareil, vérifiez ce nombre et touchez Connecter.
|
||||
---
|
||||
[device_link_ask]
|
||||
Connecter l'autre appareil à votre compte ?
|
||||
---
|
||||
[device_link_connect]
|
||||
Connecter
|
||||
---
|
||||
[device_link_working]
|
||||
Connexion…
|
||||
---
|
||||
[device_link_connected]
|
||||
Appareil connecté.
|
||||
---
|
||||
[device_link_failed]
|
||||
Impossible de connecter l'appareil. Réessayez.
|
||||
---
|
||||
[device_link_offline]
|
||||
Impossible de joindre le serveur de synchronisation. Vérifiez votre connexion et réessayez.
|
||||
---
|
||||
[device_link_expired]
|
||||
Le code a expiré. Affichez-en un nouveau.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Ce n'est pas un code de connexion Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Cet appareil n'a pas encore de compte à partager. Affichez plutôt un code ici.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Retour aux Applications
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Annuler
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Rétablir
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Corriger l’orthographe
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Aucune faute d’orthographe trouvée.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Impossible de vérifier l’orthographe pour le moment. Réessayez plus tard.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Vous avez utilisé votre quota en ligne du jour. Réessayez demain.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Connectez-vous à un compte pour corriger l’orthographe.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Cette entrée est trop longue pour être vérifiée en une fois.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d sélectionnés
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Copier
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Annuler la sélection
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Supprimer les messages sélectionnés ?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Message du chat
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Keluar
|
||||
[profile_no_leaderboard_data]
|
||||
Tidak ada data papan peringkat
|
||||
---
|
||||
[profile_practice_label]
|
||||
Latihan
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Kebiasaan saya
|
||||
---
|
||||
@@ -1929,12 +1926,6 @@ Data
|
||||
[profile_data_management_body]
|
||||
Impor, ekspor, dan penyimpanan
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Lihat peringkat dan rangkaian hari aktif Anda
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Belum ada peringkat
|
||||
---
|
||||
[appearance_style_label]
|
||||
Gaya
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Kuota daring hari ini sudah habis. Perintah lokal aplikasi tetap berfungsi.
|
||||
[lumi_developer_reply]
|
||||
Balasan pengembang:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Masukanmu telah disimpan untuk pengembang.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Tampilkan kemajuan
|
||||
@@ -2358,7 +2345,7 @@ Tidak ada aktivitas tercatat dalam periode ini.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Kirim masukan ini kepada pengembang?
|
||||
Kirim masukan ini kepada pengembang? Termasuk versi aplikasi, model perangkat, dan versi sistem.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Ya
|
||||
[lumi_feedback_no]
|
||||
Tidak
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Perintah
|
||||
---
|
||||
[lumi_command_help]
|
||||
Tampilkan apa yang bisa dilakukan Lumi
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Kirim masukan ke pengembang
|
||||
---
|
||||
[lumi_telegram]
|
||||
Pesan dari Telegram
|
||||
@@ -2655,10 +2651,195 @@ Sesi terakhir yang diketahui · menunggu pembaruan
|
||||
Menunggu perangkat yang menjalankan sesi
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Pisahkan jendela latihan
|
||||
[lumi_feedback_delivered]
|
||||
Kotak masuk pengembang telah menerima masukanmu.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Kembalikan jendela ke aplikasi
|
||||
[lumi_feedback_unavailable]
|
||||
Pengiriman ke kotak masuk pengembang belum terkonfirmasi. Masukanmu tersimpan di perangkat ini dan pengiriman akan dicoba lagi.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
Simpul sinkronisasi tidak punya ruang untuk perubahan ini, jadi perubahan tidak disinkronkan. Matikan unggahan foto untuk simpul ini di Profil › Data.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Penyimpanan simpul
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Ruang yang dipakai akunmu di setiap simpul yang kamu sinkronkan.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
Dipakai
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
Penggunaan muncul setelah sinkronisasi berikutnya dengan simpul ini.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s dari %s terpakai
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s terpakai · tanpa batas
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Hampir penuh. Setelah penuh, perubahan berhenti disinkronkan ke sini.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Hampir penuh. Foto paling cepat mengisinya; matikan unggahan foto agar catatanmu tetap tersinkron.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Tidak ada ruang untuk perubahan terbaru, jadi tidak disinkronkan ke simpul ini.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Tidak ada ruang untuk perubahan terbaru, jadi tidak disinkronkan ke simpul ini. Matikan unggahan foto di bawah agar semua yang lain tersinkron.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Foto dan video dari perangkat ini memakai sekitar %s di sebuah simpul.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Unggah foto dan video
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Foto disinkronkan ke simpul ini bersama catatan buku harianmu.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Foto tetap di perangkat ini. Catatan tetap tersinkron, dan perangkat lain menunjukkan letak foto.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Tidak dapat mengubah unggahan foto untuk simpul ini.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Tidak ada ruang di %s untuk foto ini. Matikan unggahan foto di Profil › Data.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Foto ini tidak ada di perangkat ini. Foto tetap di perangkat atau simpul yang menyimpan foto.
|
||||
---
|
||||
[device_link_title]
|
||||
Hubungkan perangkat
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Tambahkan ponsel atau komputer lain ke akun ini dengan kode QR.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Sudah memakai Inner Breeze di perangkat lain? Hubungkan perangkat ini dengan kode QR.
|
||||
---
|
||||
[device_link_show]
|
||||
Tampilkan kode
|
||||
---
|
||||
[device_link_scan]
|
||||
Pindai kode
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
Di perangkat baru, buka Profil lalu Hubungkan perangkat, ketuk Pindai kode, dan arahkan kamera ke sini.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Di ponsel yang sudah memakai akun Anda, buka Profil lalu Hubungkan perangkat, ketuk Pindai kode, dan arahkan kamera ke sini.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Arahkan kamera ke kode di perangkat lain
|
||||
---
|
||||
[device_link_compare]
|
||||
Pastikan perangkat lain menampilkan angka yang sama, lalu hubungkan.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
Di perangkat lain, periksa angka ini lalu ketuk Hubungkan.
|
||||
---
|
||||
[device_link_ask]
|
||||
Hubungkan perangkat lain ke akun Anda?
|
||||
---
|
||||
[device_link_connect]
|
||||
Hubungkan
|
||||
---
|
||||
[device_link_working]
|
||||
Menghubungkan…
|
||||
---
|
||||
[device_link_connected]
|
||||
Perangkat terhubung.
|
||||
---
|
||||
[device_link_failed]
|
||||
Tidak dapat menghubungkan perangkat. Coba lagi.
|
||||
---
|
||||
[device_link_offline]
|
||||
Tidak dapat menjangkau server sinkronisasi. Periksa koneksi Anda dan coba lagi.
|
||||
---
|
||||
[device_link_expired]
|
||||
Kode kedaluwarsa. Tampilkan kode baru.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Itu bukan kode koneksi Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Perangkat ini belum punya akun untuk dibagikan. Tampilkan kode di sini.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Kembali ke Aplikasi
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Urungkan
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Ulangi
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Perbaiki ejaan
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Tidak ada kesalahan ejaan.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Ejaan tidak dapat diperiksa sekarang. Coba lagi nanti.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Kuota daring hari ini sudah habis. Coba lagi besok.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Masuk ke akun untuk memperbaiki ejaan.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Catatan ini terlalu panjang untuk diperiksa sekaligus.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d dipilih
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Salin
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Batalkan pilihan
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Hapus pesan yang dipilih?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Pesan obrolan
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ In uscita
|
||||
[profile_no_leaderboard_data]
|
||||
Nessun dato classifica
|
||||
---
|
||||
[profile_practice_label]
|
||||
Pratica
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Le mie abitudini
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Dati
|
||||
[profile_data_management_body]
|
||||
Importazione, esportazione e archiviazione
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Visualizza la classifica e la tua serie attuale
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Ancora nessuna posizione
|
||||
---
|
||||
[appearance_style_label]
|
||||
Stile
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Hai esaurito la quota online di oggi. I comandi locali dell’app funzionano anc
|
||||
[lumi_developer_reply]
|
||||
Risposta dello sviluppatore:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Ho salvato il tuo feedback per lo sviluppatore.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Mostra progressi
|
||||
@@ -2358,7 +2345,7 @@ Nessuna attività registrata in questo periodo.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Inviare questo feedback allo sviluppatore?
|
||||
Inviare questo feedback allo sviluppatore? Include la versione dell’app, il modello del dispositivo e la versione del sistema.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Sì
|
||||
[lumi_feedback_no]
|
||||
No, grazie
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Comandi
|
||||
---
|
||||
[lumi_command_help]
|
||||
Mostra cosa sa fare Lumi
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Invia un feedback allo sviluppatore
|
||||
---
|
||||
[lumi_telegram]
|
||||
Messaggi da Telegram
|
||||
@@ -2655,10 +2651,195 @@ Ultima sessione nota · in attesa di aggiornamenti
|
||||
In attesa del dispositivo con la sessione in corso
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Stacca la finestra della pratica
|
||||
[lumi_feedback_delivered]
|
||||
La casella dello sviluppatore ha ricevuto il tuo feedback.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Riporta la finestra nell’app
|
||||
[lumi_feedback_unavailable]
|
||||
La consegna alla casella dello sviluppatore non è confermata. Il tuo feedback resta salvato su questo dispositivo e l’invio verrà ritentato.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
Il nodo di sincronizzazione non ha spazio per queste modifiche, quindi non vengono sincronizzate. Disattiva il caricamento delle foto per questo nodo in Profilo › Dati.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Spazio sui nodi
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Spazio usato dal tuo account su ogni nodo con cui sincronizzi.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
In uso
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
L’utilizzo apparirà dopo la prossima sincronizzazione con questo nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s usati su %s
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s usati · nessun limite
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Quasi pieno. Quando sarà pieno, le modifiche smetteranno di sincronizzarsi qui.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Quasi pieno. Le foto lo riempiono più in fretta; disattiva il caricamento delle foto per continuare a sincronizzare le voci.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Non c’è spazio per le ultime modifiche, quindi non vengono sincronizzate con questo nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Non c’è spazio per le ultime modifiche, quindi non vengono sincronizzate con questo nodo. Disattiva qui sotto il caricamento delle foto per sincronizzare tutto il resto.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Le foto e i video di questo dispositivo occupano circa %s su un nodo.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Carica foto e video
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Le foto si sincronizzano con questo nodo insieme alle voci del diario.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Le foto restano su questo dispositivo. Le voci continuano a sincronizzarsi e gli altri dispositivi mostrano dove si trova una foto.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Impossibile modificare il caricamento delle foto per questo nodo.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Non c’è spazio su %s per questa foto. Disattiva il caricamento delle foto in Profilo › Dati.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Questa foto non è su questo dispositivo. Resta sul dispositivo o sul nodo che conserva le foto.
|
||||
---
|
||||
[device_link_title]
|
||||
Collega un dispositivo
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Aggiungi un altro telefono o computer a questo account con un codice QR.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Usi già Inner Breeze su un altro dispositivo? Collega questo con un codice QR.
|
||||
---
|
||||
[device_link_show]
|
||||
Mostra codice
|
||||
---
|
||||
[device_link_scan]
|
||||
Scansiona codice
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
Sul nuovo dispositivo, apri Profilo e poi Collega un dispositivo, tocca Scansiona codice e inquadra qui.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Su un telefono che usa già il tuo account, apri Profilo e poi Collega un dispositivo, tocca Scansiona codice e inquadra qui.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Inquadra il codice sull'altro dispositivo
|
||||
---
|
||||
[device_link_compare]
|
||||
Controlla che l'altro dispositivo mostri lo stesso numero, poi collega.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
Sull'altro dispositivo, controlla questo numero e tocca Collega.
|
||||
---
|
||||
[device_link_ask]
|
||||
Collegare l'altro dispositivo al tuo account?
|
||||
---
|
||||
[device_link_connect]
|
||||
Collega
|
||||
---
|
||||
[device_link_working]
|
||||
Collegamento…
|
||||
---
|
||||
[device_link_connected]
|
||||
Dispositivo collegato.
|
||||
---
|
||||
[device_link_failed]
|
||||
Impossibile collegare il dispositivo. Riprova.
|
||||
---
|
||||
[device_link_offline]
|
||||
Impossibile raggiungere il server di sincronizzazione. Controlla la connessione e riprova.
|
||||
---
|
||||
[device_link_expired]
|
||||
Il codice è scaduto. Mostrane uno nuovo.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Questo non è un codice di collegamento di Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Questo dispositivo non ha ancora un account da condividere. Mostra un codice qui.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Torna alle App
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Annulla
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Ripeti
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Correggi l’ortografia
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Nessun errore di ortografia trovato.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Impossibile controllare l’ortografia ora. Riprova più tardi.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Hai esaurito la quota online di oggi. Riprova domani.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Accedi a un account per correggere l’ortografia.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Questa voce è troppo lunga per essere controllata in una volta.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d selezionati
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Copia
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Annulla selezione
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Eliminare i messaggi selezionati?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Messaggio della chat
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@
|
||||
[profile_no_leaderboard_data]
|
||||
ランキングデータなし
|
||||
---
|
||||
[profile_practice_label]
|
||||
プラクティス
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
自分の習慣
|
||||
---
|
||||
@@ -1922,12 +1919,6 @@ Inner Breezeは無料のオープンソースです。役に立ったら、少
|
||||
[profile_data_management_body]
|
||||
インポート、エクスポート、ストレージ
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
ランキングと現在の連続記録を見る
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
まだ順位はありません
|
||||
---
|
||||
[appearance_style_label]
|
||||
スタイル
|
||||
---
|
||||
@@ -2324,10 +2315,6 @@ WHMを開始
|
||||
[lumi_developer_reply]
|
||||
開発者からの返信:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
開発者へのフィードバックを保存しました。
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
進捗を表示
|
||||
@@ -2360,7 +2347,7 @@ WHMの最長息止め時間(秒)
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
このフィードバックを開発者に送信しますか?
|
||||
このフィードバックを開発者に送信しますか?アプリのバージョン、端末のモデル、システムのバージョンが含まれます。
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2370,6 +2357,15 @@ WHMの最長息止め時間(秒)
|
||||
[lumi_feedback_no]
|
||||
いいえ
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
コマンド
|
||||
---
|
||||
[lumi_command_help]
|
||||
Lumiにできることを表示
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
開発者にフィードバックを送る
|
||||
---
|
||||
[lumi_telegram]
|
||||
Telegramからの入力
|
||||
@@ -2657,10 +2653,195 @@ Lumiに相談
|
||||
実行中のデバイスからの応答を待っています
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
練習ウィンドウを切り離す
|
||||
[lumi_feedback_delivered]
|
||||
開発者の受信箱でフィードバックを受信しました。
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
ウィンドウをアプリに戻す
|
||||
[lumi_feedback_unavailable]
|
||||
開発者の受信箱への配信は確認できていません。フィードバックはこの端末に保存され、送信を再試行します。
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
同期ノードにこれらの変更を保存する空きがないため、同期されていません。プロフィール › データで、このノードへの写真のアップロードをオフにしてください。
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
ノードのストレージ
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
同期している各ノードで、このアカウントが使っている容量です。
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
使用中
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
このノードと次に同期すると、使用量が表示されます。
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s / %s 使用
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s 使用 · 上限なし
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
残りわずかです。いっぱいになると、ここへの変更は同期されなくなります。
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
残りわずかです。写真がいちばん容量を使います。写真のアップロードをオフにすると、日記は同期され続けます。
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
最新の変更を保存する空きがないため、このノードへ同期されていません。
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
最新の変更を保存する空きがないため、このノードへ同期されていません。下で写真のアップロードをオフにすると、ほかのデータは同期されます。
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
このデバイスの写真と動画は、ノード上で約 %s を使います。
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
写真と動画をアップロード
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
写真は日記と一緒にこのノードへ同期されます。
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
写真はこのデバイスに残ります。日記は引き続き同期され、ほかのデバイスには写真がある場所が表示されます。
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
このノードの写真のアップロード設定を変更できませんでした。
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
%s にこの写真を保存する空きがありません。プロフィール › データで写真のアップロードをオフにしてください。
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
この写真はこのデバイスにありません。写真を保存しているデバイスまたはノードに残っています。
|
||||
---
|
||||
[device_link_title]
|
||||
デバイスを接続
|
||||
---
|
||||
[device_link_intro_send]
|
||||
QRコードでこのアカウントに別のスマートフォンやパソコンを追加します。
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
別のデバイスでInner Breezeを使っていますか?QRコードでこのデバイスを接続しましょう。
|
||||
---
|
||||
[device_link_show]
|
||||
コードを表示
|
||||
---
|
||||
[device_link_scan]
|
||||
コードを読み取る
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
新しいデバイスで「プロフィール」から「デバイスを接続」を開き、「コードを読み取る」をタップしてカメラをここに向けてください。
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
あなたのアカウントを使っているスマートフォンで「プロフィール」から「デバイスを接続」を開き、「コードを読み取る」をタップしてカメラをここに向けてください。
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
もう一方のデバイスのコードにカメラを向けてください
|
||||
---
|
||||
[device_link_compare]
|
||||
もう一方のデバイスに同じ番号が表示されていることを確認してから接続してください。
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
もう一方のデバイスでこの番号を確認し、「接続」をタップしてください。
|
||||
---
|
||||
[device_link_ask]
|
||||
もう一方のデバイスをあなたのアカウントに接続しますか?
|
||||
---
|
||||
[device_link_connect]
|
||||
接続
|
||||
---
|
||||
[device_link_working]
|
||||
接続中…
|
||||
---
|
||||
[device_link_connected]
|
||||
デバイスを接続しました。
|
||||
---
|
||||
[device_link_failed]
|
||||
デバイスを接続できませんでした。もう一度お試しください。
|
||||
---
|
||||
[device_link_offline]
|
||||
同期サーバーに接続できません。接続を確認してもう一度お試しください。
|
||||
---
|
||||
[device_link_expired]
|
||||
コードの有効期限が切れました。新しいコードを表示してください。
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Inner Breezeの接続コードではありません。
|
||||
---
|
||||
[device_link_no_account]
|
||||
このデバイスには共有するアカウントがまだありません。ここでコードを表示してください。
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
アプリに戻る
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
元に戻す
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
やり直す
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
スペルを修正
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
スペルの間違いは見つかりませんでした。
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
今はスペルを確認できません。後でもう一度お試しください。
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
本日のオンライン利用枠を使い切りました。明日もう一度お試しください。
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
スペルを修正するにはアカウントにサインインしてください。
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
この日記は長すぎるため、一度に確認できません。
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d件選択
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
コピー
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
選択を解除
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
選択したメッセージを削除しますか?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
チャットのメッセージ
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Inner Breeze
|
||||
[profile_no_leaderboard_data]
|
||||
순위표 데이터 없음
|
||||
---
|
||||
[profile_practice_label]
|
||||
연습
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
내 습관
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Inner Breeze는 무료 오픈 소스입니다. 도움이 되셨다면 작은 후
|
||||
[profile_data_management_body]
|
||||
가져오기, 내보내기 및 저장 공간
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
순위와 현재 연속 기록 보기
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
아직 순위 없음
|
||||
---
|
||||
[appearance_style_label]
|
||||
스타일
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ WHM 시작
|
||||
[lumi_developer_reply]
|
||||
개발자 답변:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
개발자에게 보낼 의견을 저장했어요.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
진행 상황 보기
|
||||
@@ -2358,7 +2345,7 @@ WHM 시작
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
이 피드백을 개발자에게 보낼까요?
|
||||
이 피드백을 개발자에게 보낼까요? 앱 버전, 기기 이름, 시스템 버전이 함께 전송됩니다.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ WHM 시작
|
||||
[lumi_feedback_no]
|
||||
아니요
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
명령어
|
||||
---
|
||||
[lumi_command_help]
|
||||
Lumi가 할 수 있는 일 보기
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
개발자에게 피드백 보내기
|
||||
---
|
||||
[lumi_telegram]
|
||||
Telegram에서 메시지 보내기
|
||||
@@ -2655,10 +2651,195 @@ Lumi에게 요청
|
||||
세션이 실행 중인 기기의 응답을 기다리는 중
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
연습 창 분리하기
|
||||
[lumi_feedback_delivered]
|
||||
개발자 수신함에서 피드백을 받았어요.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
창을 앱으로 되돌리기
|
||||
[lumi_feedback_unavailable]
|
||||
개발자 수신함으로 전달되었는지 확인되지 않았어요. 피드백은 이 기기에 저장되어 있으며 전송을 다시 시도할 거예요.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
동기화 노드에 이 변경 사항을 저장할 공간이 없어 동기화되지 않습니다. 프로필 › 데이터에서 이 노드의 사진 업로드를 끄세요.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
노드 저장 공간
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
동기화하는 각 노드에서 계정이 사용하는 공간입니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
사용 중
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
이 노드와 다음에 동기화하면 사용량이 표시됩니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s / %s 사용
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s 사용 · 제한 없음
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
거의 가득 찼습니다. 가득 차면 이곳으로 변경 사항이 동기화되지 않습니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
거의 가득 찼습니다. 사진이 가장 빨리 채웁니다. 사진 업로드를 끄면 일기는 계속 동기화됩니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
최신 변경 사항을 저장할 공간이 없어 이 노드로 동기화되지 않습니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
최신 변경 사항을 저장할 공간이 없어 이 노드로 동기화되지 않습니다. 아래에서 사진 업로드를 끄면 나머지는 모두 동기화됩니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
이 기기의 사진과 동영상은 노드에서 약 %s를 차지합니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
사진 및 동영상 업로드
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
사진은 일기 항목과 함께 이 노드로 동기화됩니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
사진은 이 기기에 남습니다. 일기는 계속 동기화되고, 다른 기기에는 사진이 있던 자리가 표시됩니다.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
이 노드의 사진 업로드 설정을 바꾸지 못했습니다.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
%s에 이 사진을 저장할 공간이 없습니다. 프로필 › 데이터에서 사진 업로드를 끄세요.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
이 사진은 이 기기에 없습니다. 사진을 보관하는 기기나 노드에 남아 있습니다.
|
||||
---
|
||||
[device_link_title]
|
||||
기기 연결
|
||||
---
|
||||
[device_link_intro_send]
|
||||
QR 코드로 이 계정에 다른 휴대폰이나 컴퓨터를 추가하세요.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
다른 기기에서 이미 Inner Breeze를 사용하나요? QR 코드로 이 기기를 연결하세요.
|
||||
---
|
||||
[device_link_show]
|
||||
코드 표시
|
||||
---
|
||||
[device_link_scan]
|
||||
코드 스캔
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
새 기기에서 프로필을 열고 기기 연결로 이동한 다음 코드 스캔을 누르고 카메라를 여기에 비추세요.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
이미 내 계정을 사용하는 휴대폰에서 프로필을 열고 기기 연결로 이동한 다음 코드 스캔을 누르고 카메라를 여기에 비추세요.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
다른 기기의 코드에 카메라를 비추세요
|
||||
---
|
||||
[device_link_compare]
|
||||
다른 기기에 같은 번호가 표시되는지 확인한 다음 연결하세요.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
다른 기기에서 이 번호를 확인하고 연결을 누르세요.
|
||||
---
|
||||
[device_link_ask]
|
||||
다른 기기를 내 계정에 연결할까요?
|
||||
---
|
||||
[device_link_connect]
|
||||
연결
|
||||
---
|
||||
[device_link_working]
|
||||
연결 중…
|
||||
---
|
||||
[device_link_connected]
|
||||
기기가 연결되었습니다.
|
||||
---
|
||||
[device_link_failed]
|
||||
기기를 연결하지 못했습니다. 다시 시도하세요.
|
||||
---
|
||||
[device_link_offline]
|
||||
동기화 서버에 연결할 수 없습니다. 연결을 확인하고 다시 시도하세요.
|
||||
---
|
||||
[device_link_expired]
|
||||
코드가 만료되었습니다. 새 코드를 표시하세요.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Inner Breeze 연결 코드가 아닙니다.
|
||||
---
|
||||
[device_link_no_account]
|
||||
이 기기에는 아직 공유할 계정이 없습니다. 여기에서 코드를 표시하세요.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
앱으로 돌아가기
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
실행 취소
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
다시 실행
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
맞춤법 고치기
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
맞춤법 오류를 찾지 못했어요.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
지금은 맞춤법을 확인할 수 없어요. 나중에 다시 시도해 주세요.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
오늘의 온라인 사용 한도를 모두 사용했어요. 내일 다시 시도해 주세요.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
맞춤법을 고치려면 계정에 로그인하세요.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
이 일기는 너무 길어서 한 번에 확인할 수 없어요.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d개 선택됨
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
복사
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
선택 취소
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
선택한 메시지를 삭제할까요?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
채팅 메시지
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Enviados
|
||||
[profile_no_leaderboard_data]
|
||||
Sem dados de classificacao
|
||||
---
|
||||
[profile_practice_label]
|
||||
Pratica
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Meus hábitos
|
||||
---
|
||||
@@ -1929,12 +1926,6 @@ Dados
|
||||
[profile_data_management_body]
|
||||
Importação, exportação e armazenamento
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Ver a classificação e sua sequência atual
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Ainda sem classificação
|
||||
---
|
||||
[appearance_style_label]
|
||||
Estilo
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Você usou sua cota on-line de hoje. Os comandos locais do aplicativo continuam
|
||||
[lumi_developer_reply]
|
||||
Resposta do desenvolvedor:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Salvei seu feedback para o desenvolvedor.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Mostrar progresso
|
||||
@@ -2358,7 +2345,7 @@ Nenhuma atividade registrada neste período.
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Enviar este feedback ao desenvolvedor?
|
||||
Enviar este feedback ao desenvolvedor? Ele inclui a versão do app, o modelo do dispositivo e a versão do sistema.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Sim
|
||||
[lumi_feedback_no]
|
||||
Não
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Comandos
|
||||
---
|
||||
[lumi_command_help]
|
||||
Mostrar o que a Lumi pode fazer
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Enviar feedback ao desenvolvedor
|
||||
---
|
||||
[lumi_telegram]
|
||||
Mensagens do Telegram
|
||||
@@ -2655,10 +2651,195 @@ Pausado em outro dispositivo
|
||||
Aguardando o dispositivo com a sessão em andamento
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Separar a janela da prática
|
||||
[lumi_feedback_delivered]
|
||||
A caixa de entrada do programador recebeu o teu comentário.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Devolver a janela ao aplicativo
|
||||
[lumi_feedback_unavailable]
|
||||
A entrega na caixa de entrada do programador não está confirmada. O teu comentário continua guardado neste dispositivo e o envio será tentado novamente.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
O nó de sincronização não tem espaço para estas alterações, por isso elas não estão sendo sincronizadas. Desative o envio de fotos para ele em Perfil › Dados.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Armazenamento nos nós
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Espaço que sua conta usa em cada nó com que você sincroniza.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
Em uso
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
O uso aparece após a próxima sincronização com este nó.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
%s de %s usados
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
%s usados · sem limite
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Quase cheio. Quando encher, as alterações deixam de ser sincronizadas aqui.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Quase cheio. As fotos o enchem mais rápido; desative o envio de fotos para continuar sincronizando suas entradas.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Não há espaço para as alterações mais recentes, por isso elas não estão sendo sincronizadas com este nó.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Não há espaço para as alterações mais recentes, por isso elas não estão sendo sincronizadas com este nó. Desative abaixo o envio de fotos para sincronizar todo o resto.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
As fotos e vídeos deste dispositivo ocupam cerca de %s em um nó.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Enviar fotos e vídeos
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
As fotos são sincronizadas com este nó junto com as entradas do diário.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
As fotos ficam neste dispositivo. As entradas continuam sincronizando, e os outros dispositivos mostram onde há uma foto.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Não foi possível alterar o envio de fotos para este nó.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
Não há espaço em %s para esta foto. Desative o envio de fotos em Perfil › Dados.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Esta foto não está neste dispositivo. Ela fica no dispositivo ou nó que guarda as fotos.
|
||||
---
|
||||
[device_link_title]
|
||||
Conectar um dispositivo
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Adicione outro telefone ou computador a esta conta com um código QR.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Já usa o Inner Breeze em outro dispositivo? Conecte este com um código QR.
|
||||
---
|
||||
[device_link_show]
|
||||
Mostrar código
|
||||
---
|
||||
[device_link_scan]
|
||||
Escanear código
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
No novo dispositivo, abra Perfil e depois Conectar um dispositivo, toque em Escanear código e aponte a câmera para cá.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
Em um telefone que já usa sua conta, abra Perfil e depois Conectar um dispositivo, toque em Escanear código e aponte a câmera para cá.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Aponte a câmera para o código no outro dispositivo
|
||||
---
|
||||
[device_link_compare]
|
||||
Confira se o outro dispositivo mostra o mesmo número e depois conecte.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
No outro dispositivo, confira este número e toque em Conectar.
|
||||
---
|
||||
[device_link_ask]
|
||||
Conectar o outro dispositivo à sua conta?
|
||||
---
|
||||
[device_link_connect]
|
||||
Conectar
|
||||
---
|
||||
[device_link_working]
|
||||
Conectando…
|
||||
---
|
||||
[device_link_connected]
|
||||
Dispositivo conectado.
|
||||
---
|
||||
[device_link_failed]
|
||||
Não foi possível conectar o dispositivo. Tente novamente.
|
||||
---
|
||||
[device_link_offline]
|
||||
Não foi possível acessar o servidor de sincronização. Verifique sua conexão e tente novamente.
|
||||
---
|
||||
[device_link_expired]
|
||||
O código expirou. Mostre um novo.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Esse não é um código de conexão do Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
Este dispositivo ainda não tem uma conta para compartilhar. Mostre um código aqui.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Voltar para Aplicativos
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Desfazer
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Refazer
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Corrigir ortografia
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Nenhum erro de ortografia encontrado.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Não foi possível verificar a ortografia agora. Tente novamente mais tarde.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Você usou sua cota on-line de hoje. Tente novamente amanhã.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Entre em uma conta para corrigir a ortografia.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Esta entrada é longa demais para ser verificada de uma vez.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
%d selecionadas
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Copiar
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Cancelar seleção
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Excluir as mensagens selecionadas?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Mensagem do chat
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@ Inner Breeze
|
||||
[profile_no_leaderboard_data]
|
||||
Нет данных рейтинга
|
||||
---
|
||||
[profile_practice_label]
|
||||
Практика
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Мои привычки
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Inner Breeze бесплатное приложение с открытым ис
|
||||
[profile_data_management_body]
|
||||
Импорт, экспорт и хранение
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
Посмотреть рейтинг и текущую серию
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
Пока нет места в рейтинге
|
||||
---
|
||||
[appearance_style_label]
|
||||
Стиль
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Inner Breeze бесплатное приложение с открытым ис
|
||||
[lumi_developer_reply]
|
||||
Ответ разработчика:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
Ваш отзыв сохранён для разработчика.
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
Показать прогресс
|
||||
@@ -2358,7 +2345,7 @@ Inner Breeze бесплатное приложение с открытым ис
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
Отправить этот отзыв разработчику?
|
||||
Отправить этот отзыв разработчику? К нему прилагаются версия приложения, модель устройства и версия системы.
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ Inner Breeze бесплатное приложение с открытым ис
|
||||
[lumi_feedback_no]
|
||||
Нет
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
Команды
|
||||
---
|
||||
[lumi_command_help]
|
||||
Показать, что умеет Lumi
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
Отправить отзыв разработчику
|
||||
---
|
||||
[lumi_telegram]
|
||||
Сообщения из Telegram
|
||||
@@ -2655,10 +2651,195 @@ Inner Breeze бесплатное приложение с открытым ис
|
||||
Ожидание устройства с текущим сеансом
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
Отделить окно практики
|
||||
[lumi_feedback_delivered]
|
||||
Ваш отзыв получен в почтовом ящике разработчика.
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
Вернуть окно в приложение
|
||||
[lumi_feedback_unavailable]
|
||||
Доставка в почтовый ящик разработчика не подтверждена. Ваш отзыв сохранён на этом устройстве, и отправка будет повторена.
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
На узле синхронизации нет места для этих изменений, поэтому они не синхронизируются. Отключите загрузку фото для этого узла в разделе Профиль › Данные.
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
Хранилище узлов
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
Сколько места ваш аккаунт занимает на каждом узле, с которым вы синхронизируетесь.
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
Используется
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
Объём появится после следующей синхронизации с этим узлом.
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
Занято %s из %s
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
Занято %s · без ограничения
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
Почти заполнено. Когда место закончится, изменения перестанут синхронизироваться сюда.
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
Почти заполнено. Быстрее всего место занимают фото; отключите загрузку фото, чтобы записи продолжали синхронизироваться.
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
Для последних изменений нет места, поэтому они не синхронизируются с этим узлом.
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
Для последних изменений нет места, поэтому они не синхронизируются с этим узлом. Отключите ниже загрузку фото, чтобы синхронизировалось всё остальное.
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
Фото и видео с этого устройства занимают на узле около %s.
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
Загружать фото и видео
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
Фото синхронизируются с этим узлом вместе с записями дневника.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
Фото остаются на этом устройстве. Записи продолжают синхронизироваться, а другие устройства показывают, где есть фото.
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
Не удалось изменить загрузку фото для этого узла.
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
На %s нет места для этого фото. Отключите загрузку фото в разделе Профиль › Данные.
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
Этого фото нет на этом устройстве. Оно хранится на устройстве или узле, где сохраняются фото.
|
||||
---
|
||||
[device_link_title]
|
||||
Подключить устройство
|
||||
---
|
||||
[device_link_intro_send]
|
||||
Добавьте к этому аккаунту другой телефон или компьютер с помощью QR-кода.
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
Уже пользуетесь Inner Breeze на другом устройстве? Подключите это с помощью QR-кода.
|
||||
---
|
||||
[device_link_show]
|
||||
Показать код
|
||||
---
|
||||
[device_link_scan]
|
||||
Сканировать код
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
На новом устройстве откройте «Профиль», затем «Подключить устройство», нажмите «Сканировать код» и наведите камеру сюда.
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
На телефоне, где уже есть ваш аккаунт, откройте «Профиль», затем «Подключить устройство», нажмите «Сканировать код» и наведите камеру сюда.
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
Наведите камеру на код на другом устройстве
|
||||
---
|
||||
[device_link_compare]
|
||||
Убедитесь, что на другом устройстве то же число, затем подключите.
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
На другом устройстве проверьте это число и нажмите «Подключить».
|
||||
---
|
||||
[device_link_ask]
|
||||
Подключить другое устройство к вашему аккаунту?
|
||||
---
|
||||
[device_link_connect]
|
||||
Подключить
|
||||
---
|
||||
[device_link_working]
|
||||
Подключение…
|
||||
---
|
||||
[device_link_connected]
|
||||
Устройство подключено.
|
||||
---
|
||||
[device_link_failed]
|
||||
Не удалось подключить устройство. Попробуйте ещё раз.
|
||||
---
|
||||
[device_link_offline]
|
||||
Сервер синхронизации недоступен. Проверьте подключение и попробуйте ещё раз.
|
||||
---
|
||||
[device_link_expired]
|
||||
Срок действия кода истёк. Покажите новый.
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
Это не код подключения Inner Breeze.
|
||||
---
|
||||
[device_link_no_account]
|
||||
На этом устройстве пока нет аккаунта для передачи. Покажите код здесь.
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
Назад к приложениям
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
Отменить
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
Повторить
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
Исправить орфографию
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
Орфографических ошибок не найдено.
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
Сейчас не удаётся проверить орфографию. Попробуйте позже.
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
Лимит онлайн-запросов на сегодня исчерпан. Попробуйте завтра.
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
Войдите в аккаунт, чтобы исправлять орфографию.
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
Эта запись слишком длинная, чтобы проверить её за один раз.
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
Выбрано: %d
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
Копировать
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
Отменить выбор
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
Удалить выбранные сообщения?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
Сообщение в чате
|
||||
---
|
||||
+199
-18
@@ -100,9 +100,6 @@
|
||||
[profile_no_leaderboard_data]
|
||||
没有排行榜数据
|
||||
---
|
||||
[profile_practice_label]
|
||||
练习
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
我的习惯
|
||||
---
|
||||
@@ -1920,12 +1917,6 @@ Inner Breeze 免费且开源。如果它对您有帮助,一点小额捐赠将
|
||||
[profile_data_management_body]
|
||||
导入、导出和存储
|
||||
---
|
||||
[profile_leaderboard_preview_body]
|
||||
查看排名和当前连续记录
|
||||
---
|
||||
[profile_no_rank_short]
|
||||
暂无排名
|
||||
---
|
||||
[appearance_style_label]
|
||||
样式
|
||||
---
|
||||
@@ -2322,10 +2313,6 @@ Inner Breeze 免费且开源。如果它对您有帮助,一点小额捐赠将
|
||||
[lumi_developer_reply]
|
||||
开发者回复:
|
||||
|
||||
---
|
||||
[lumi_feedback_saved]
|
||||
已保存你的反馈,供开发者查看。
|
||||
|
||||
---
|
||||
[lumi_show_progress]
|
||||
显示进度
|
||||
@@ -2358,7 +2345,7 @@ WHM 最长屏息时间(秒)
|
||||
|
||||
---
|
||||
[lumi_feedback_confirm]
|
||||
将此反馈发送给开发者吗?
|
||||
将此反馈发送给开发者吗?应用版本、设备名称和系统版本会一起发送。
|
||||
|
||||
---
|
||||
[lumi_feedback_yes]
|
||||
@@ -2368,6 +2355,15 @@ WHM 最长屏息时间(秒)
|
||||
[lumi_feedback_no]
|
||||
否
|
||||
|
||||
---
|
||||
[lumi_commands]
|
||||
命令
|
||||
---
|
||||
[lumi_command_help]
|
||||
查看 Lumi 能做什么
|
||||
---
|
||||
[lumi_command_feedback]
|
||||
向开发者发送反馈
|
||||
---
|
||||
[lumi_telegram]
|
||||
从Telegram输入
|
||||
@@ -2655,10 +2651,195 @@ Daochi 节点
|
||||
正在等待运行练习的设备
|
||||
---
|
||||
|
||||
[session_detach_button]
|
||||
弹出练习窗口
|
||||
[lumi_feedback_delivered]
|
||||
开发者收件箱已收到你的反馈。
|
||||
---
|
||||
|
||||
[session_attach_button]
|
||||
将窗口移回应用
|
||||
[lumi_feedback_unavailable]
|
||||
尚未确认反馈已送达开发者收件箱。反馈已保存在此设备上,稍后会重试发送。
|
||||
---
|
||||
|
||||
[sync_storage_full]
|
||||
同步节点没有空间保存这些更改,因此无法同步。请在“个人资料 › 数据”中关闭该节点的照片上传。
|
||||
---
|
||||
|
||||
[profile_node_storage_title]
|
||||
节点存储
|
||||
---
|
||||
|
||||
[profile_node_storage_hint]
|
||||
你的账户在每个同步节点上占用的空间。
|
||||
---
|
||||
|
||||
[profile_node_storage_active]
|
||||
使用中
|
||||
---
|
||||
|
||||
[profile_node_storage_unknown]
|
||||
与此节点下次同步后会显示用量。
|
||||
---
|
||||
|
||||
[profile_node_storage_used_of]
|
||||
已用 %s / %s
|
||||
---
|
||||
|
||||
[profile_node_storage_used_unlimited]
|
||||
已用 %s · 无上限
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full]
|
||||
即将用完。用完后,更改将不再同步到这里。
|
||||
---
|
||||
|
||||
[profile_node_storage_nearly_full_media]
|
||||
即将用完。照片占用空间最快;关闭照片上传可让日记继续同步。
|
||||
---
|
||||
|
||||
[profile_node_storage_full]
|
||||
没有空间保存最新的更改,因此无法同步到此节点。
|
||||
---
|
||||
|
||||
[profile_node_storage_full_media]
|
||||
没有空间保存最新的更改,因此无法同步到此节点。在下方关闭照片上传后,其他内容会继续同步。
|
||||
---
|
||||
|
||||
[profile_node_storage_photos]
|
||||
此设备上的照片和视频在节点上约占 %s。
|
||||
---
|
||||
|
||||
[profile_node_storage_media]
|
||||
上传照片和视频
|
||||
---
|
||||
|
||||
[profile_node_storage_media_on]
|
||||
照片会随日记一起同步到此节点。
|
||||
---
|
||||
|
||||
[profile_node_storage_media_off]
|
||||
照片保留在此设备上。日记仍会同步,其他设备会显示照片所在的位置。
|
||||
---
|
||||
|
||||
[profile_node_storage_media_failed]
|
||||
无法更改此节点的照片上传设置。
|
||||
---
|
||||
|
||||
[diary_photo_no_room]
|
||||
%s 上没有空间保存这张照片。请在“个人资料 › 数据”中关闭照片上传。
|
||||
---
|
||||
|
||||
[diary_photo_unavailable]
|
||||
这张照片不在此设备上。它保存在存放照片的设备或节点上。
|
||||
---
|
||||
[device_link_title]
|
||||
连接设备
|
||||
---
|
||||
[device_link_intro_send]
|
||||
用二维码将另一部手机或电脑添加到此账户。
|
||||
---
|
||||
[device_link_intro_receive]
|
||||
已在其他设备上使用 Inner Breeze?用二维码连接这台设备。
|
||||
---
|
||||
[device_link_show]
|
||||
显示二维码
|
||||
---
|
||||
[device_link_scan]
|
||||
扫描二维码
|
||||
---
|
||||
[device_link_show_hint_send]
|
||||
在新设备上打开“个人资料”,再进入“连接设备”,点按“扫描二维码”并将相机对准这里。
|
||||
---
|
||||
[device_link_show_hint_receive]
|
||||
在已登录你账户的手机上打开“个人资料”,再进入“连接设备”,点按“扫描二维码”并将相机对准这里。
|
||||
---
|
||||
[device_link_scan_prompt]
|
||||
将相机对准另一台设备上的二维码
|
||||
---
|
||||
[device_link_compare]
|
||||
确认另一台设备显示的是相同的数字,然后连接。
|
||||
---
|
||||
[device_link_waiting_compare]
|
||||
在另一台设备上核对这个数字,然后点按“连接”。
|
||||
---
|
||||
[device_link_ask]
|
||||
将另一台设备连接到你的账户?
|
||||
---
|
||||
[device_link_connect]
|
||||
连接
|
||||
---
|
||||
[device_link_working]
|
||||
正在连接…
|
||||
---
|
||||
[device_link_connected]
|
||||
设备已连接。
|
||||
---
|
||||
[device_link_failed]
|
||||
无法连接设备,请重试。
|
||||
---
|
||||
[device_link_offline]
|
||||
无法连接同步服务器。请检查网络后重试。
|
||||
---
|
||||
[device_link_expired]
|
||||
二维码已过期,请显示新的二维码。
|
||||
---
|
||||
[device_link_not_a_code]
|
||||
这不是 Inner Breeze 的连接二维码。
|
||||
---
|
||||
[device_link_no_account]
|
||||
这台设备还没有可共享的账户。请在此显示二维码。
|
||||
---
|
||||
|
||||
[return_to_apps]
|
||||
返回应用
|
||||
---
|
||||
|
||||
[diary_undo]
|
||||
撤销
|
||||
---
|
||||
|
||||
[diary_redo]
|
||||
重做
|
||||
---
|
||||
|
||||
[diary_check_spelling]
|
||||
纠正拼写
|
||||
---
|
||||
|
||||
[diary_spelling_none]
|
||||
未发现拼写错误。
|
||||
---
|
||||
|
||||
[diary_spelling_error]
|
||||
现在无法检查拼写,请稍后再试。
|
||||
---
|
||||
|
||||
[diary_spelling_limit]
|
||||
今天的在线使用额度已用完,请明天再试。
|
||||
---
|
||||
|
||||
[diary_spelling_account]
|
||||
登录账户后即可纠正拼写。
|
||||
---
|
||||
|
||||
[diary_spelling_too_long]
|
||||
这篇日记太长,无法一次检查。
|
||||
---
|
||||
|
||||
[lumi_selected_count]
|
||||
已选择 %d 条
|
||||
---
|
||||
|
||||
[lumi_copy]
|
||||
复制
|
||||
---
|
||||
|
||||
[lumi_cancel_selection]
|
||||
取消选择
|
||||
---
|
||||
|
||||
[lumi_delete_confirm]
|
||||
删除所选消息?
|
||||
---
|
||||
|
||||
[lumi_message]
|
||||
聊天消息
|
||||
---
|
||||
@@ -1,5 +1,5 @@
|
||||
Package: inbe.waozi
|
||||
Version: 2.1.26
|
||||
Version: 2.1.30
|
||||
Architecture: arm64
|
||||
Maintainer: Waozi <[email protected]>
|
||||
Click-Version: 0.4
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.26" date="2026-10-09"/>
|
||||
<release version="2.1.30" date="2026-10-11"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "inbe",
|
||||
"title": "Inner Breeze",
|
||||
"version": "2.1.26",
|
||||
"version": "2.1.30",
|
||||
"architecture": "arm64",
|
||||
"framework": "ubuntu-sdk-20.04",
|
||||
"description": "Syncable breathing, meditation, and habit practice app.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "Inner Breeze",
|
||||
"short_name": "Inbe",
|
||||
"version": "2.1.26",
|
||||
"version": "2.1.30",
|
||||
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
|
||||
"permissions": [
|
||||
"contextMenus"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.26" date="2026-10-09"/>
|
||||
<release version="2.1.30" date="2026-10-11"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.26" date="2026-10-09"/>
|
||||
<release version="2.1.30" date="2026-10-11"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -6,7 +6,7 @@ description: |
|
||||
meditation, and habit tracking with visual and audio cues, meditation
|
||||
timers, habit counters, session history, and optional sync.
|
||||
|
||||
version: '2.1.26'
|
||||
version: '2.1.30'
|
||||
license: BSD-3-Clause
|
||||
base: core22
|
||||
confinement: strict
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"version": "2.1.29",
|
||||
"source_commit": "736882b1bdaae8100c89d6e069301013068ec106",
|
||||
"apk": {
|
||||
"sha256": "e31560818d9808b9e5792a03a1bd35173ede2eea293cfdd58be40bc04d3a618c",
|
||||
"package": "xyz.waozi.inbe.debug",
|
||||
"version_code": 166,
|
||||
"version_name": "2.1.29"
|
||||
},
|
||||
"device": {
|
||||
"model": "moto e6 play",
|
||||
"android": "9"
|
||||
},
|
||||
"practice": {
|
||||
"name": "Wim Hof",
|
||||
"seconds": 59.91,
|
||||
"frames": 3460,
|
||||
"refresh_hz": 58.2,
|
||||
"fps": 57.7,
|
||||
"late_percent": 0.0,
|
||||
"p95_frame_ms": 17.4,
|
||||
"worst_frame_ms": 17.6,
|
||||
"resume_layout_shift": 11.4
|
||||
},
|
||||
"limits": {
|
||||
"minimum_refresh_share": 0.94,
|
||||
"maximum_late_percent": 3.0,
|
||||
"maximum_frame_ms": 250.0
|
||||
},
|
||||
"checks": [
|
||||
"installed over the existing app",
|
||||
"launch",
|
||||
"Wim Hof frame timing",
|
||||
"background and resume"
|
||||
],
|
||||
"passed": true,
|
||||
"checked_at": "2026-10-11T16:59:26+00:00"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"version": "2.1.30",
|
||||
"source_commit": "d0993d71ad22f3de8ed440b2d4aaf39167763ce0",
|
||||
"apk": {
|
||||
"sha256": "42c55b0ae80abe1969486af4203a44d0aea76e0607de7691bc2107cc3e82391e",
|
||||
"package": "xyz.waozi.inbe.debug",
|
||||
"version_code": 167,
|
||||
"version_name": "2.1.30"
|
||||
},
|
||||
"device": {
|
||||
"model": "moto e6 play",
|
||||
"android": "9"
|
||||
},
|
||||
"practice": {
|
||||
"name": "Wim Hof",
|
||||
"seconds": 59.4,
|
||||
"frames": 3431,
|
||||
"refresh_hz": 58.2,
|
||||
"fps": 57.7,
|
||||
"late_percent": 0.0,
|
||||
"p95_frame_ms": 17.4,
|
||||
"worst_frame_ms": 17.6,
|
||||
"resume_layout_shift": 11.4
|
||||
},
|
||||
"limits": {
|
||||
"minimum_refresh_share": 0.94,
|
||||
"maximum_late_percent": 3.0,
|
||||
"maximum_frame_ms": 250.0
|
||||
},
|
||||
"checks": [
|
||||
"installed over the existing app",
|
||||
"launch",
|
||||
"Wim Hof frame timing",
|
||||
"background and resume"
|
||||
],
|
||||
"passed": true,
|
||||
"checked_at": "2026-10-11T19:19:25+00:00"
|
||||
}
|
||||
@@ -1,402 +0,0 @@
|
||||
// Raw, bounded browser network effects. Daochi protocol and app state stay in Zi.
|
||||
addToLibrary({
|
||||
$BrowserNetwork: {
|
||||
next: 1,
|
||||
http: null,
|
||||
sockets: null,
|
||||
streams: null,
|
||||
decoder: null,
|
||||
encoder: null,
|
||||
initialize() {
|
||||
if (!this.http) {
|
||||
this.http = new Map();
|
||||
this.sockets = new Map();
|
||||
this.streams = new Map();
|
||||
this.decoder = new TextDecoder('utf-8', { fatal: true });
|
||||
this.encoder = new TextEncoder();
|
||||
}
|
||||
},
|
||||
bytes(pointer, length) {
|
||||
if (!Number.isInteger(pointer) || !Number.isInteger(length) ||
|
||||
pointer < 0 || length < 0 || pointer + length > HEAPU8.length) {
|
||||
throw new Error('invalid network buffer');
|
||||
}
|
||||
return HEAPU8.subarray(pointer, pointer + length);
|
||||
},
|
||||
text(pointer, length) {
|
||||
return this.decoder.decode(this.bytes(pointer, length));
|
||||
},
|
||||
id() {
|
||||
if (this.next >= 2147483647) {
|
||||
this.next = 1;
|
||||
}
|
||||
while (this.http.has(this.next) || this.sockets.has(this.next) || this.streams.has(this.next)) {
|
||||
this.next += 1;
|
||||
}
|
||||
return this.next++;
|
||||
},
|
||||
failStream(id, task) {
|
||||
if (this.streams.get(id) !== task) return;
|
||||
task.failed = true;
|
||||
task.chunk = null;
|
||||
clearTimeout(task.timer);
|
||||
task.controller.abort();
|
||||
if (task.reader) task.reader.cancel().catch(() => {});
|
||||
},
|
||||
readStream(id, task) {
|
||||
if (this.streams.get(id) !== task || task.reading || task.done || task.failed) return;
|
||||
task.reading = true;
|
||||
task.reader.read().then(chunk => {
|
||||
task.reading = false;
|
||||
if (this.streams.get(id) !== task || task.failed) return;
|
||||
if (chunk.done) {
|
||||
task.done = true;
|
||||
clearTimeout(task.timer);
|
||||
return;
|
||||
}
|
||||
if ((!ArrayBuffer.isView(chunk.value) || chunk.value.BYTES_PER_ELEMENT !== 1) || chunk.value.length > 1048576 ||
|
||||
chunk.value.length > task.maximum - task.received) {
|
||||
this.failStream(id, task);
|
||||
return;
|
||||
}
|
||||
if (chunk.value.length === 0) {
|
||||
this.readStream(id, task);
|
||||
return;
|
||||
}
|
||||
task.received += chunk.value.length;
|
||||
task.chunk = chunk.value;
|
||||
task.offset = 0;
|
||||
}).catch(() => this.failStream(id, task));
|
||||
},
|
||||
finish(id, task, success, status) {
|
||||
if (this.http.get(id) !== task) {
|
||||
return;
|
||||
}
|
||||
clearTimeout(task.timer);
|
||||
task.done = true;
|
||||
task.success = success;
|
||||
task.status = status;
|
||||
if (!success) {
|
||||
HEAPU8[task.output] = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
browser_http_create__deps: ['$BrowserNetwork'],
|
||||
browser_http_create: (methodPointer, methodLength, urlPointer, urlLength,
|
||||
output, capacity, timeout) => {
|
||||
BrowserNetwork.initialize();
|
||||
try {
|
||||
if (methodLength < 1 || methodLength > 31 || urlLength < 1 ||
|
||||
urlLength >= 2048 || capacity < 1 || capacity > 16777216 ||
|
||||
timeout < 1 || timeout > 900000 || BrowserNetwork.http.size >= 8) {
|
||||
return 0;
|
||||
}
|
||||
const method = BrowserNetwork.text(methodPointer, methodLength);
|
||||
const url = new URL(BrowserNetwork.text(urlPointer, urlLength));
|
||||
if (!/^[A-Za-z-]+$/.test(method) ||
|
||||
!['http:', 'https:'].includes(url.protocol) || url.username || url.password) {
|
||||
return 0;
|
||||
}
|
||||
BrowserNetwork.bytes(output, capacity);
|
||||
HEAPU8[output] = 0;
|
||||
const id = BrowserNetwork.id();
|
||||
BrowserNetwork.http.set(id, {
|
||||
method, url: url.href, output, capacity, timeout,
|
||||
headers: new Headers(), controller: new AbortController(),
|
||||
sent: false, done: false, success: false, status: 0, timer: null
|
||||
});
|
||||
return id;
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
browser_http_header__deps: ['$BrowserNetwork'],
|
||||
browser_http_header: (id, namePointer, nameLength, valuePointer, valueLength) => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.http.get(id);
|
||||
if (!task || task.sent || nameLength < 1 || nameLength > 128 || valueLength > 8192) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
task.headers.append(BrowserNetwork.text(namePointer, nameLength),
|
||||
BrowserNetwork.text(valuePointer, valueLength));
|
||||
return 1;
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
browser_http_send__deps: ['$BrowserNetwork'],
|
||||
browser_http_send: (id, bodyPointer, bodyLength) => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.http.get(id);
|
||||
if (!task || task.sent || bodyLength > 16777216) {
|
||||
return 0;
|
||||
}
|
||||
let body;
|
||||
try {
|
||||
if (bodyLength > 0) {
|
||||
body = BrowserNetwork.bytes(bodyPointer, bodyLength).slice();
|
||||
}
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
task.sent = true;
|
||||
task.timer = setTimeout(() => {
|
||||
task.controller.abort();
|
||||
BrowserNetwork.finish(id, task, false, 0);
|
||||
}, task.timeout);
|
||||
(async () => {
|
||||
let reader;
|
||||
try {
|
||||
const response = await fetch(task.url, {
|
||||
method: task.method, headers: task.headers, body,
|
||||
redirect: 'error', credentials: 'omit', cache: 'no-store',
|
||||
signal: task.controller.signal
|
||||
});
|
||||
if (BrowserNetwork.http.get(id) !== task || task.done) {
|
||||
return;
|
||||
}
|
||||
const declaredLength = Number(response.headers.get('content-length'));
|
||||
if (declaredLength >= task.capacity) {
|
||||
throw new Error('response capacity exceeded');
|
||||
}
|
||||
let length = 0;
|
||||
if (response.body) {
|
||||
reader = response.body.getReader();
|
||||
for (;;) {
|
||||
const chunk = await reader.read();
|
||||
if (BrowserNetwork.http.get(id) !== task || task.done) {
|
||||
await reader.cancel();
|
||||
return;
|
||||
}
|
||||
if (chunk.done) {
|
||||
break;
|
||||
}
|
||||
if (chunk.value.length > task.capacity - length - 1) {
|
||||
throw new Error('response capacity exceeded');
|
||||
}
|
||||
HEAPU8.set(chunk.value, task.output + length);
|
||||
length += chunk.value.length;
|
||||
}
|
||||
}
|
||||
HEAPU8[task.output + length] = 0;
|
||||
BrowserNetwork.finish(id, task, true, response.status);
|
||||
} catch (_) {
|
||||
task.controller.abort();
|
||||
if (reader) {
|
||||
try {
|
||||
await reader.cancel();
|
||||
} catch (_) {
|
||||
// Cancellation has already invalidated the transfer.
|
||||
}
|
||||
}
|
||||
BrowserNetwork.finish(id, task, false, 0);
|
||||
}
|
||||
})();
|
||||
return 1;
|
||||
},
|
||||
|
||||
browser_http_poll__deps: ['$BrowserNetwork'],
|
||||
browser_http_poll: (id, statusPointer) => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.http.get(id);
|
||||
if (!task || !task.sent) {
|
||||
return 0;
|
||||
}
|
||||
if (!task.done) {
|
||||
return -1;
|
||||
}
|
||||
BrowserNetwork.http.delete(id);
|
||||
HEAP32[statusPointer >> 2] = task.status;
|
||||
return task.success ? 1 : 0;
|
||||
},
|
||||
|
||||
browser_http_cancel__deps: ['$BrowserNetwork'],
|
||||
browser_http_cancel: id => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.http.get(id);
|
||||
if (!task) {
|
||||
return;
|
||||
}
|
||||
BrowserNetwork.http.delete(id);
|
||||
clearTimeout(task.timer);
|
||||
task.controller.abort();
|
||||
},
|
||||
|
||||
browser_stream_open__deps: ['$BrowserNetwork'],
|
||||
browser_stream_open: (urlPointer, urlLength, maximum, timeout) => {
|
||||
BrowserNetwork.initialize();
|
||||
try {
|
||||
if (urlLength < 1 || urlLength >= 4096 || maximum < 1 || maximum > 536870912 ||
|
||||
timeout < 1 || timeout > 900000 || BrowserNetwork.streams.size >= 4) return 0;
|
||||
const url = new URL(BrowserNetwork.text(urlPointer, urlLength));
|
||||
if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password) return 0;
|
||||
const id = BrowserNetwork.id();
|
||||
const task = { controller: new AbortController(), maximum, received: 0, total: 0,
|
||||
status: 0, reader: null, chunk: null, offset: 0, reading: false, done: false,
|
||||
failed: false, timer: null };
|
||||
BrowserNetwork.streams.set(id, task);
|
||||
task.timer = setTimeout(() => BrowserNetwork.failStream(id, task), timeout);
|
||||
fetch(url.href, { method: 'GET', redirect: 'follow', credentials: 'omit',
|
||||
signal: task.controller.signal }).then(response => {
|
||||
if (BrowserNetwork.streams.get(id) !== task || task.failed) {
|
||||
response.body?.cancel().catch(() => {});
|
||||
return;
|
||||
}
|
||||
task.status = response.status;
|
||||
const declared = Number(response.headers.get('content-length'));
|
||||
if (Number.isSafeInteger(declared) && declared > maximum) {
|
||||
BrowserNetwork.failStream(id, task);
|
||||
response.body?.cancel().catch(() => {});
|
||||
return;
|
||||
}
|
||||
if (Number.isSafeInteger(declared) && declared > 0) task.total = declared;
|
||||
if (!response.body) {
|
||||
task.done = true;
|
||||
clearTimeout(task.timer);
|
||||
return;
|
||||
}
|
||||
task.reader = response.body.getReader();
|
||||
BrowserNetwork.readStream(id, task);
|
||||
}).catch(() => BrowserNetwork.failStream(id, task));
|
||||
return id;
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
browser_stream_poll__deps: ['$BrowserNetwork'],
|
||||
browser_stream_poll: (id, output, capacity, countPointer, statusPointer, totalPointer) => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.streams.get(id);
|
||||
if (!task || capacity < 1 || capacity > 1048576) return 0;
|
||||
BrowserNetwork.bytes(output, capacity);
|
||||
HEAP32[countPointer >> 2] = 0;
|
||||
HEAP32[statusPointer >> 2] = task.status;
|
||||
HEAP32[totalPointer >> 2] = task.total;
|
||||
if (task.failed) return 0;
|
||||
if (task.chunk) {
|
||||
const length = Math.min(capacity, task.chunk.length - task.offset);
|
||||
HEAPU8.set(task.chunk.subarray(task.offset, task.offset + length), output);
|
||||
HEAP32[countPointer >> 2] = length;
|
||||
task.offset += length;
|
||||
if (task.offset === task.chunk.length) {
|
||||
task.chunk = null;
|
||||
task.offset = 0;
|
||||
BrowserNetwork.readStream(id, task);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return task.done ? 2 : -1;
|
||||
},
|
||||
|
||||
browser_stream_close__deps: ['$BrowserNetwork'],
|
||||
browser_stream_close: id => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.streams.get(id);
|
||||
if (!task) return;
|
||||
BrowserNetwork.streams.delete(id);
|
||||
clearTimeout(task.timer);
|
||||
task.controller.abort();
|
||||
if (task.reader) task.reader.cancel().catch(() => {});
|
||||
task.chunk = null;
|
||||
},
|
||||
|
||||
browser_ws_open__deps: ['$BrowserNetwork'],
|
||||
browser_ws_open: (urlPointer, urlLength, protocolPointer, protocolLength,
|
||||
authPointer, authLength, capacity) => {
|
||||
BrowserNetwork.initialize();
|
||||
try {
|
||||
if (urlLength < 1 || urlLength >= 2048 || protocolLength > 128 ||
|
||||
authLength > 8192 || capacity < 2 || capacity > 65536 ||
|
||||
BrowserNetwork.sockets.size >= 4) {
|
||||
return 0;
|
||||
}
|
||||
const url = new URL(BrowserNetwork.text(urlPointer, urlLength));
|
||||
if (!['ws:', 'wss:'].includes(url.protocol) || url.username || url.password) {
|
||||
return 0;
|
||||
}
|
||||
const protocols = [];
|
||||
if (protocolLength) {
|
||||
protocols.push(BrowserNetwork.text(protocolPointer, protocolLength));
|
||||
}
|
||||
if (authLength) {
|
||||
protocols.push(BrowserNetwork.text(authPointer, authLength));
|
||||
}
|
||||
const socket = new WebSocket(url.href, protocols);
|
||||
const id = BrowserNetwork.id();
|
||||
const task = { socket, queue: [], closed: false, capacity, timer: null };
|
||||
BrowserNetwork.sockets.set(id, task);
|
||||
const fail = code => {
|
||||
task.closed = true;
|
||||
clearTimeout(task.timer);
|
||||
socket.close(code);
|
||||
};
|
||||
task.timer = setTimeout(() => fail(1000), 10000);
|
||||
socket.onopen = () => clearTimeout(task.timer);
|
||||
socket.onerror = () => fail(1000);
|
||||
socket.onclose = () => {
|
||||
clearTimeout(task.timer);
|
||||
task.closed = true;
|
||||
};
|
||||
socket.onmessage = event => {
|
||||
if (BrowserNetwork.sockets.get(id) !== task || task.closed) {
|
||||
return;
|
||||
}
|
||||
if (typeof event.data !== 'string') {
|
||||
fail(1003);
|
||||
return;
|
||||
}
|
||||
const bytes = BrowserNetwork.encoder.encode(event.data);
|
||||
if (bytes.length >= capacity || task.queue.length >= 16) {
|
||||
fail(1009);
|
||||
return;
|
||||
}
|
||||
task.queue.push(bytes);
|
||||
};
|
||||
return id;
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
browser_ws_poll__deps: ['$BrowserNetwork'],
|
||||
browser_ws_poll: (id, output, capacity) => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.sockets.get(id);
|
||||
if (!task) {
|
||||
return 0;
|
||||
}
|
||||
if (task.closed) {
|
||||
BrowserNetwork.sockets.delete(id);
|
||||
return 0;
|
||||
}
|
||||
if (!task.queue.length) {
|
||||
return -1;
|
||||
}
|
||||
const bytes = task.queue.shift();
|
||||
if (bytes.length >= capacity) {
|
||||
task.socket.close(1009);
|
||||
BrowserNetwork.sockets.delete(id);
|
||||
return 0;
|
||||
}
|
||||
BrowserNetwork.bytes(output, capacity);
|
||||
HEAPU8.set(bytes, output);
|
||||
HEAPU8[output + bytes.length] = 0;
|
||||
return bytes.length;
|
||||
},
|
||||
|
||||
browser_ws_close__deps: ['$BrowserNetwork'],
|
||||
browser_ws_close: id => {
|
||||
BrowserNetwork.initialize();
|
||||
const task = BrowserNetwork.sockets.get(id);
|
||||
if (task) {
|
||||
BrowserNetwork.sockets.delete(id);
|
||||
clearTimeout(task.timer);
|
||||
task.socket.close(1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -19,7 +19,7 @@ python3 scripts/animation_inventory.py --check
|
||||
python3 scripts/prepare-package-assets.py
|
||||
mkdir -p "$output" build/bundled-cells
|
||||
rm -f "$output/practice.zib"
|
||||
for feature in lists habits practices diary lumi; do
|
||||
for feature in lists habits practices diary lumi leaderboard; do
|
||||
source=$feature
|
||||
entry=$feature
|
||||
if [ "$feature" = practices ]; then source=practice; entry=practice; fi
|
||||
@@ -33,7 +33,7 @@ for feature in lists habits practices diary lumi; do
|
||||
done
|
||||
# Removing a sidebar shortcut never removes its bundled package.
|
||||
rm -f build/bundled-cells/practice.zib
|
||||
for feature in lists habits practices diary lumi; do
|
||||
for feature in lists habits practices diary lumi leaderboard; do
|
||||
cp "$output/$feature.zib" build/bundled-cells/
|
||||
done
|
||||
"$ziran" bundle --root . --module-path src \
|
||||
|
||||
@@ -8,17 +8,21 @@ import re
|
||||
import sys
|
||||
|
||||
NAMES = {"inbe": "inbe", "lists": "lists", "habits": "habits",
|
||||
"practices": "practice", "diary": "diary", "lumi": "lumi"}
|
||||
"practices": "practice", "diary": "diary", "lumi": "lumi",
|
||||
"leaderboard": "leaderboard"}
|
||||
VERSION = r"(?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8})"
|
||||
|
||||
|
||||
def validate(root):
|
||||
ledger = json.loads((root / "apps/versions.json").read_text())
|
||||
for api in ("host_api", "module_api"):
|
||||
if type(ledger.get(api)) is not int or not 0 < ledger[api] <= 2147483647:
|
||||
for api in ("host_api", "oldest_host_api", "module_api"):
|
||||
if type(ledger.get(api)) is not int or not 0 < ledger[api] <= 65535:
|
||||
raise ValueError(f"invalid {api}")
|
||||
# The host runs packages from its oldest supported interface to its own.
|
||||
if ledger["oldest_host_api"] > ledger["host_api"]:
|
||||
raise ValueError("oldest_host_api is newer than host_api")
|
||||
if set(ledger["apps"]) != set(NAMES):
|
||||
raise ValueError("the ledger must contain the root and all five cells")
|
||||
raise ValueError("the ledger must contain the root and all six cells")
|
||||
for name, source in NAMES.items():
|
||||
component = ledger["apps"][name]
|
||||
expected_id = "inbe" if name == "inbe" else "inbe." + name
|
||||
@@ -30,6 +34,11 @@ def validate(root):
|
||||
raise ValueError(f"{name}: invalid release sequence")
|
||||
if component.get("bundled") is not True:
|
||||
raise ValueError(f"{name}: every cell must be bundled for offline use")
|
||||
# A package declares the oldest host interface it runs on, so apps
|
||||
# that keep an older host still receive it.
|
||||
host = component.get("host_api", ledger["host_api"])
|
||||
if type(host) is not int or not ledger["oldest_host_api"] <= host <= ledger["host_api"]:
|
||||
raise ValueError(f"{name}: host_api must be between oldest_host_api and host_api")
|
||||
changelog = root / "apps" / source / "CHANGELOG.md"
|
||||
headings = re.findall(r"^## \[([^\]]+)\] - ([^\n]+)$", changelog.read_text(), re.M)
|
||||
if not headings or not re.fullmatch(VERSION, headings[0][0]):
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Allow a new release only with a passing phone check of its exact sources.
|
||||
|
||||
scripts/phone-check.py --record writes releases/phone-checks/VERSION.json for
|
||||
the commit it checked. The released commit may differ from that commit only in
|
||||
paths that do not change the app, such as the receipt itself.
|
||||
"""
|
||||
import argparse
|
||||
import importlib.util
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
spec = importlib.util.spec_from_file_location("phone_check", ROOT / "scripts/phone-check.py")
|
||||
phone_check = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(phone_check)
|
||||
|
||||
|
||||
def git(root, *argv):
|
||||
return subprocess.run(["git", "-C", str(root), *argv], check=True, capture_output=True,
|
||||
text=True).stdout
|
||||
|
||||
|
||||
def changes_app(path):
|
||||
return any(path == source or path.startswith(source + "/") for source in phone_check.SOURCE_PATHS)
|
||||
|
||||
|
||||
def validate(root, version):
|
||||
path = root / "releases/phone-checks" / f"{version}.json"
|
||||
if not path.is_file():
|
||||
raise ValueError(f"{version} has no phone check; run scripts/phone-check.py --record on the "
|
||||
"development Moto and commit the receipt")
|
||||
receipt = json.loads(path.read_text())
|
||||
if receipt.get("schema") != 1 or receipt.get("version") != version:
|
||||
raise ValueError("the phone check is for a different version")
|
||||
if receipt.get("apk", {}).get("version_name") != version:
|
||||
raise ValueError("the checked APK has a different version")
|
||||
commit = receipt.get("source_commit", "")
|
||||
if not re.fullmatch(r"[0-9a-f]{40}", commit):
|
||||
raise ValueError("the phone check has no full source commit")
|
||||
timing = receipt.get("practice", {})
|
||||
if receipt.get("passed") is not True or not phone_check.smooth(timing) or timing.get("seconds", 0) < 55:
|
||||
raise ValueError(f"the phone check did not pass: {timing}")
|
||||
if subprocess.run(["git", "-C", str(root), "merge-base", "--is-ancestor", commit, "HEAD"],
|
||||
capture_output=True).returncode != 0:
|
||||
raise ValueError(f"the checked commit {commit} is not part of this release")
|
||||
changed = [name for name in git(root, "diff", "--name-only", commit, "HEAD").splitlines()
|
||||
if changes_app(name)]
|
||||
if changed:
|
||||
raise ValueError("the app changed after its phone check: " + ", ".join(changed[:10]))
|
||||
return receipt
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("version")
|
||||
parser.add_argument("--root", type=Path, default=ROOT)
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
receipt = validate(args.root, args.version)
|
||||
except (OSError, ValueError, subprocess.CalledProcessError) as error:
|
||||
print(f"Phone check required: {error}", file=sys.stderr)
|
||||
return 1
|
||||
timing = receipt["practice"]
|
||||
print(f"{args.version} passed its phone check on {receipt['device']['model']}: {timing['fps']} fps, "
|
||||
f"{timing['late_percent']}% late frames")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -36,7 +36,7 @@ check_pattern '"/home/(breathing|inbe)"' \
|
||||
# its two type-name operations are allowed; paths in this file still fail.
|
||||
check_pattern '"BreathSession"' \
|
||||
'Directory names come from the storage layout.' \
|
||||
'^src/cells/value_codec\.zi:[0-9]+: (value\.type_name = ModuleTextData\("BreathSession"\)|if value\.kind != cast\(s32\)HostRecord \|\| TextFromCString\(value\.type_name\) != "BreathSession" \|\|)$'
|
||||
'^src/cells/value_codec\.zi:[0-9]+: (value\.type_name = HostTextData\("BreathSession"\)|if value\.kind != cast\(s32\)HostRecord \|\| TextFromCString\(value\.type_name\) != "BreathSession" \|\|)$'
|
||||
check_pattern '"(breathing|inbe)-sessions\.csv"|"breathing-web-export' \
|
||||
'Export artifact names come from the storage layout.'
|
||||
check_pattern '\bjoin_path2\b' \
|
||||
|
||||
@@ -56,6 +56,8 @@ result = subprocess.run(
|
||||
"--module-path",
|
||||
str(game2d),
|
||||
"--module-path",
|
||||
f"qrcode={root / 'build/packages/qrcode/src'}",
|
||||
"--module-path",
|
||||
str(standard),
|
||||
"--module-path",
|
||||
str(client),
|
||||
|
||||
@@ -33,6 +33,7 @@ for directory in (
|
||||
# KSS imports Kryon as kryon/NAME, and account code imports oqs/Oqs.
|
||||
command.extend(["--module-path", f"kryon={kryon / 'src/ui'}"])
|
||||
command.extend(["--module-path", f"kryon={kryon / 'src/backend'}"])
|
||||
command.extend(["--module-path", f"qrcode={root / 'build/packages/qrcode/src'}"])
|
||||
command.extend(["--module-path", f"oqs={root / 'build/packages/oqs/src'}"])
|
||||
command.extend(["-o", str(args.output)])
|
||||
command.extend(str(path.relative_to(root)) for path in sources)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate src/cells/app_codec.zi with Kryon's widget codec generator.
|
||||
|
||||
Kryon encodes its own widget records in its widget_codec module. This adds
|
||||
the frames and rows Inner Breeze's apps exchange with their screens.
|
||||
Pass --check to verify the file is current."""
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
KRYON = ROOT / 'build/packages/kryon'
|
||||
KRYON_MODULES = ['session', 'geometry', 'drawing_props', 'text_props', 'image_props',
|
||||
'button_props', 'control_props', 'text_input', 'text_input_props',
|
||||
'scroll', 'scroll_props', 'semantic', 'text_align', 'checkbox_props',
|
||||
'toggle_props', 'tab_bar_props', 'box_props']
|
||||
APP_TYPES = ['diary_ui_types', 'inbe_ui_types', 'lists_ui_types', 'lumi_ui_types',
|
||||
'lumi_types', 'leaderboard_ui_types']
|
||||
ROOTS = ['DiaryUiFrame', 'InbeUiFrame', 'ListsUiFrame', 'ListsUiRow', 'LumiUiFrame',
|
||||
'LumiChatRow', 'LumiTask', 'LumiAction', 'LumiTools', 'LumiDonation',
|
||||
'LeaderboardUiFrame', 'LeaderboardUiRow']
|
||||
|
||||
command = [sys.executable, str(KRYON / 'scripts/generate-widget-codecs.py'),
|
||||
'--output', str(ROOT / 'src/cells/app_codec.zi'),
|
||||
'--uses', str(KRYON / 'src/backend/widget_codec.zi'),
|
||||
'--generated-by', 'scripts/generate-app-codec.py']
|
||||
for module in KRYON_MODULES:
|
||||
command += ['--source', str(KRYON / 'src/ui' / (module + '.zi'))]
|
||||
for name in APP_TYPES:
|
||||
command += ['--source', str(ROOT / 'src/cells' / (name + '.zi'))]
|
||||
for root in ROOTS:
|
||||
command += ['--root', root]
|
||||
for line in ['"std/bundle_host"', '"std/byte_text_linux"', '"hosted_values"', '"widget_codec"',
|
||||
*(f', file "{name}.zi";' for name in APP_TYPES), *(f'"{module}"' for module in KRYON_MODULES)]:
|
||||
command += ['--import', line]
|
||||
command += sys.argv[1:]
|
||||
sys.exit(subprocess.run(command).returncode)
|
||||
@@ -29,6 +29,7 @@ roots = [
|
||||
"ListsMutationResult",
|
||||
"HabitsMessage",
|
||||
"PracticeMessage",
|
||||
"LeaderboardMessage",
|
||||
]
|
||||
needed = []
|
||||
|
||||
@@ -50,10 +51,11 @@ lines = [
|
||||
"// No native application pointers cross the portable module boundary.",
|
||||
*[
|
||||
f'#import, file "{name}_types.zi";'
|
||||
for name in ["module", "lists", "habits", "practice", "inbe", "diary", "lumi"]
|
||||
for name in ["module", "lists", "habits", "practice", "inbe", "diary", "lumi", "leaderboard"]
|
||||
],
|
||||
'#import "bundle_host"',
|
||||
'#import "byte_text_linux"',
|
||||
'#import "hosted_values"',
|
||||
'#import "drawing_props"',
|
||||
'#import, file "../core/types.zi";',
|
||||
'#import, file "../practices/patterns/patterns_types.zi";',
|
||||
@@ -138,13 +140,13 @@ for t in needed:
|
||||
f" {row}.elements = *codec.{n}_elements[i][0]",
|
||||
" j: s32 = 0",
|
||||
f" while j < {ds[1]} {{",
|
||||
f' codec.{n}_elements[i][j] = ModuleScalar("{base}", cast(s64)data.{n}[i][j])',
|
||||
f' codec.{n}_elements[i][j] = HostScalar("{base}", cast(s64)data.{n}[i][j])',
|
||||
" j += 1",
|
||||
" }",
|
||||
]
|
||||
else:
|
||||
lines += [
|
||||
f' codec.{n}_elements[i] = ModuleScalar("{base}", cast(s64)data.{n}[i])'
|
||||
f' codec.{n}_elements[i] = HostScalar("{base}", cast(s64)data.{n}[i])'
|
||||
]
|
||||
lines += [" i += 1", " }", " }"]
|
||||
elif sub == "string":
|
||||
@@ -162,7 +164,7 @@ for t in needed:
|
||||
]
|
||||
else:
|
||||
lines += [
|
||||
f' {target} = ModuleScalar("{sub}", '
|
||||
f' {target} = HostScalar("{sub}", '
|
||||
+ (
|
||||
f"ifx data.{n} then 1 else 0)"
|
||||
if sub == "bool"
|
||||
@@ -177,7 +179,10 @@ for t in needed:
|
||||
f" data: {t}",
|
||||
]
|
||||
for i, (n, sub) in enumerate(schema[t]):
|
||||
v = f"value.fields[{i}].value"
|
||||
v = "value.fields[field_at].value"
|
||||
# A field the other side lacks keeps its zero value.
|
||||
lines += [" {", f' field_at := HostFieldAt(value, {i}, "{n}")', " if field_at >= 0 {"]
|
||||
start = len(lines)
|
||||
if sub in needed:
|
||||
lines += [f" data.{n} = Decode{sub}({v})"]
|
||||
elif sub.startswith("["):
|
||||
@@ -213,23 +218,23 @@ for t in needed:
|
||||
else "bits" if sub.startswith("u") else "integer"
|
||||
)
|
||||
]
|
||||
lines[start:] = [" " + line for line in lines[start:]]
|
||||
lines += [" }", " }"]
|
||||
lines += [" return data", "}", ""]
|
||||
# Check every borrowed native value before any decoder can dereference it.
|
||||
for t in needed:
|
||||
lines += [
|
||||
f"Valid{t} :: (value: HostValue) -> bool {{",
|
||||
f' if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "{t}" ||',
|
||||
f" value.field_count != {len(schema[t])} || value.fields == null {{",
|
||||
" value.field_count > cast(usize)HOST_FIELD_LIMIT ||",
|
||||
" (value.field_count > cast(usize)0 && value.fields == null) {",
|
||||
" return false",
|
||||
" }",
|
||||
]
|
||||
for i, (n, sub) in enumerate(schema[t]):
|
||||
v = f"value.fields[{i}].value"
|
||||
lines += [
|
||||
f' if TextFromCString(value.fields[{i}].name) != "{n}" {{',
|
||||
" return false",
|
||||
" }",
|
||||
]
|
||||
v = "value.fields[field_at].value"
|
||||
lines += [" {", f' field_at := HostFieldAt(value, {i}, "{n}")', " if field_at >= 0 {"]
|
||||
start = len(lines)
|
||||
if sub in needed:
|
||||
lines += [f" if !Valid{sub}({v}) {{", " return false", " }"]
|
||||
elif sub.startswith("["):
|
||||
@@ -237,7 +242,7 @@ for t in needed:
|
||||
base = re.sub(r"\[[^]]+\]", "", sub)
|
||||
canonical = "".join(f"[{d}]" for d in ds) + base
|
||||
lines += [
|
||||
f' if !ModuleArrayValid({v}, "{canonical}", {ds[0]}) {{',
|
||||
f' if !HostArrayValid({v}, "{canonical}", {ds[0]}) {{',
|
||||
" return false",
|
||||
" }",
|
||||
" {",
|
||||
@@ -246,12 +251,12 @@ for t in needed:
|
||||
]
|
||||
if len(ds) > 1:
|
||||
lines += [
|
||||
f' if !ModuleArrayValid({v}.elements[i], "[{ds[1]}]{base}", {ds[1]}) {{',
|
||||
f' if !HostArrayValid({v}.elements[i], "[{ds[1]}]{base}", {ds[1]}) {{',
|
||||
" return false",
|
||||
" }",
|
||||
" j: s32 = 0",
|
||||
f" while j < {ds[1]} {{",
|
||||
f' if !ModuleScalarValid({v}.elements[i].elements[j], "{base}", cast(s32){scalar(base)}) {{',
|
||||
f' if !HostScalarValid({v}.elements[i].elements[j], "{base}", cast(s32){scalar(base)}) {{',
|
||||
" return false",
|
||||
" }",
|
||||
" j += 1",
|
||||
@@ -259,53 +264,20 @@ for t in needed:
|
||||
]
|
||||
else:
|
||||
lines += [
|
||||
f' if !ModuleScalarValid({v}.elements[i], "{base}", cast(s32){scalar(base)}) {{',
|
||||
f' if !HostScalarValid({v}.elements[i], "{base}", cast(s32){scalar(base)}) {{',
|
||||
" return false",
|
||||
" }",
|
||||
]
|
||||
lines += [" i += 1", " }", " }"]
|
||||
else:
|
||||
lines += [
|
||||
f' if !ModuleScalarValid({v}, "{sub}", cast(s32){scalar(sub)}) {{',
|
||||
f' if !HostScalarValid({v}, "{sub}", cast(s32){scalar(sub)}) {{',
|
||||
" return false",
|
||||
" }",
|
||||
]
|
||||
lines[start:] = [" " + line for line in lines[start:]]
|
||||
lines += [" }", " }"]
|
||||
lines += [" return true", "}", ""]
|
||||
lines += [
|
||||
"ModuleScalarValid :: (value: HostValue, type_name: string, kind: s32) -> bool {",
|
||||
" if value.kind != kind || TextFromCString(value.type_name) != type_name {",
|
||||
" return false",
|
||||
" }",
|
||||
" if kind == cast(s32)HostString {",
|
||||
" return value.length == 0 || value.data != null",
|
||||
" }",
|
||||
" return true",
|
||||
"}",
|
||||
"",
|
||||
"ModuleArrayValid :: (value: HostValue, type_name: string, count: usize) -> bool {",
|
||||
" return value.kind == cast(s32)HostArray && TextFromCString(value.type_name) == type_name &&",
|
||||
" value.length == count && value.elements != null",
|
||||
"}",
|
||||
"",
|
||||
]
|
||||
lines += [
|
||||
"ModuleScalar :: (type_name: string, number: s64) -> HostValue {",
|
||||
" value: HostValue",
|
||||
" value.type_name = type_name.data",
|
||||
" value.integer = number",
|
||||
" value.bits = cast(u64)number",
|
||||
" value.kind = ifx type_name[0] == cast(u8)117 then cast(s32)HostUnsigned else cast(s32)HostInteger",
|
||||
" return value",
|
||||
"}",
|
||||
"",
|
||||
]
|
||||
lines += [
|
||||
"ModuleTextData :: (text: string) -> *u8 {",
|
||||
" descriptor := cast(*TextDescriptor)(*text)",
|
||||
" return descriptor.data",
|
||||
"}",
|
||||
"",
|
||||
]
|
||||
source = "\n".join(lines)
|
||||
source = re.sub(r'("[^"\n]+"|data\.\w+|type_name)\.data', r"ModuleTextData(\1)", source)
|
||||
source = re.sub(r'("[^"\n]+"|data\.\w+|type_name)\.data', r"HostTextData(\1)", source)
|
||||
(root / "src/cells/value_codec.zi").write_text(source)
|
||||
@@ -6,7 +6,7 @@ import re
|
||||
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
ledger = json.loads((root / "apps/versions.json").read_text())
|
||||
names = ("inbe", "lists", "habits", "practices", "diary", "lumi")
|
||||
names = ("inbe", "lists", "habits", "practices", "diary", "lumi", "leaderboard")
|
||||
apps = ledger["apps"]
|
||||
for name in names:
|
||||
value = apps[name]
|
||||
@@ -14,14 +14,28 @@ for name in names:
|
||||
raise SystemExit(f"invalid {name} version")
|
||||
if type(value["sequence"]) is not int or not 0 < value["sequence"] <= 2147483647:
|
||||
raise SystemExit(f"invalid {name} sequence")
|
||||
for api in ("host_api", "oldest_host_api", "module_api"):
|
||||
if type(ledger.get(api)) is not int or not 0 < ledger[api] <= 65535:
|
||||
raise SystemExit(f"invalid {api}")
|
||||
# The interfaces are compiled host behavior, so they live apart from the
|
||||
# package versions and changing them triggers an app release.
|
||||
interfaces = "\n".join([
|
||||
"// Generated from apps/versions.json. This host runs packages built for host",
|
||||
"// interfaces from the oldest to the current one; module interfaces must match.",
|
||||
f"PackageHostAPI :: {ledger['host_api']}",
|
||||
f"PackageHostAPIOldest :: {ledger['oldest_host_api']}",
|
||||
f"PackageModuleAPI :: {ledger['module_api']}", ""])
|
||||
interface_path = root / "src/cells/host_api.zi"
|
||||
if not interface_path.exists() or interface_path.read_text() != interfaces:
|
||||
interface_path.write_text(interfaces)
|
||||
lines = ["// Generated from apps/versions.json; module releases are independent.",
|
||||
"PackageBundledVersion :: (index: s32) -> string {",
|
||||
" if index < 0 || index >= 6 {", " return \"\"", " }",
|
||||
" versions: [6]string = .[" + ", ".join(json.dumps(apps[n]["version"]) for n in names) + "]",
|
||||
f" if index < 0 || index >= {len(names)} {{", " return \"\"", " }",
|
||||
f" versions: [{len(names)}]string = .[" + ", ".join(json.dumps(apps[n]["version"]) for n in names) + "]",
|
||||
" return versions[index]", "}", "",
|
||||
"PackageBundledSequence :: (index: s32) -> s32 {",
|
||||
" if index < 0 || index >= 6 {", " return 0", " }",
|
||||
" sequences: [6]s32 = .[" + ", ".join(str(apps[n]["sequence"] if apps[n]["bundled"] else 0) for n in names) + "]",
|
||||
f" if index < 0 || index >= {len(names)} {{", " return 0", " }",
|
||||
f" sequences: [{len(names)}]s32 = .[" + ", ".join(str(apps[n]["sequence"] if apps[n]["bundled"] else 0) for n in names) + "]",
|
||||
" return sequences[index]", "}", ""]
|
||||
path = root / "src/cells/versions.zi"
|
||||
content = "\n".join(lines)
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate bounded typed values for the standard hosted Kryon widget ABI."""
|
||||
from pathlib import Path
|
||||
import re
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
modules = ['session', 'geometry', 'drawing_props', 'text_props', 'image_props',
|
||||
'button_props', 'control_props', 'text_input', 'text_input_props',
|
||||
'scroll', 'scroll_props', 'semantic', 'text_align', 'checkbox_props', 'toggle_props',
|
||||
'tab_bar_props', 'box_props']
|
||||
schema = {}
|
||||
for path in [*(root / 'build/packages/kryon/src/ui' / (m + '.zi') for m in modules),
|
||||
root / 'src/cells/diary_ui_types.zi', root / 'src/cells/inbe_ui_types.zi',
|
||||
root / 'src/cells/lists_ui_types.zi', root / 'src/cells/lumi_ui_types.zi', root / 'src/cells/lumi_types.zi']:
|
||||
for name, body in re.findall(r'(\w+)\s*::\s*struct\s*\{([^{}]*)\}', path.read_text()):
|
||||
schema[name] = [(n, re.sub(r'\s+', '', t.split('//')[0])) for n, t in
|
||||
re.findall(r'^\s*(\w+)\s*:\s*([^\n;]+)', body, re.M)]
|
||||
roots = ['TextProps','ImageProps','ButtonProps','TextAreaProps','TextAreaResult',
|
||||
'ScrollProps','ScrollResult','DiaryUiFrame','Session','InbeUiFrame',
|
||||
'CheckboxProps','CheckboxValueResult','ToggleProps','ToggleValueResult',
|
||||
'TextFieldProps','TextFieldResult','Tab','TabBarProps','TabBarResult',
|
||||
'BoxProps','ListsUiFrame','ListsUiRow','LumiUiFrame','LumiChatRow','LumiTask','LumiAction','LumiTools','LumiDonation']
|
||||
needed = []
|
||||
def discover(t):
|
||||
if t.startswith('[]'): discover(t[2:]); return
|
||||
if t in schema and t not in needed:
|
||||
for _, s in schema[t]: discover(s)
|
||||
needed.append(t)
|
||||
for t in roots: discover(t)
|
||||
lines = ['// Generated by scripts/generate-widget-codecs.py; bounded public widget values.',
|
||||
'#import "bundle_host"', '#import "byte_text_linux"',
|
||||
'#import, file "value_codec.zi";', '#import, file "diary_ui_types.zi";', '#import, file "inbe_ui_types.zi";',
|
||||
'#import, file "lists_ui_types.zi";', '#import, file "lumi_ui_types.zi";', '#import, file "lumi_types.zi";',
|
||||
*(f'#import "{m}"' for m in modules), 'using HostValueKind;', '']
|
||||
def scalar(t):
|
||||
return 'HostString' if t == 'string' else 'HostReal' if t.startswith('float') else 'HostUnsigned' if t.startswith('u') else 'HostInteger'
|
||||
for t in needed:
|
||||
lines += [f'Widget{t}Codec :: struct {{', f' fields: [{len(schema[t])}]HostField']
|
||||
for n,s in schema[t]:
|
||||
if s in needed: lines += [f' {n}: Widget{s}Codec']
|
||||
if s.startswith('[]'):
|
||||
b=s[2:]
|
||||
lines += [f' {n}_values: [1024]HostValue', f' {n}_codecs: [1024]Widget{b}Codec', f' {n}_decoded: [1024]{b}']
|
||||
lines += ['}', '', f'WidgetEncode{t} :: (data: {t}, codec: *Widget{t}Codec) -> HostValue {{',
|
||||
' value: HostValue', ' value.kind = cast(s32)HostRecord',
|
||||
f' value.type_name = ModuleTextData("{t}")',
|
||||
' value.fields = *codec.fields[0]', f' value.field_count = {len(schema[t])}']
|
||||
for i,(n,s) in enumerate(schema[t]):
|
||||
v=f'codec.fields[{i}].value'; lines += [f' codec.fields[{i}].name = ModuleTextData("{n}")']
|
||||
if s in needed: lines += [f' {v} = WidgetEncode{s}(data.{n}, *codec.{n})']
|
||||
elif s.startswith('[]'):
|
||||
b=s[2:]
|
||||
lines += [f' {v}.kind = cast(s32)HostSlice', f' {v}.type_name = ModuleTextData("{s}")',
|
||||
f' {v}.length = cast(usize)data.{n}.count', f' if {v}.length > cast(usize)1024 {{ {v}.length = cast(usize)1024 }}',
|
||||
f' {v}.elements = *codec.{n}_values[0]', ' {', ' index: usize = 0',
|
||||
f' while index < {v}.length {{', f' codec.{n}_values[index] = WidgetEncode{b}(data.{n}[index], *codec.{n}_codecs[index])',
|
||||
' index += cast(usize)1', ' }', ' }']
|
||||
elif s=='string': lines += [f' {v} = HostValue.{{.kind = cast(s32)HostString, .type_name = ModuleTextData("string"), .data = ModuleTextData(data.{n}), .length = cast(usize)data.{n}.count}}']
|
||||
elif s.startswith('float'): lines += [f' {v} = HostValue.{{.kind = cast(s32)HostReal, .type_name = ModuleTextData("{s}"), .real = cast(float64)data.{n}}}']
|
||||
else: lines += [f' {v} = ModuleScalar("{s}", ' + (f'ifx data.{n} then 1 else 0)' if s=='bool' else f'cast(s64)data.{n})')]
|
||||
lines += [' return value', '}', '', f'WidgetDecode{t} :: (value: HostValue, codec: *Widget{t}Codec) -> {t} {{', f' data: {t}']
|
||||
for i,(n,s) in enumerate(schema[t]):
|
||||
v=f'value.fields[{i}].value'
|
||||
if s in needed: lines += [f' data.{n} = WidgetDecode{s}({v}, *codec.{n})']
|
||||
elif s.startswith('[]'):
|
||||
b=s[2:]
|
||||
lines += [' {', ' index: usize = 0', f' while index < {v}.length {{',
|
||||
f' codec.{n}_decoded[index] = WidgetDecode{b}({v}.elements[index], *codec.{n}_codecs[index])',
|
||||
' index += cast(usize)1', ' }', ' }',
|
||||
f' // Slice storage is attached by the rendering effect after decoding.']
|
||||
elif s=='string': lines += [f' data.{n} = TextFromBytes(BytesFromPointer({v}.data, cast(u64){v}.length))']
|
||||
elif s=='bool': lines += [f' data.{n} = {v}.integer != 0']
|
||||
else: lines += [f' data.{n} = cast({s}){v}.' + ('real' if s.startswith('float') else 'bits' if s.startswith('u') else 'integer')]
|
||||
lines += [' return data', '}', '', f'WidgetValid{t} :: (value: HostValue) -> bool {{',
|
||||
f' if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "{t}" ||',
|
||||
f' value.field_count != {len(schema[t])} || value.fields == null {{ return false }}']
|
||||
for i,(n,s) in enumerate(schema[t]):
|
||||
v=f'value.fields[{i}].value'
|
||||
lines += [f' if TextFromCString(value.fields[{i}].name) != "{n}" {{ return false }}']
|
||||
if s in needed: lines += [f' if !WidgetValid{s}({v}) {{ return false }}']
|
||||
elif s.startswith('[]'):
|
||||
b=s[2:]; lines += [f' if {v}.kind != cast(s32)HostSlice || TextFromCString({v}.type_name) != "{s}" ||',
|
||||
f' {v}.length > cast(usize)1024 || ({v}.length > cast(usize)0 && {v}.elements == null) {{ return false }}',
|
||||
' {', ' index: usize = 0', f' while index < {v}.length {{',
|
||||
f' if !WidgetValid{b}({v}.elements[index]) {{ return false }}',
|
||||
' index += cast(usize)1', ' }', ' }']
|
||||
else: lines += [f' if !ModuleScalarValid({v}, "{s}", cast(s32){scalar(s)}) {{ return false }}']
|
||||
lines += [' return true', '}', '']
|
||||
(root / 'src/cells/widget_codec.zi').write_text('\n'.join(lines))
|
||||
@@ -18,7 +18,8 @@ from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
NAMES = {"inbe": "Inner Breeze", "habits": "Habits", "practices": "Practices",
|
||||
"lists": "Lists", "diary": "Diary", "lumi": "Lumi"}
|
||||
"lists": "Lists", "diary": "Diary", "lumi": "Lumi",
|
||||
"leaderboard": "Leaderboard"}
|
||||
# Declaration order is part of Daochi's Go JSON signature contract.
|
||||
FIELDS = ("manifest_version", "app_id", "display_name", "description",
|
||||
"homepage_url", "source_url", "status", "expires_at", "lan_only",
|
||||
@@ -116,7 +117,7 @@ def registrations(origin, key_path, approval_path, key_id, output, open_url=urlo
|
||||
pin = next((pin for pin in pins if pin["key_id"] == key_id and pin["public_key"] == public), None)
|
||||
versions = json.loads((ROOT / "apps/versions.json").read_text())
|
||||
if pin is None or not {app["id"] for app in versions["apps"].values()} <= set(pin["app_ids"]):
|
||||
raise ValueError("publisher must match the shipped pin for the root and all five cells")
|
||||
raise ValueError("publisher must match the shipped pin for the root and every cell")
|
||||
prepared = {}
|
||||
for name, component in versions["apps"].items():
|
||||
try:
|
||||
|
||||
+60
-15
@@ -3,6 +3,7 @@
|
||||
import argparse
|
||||
from contextlib import ExitStack
|
||||
import fcntl
|
||||
import io
|
||||
from hashlib import sha256
|
||||
import json
|
||||
import os
|
||||
@@ -11,6 +12,7 @@ import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
import sys
|
||||
from urllib.parse import urlsplit
|
||||
from urllib.request import Request, urlopen
|
||||
@@ -19,7 +21,7 @@ from cryptography.hazmat.primitives import serialization
|
||||
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey, Ed25519PublicKey
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
NAMES = ("habits", "practices", "lumi", "lists", "diary", "inbe")
|
||||
NAMES = ("habits", "practices", "lumi", "lists", "diary", "leaderboard", "inbe")
|
||||
IDENTIFIER = re.compile(r"[a-z0-9][a-z0-9_.-]{0,62}\Z")
|
||||
VERSION = re.compile(r"(?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8})\Z")
|
||||
|
||||
@@ -83,7 +85,7 @@ def stage(store, key_path, key_id, publishers_path=None):
|
||||
artifact = dict(variant="module", sha256=sha256(data).hexdigest(), size=len(data))
|
||||
dependencies = []
|
||||
if name == "inbe":
|
||||
for child in ("habits", "practices", "lumi", "lists", "diary"):
|
||||
for child in (name for name in NAMES if name != "inbe"):
|
||||
release = releases[child]
|
||||
nested = payloads[child]
|
||||
if data.count(nested) != 1:
|
||||
@@ -91,7 +93,7 @@ def stage(store, key_path, key_id, publishers_path=None):
|
||||
dependencies.append(dict(app_id=release["app_id"], version=release["version"],
|
||||
sha256=release["artifacts"][0]["sha256"], size=len(nested)))
|
||||
value = dict(app_id=component["id"], sequence=sequence, version=component["version"],
|
||||
runtime="kryon-app-v1", host_api=versions["host_api"],
|
||||
runtime="kryon-app-v1", host_api=component.get("host_api", versions["host_api"]),
|
||||
module_api=versions["module_api"], data_schema=0, key_id=key_id,
|
||||
artifacts=[artifact], dependencies=sorted(dependencies, key=lambda d: d["app_id"]))
|
||||
value["signature"] = key.sign(signing_message(value)).hex()
|
||||
@@ -141,7 +143,14 @@ def stage(store, key_path, key_id, publishers_path=None):
|
||||
return releases
|
||||
|
||||
|
||||
def publish(store, target, remote_store):
|
||||
def rollout_value(percent, hours):
|
||||
"""A staged release reaches buckets below percent, then everyone after hours."""
|
||||
if type(percent) is not int or not 1 <= percent <= 100 or type(hours) is not int or not 0 < hours <= 720:
|
||||
raise ValueError("rollout needs a share from 1 to 100 percent and 1 to 720 hours")
|
||||
return dict(percent=percent, hours=hours)
|
||||
|
||||
|
||||
def publish(store, target, remote_store, rollout=None):
|
||||
if not re.fullmatch(r"[a-zA-Z0-9_.@-]+", target) or target.startswith("-"):
|
||||
raise ValueError("invalid SSH target")
|
||||
if not remote_store.startswith("/") or "\n" in remote_store:
|
||||
@@ -162,6 +171,11 @@ def publish(store, target, remote_store):
|
||||
f"release-{value['sequence']}.json"):
|
||||
path = directory / filename
|
||||
tar.add(path, arcname=str(path.relative_to(store)), recursive=False)
|
||||
if rollout is not None:
|
||||
encoded = json.dumps(rollout_value(rollout["percent"], rollout["hours"])).encode()
|
||||
member = tarfile.TarInfo("rollout.json")
|
||||
member.size = len(encoded)
|
||||
tar.addfile(member, io.BytesIO(encoded))
|
||||
options = ["-o", "BatchMode=yes", "-o", "StrictHostKeyChecking=yes"]
|
||||
if os.environ.get("INBE_SSH_IDENTITY"):
|
||||
options += ["-i", os.environ["INBE_SSH_IDENTITY"]]
|
||||
@@ -189,7 +203,8 @@ def verify_origin(store, origin, open_url=open_public_url):
|
||||
app_id = "inbe" if name == "inbe" else "inbe." + name
|
||||
expected = json.loads((store / app_id / "latest-v2.json").read_bytes())
|
||||
route = origin + "/api/v2/packages/" + app_id
|
||||
with open_url(route + "/latest", timeout=30) as response:
|
||||
# Bucket 0 receives a staged release first.
|
||||
with open_url(route + "/latest?bucket=0", timeout=30) as response:
|
||||
encoded = response.read(65537)
|
||||
if len(encoded) > 65536 or json.loads(encoded) != expected:
|
||||
raise ValueError(f"{app_id}: public release metadata differs from the signed publication")
|
||||
@@ -210,7 +225,7 @@ def verify_origin(store, origin, open_url=open_public_url):
|
||||
checksum.update(block)
|
||||
if size != artifact["size"] or checksum.hexdigest() != digest:
|
||||
raise ValueError(f"{app_id}: public package hash or size differs from the signed publication")
|
||||
print("Verified public signed metadata and package bytes for the root and all five cells")
|
||||
print("Verified public signed metadata and package bytes for the root and all six cells")
|
||||
|
||||
|
||||
def validate_release(value, app_id, publishers):
|
||||
@@ -235,6 +250,10 @@ def validate_release(value, app_id, publishers):
|
||||
raise ValueError("invalid module artifact")
|
||||
dependencies = value["dependencies"]
|
||||
expected = sorted("inbe." + name for name in NAMES if name != "inbe") if app_id == "inbe" else []
|
||||
# Roots built before Leaderboard became an app have no dependency on it.
|
||||
if app_id == "inbe" and isinstance(dependencies, list) and \
|
||||
len(dependencies) == len(expected) - 1:
|
||||
expected.remove("inbe.leaderboard")
|
||||
if not isinstance(dependencies, list) or len(dependencies) != len(expected):
|
||||
raise ValueError("invalid root dependencies")
|
||||
for dependency, expected_id in zip(dependencies, expected):
|
||||
@@ -261,23 +280,36 @@ def import_archive(archive, store, publishers_path=None):
|
||||
"""Node-side merge. Daochi still checks registry/key status on every GET."""
|
||||
import tarfile
|
||||
publishers = json.loads((publishers_path or ROOT / "apps/publishers.json").read_text())
|
||||
ids = {"inbe", "inbe.habits", "inbe.practices", "inbe.lists", "inbe.diary", "inbe.lumi"}
|
||||
ids = {"inbe", "inbe.habits", "inbe.practices", "inbe.lists", "inbe.diary", "inbe.lumi",
|
||||
"inbe.leaderboard"}
|
||||
entries = {}
|
||||
total = 0
|
||||
rollout = None
|
||||
with tarfile.open(archive) as tar:
|
||||
for member in tar.getmembers():
|
||||
if member.name == "rollout.json" and member.isfile() and member.size <= 1024 and rollout is None:
|
||||
rollout = json.loads(tar.extractfile(member).read())
|
||||
if not isinstance(rollout, dict) or set(rollout) != {"percent", "hours"}:
|
||||
raise ValueError("invalid rollout")
|
||||
rollout = rollout_value(rollout["percent"], rollout["hours"])
|
||||
continue
|
||||
parts = Path(member.name).parts
|
||||
if len(parts) != 2 or parts[0] not in ids or not member.isfile() or member.size > 64 * 1024 * 1024:
|
||||
raise ValueError("invalid archive member")
|
||||
if member.name in entries:
|
||||
raise ValueError("duplicate archive member")
|
||||
total += member.size
|
||||
if len(entries) >= 24 or total > 6 * 64 * 1024 * 1024 + 1024 * 1024:
|
||||
if len(entries) >= 28 or total > 7 * 64 * 1024 * 1024 + 1024 * 1024:
|
||||
raise ValueError("archive exceeds the release size limit")
|
||||
entries[member.name] = tar.extractfile(member).read()
|
||||
# The node accepts archives built before and after Leaderboard became an
|
||||
# app, so the importer and the app can be updated in either order.
|
||||
present = {name.split("/")[0] for name in entries}
|
||||
if present != ids and present != ids - {"inbe.leaderboard"}:
|
||||
raise ValueError("archive must contain the root and every cell")
|
||||
with ExitStack() as stack:
|
||||
releases = {}
|
||||
for app_id in sorted(ids):
|
||||
for app_id in sorted(present):
|
||||
directory = store / app_id
|
||||
directory.mkdir(parents=True, exist_ok=True, mode=0o700)
|
||||
lock = stack.enter_context((directory / ".publish.lock").open("a+b"))
|
||||
@@ -294,6 +326,7 @@ def import_archive(archive, store, publishers_path=None):
|
||||
if not data.startswith(b"ZIB\0"):
|
||||
raise ValueError("payload is not a ZIB bundle")
|
||||
current = directory / "latest-v2.json"
|
||||
old = None
|
||||
if current.exists():
|
||||
old = json.loads(current.read_bytes())
|
||||
if old != value and (old["sequence"] >= value["sequence"] or
|
||||
@@ -303,17 +336,17 @@ def import_archive(archive, store, publishers_path=None):
|
||||
archived = directory / f"release-{value['sequence']}.json"
|
||||
if archived.exists() and archived.read_bytes() != encoded:
|
||||
raise ValueError("release sequence is already occupied")
|
||||
releases[app_id] = (value, encoded, data)
|
||||
releases[app_id] = (value, encoded, data, old != value)
|
||||
root = releases["inbe"]
|
||||
for dependency in root[0]["dependencies"]:
|
||||
child, _, payload = releases[dependency["app_id"]]
|
||||
child, _, payload, _ = releases[dependency["app_id"]]
|
||||
artifact = child["artifacts"][0]
|
||||
if dependency != dict(app_id=child["app_id"], version=child["version"],
|
||||
sha256=artifact["sha256"], size=artifact["size"]) or root[2].count(payload) != 1:
|
||||
raise ValueError("root does not contain its exact signed cell dependency")
|
||||
# Dependencies go first. Publishing the root is the final step.
|
||||
for app_id in sorted(ids, key=lambda value: value == "inbe"):
|
||||
value, encoded, data = releases[app_id]
|
||||
for app_id in sorted(present, key=lambda value: value == "inbe"):
|
||||
value, encoded, data, changed = releases[app_id]
|
||||
directory = store / app_id
|
||||
payload = directory / (value["artifacts"][0]["sha256"] + ".zib")
|
||||
archived = directory / f"release-{value['sequence']}.json"
|
||||
@@ -323,6 +356,15 @@ def import_archive(archive, store, publishers_path=None):
|
||||
atomic_write(payload.with_name(payload.name + ".release-v2.json"), encoded)
|
||||
atomic_write(archived, encoded)
|
||||
atomic_write(directory / "latest-v2.json", encoded)
|
||||
# Daochi holds a staged release back from the other buckets until
|
||||
# it expires. A new full release or a full rollout ends staging.
|
||||
staged = directory / "rollout.json"
|
||||
if rollout is not None and rollout["percent"] < 100 and changed:
|
||||
until = int(time.time()) + rollout["hours"] * 3600
|
||||
atomic_write(staged, json.dumps(dict(sequence=value["sequence"], percent=rollout["percent"],
|
||||
until=until)).encode())
|
||||
elif changed or (rollout is not None and rollout["percent"] == 100):
|
||||
staged.unlink(missing_ok=True)
|
||||
archive.unlink()
|
||||
archive.parent.rmdir()
|
||||
|
||||
@@ -332,7 +374,7 @@ def receive_archive(store, publishers_path):
|
||||
raise ValueError("upload key permits only publication to its configured package store")
|
||||
with tempfile.TemporaryDirectory(prefix="inbe-receive-") as directory:
|
||||
archive = Path(directory) / "packages.tar"
|
||||
maximum = 5 * 64 * 1024 * 1024 + 1024 * 1024
|
||||
maximum = 7 * 64 * 1024 * 1024 + 1024 * 1024
|
||||
total = 0
|
||||
with archive.open("wb") as output:
|
||||
while True:
|
||||
@@ -357,6 +399,8 @@ def main():
|
||||
parser.add_argument("--import-archive", type=Path)
|
||||
parser.add_argument("--receive-archive", action="store_true")
|
||||
parser.add_argument("--publishers", type=Path, help="node-owned public publisher pins")
|
||||
parser.add_argument("--rollout", type=int, help="publish changed releases to this share of devices first")
|
||||
parser.add_argument("--rollout-hours", type=int, default=24, help="then to every device after these hours")
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
if args.receive_archive:
|
||||
@@ -372,7 +416,8 @@ def main():
|
||||
if args.ssh_target:
|
||||
if not args.remote_store:
|
||||
parser.error("--remote-store is required with --ssh-target")
|
||||
publish(args.store, args.ssh_target, args.remote_store)
|
||||
rollout = None if args.rollout is None else rollout_value(args.rollout, args.rollout_hours)
|
||||
publish(args.store, args.ssh_target, args.remote_store, rollout)
|
||||
if args.verify_origin:
|
||||
verify_origin(args.store, args.verify_origin)
|
||||
print("Inbe package releases published" if args.ssh_target or args.import_archive or args.receive_archive else "Inbe package releases staged")
|
||||
|
||||
@@ -86,6 +86,7 @@ link kss kss
|
||||
link oqs oqs
|
||||
link raylib raylib
|
||||
link game2d game2d
|
||||
link qrcode qrcode
|
||||
link daochi-client daochi_client
|
||||
link sqlite sqlite
|
||||
link curl curl
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check an exact Inner Breeze APK on the development Moto before release.
|
||||
|
||||
The APK is installed over the existing app, launched, and the Wim Hof session
|
||||
is started through the app's own start-practice intent. SurfaceFlinger's frame
|
||||
timestamps for the app's window are collected for the whole session, then the
|
||||
app is sent to the background and resumed. With --record the result is written
|
||||
to releases/phone-checks/VERSION.json for the release workflow, which publishes
|
||||
a new version only with a passing check of its exact source commit.
|
||||
"""
|
||||
import argparse
|
||||
from datetime import datetime, timezone
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
ACTIVITY = "xyz.waozi.inbe.MainActivity"
|
||||
START_PRACTICE = "xyz.waozi.inbe.action.START_PRACTICE"
|
||||
WIM_HOF = 0
|
||||
# Paths whose changes alter the APK. The release gate allows only other
|
||||
# changes between the checked commit and the released one.
|
||||
SOURCE_PATHS = ("src", "droid", "apps", "assets", "locales", "themes", "fonts",
|
||||
"Makefile", "ziran.toml", "ziran.lock", "CHANGELOG.md", "scripts", "packaging")
|
||||
# The breathing circle animates for the whole measured window, so the app
|
||||
# must keep the display's refresh rate with only occasional late frames.
|
||||
MINIMUM_REFRESH_SHARE = 0.94
|
||||
MAXIMUM_LATE_PERCENT = 3.0
|
||||
MAXIMUM_FRAME_MS = 250.0
|
||||
PENDING = 9223372036854775807
|
||||
|
||||
|
||||
def run(argv, *, timeout=60, **kwargs):
|
||||
return subprocess.run(list(map(str, argv)), check=True, capture_output=True,
|
||||
timeout=timeout, **kwargs).stdout
|
||||
|
||||
|
||||
class Phone:
|
||||
def __init__(self, host, serial):
|
||||
if not re.fullmatch(r"[A-Za-z0-9_.@-]+", host) or host.startswith("-"):
|
||||
raise ValueError("invalid ADB host")
|
||||
if not re.fullmatch(r"[A-Za-z0-9]+", serial):
|
||||
raise ValueError("invalid phone serial")
|
||||
self.host = host
|
||||
self.serial = serial
|
||||
|
||||
def remote(self, *argv, timeout=60, **kwargs):
|
||||
if self.host == "local":
|
||||
return run(argv, timeout=timeout, **kwargs)
|
||||
return run(["ssh", "-o", "BatchMode=yes", "-o", "ConnectTimeout=8", self.host,
|
||||
shlex.join(list(map(str, argv)))], timeout=timeout, **kwargs)
|
||||
|
||||
def adb(self, *argv, **kwargs):
|
||||
return self.remote("adb", "-s", self.serial, *argv, **kwargs)
|
||||
|
||||
def shell(self, *argv, **kwargs):
|
||||
return self.adb("shell", *argv, **kwargs).decode(errors="replace")
|
||||
|
||||
def focused(self, package):
|
||||
# Launcher aliases name the window too, so any activity of the app counts.
|
||||
windows = self.shell("dumpsys", "window", "windows")
|
||||
line = next((line for line in windows.splitlines() if "mCurrentFocus=" in line), "")
|
||||
if f" {package}/" not in line:
|
||||
raise ValueError("Inner Breeze does not own the foreground window: " + line.strip())
|
||||
|
||||
def screenshot(self, package, path):
|
||||
from PIL import Image, ImageStat
|
||||
|
||||
self.focused(package)
|
||||
data = self.adb("exec-out", "screencap", "-p")
|
||||
with Image.open(io.BytesIO(data)) as image:
|
||||
body = image.convert("RGB").crop((0, image.height // 10, image.width, image.height * 9 // 10))
|
||||
if max(ImageStat.Stat(body).stddev) < 2:
|
||||
raise ValueError(f"Inner Breeze rendered a blank screen ({path.name})")
|
||||
path.write_bytes(data)
|
||||
|
||||
def start(self, package, *extra):
|
||||
output = self.shell("am", "start", "-W", "-n", f"{package}/{ACTIVITY}", *extra)
|
||||
if "Status: ok" not in output and "Warning: Activity not started" not in output:
|
||||
raise ValueError("Inner Breeze did not start: " + output.strip())
|
||||
|
||||
def pid(self, package):
|
||||
return self.shell("pidof", package).strip()
|
||||
|
||||
|
||||
def apk_identity(apk):
|
||||
tools = sorted((Path(os.environ.get("ANDROID_SDK_ROOT") or os.environ.get("ANDROID_HOME") or
|
||||
Path.home() / "Android/Sdk") / "build-tools").glob("*/aapt2"))
|
||||
if not tools:
|
||||
raise ValueError("aapt2 not found; set ANDROID_SDK_ROOT")
|
||||
badging = run([tools[-1], "dump", "badging", apk]).decode()
|
||||
match = re.search(r"package: name='([^']+)' versionCode='(\d+)' versionName='([^']+)'", badging)
|
||||
if not match:
|
||||
raise ValueError("the APK has no package identity")
|
||||
return dict(package=match[1], version_code=int(match[2]), version_name=match[3])
|
||||
|
||||
|
||||
def source_state():
|
||||
commit = run(["git", "-C", ROOT, "rev-parse", "HEAD"]).decode().strip()
|
||||
dirty = run(["git", "-C", ROOT, "status", "--porcelain", "--", *SOURCE_PATHS]).decode().strip()
|
||||
version = run([sys.executable, ROOT / "scripts/check-version.py", "--print-version"]).decode().strip()
|
||||
return commit, dirty, version
|
||||
|
||||
|
||||
def layout_shift(before, after):
|
||||
"""Mean pixel difference of the practice header, which does not animate."""
|
||||
from PIL import Image, ImageChops, ImageStat
|
||||
|
||||
with Image.open(before) as first, Image.open(after) as second:
|
||||
if first.size != second.size:
|
||||
return 255.0
|
||||
width, height = first.size
|
||||
box = (0, height * 4 // 100, width, height * 12 // 100)
|
||||
difference = ImageChops.difference(first.convert("RGB").crop(box), second.convert("RGB").crop(box))
|
||||
return round(sum(ImageStat.Stat(difference).mean) / 3, 1)
|
||||
|
||||
|
||||
def frame_timing(phone, package, seconds):
|
||||
"""Collect every presented frame of the app's window for the session."""
|
||||
# Android 9 names layers "<id> package/activity#N"; tokens are not layers.
|
||||
layers = [line.strip() for line in phone.shell("dumpsys", "SurfaceFlinger", "--list").splitlines()
|
||||
if f" {package}/" in " " + line.strip() and "Token{" not in line]
|
||||
if not layers:
|
||||
raise ValueError("Inner Breeze has no window layer")
|
||||
presented = {}
|
||||
period = 0
|
||||
deadline = time.monotonic() + seconds
|
||||
for layer in layers:
|
||||
phone.shell("dumpsys", "SurfaceFlinger", "--latency-clear", shlex.quote(layer))
|
||||
while time.monotonic() < deadline:
|
||||
for layer in layers:
|
||||
lines = phone.shell("dumpsys", "SurfaceFlinger", "--latency", shlex.quote(layer)).split("\n")
|
||||
if lines and lines[0].strip().isdigit():
|
||||
period = int(lines[0])
|
||||
for line in lines[1:]:
|
||||
fields = line.split()
|
||||
if len(fields) == 3 and fields[1].isdigit():
|
||||
actual = int(fields[1])
|
||||
if 0 < actual < PENDING:
|
||||
presented.setdefault(layer, set()).add(actual)
|
||||
time.sleep(0.5)
|
||||
if not presented or period <= 0:
|
||||
raise ValueError("SurfaceFlinger reported no frames for Inner Breeze")
|
||||
frames = sorted(max(presented.values(), key=len))
|
||||
if len(frames) < 2:
|
||||
raise ValueError("Inner Breeze presented fewer than two frames")
|
||||
gaps = [(right - left) / 1e6 for left, right in zip(frames, frames[1:])]
|
||||
period_ms = period / 1e6
|
||||
late = sum(1 for gap in gaps if gap > period_ms * 1.5)
|
||||
ordered = sorted(gaps)
|
||||
return dict(seconds=round((frames[-1] - frames[0]) / 1e9, 2), frames=len(frames),
|
||||
refresh_hz=round(1000 / period_ms, 1),
|
||||
fps=round((len(frames) - 1) / ((frames[-1] - frames[0]) / 1e9), 1),
|
||||
late_percent=round(100 * late / len(gaps), 2),
|
||||
p95_frame_ms=round(ordered[int(len(ordered) * 0.95) - 1], 1),
|
||||
worst_frame_ms=round(ordered[-1], 1))
|
||||
|
||||
|
||||
def smooth(timing):
|
||||
return (timing["refresh_hz"] >= 30 and timing["fps"] >= timing["refresh_hz"] * MINIMUM_REFRESH_SHARE and
|
||||
timing["late_percent"] <= MAXIMUM_LATE_PERCENT and
|
||||
timing["worst_frame_ms"] <= MAXIMUM_FRAME_MS)
|
||||
|
||||
|
||||
def check(phone, apk, seconds, evidence):
|
||||
identity = apk_identity(apk)
|
||||
package = identity["package"]
|
||||
if phone.adb("get-state").decode().strip() != "device":
|
||||
raise ValueError("the phone is not connected and authorized")
|
||||
transfer = ""
|
||||
try:
|
||||
if phone.host != "local":
|
||||
transfer = phone.remote("mktemp", "-d", "/tmp/inbe-phone-check-XXXXXXXX").decode().strip()
|
||||
if not re.fullmatch(r"/tmp/inbe-phone-check-[A-Za-z0-9]+", transfer):
|
||||
raise ValueError("unsafe transfer folder on the ADB host")
|
||||
remote = transfer + "/inbe.apk"
|
||||
phone.remote("sh", "-c", "umask 077; cat > " + shlex.quote(remote), input=apk.read_bytes(),
|
||||
timeout=300)
|
||||
else:
|
||||
remote = apk
|
||||
if "Success" not in phone.adb("install", "-r", remote, timeout=300).decode():
|
||||
raise ValueError("the phone rejected the APK; its existing app and data were kept")
|
||||
finally:
|
||||
if transfer:
|
||||
phone.remote("rm", "-rf", transfer)
|
||||
phone.shell("input", "keyevent", "KEYCODE_WAKEUP")
|
||||
phone.shell("wm", "dismiss-keyguard")
|
||||
phone.shell("am", "force-stop", package)
|
||||
phone.start(package)
|
||||
time.sleep(4)
|
||||
pid = phone.pid(package)
|
||||
if not pid:
|
||||
raise ValueError("Inner Breeze did not stay running after launch")
|
||||
phone.screenshot(package, evidence / "launch.png")
|
||||
phone.start(package, "-a", START_PRACTICE, "--ei", "practice_id", str(WIM_HOF))
|
||||
time.sleep(3)
|
||||
phone.screenshot(package, evidence / "practice-start.png")
|
||||
timing = frame_timing(phone, package, seconds)
|
||||
phone.screenshot(package, evidence / "practice-end.png")
|
||||
if phone.pid(package) != pid:
|
||||
raise ValueError("Inner Breeze restarted during the practice")
|
||||
phone.shell("input", "keyevent", "KEYCODE_HOME")
|
||||
time.sleep(2)
|
||||
phone.start(package)
|
||||
time.sleep(2)
|
||||
if phone.pid(package) != pid:
|
||||
raise ValueError("Inner Breeze restarted when it returned from the background")
|
||||
phone.screenshot(package, evidence / "resume.png")
|
||||
# Leaving during a practice may pass through the floating window; the
|
||||
# practice must come back with the layout it had.
|
||||
timing["resume_layout_shift"] = layout_shift(evidence / "practice-end.png", evidence / "resume.png")
|
||||
model = phone.shell("getprop", "ro.product.model").strip()
|
||||
android = phone.shell("getprop", "ro.build.version.release").strip()
|
||||
return identity, timing, dict(model=model, android=android)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("apk", type=Path)
|
||||
parser.add_argument("--host", default=os.environ.get("INBE_PHONE_HOST", "auto"),
|
||||
help="SSH host that runs adb, 'local', or 'auto' (this machine, then the ThinkPad)")
|
||||
parser.add_argument("--serial", default=os.environ.get("INBE_PHONE_SERIAL", "ZE2223BQZT"))
|
||||
parser.add_argument("--seconds", type=int, default=60)
|
||||
parser.add_argument("--record", action="store_true",
|
||||
help="write releases/phone-checks/VERSION.json for the release gate")
|
||||
args = parser.parse_args()
|
||||
for name in ("DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"):
|
||||
os.environ.pop(name, None)
|
||||
apk = args.apk.resolve(strict=True)
|
||||
commit, dirty, version = source_state()
|
||||
if args.record and (dirty or args.seconds < 60):
|
||||
parser.error("a recorded check needs a full minute and committed sources:\n" + dirty)
|
||||
stamp = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
|
||||
evidence = ROOT / "backup/phone-checks" / f"{version}-{stamp}"
|
||||
evidence.mkdir(parents=True, exist_ok=True)
|
||||
host = args.host
|
||||
if host == "auto":
|
||||
attached = subprocess.run(["adb", "devices"], capture_output=True, text=True).stdout
|
||||
host = "local" if re.search(rf"^{re.escape(args.serial)}\s+device$", attached, re.M) else "[email protected]"
|
||||
identity, timing, device = check(Phone(host, args.serial), apk, args.seconds, evidence)
|
||||
if identity["version_name"] != version:
|
||||
raise SystemExit(f"the APK is {identity['version_name']}, but the source is {version}")
|
||||
passed = smooth(timing)
|
||||
receipt = dict(schema=1, version=version, source_commit=commit,
|
||||
apk=dict(sha256=hashlib.sha256(apk.read_bytes()).hexdigest(), **identity),
|
||||
device=device, practice=dict(name="Wim Hof", **timing),
|
||||
limits=dict(minimum_refresh_share=MINIMUM_REFRESH_SHARE, maximum_late_percent=MAXIMUM_LATE_PERCENT,
|
||||
maximum_frame_ms=MAXIMUM_FRAME_MS),
|
||||
checks=["installed over the existing app", "launch", "Wim Hof frame timing",
|
||||
"background and resume"],
|
||||
passed=passed, checked_at=datetime.now(timezone.utc).isoformat(timespec="seconds"))
|
||||
(evidence / "receipt.json").write_text(json.dumps(receipt, indent=2) + "\n")
|
||||
if args.record:
|
||||
target = ROOT / "releases/phone-checks" / f"{version}.json"
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_text(json.dumps(receipt, indent=2) + "\n")
|
||||
print(f"Recorded {target.relative_to(ROOT)}; commit it with the release.")
|
||||
if timing["resume_layout_shift"] > 2:
|
||||
print(f"WARNING: the practice layout changed after resuming (difference {timing['resume_layout_shift']}); "
|
||||
f"compare practice-end.png and resume.png in {evidence.relative_to(ROOT)}")
|
||||
print(f"{device['model']} (Android {device['android']}): {timing['fps']} fps over {timing['seconds']} s, "
|
||||
f"{timing['late_percent']}% late frames, worst {timing['worst_frame_ms']} ms -> "
|
||||
f"{'smooth' if passed else 'NOT smooth'}; evidence in {evidence.relative_to(ROOT)}")
|
||||
return 0 if passed else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -10,7 +10,7 @@ _, _, unique_animation = inventory()
|
||||
unique_animation = set(unique_animation)
|
||||
if OUTPUT.exists():
|
||||
shutil.rmtree(OUTPUT)
|
||||
for name in ('inbe', 'lists', 'habits', 'practices', 'diary', 'lumi'):
|
||||
for name in ('inbe', 'lists', 'habits', 'practices', 'diary', 'lumi', 'leaderboard'):
|
||||
(OUTPUT / name / 'assets').mkdir(parents=True)
|
||||
patterns = (
|
||||
'assets/mcp/*.json', 'assets/app/icon.png', 'assets/app/icon-sky-cradle.png',
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
{"scene":"practice_manual_whm", "slug":"13-breathing-guide", "app":"practices", "expected":["How to"], "store":false},
|
||||
{"scene":"cobalt_dark", "slug":"14-dark-patterns", "app":"practices", "expected":["Steady Box Breath"], "theme":11, "dark":1, "store":false},
|
||||
{"scene":"settings_overview", "slug":"15-settings", "app":"inbe", "expected":["Language"], "store":false},
|
||||
{"scene":"lists_completed", "slug":"16-completed-list", "app":"lists", "expected":["Hide completed", "Fresh fruit"], "store":false}
|
||||
{"scene":"lists_completed", "slug":"16-completed-list", "app":"lists", "expected":["Hide completed", "Fresh fruit"], "store":false},
|
||||
{"scene":"leaderboard", "slug":"17-leaderboard", "app":"leaderboard", "expected":["Breathing Patterns", "maple"], "store":false}
|
||||
]
|
||||
}
|
||||
@@ -7,9 +7,10 @@ import sys
|
||||
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
names = {"inbe": "inbe", "lists": "lists", "habits": "habits",
|
||||
"practices": "practice", "diary": "diary", "lumi": "lumi"}
|
||||
"practices": "practice", "diary": "diary", "lumi": "lumi",
|
||||
"leaderboard": "leaderboard"}
|
||||
if len(sys.argv) != 2 or sys.argv[1] not in names:
|
||||
raise SystemExit("usage: ./update_version.sh --cell inbe|lists|habits|practices|diary")
|
||||
raise SystemExit("usage: ./update_version.sh --cell inbe|lists|habits|practices|diary|lumi|leaderboard")
|
||||
name = sys.argv[1]
|
||||
changelog = (root / "apps" / names[name] / "CHANGELOG.md").read_text()
|
||||
version = re.search(r"^## \[((?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8})\.(?:0|[1-9][0-9]{0,8}))\]", changelog, re.M)
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#import, file "../storage/cell_records.zi";
|
||||
#import, file "../storage/storage_core.zi";
|
||||
#import, file "../storage/db.zi";
|
||||
#import, file "../storage/sync_crypto_random.zi";
|
||||
#import, file "../storage/sync_crypto.zi";
|
||||
#import "keys"
|
||||
#import "crypto"
|
||||
#import, file "../storage/delegate_store.zi";
|
||||
#import, file "../storage/temporary_data.zi";
|
||||
#import, file "../cells/package_files.zi";
|
||||
@@ -58,11 +58,11 @@ ActivityCurrentTime :: () -> s64 {
|
||||
ActivityRandomID :: (output: []u8, byte_count: s32) -> bool {
|
||||
bytes: [32]u8
|
||||
if byte_count < 1 || byte_count > 32 || output.count < byte_count * 2 + 1 ||
|
||||
SyncCryptoRandom(*bytes[0], byte_count) == 0 {
|
||||
SecureRandom(*bytes[0], byte_count) == 0 {
|
||||
return false
|
||||
}
|
||||
result := SyncCryptoBytesToHex(*bytes[0], byte_count, *output[0], output.count) != 0
|
||||
SyncCryptoWipe(*bytes[0], 32)
|
||||
result := BytesToHex(*bytes[0], byte_count, *output[0], output.count) != 0
|
||||
SecureWipe(*bytes[0], 32)
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
+22
-16
@@ -24,6 +24,8 @@
|
||||
#import "layout"
|
||||
#import "kss_parser"
|
||||
#import "layout_widget"
|
||||
#import "grid"
|
||||
#import "grid_props"
|
||||
#import "overlay_props"
|
||||
#import "overlay_widget"
|
||||
#import "paint_queue"
|
||||
@@ -244,10 +246,10 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
if searched.clipboard_write { unused TextInputWriteClipboard(searched.clipboard_text) }
|
||||
query := AppTextFromCString(*app.launcher_search[0], 128)
|
||||
routes := LauncherRoutes()
|
||||
canonical: [5]string = .{"Diary", "Habits", "Lists", "Lumi", "Practice"}
|
||||
matches: [5]s32
|
||||
canonical: [LAUNCHER_APP_COUNT]string = .{"Diary", "Habits", "Lists", "Lumi", "Practice", "Leaderboard"}
|
||||
matches: [LAUNCHER_APP_COUNT]s32
|
||||
match_count: s32 = 0
|
||||
for index: cast(s32)0..4 {
|
||||
for index: cast(s32)0..LAUNCHER_APP_COUNT - 1 {
|
||||
if LauncherMatches(app_nav_route_label(routes[index]), query) ||
|
||||
LauncherMatches(canonical[index], query) {
|
||||
matches[match_count] = routes[index]
|
||||
@@ -275,8 +277,13 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
}
|
||||
tile_height := AppScale(88)
|
||||
gap := AppScale(12)
|
||||
pinned_rows := (pinned_count + 1) / 2
|
||||
more_rows := (more_count + 1) / 2
|
||||
// The tiles reflow into as many columns as the panel's width allows.
|
||||
columns := MeasureGrid(GridProps.{.bounds = Rectangle.{cast(float32)x, 0.0, cast(float32)width, 0.0},
|
||||
.min_item_width = AppScale(140), .max_columns = 6, .gap = gap}).columns
|
||||
cells := MeasureGrid(GridProps.{.columns = columns, .gap = gap,
|
||||
.bounds = Rectangle.{cast(float32)x, 0.0, cast(float32)width, 0.0}})
|
||||
pinned_rows := GridRowCount(cells, pinned_count)
|
||||
more_rows := GridRowCount(cells, more_count)
|
||||
pinned_height := AppScale(36) + pinned_rows * (tile_height + gap)
|
||||
more_height := AppScale(36) + more_rows * (tile_height + gap)
|
||||
if more_count == 0 { more_height += AppScale(64) }
|
||||
@@ -294,6 +301,7 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
scrolled := Scroll(app.ui.session, scroll)
|
||||
app.launcher_scroll = scrolled.scroll_offset
|
||||
pinned_bounds: Rectangle
|
||||
pinned_cells: GridMetrics
|
||||
more_bounds: Rectangle
|
||||
pinned_slots: [LAUNCHER_APP_COUNT]Rectangle
|
||||
if scrolled.opened {
|
||||
@@ -301,7 +309,6 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
y := cast(s32)scrolled.content.y
|
||||
pinned_bounds = Rectangle.{cast(float32)x, cast(float32)y,
|
||||
cast(float32)width, cast(float32)pinned_height}
|
||||
item_width := (width - gap) / 2
|
||||
for section: cast(s32)0..cast(s32)1 {
|
||||
count := ifx section == 0 then pinned_count else more_count
|
||||
Text(app.ui.session, TextProps.{
|
||||
@@ -314,15 +321,18 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
cast(float32)width, cast(float32)more_height}
|
||||
}
|
||||
y += AppScale(36)
|
||||
// The scroll's content may be narrower than the panel; the column
|
||||
// count chosen for the panel keeps the content height exact.
|
||||
section_cells := MeasureGrid(GridProps.{.columns = columns, .gap = gap,
|
||||
.bounds = Rectangle.{cast(float32)x, cast(float32)y, cast(float32)width, 0.0}})
|
||||
if section == 0 { pinned_cells = section_cells }
|
||||
for index: cast(s32)0..count - 1 {
|
||||
route := ifx section == 0 then pinned[index] else more[index]
|
||||
bounds := Rectangle.{cast(float32)(x + (index % 2) * (item_width + gap)),
|
||||
cast(float32)(y + (index / 2) * (tile_height + gap)),
|
||||
cast(float32)item_width, cast(float32)tile_height}
|
||||
bounds := GridCellBounds(section_cells, index, tile_height)
|
||||
if section == 0 { pinned_slots[index] = bounds }
|
||||
app_launcher_draw_card(app, route, bounds, true)
|
||||
}
|
||||
y += ((count + 1) / 2) * (tile_height + gap)
|
||||
y += GridRowCount(section_cells, count) * (tile_height + gap)
|
||||
}
|
||||
if match_count == 0 {
|
||||
Text(app.ui.session, TextProps.{.text = LocaleText("launcher_no_results"),
|
||||
@@ -356,12 +366,8 @@ app_draw_launcher :: (app: *InnerBreeze) {
|
||||
if query.count == 0 && scrolled.opened &&
|
||||
PointInBounds(point.x, point.y, scrolled.viewport) &&
|
||||
PointInBounds(point.x, point.y, pinned_bounds) {
|
||||
row := cast(s32)(point.y - pinned_bounds.y - cast(float32)AppScale(36))
|
||||
if row < 0 { row = 0 }
|
||||
row /= tile_height + gap
|
||||
column: s32 = ifx point.x >= pinned_bounds.x + pinned_bounds.width * 0.5 then 1 else 0
|
||||
target = row * 2 + column
|
||||
if target > app.launcher_favorite_count { target = app.launcher_favorite_count }
|
||||
target = GridIndexAt(pinned_cells, point.x, point.y, tile_height,
|
||||
app.launcher_favorite_count)
|
||||
highlight := pinned_bounds
|
||||
if target < pinned_count { highlight = pinned_slots[target] }
|
||||
highlight = RectangleIntersection(highlight, scrolled.viewport)
|
||||
|
||||
@@ -92,4 +92,5 @@ BeginScreenDraw :: (value: *void, viewport: Rectangle) {
|
||||
}
|
||||
app.ui.view_width = cast(s32)viewport.width
|
||||
app.ui.view_height = cast(s32)viewport.height
|
||||
app.ui.navigation_height = cast(s32)viewport.height
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
#import "keys"
|
||||
#import, file "modal_rules.zi";
|
||||
#import, file "../habits/habit_types.zi";
|
||||
#import, file "../core/types.zi";
|
||||
@@ -48,6 +49,9 @@ app_nav_route_bit :: (route: s32) -> s32 {
|
||||
if route == APP_NAV_ROUTE_LUMI {
|
||||
bit = APP_LUMI
|
||||
}
|
||||
if route == APP_NAV_ROUTE_LEADERBOARD {
|
||||
bit = APP_LEADERBOARD
|
||||
}
|
||||
return bit
|
||||
}
|
||||
|
||||
@@ -63,7 +67,7 @@ app_nav_route_available :: (app: *InnerBreeze, route: s32) -> bool {
|
||||
c :: #system_library "c";
|
||||
app_leave_practice_config :: (app: *InnerBreeze) #foreign c;
|
||||
save_settings :: (app: *InnerBreeze) #foreign c;
|
||||
sync_account_load :: (account: *SyncAccount) -> s32 #foreign c;
|
||||
sync_account_load :: (account: *AccountKeys) -> s32 #foreign c;
|
||||
storage_get_setting_text :: (key: string) -> string #foreign c;
|
||||
|
||||
APP_BOTTOM_NAV_CONFIGURABLE_COUNT :: 7
|
||||
@@ -87,6 +91,7 @@ app_capture_navigation_viewport :: (app: *InnerBreeze, width: s32,
|
||||
}
|
||||
app.ui.view_width = width
|
||||
app.ui.view_height = height
|
||||
app.ui.navigation_height = height
|
||||
// The width is already the layout width: the window divided by the zoom.
|
||||
app.ui.desktop_mode = cast(s32)IsDesktopWidth(width, 1.0)
|
||||
}
|
||||
@@ -116,7 +121,9 @@ app_nav_desktop_rail_enabled :: (app: *InnerBreeze) -> s32 {
|
||||
return 0
|
||||
}
|
||||
placement := app_navigation_placement(app)
|
||||
full_height := ifx app != null then app.ui.view_height else 0
|
||||
// Decide from the whole window, so a return bar never turns the sidebar
|
||||
// into a bottom bar.
|
||||
full_height := ifx app != null then app.ui.navigation_height else 0
|
||||
if app == null || (placement != NAVIGATION_LEFT && placement != NAVIGATION_RIGHT) || full_height < AppScale(476) {
|
||||
return 0
|
||||
}
|
||||
@@ -135,7 +142,7 @@ app_nav_desktop_rail_enabled :: (app: *InnerBreeze) -> s32 {
|
||||
if app.breathing.screen == ScreenHabitSessionEdit || app.breathing.screen == ScreenSession || app.breathing.screen == ScreenMeditation || app.breathing.screen == ScreenSunSalutation || app.breathing.screen == ScreenPatterns || app.breathing.screen == ScreenResults {
|
||||
return 0
|
||||
}
|
||||
return cast(s32)(app.breathing.screen == ScreenStart || app.breathing.screen == ScreenHabits || app.breathing.screen == ScreenHabitEdit || app.breathing.screen == ScreenEList || app.breathing.screen == ScreenLumi || app.breathing.screen == ScreenDiary || app.breathing.screen == ScreenProfile || app.breathing.screen == ScreenSettings || app.breathing.screen == ScreenAppSelection)
|
||||
return cast(s32)(app.breathing.screen == ScreenStart || app.breathing.screen == ScreenHabits || app.breathing.screen == ScreenHabitEdit || app.breathing.screen == ScreenEList || app.breathing.screen == ScreenLumi || app.breathing.screen == ScreenDiary || app.breathing.screen == ScreenLeaderboard || app.breathing.screen == ScreenProfile || app.breathing.screen == ScreenSettings || app.breathing.screen == ScreenAppSelection)
|
||||
}
|
||||
|
||||
app_bottom_nav_configurable_route :: (route: s32) -> s32 {
|
||||
@@ -249,7 +256,7 @@ app_open_main_tab :: (app: *InnerBreeze, main_tab: s32, persist: s32) {
|
||||
return
|
||||
}
|
||||
|
||||
app.main_tab = Clamp(main_tab, APP_MAIN_TAB_HABITS, APP_MAIN_TAB_LUMI)
|
||||
app.main_tab = Clamp(main_tab, APP_MAIN_TAB_HABITS, APP_MAIN_TAB_LEADERBOARD)
|
||||
if app.main_tab == APP_MAIN_TAB_PRACTICE {
|
||||
app.practice_tab = PRACTICE_TAB_PLAY
|
||||
}
|
||||
@@ -302,7 +309,7 @@ app_apply_nav_route :: (app: *InnerBreeze, route: s32) {
|
||||
case APP_NAV_ROUTE_FRIENDS;
|
||||
app_open_profile_tab(app, PROFILE_TAB_FRIENDS)
|
||||
case APP_NAV_ROUTE_LEADERBOARD;
|
||||
app_open_profile_tab(app, PROFILE_TAB_LEADERBOARD)
|
||||
app_open_main_tab(app, APP_MAIN_TAB_LEADERBOARD, 1)
|
||||
case APP_NAV_ROUTE_PRACTICE;
|
||||
app_open_main_tab(app, APP_MAIN_TAB_PRACTICE, 1)
|
||||
case APP_NAV_ROUTE_HABITS;
|
||||
@@ -453,6 +460,9 @@ app_current_nav_route :: (app: *InnerBreeze) -> s32 {
|
||||
if app.breathing.screen == ScreenDiary {
|
||||
return APP_NAV_ROUTE_DIARY
|
||||
}
|
||||
if app.breathing.screen == ScreenLeaderboard {
|
||||
return APP_NAV_ROUTE_LEADERBOARD
|
||||
}
|
||||
return APP_NAV_ROUTE_NONE
|
||||
}
|
||||
|
||||
@@ -567,7 +577,7 @@ app_nav_profile_identity :: (app: *InnerBreeze, out: []u8, out_size: s64,
|
||||
subtitle[0] = cast(u8)0
|
||||
}
|
||||
|
||||
account: SyncAccount
|
||||
account: AccountKeys
|
||||
has_account := sync_account_load(*account) != 0
|
||||
alias: string = ""
|
||||
if has_account {
|
||||
@@ -592,7 +602,7 @@ app_nav_profile_identity :: (app: *InnerBreeze, out: []u8, out_size: s64,
|
||||
return
|
||||
}
|
||||
app_compact_public_id(
|
||||
AppTextFromCString(*account.public_id[0], SYNC_PUBLIC_ID_HEX_SIZE),
|
||||
AppTextFromCString(*account.public_id[0], ACCOUNT_PUBLIC_ID_HEX_SIZE),
|
||||
out, out_size)
|
||||
app_nav_copy_text(LocaleText("tab_profile"), subtitle, subtitle_size)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ c :: #system_library "c";
|
||||
// The social screen owns these native cache effects. Declaring the calls here
|
||||
// keeps its screen drawing and storage implementation out of route checking.
|
||||
profile_social_load_friends_cache :: (app: *InnerBreeze) #foreign c;
|
||||
profile_social_load_leaderboard_cache :: (app: *InnerBreeze) #foreign c;
|
||||
leaderboard_screen_enter :: (app: *InnerBreeze) #foreign c;
|
||||
app_request_social_refresh :: (app: *InnerBreeze) #foreign c;
|
||||
app_diary_save :: () -> bool #foreign c;
|
||||
app_lumi_session_result :: (app: *InnerBreeze) #foreign c;
|
||||
@@ -39,13 +39,14 @@ app_current_route :: (app: *InnerBreeze) -> AppRoute {
|
||||
}
|
||||
|
||||
enter_route :: (app: *InnerBreeze, route: AppRoute) {
|
||||
if route.screen == ScreenLeaderboard {
|
||||
leaderboard_screen_enter(app)
|
||||
return
|
||||
}
|
||||
if route.screen != ScreenProfile { return }
|
||||
if route.profile_tab == PROFILE_TAB_FRIENDS {
|
||||
profile_social_load_friends_cache(app)
|
||||
app_request_social_refresh(app)
|
||||
} else if route.profile_tab == PROFILE_TAB_LEADERBOARD {
|
||||
profile_social_load_leaderboard_cache(app)
|
||||
app_request_social_refresh(app)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -609,7 +609,7 @@ app_load_settings :: (app: *InnerBreeze) -> s32 {
|
||||
"ui_scale", 10, 5, 25)
|
||||
load_clamped_setting(*app.main_tab, "main_tab",
|
||||
APP_MAIN_TAB_LUMI, APP_MAIN_TAB_NONE,
|
||||
APP_MAIN_TAB_LUMI)
|
||||
APP_MAIN_TAB_LEADERBOARD)
|
||||
load_clamped_setting(*app.habits.screen_mode,
|
||||
"habits_screen_mode", HABITS_SCREEN_OVERVIEW,
|
||||
HABITS_SCREEN_OVERVIEW, HABITS_SCREEN_STATISTICS)
|
||||
@@ -740,6 +740,17 @@ app_load_settings :: (app: *InnerBreeze) -> s32 {
|
||||
save_setting_int("enabled_apps", app.enabled_apps)
|
||||
save_setting_int("lumi_introduced", 1)
|
||||
}
|
||||
// Leaderboard moved from Profile into its own app. Fresh profiles start
|
||||
// with every app; existing ones get it installed once. Removing it later
|
||||
// is respected.
|
||||
if !TelegramHostPresent() && !SettingsCacheContains("leaderboard_introduced") {
|
||||
if settings_missing == 0 && !SettingsCacheContains("app_used_leaderboard") {
|
||||
app.enabled_apps |= APP_LEADERBOARD
|
||||
save_setting_int("app_used_leaderboard", 1)
|
||||
save_setting_int("enabled_apps", app.enabled_apps)
|
||||
}
|
||||
save_setting_int("leaderboard_introduced", 1)
|
||||
}
|
||||
app.apps_selected = SettingsCacheInt("apps_setup_done",
|
||||
ifx settings_missing != 0 then 0 else 1)
|
||||
|
||||
|
||||
@@ -479,7 +479,10 @@ StyleInstall :: (theme_id: s32, dark: bool, style_index: s32) -> bool {
|
||||
app_apply_style :: (app: *InnerBreeze) -> bool {
|
||||
if app == null { return false }
|
||||
scope := StyleActiveScope(app)
|
||||
if scope == 0 {
|
||||
// An app without its own sheet compiles to exactly the shared rules, so
|
||||
// opening it keeps them. Compiling every sheet again on the frame stalled
|
||||
// a minimized practice's window when an app such as Lumi opened.
|
||||
if scope == 0 || StyleAppliedSource(scope).count == 0 {
|
||||
return StyleInstall(app.theme_id, app.dark_mode != 0, app.style_index)
|
||||
}
|
||||
if style_installed && style_installed_theme == app.theme_id &&
|
||||
|
||||
+19
-16
@@ -6,7 +6,7 @@ c :: #system_library "c";
|
||||
LOG_INFO :: 3
|
||||
LOG_WARNING :: 4
|
||||
LOG_ERROR :: 5
|
||||
#import, file "../platform/trace_log.zi";
|
||||
#import "raylib_trace"
|
||||
SyncLog :: (level: s32, message: string) {
|
||||
TraceLog(level, message)
|
||||
}
|
||||
@@ -395,22 +395,23 @@ app_social_apply_result :: (app: *InnerBreeze, requests_json: string,
|
||||
if leaderboard_key.count > 0 && leaderboard_json.count > 0 {
|
||||
current_key: [96] u8
|
||||
app_social_leaderboard_key(*current_key[0], 96,
|
||||
app.profile_leaderboard_practice,
|
||||
app.profile_leaderboard_metric)
|
||||
app.leaderboard_practice,
|
||||
app.leaderboard_metric)
|
||||
if AppTextFromCString(*current_key[0], 96) == leaderboard_key {
|
||||
AppCopyText(ifx (leaderboard_json.count > 0) then (leaderboard_json) else ("{\"rows\":[]}"), app.profile_leaderboard_json[:])
|
||||
AppCopyText(ifx (leaderboard_json.count > 0) then (leaderboard_json) else ("{\"rows\":[]}"), app.leaderboard_json[:])
|
||||
}
|
||||
}
|
||||
if leaderboard_avg_key.count > 0 && leaderboard_avg_json.count > 0 {
|
||||
current_avg_key: [96] u8
|
||||
app_social_leaderboard_key(*current_avg_key[0], 96,
|
||||
app.profile_leaderboard_practice, 1)
|
||||
app.leaderboard_practice, 1)
|
||||
if AppTextFromCString(*current_avg_key[0], 96) == leaderboard_avg_key {
|
||||
AppCopyText(ifx (leaderboard_avg_json.count > 0) then (leaderboard_avg_json) else ("{\"rows\":[]}"), app.profile_leaderboard_avg_json[:])
|
||||
AppCopyText(ifx (leaderboard_avg_json.count > 0) then (leaderboard_avg_json) else ("{\"rows\":[]}"), app.leaderboard_avg_json[:])
|
||||
}
|
||||
}
|
||||
app.profile_friends_loaded = 1
|
||||
app.profile_leaderboard_loaded = 1
|
||||
app.leaderboard_loaded = 1
|
||||
app.leaderboard_revision += 1
|
||||
app_notifications_on_friends_synced(app)
|
||||
}
|
||||
}
|
||||
@@ -455,7 +456,9 @@ app_social_apply_result :: (app: *InnerBreeze, requests_json: string,
|
||||
*friends_json[0], size_of(type_of(friends_json)),
|
||||
*leaderboard_json[0], size_of(type_of(leaderboard_json)))
|
||||
SyncCopyText(*leaderboard_avg_json[0], size_of(type_of(leaderboard_avg_json)), "{\"rows\":[]}")
|
||||
if result == cast(SyncResult)SYNC_OK && AppTextFromCString(*args.practice[0], 32) == "whm" {
|
||||
// Wim Hof ranks average holds and meditation average time as well.
|
||||
if result == cast(SyncResult)SYNC_OK && (AppTextFromCString(*args.practice[0], 32) == "whm" ||
|
||||
AppTextFromCString(*args.practice[0], 32) == "meditation") {
|
||||
avg_metric: string = ifx (AppTextFromCString(*args.practice[0], 32) == "meditation") then ("avg_time") else ("avg_hold")
|
||||
leaderboard_avg_result = cast(SyncResult)FetchFriendStats(
|
||||
AppTextFromCString(*args.url[0], 256),
|
||||
@@ -780,16 +783,16 @@ app_apply_pending_social_refresh :: (app: *InnerBreeze) {
|
||||
sync_unlock()
|
||||
|
||||
SyncCopyText(*args.url[0], 256, AppTextFromCString(*url[0], 256))
|
||||
SyncCopyText(*args.practice[0], 32, app_social_practice_id(app.profile_leaderboard_practice))
|
||||
SyncCopyText(*args.metric[0], 32, app_social_metric_id(app.profile_leaderboard_practice,
|
||||
app.profile_leaderboard_metric))
|
||||
SyncCopyText(*args.practice[0], 32, app_social_practice_id(app.leaderboard_practice))
|
||||
SyncCopyText(*args.metric[0], 32, app_social_metric_id(app.leaderboard_practice,
|
||||
app.leaderboard_metric))
|
||||
app_social_leaderboard_key(*args.leaderboard_key[0],
|
||||
size_of(type_of(args.leaderboard_key)),
|
||||
app.profile_leaderboard_practice,
|
||||
app.leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_STREAK)
|
||||
app_social_leaderboard_key(*args.leaderboard_avg_key[0],
|
||||
size_of(type_of(args.leaderboard_avg_key)),
|
||||
app.profile_leaderboard_practice,
|
||||
app.leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_AVG_HOLD)
|
||||
SyncCopyText(*args.metric[0], 32, "streak")
|
||||
SyncCopyText(*args.action[0], 16, AppTextFromCString(*action[0], 16))
|
||||
@@ -818,12 +821,12 @@ app_apply_pending_social_refresh :: (app: *InnerBreeze) {
|
||||
}
|
||||
SocialQueuePeek(action[:], action_value[:])
|
||||
app_social_leaderboard_key(*g_social_streak_key[0], 96,
|
||||
app.profile_leaderboard_practice, PROFILE_LEADERBOARD_STREAK)
|
||||
app.leaderboard_practice, PROFILE_LEADERBOARD_STREAK)
|
||||
app_social_leaderboard_key(*g_social_average_key[0], 96,
|
||||
app.profile_leaderboard_practice, PROFILE_LEADERBOARD_AVG_HOLD)
|
||||
app.leaderboard_practice, PROFILE_LEADERBOARD_AVG_HOLD)
|
||||
if !BeginSocialRefresh(*g_social_async, AppTextFromCString(*url[0], 256),
|
||||
NetworkTransport(*g_social_transfer),
|
||||
app_social_practice_id(app.profile_leaderboard_practice),
|
||||
app_social_practice_id(app.leaderboard_practice),
|
||||
AppTextFromCString(*action[0], 16), AppTextFromCString(*action_value[0], 96)) {
|
||||
app_social_record_result(g_social_async.result)
|
||||
return
|
||||
|
||||
+20
-12
@@ -1,10 +1,11 @@
|
||||
#import "keys"
|
||||
#import "drawing_props"
|
||||
#import "dropdown_props"
|
||||
#import "geometry"
|
||||
#import "swipe_props"
|
||||
#import "router_props"
|
||||
#import "session"
|
||||
#import, file "../platform/asset_download_types.zi";
|
||||
#import "file_download"
|
||||
#import, file "../platform/media_types.zi";
|
||||
#import, file "../core/types.zi";
|
||||
#import, file "route_types.zi";
|
||||
@@ -103,9 +104,9 @@ SETTINGS_TAB_BREAKS :: 2
|
||||
SETTINGS_TAB_NOTIFICATIONS :: 3
|
||||
SETTINGS_TAB_THEME :: 4
|
||||
SETTINGS_TAB_ABOUT :: 5
|
||||
// Settings slot 6 is retired; keep Telegram at its persisted ID.
|
||||
SETTINGS_TAB_TELEGRAM :: 7
|
||||
SETTINGS_TAB_COUNT :: 8
|
||||
// Saved slots 6 (the removed Apps panel) and 7 (Telegram, now in Profile)
|
||||
// open Device.
|
||||
SETTINGS_TAB_COUNT :: 6
|
||||
|
||||
AUDIO_CUE_BREATH_IN :: 0
|
||||
AUDIO_CUE_BREATH_OUT :: 1
|
||||
@@ -139,7 +140,7 @@ PROFILE_TAB_OVERVIEW :: 0
|
||||
PROFILE_TAB_SYNC :: 1
|
||||
PROFILE_TAB_DATA :: 2
|
||||
PROFILE_TAB_FRIENDS :: 3
|
||||
PROFILE_TAB_LEADERBOARD :: 4
|
||||
PROFILE_TAB_TELEGRAM :: 4
|
||||
PROFILE_TAB_COUNT :: 5
|
||||
|
||||
PRACTICE_CATEGORY_MIND :: 0
|
||||
@@ -255,7 +256,7 @@ MeditationPracticeState :: struct {
|
||||
music_archive_extracted: s32
|
||||
music_network_error_notified: s32
|
||||
music: MusicHandle
|
||||
music_download: AssetDownload
|
||||
music_download: FileDownload
|
||||
music_cache_dir: [FS_PATH_MAX] u8
|
||||
music_status: [128] u8
|
||||
}
|
||||
@@ -319,6 +320,8 @@ AppUiState :: struct {
|
||||
view_width: s32
|
||||
view_height: s32
|
||||
desktop_mode: s32
|
||||
// The window's layout height; a return bar shortens only view_height.
|
||||
navigation_height: s32
|
||||
config_scroll: s32
|
||||
pointer_active: bool
|
||||
mouse_x: s32
|
||||
@@ -359,6 +362,9 @@ SessionWindow :: struct {
|
||||
system_visible: bool
|
||||
system_screen: s32
|
||||
system_generation: s32
|
||||
// Flips with Android each time the floating window opens back into the
|
||||
// app.
|
||||
system_returned: bool
|
||||
system_last_tick: float64
|
||||
system_elapsed_carry: float64
|
||||
last_tick: float64
|
||||
@@ -424,9 +430,11 @@ InnerBreeze :: struct {
|
||||
profile_tab: s32
|
||||
profile_tab_scroll: s32
|
||||
profile_scroll: s32
|
||||
profile_leaderboard_practice: s32
|
||||
profile_leaderboard_metric: s32
|
||||
profile_leaderboard_loaded: s32
|
||||
leaderboard_practice: s32
|
||||
leaderboard_metric: s32
|
||||
leaderboard_loaded: s32
|
||||
// Advances whenever saved or fetched leaderboard results change.
|
||||
leaderboard_revision: s32
|
||||
profile_friend_input_cursor: s32
|
||||
profile_friend_input_focused: s32
|
||||
profile_friends_loaded: s32
|
||||
@@ -441,8 +449,8 @@ InnerBreeze :: struct {
|
||||
profile_pending_friend_remove_name: [96] u8
|
||||
profile_friends_json: [8192] u8
|
||||
profile_friend_requests_json: [8192] u8
|
||||
profile_leaderboard_json: [8192] u8
|
||||
profile_leaderboard_avg_json: [8192] u8
|
||||
leaderboard_json: [8192] u8
|
||||
leaderboard_avg_json: [8192] u8
|
||||
sync_server_url_cursor: s32
|
||||
sync_server_url_focused: s32
|
||||
sync_server_url: [256] u8
|
||||
@@ -450,7 +458,7 @@ InnerBreeze :: struct {
|
||||
sync_alias_focused: s32
|
||||
sync_alias_then_backup: s32
|
||||
sync_alias_input: [40] u8
|
||||
pending_sync_account: SyncAccount
|
||||
pending_sync_account: AccountKeys
|
||||
pending_sync_account_action: s32
|
||||
device_picker_scroll: s32
|
||||
fullscreen_enabled: s32
|
||||
|
||||
+49
-23
@@ -7,6 +7,7 @@ LOG_INFO :: 3
|
||||
LOG_WARNING :: 4
|
||||
LOG_ERROR :: 5
|
||||
#import, file "../platform/trace_log.zi";
|
||||
#import "raylib_trace"
|
||||
GetTime :: () -> float64 #foreign c;
|
||||
PackageNow :: () -> s64 #foreign c "now_seconds";
|
||||
#import, file "modal_rules.zi";
|
||||
@@ -17,9 +18,9 @@ PackageNow :: () -> s64 #foreign c "now_seconds";
|
||||
#import, file "exercise_types.zi";
|
||||
#import, file "../platform/web_storage.zi";
|
||||
#import, file "../platform/environment.zi";
|
||||
#import, file "../platform/asset_download.zi";
|
||||
#import, file "../platform/asset_download_types.zi";
|
||||
#import, file "../platform/android/android_device.zi";
|
||||
#import "file_download"
|
||||
#import "android_device"
|
||||
#import, file "../platform/android/android_activity.zi";
|
||||
#import, file "../platform/android/graphics_context.zi";
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
#import "kryon/canvas_host"
|
||||
@@ -29,7 +30,7 @@ PackageNow :: () -> s64 #foreign c "now_seconds";
|
||||
#if #defined(DESKTOP_TRAY_ENABLED) {
|
||||
#import, file "../platform/desktop_tray.zi";
|
||||
}
|
||||
#import, file "../platform/uri.zi";
|
||||
#import "open_uri"
|
||||
#import "text_align"
|
||||
#import "text_props"
|
||||
#import "image_props"
|
||||
@@ -54,6 +55,7 @@ PackageNow :: () -> s64 #foreign c "now_seconds";
|
||||
#import, file "app_nav.zi";
|
||||
#import, file "app_launcher.zi";
|
||||
#import, file "app_launcher_state.zi";
|
||||
#import, file "return_bar.zi";
|
||||
#import, file "session_window.zi";
|
||||
#import, file "session_window_view.zi";
|
||||
#import, file "../platform/practice_window_host.zi";
|
||||
@@ -96,6 +98,7 @@ PackageNow :: () -> s64 #foreign c "now_seconds";
|
||||
#import, file "../screens/app_selection_screen.zi";
|
||||
#import, file "../screens/diary_screen.zi";
|
||||
#import, file "../screens/lumi_screen.zi";
|
||||
#import, file "../screens/leaderboard_screen.zi";
|
||||
#import, file "../cells/package_manager.zi";
|
||||
#import, file "../cells/catalog.zi";
|
||||
#import, file "../cells/inbe_types.zi";
|
||||
@@ -615,6 +618,9 @@ app_open_feature :: (vapp: *void, feature: s32) -> s32 {
|
||||
|
||||
bit = APP_DIARY
|
||||
tab = APP_MAIN_TAB_DIARY
|
||||
} else if feature == APP_LEADERBOARD {
|
||||
bit = APP_LEADERBOARD
|
||||
tab = APP_MAIN_TAB_LEADERBOARD
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
@@ -657,7 +663,7 @@ app_init :: (vapp: *void) {
|
||||
FramePacingReset()
|
||||
app.ui.session = SessionOpen()
|
||||
if !SessionValid(app.ui.session) { return }
|
||||
android_text_input_open(app.ui.session)
|
||||
AndroidTextInputOpen(app.ui.session)
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
app.graphics_context = AndroidGraphicsContext()
|
||||
if practice_active(app) != null {
|
||||
@@ -812,6 +818,10 @@ handle_back_button :: (app: *InnerBreeze) {
|
||||
if app.modal.active != 0 {
|
||||
return
|
||||
}
|
||||
if app_return_bar_takes_back(app) {
|
||||
app_return_to_apps(app)
|
||||
return
|
||||
}
|
||||
screen := app.breathing.screen
|
||||
if screen == ScreenStart {
|
||||
if app.practice_tab == PRACTICE_TAB_CONFIG {
|
||||
@@ -863,15 +873,13 @@ handle_back_button :: (app: *InnerBreeze) {
|
||||
android_allow_screen_off()
|
||||
android_wakelock_release()
|
||||
}
|
||||
app_init(cast(*void)app)
|
||||
app.session_result = SessionResult.{}
|
||||
app_switch_screen(app, ScreenStart)
|
||||
} else if screen == ScreenSession {
|
||||
// When paused, exit immediately
|
||||
if app.session_paused != 0 {
|
||||
practice_active_background_stop(app)
|
||||
app_init(cast(*void)app)
|
||||
} else {
|
||||
// Show confirmation modal
|
||||
app_open_modal(app, cast(ModalType)ModalConfirmExitSession)
|
||||
// Paused, it leaves at once; otherwise it asks first.
|
||||
practice: *PracticeDefinition = practice_get(EXERCISE_WIM_HOF)
|
||||
if practice.request_exit != null {
|
||||
practice.request_exit(app)
|
||||
}
|
||||
} else if screen == ScreenMeditation {
|
||||
{
|
||||
@@ -1138,6 +1146,7 @@ updateapp :: (app: *InnerBreeze) {
|
||||
// bottom-dock click must draw its destination in this frame, just like
|
||||
// the desktop rail, so a cold page cannot swallow the next tap.
|
||||
app_draw_bottom_nav(app)
|
||||
app_draw_return_bar(app)
|
||||
back_requested := IsKeyPressed(APP_KEY_BACK) ||
|
||||
(app.launcher_open && IsKeyPressed(APP_KEY_ESCAPE))
|
||||
#if !#defined(ANDROID_BUILD) && !#defined(PLATFORM_WEB) {
|
||||
@@ -1208,6 +1217,9 @@ updateapp :: (app: *InnerBreeze) {
|
||||
|
||||
diary_screen_draw(app)
|
||||
handled_screen = true
|
||||
} else if app.breathing.screen == ScreenLeaderboard {
|
||||
leaderboard_screen_draw(app)
|
||||
handled_screen = true
|
||||
} else if app.breathing.screen == ScreenEList {
|
||||
draw_elist_screen(app)
|
||||
handled_screen = true
|
||||
@@ -1304,15 +1316,18 @@ updateapp :: (app: *InnerBreeze) {
|
||||
if !global_modal_drawn {
|
||||
draw_global_modal(app)
|
||||
}
|
||||
app_draw_close_prompt(app)
|
||||
if !launcher_covers_page {
|
||||
app_draw_close_prompt(app)
|
||||
}
|
||||
app_draw_launcher(app)
|
||||
if launcher_covers_page {
|
||||
// Apps is an overlay above the page, so the window is drawn inside
|
||||
// its panel, above the apps. If Apps closed during this frame, the
|
||||
// window is drawn over the page instead.
|
||||
// Apps is an overlay above the page, so the window and the close
|
||||
// prompt are drawn inside its panel, above the apps. If Apps closed
|
||||
// during this frame, they are drawn over the page instead.
|
||||
inside_launcher := app.launcher_panel_node >= 0 &&
|
||||
TreePushScope(app.ui.session, app.launcher_panel_node)
|
||||
app_session_window_draw(app)
|
||||
app_draw_close_prompt(app)
|
||||
if inside_launcher {
|
||||
unused End(app.ui.session)
|
||||
}
|
||||
@@ -1443,14 +1458,21 @@ app_update_draw :: (vapp: *void, viewport: Rectangle) {
|
||||
}
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
picture_state := AndroidPictureWindowState()
|
||||
app.session_window.system_available = (picture_state & 1) != 0 &&
|
||||
app.picture_in_picture_enabled != 0
|
||||
app.session_window.system_visible = (picture_state & 2) != 0
|
||||
generation := picture_state >> 2
|
||||
generation := picture_state >> 3
|
||||
if generation != app.session_window.system_generation {
|
||||
app.session_window.system_generation = generation
|
||||
app.session_window.system_last_tick = GetTime()
|
||||
}
|
||||
// Opening the floating window back into the app shows its practice,
|
||||
// not the page that was open behind the practice's in-app window.
|
||||
// Like other window input from outside the frame, the window tick
|
||||
// applies it after the frame has read the current route.
|
||||
returned := (picture_state & 4) != 0
|
||||
if returned != app.session_window.system_returned {
|
||||
app.session_window.system_returned = returned
|
||||
app.session_window.restore_requested = true
|
||||
}
|
||||
if app.session_window.system_visible {
|
||||
app_draw_android_picture_window(app, viewport)
|
||||
return
|
||||
@@ -1493,7 +1515,11 @@ app_update_draw :: (vapp: *void, viewport: Rectangle) {
|
||||
}
|
||||
content_x = cast(s32)(cast(float32)layout_content_x * render_scale + 0.5f)
|
||||
rail_width = cast(s32)(cast(float32)rail_width * render_scale + 0.5f)
|
||||
top_height = ifx (app_navigation_placement(app) == NAVIGATION_TOP) then (cast(s32)(cast(float32)app_navigation_height(app) * render_scale + 0.5f)) else (0)
|
||||
top_layout := app_return_bar_height(app)
|
||||
if app_navigation_placement(app) == NAVIGATION_TOP {
|
||||
top_layout += app_navigation_height(app)
|
||||
}
|
||||
top_height = cast(s32)(cast(float32)top_layout * render_scale + 0.5f)
|
||||
practice_update_circle_bounds(app, app_content_top_reserved(app),
|
||||
app_content_bottom_reserved(app))
|
||||
app_device_preferences_update(app)
|
||||
@@ -1682,14 +1708,14 @@ app_destroy :: (vapp: *void) {
|
||||
}
|
||||
CloseBreakWindows()
|
||||
ClosePracticeWindow(app)
|
||||
ReleaseRuntimeAssetDownload(*app.meditation.music_download)
|
||||
FileDownloadRelease(*app.meditation.music_download)
|
||||
unused app_diary_save()
|
||||
PackageCancel()
|
||||
save_settings(app)
|
||||
settings_sync_account_cancel(app)
|
||||
LumiOnlineCancel()
|
||||
app_clear_disconnected_sync_work()
|
||||
android_text_input_close(app.ui.session)
|
||||
AndroidTextInputClose(app.ui.session)
|
||||
SessionClose(app.ui.session)
|
||||
habits_flush_save(app)
|
||||
if PreviewMode() == 0 {
|
||||
|
||||
@@ -0,0 +1,421 @@
|
||||
// One QR code connection at a time, advanced by the frame loop. The device
|
||||
// showing the code polls Daochi's link mailbox for the other device; the
|
||||
// scanning device answers. See src/storage/device_link.zi for the protocol.
|
||||
#import "keys"
|
||||
#import "json_scan"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "text_buffer"
|
||||
#import "net_http"
|
||||
#import "byte_text_linux"
|
||||
#import "c_string"
|
||||
#import, file "../platform/network_transport.zi";
|
||||
#import, file "../storage/account_types.zi";
|
||||
#import, file "../storage/device_link.zi";
|
||||
#import "crypto"
|
||||
#import, file "../storage/storage_core.zi";
|
||||
#import, file "../storage/sync_account.zi";
|
||||
#import, file "../storage/sync_nodes.zi";
|
||||
#import, file "../cells/package_files.zi";
|
||||
#import "raylib_trace"
|
||||
|
||||
c :: #system_library "c";
|
||||
DeviceLinkClock :: () -> float64 #foreign c "GetTime";
|
||||
DeviceLinkGetenv :: (name: *u8) -> *u8 #foreign c "getenv";
|
||||
DeviceLinkRemove :: (path: *u8) -> s32 #foreign c "remove";
|
||||
|
||||
DeviceLinkStage :: enum {
|
||||
DeviceLinkIdle :: 0
|
||||
// This device shows its code and waits for a phone to scan it.
|
||||
DeviceLinkShowing :: 1
|
||||
// A scanner answered; compare the digits, then send the account.
|
||||
DeviceLinkConfirm :: 2
|
||||
// This device scanned a code and waits for the other device to confirm.
|
||||
DeviceLinkWaiting :: 3
|
||||
// This device scanned a device without an account; send it ours?
|
||||
DeviceLinkAsk :: 4
|
||||
DeviceLinkWorking :: 5
|
||||
DeviceLinkConnected :: 6
|
||||
DeviceLinkFailed :: 7
|
||||
// The account arrived; the screen imports it with the same choices as
|
||||
// importing a key file, then calls DeviceLinkImported.
|
||||
DeviceLinkReceived :: 8
|
||||
}
|
||||
using DeviceLinkStage;
|
||||
|
||||
// Requests to the mailbox, one in flight at a time.
|
||||
DEVICE_LINK_PUT_REQUEST :: 1
|
||||
DEVICE_LINK_GET_REQUEST :: 2
|
||||
DEVICE_LINK_PUT_RESPONSE :: 3
|
||||
DEVICE_LINK_GET_RESPONSE :: 4
|
||||
DEVICE_LINK_CLOSE :: 5
|
||||
// Links expire on the node after ten minutes.
|
||||
DEVICE_LINK_LIFETIME :: 590.0
|
||||
DEVICE_LINK_POLL :: 1.0
|
||||
DEVICE_LINK_LOG_WARNING :: 4
|
||||
|
||||
DeviceLinkSession :: struct {
|
||||
stage: DeviceLinkStage
|
||||
shows: bool
|
||||
sends: bool
|
||||
keys: DeviceLinkKeys
|
||||
id: [DEVICE_LINK_ID_HEX + 1]u8
|
||||
other: [DEVICE_LINK_KEY]u8
|
||||
server: [DEVICE_LINK_SERVER_MAX + 1]u8
|
||||
code: [DEVICE_LINK_CODE_MAX + 1]u8
|
||||
confirmation: s32
|
||||
expires_at: float64
|
||||
next_poll: float64
|
||||
error: string
|
||||
request: s32
|
||||
request_active: bool
|
||||
// Close the link once the current request finishes.
|
||||
close_next: bool
|
||||
}
|
||||
|
||||
device_link: DeviceLinkSession;
|
||||
device_link_transfer: NetworkTransfer;
|
||||
device_link_url: [DEVICE_LINK_SERVER_MAX + 32]u8;
|
||||
device_link_body: [DEVICE_LINK_MESSAGE_MAX + 128]u8;
|
||||
device_link_output: [DEVICE_LINK_MESSAGE_MAX + 256]u8;
|
||||
device_link_pending: DeviceLinkAccount;
|
||||
device_link_message_in: [DEVICE_LINK_MESSAGE_MAX]u8;
|
||||
|
||||
DeviceLinkActive :: () -> bool {
|
||||
return device_link.stage != cast(DeviceLinkStage)DeviceLinkIdle
|
||||
}
|
||||
|
||||
DeviceLinkCodeShown :: () -> string {
|
||||
return TextUntilNul(device_link.code[:])
|
||||
}
|
||||
|
||||
DeviceLinkReset :: () {
|
||||
if device_link.request_active {
|
||||
transport := NetworkTransport(*device_link_transfer)
|
||||
transport.cancel(transport.context)
|
||||
}
|
||||
DeviceLinkForget(*device_link.keys)
|
||||
device_link = DeviceLinkSession.{}
|
||||
}
|
||||
|
||||
DeviceLinkFail :: (error: string) {
|
||||
DeviceLinkForget(*device_link.keys)
|
||||
device_link_pending = DeviceLinkAccount.{}
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkFailed
|
||||
device_link.error = error
|
||||
}
|
||||
|
||||
// Names the step that failed in the log, without keys or account data.
|
||||
DeviceLinkFailAt :: (error: string, step: string, status: s32) {
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "DEVICE LINK: % at % (request %, status %)", error, step, device_link.request, status)
|
||||
line := BuilderFinish(out)
|
||||
TraceLog(DEVICE_LINK_LOG_WARNING, line)
|
||||
PackageFree(line)
|
||||
DeviceLinkFail(error)
|
||||
}
|
||||
|
||||
DeviceLinkServer :: (output: []u8) -> bool {
|
||||
saved := storage_get_setting_text("sync_server_url")
|
||||
if saved.count == 0 {
|
||||
saved = "https://api.waozi.xyz"
|
||||
}
|
||||
return SyncNodeAddress(saved, output)
|
||||
}
|
||||
|
||||
// Shows a code. With an account here, the scanning device receives it;
|
||||
// without one, the scanning device sends its account to this device.
|
||||
DeviceLinkShow :: () -> bool {
|
||||
DeviceLinkReset()
|
||||
account: AccountKeys
|
||||
device_link.sends = sync_account_load(*account) != 0
|
||||
device_link.shows = true
|
||||
if !DeviceLinkServer(device_link.server[:]) || !DeviceLinkNewKeys(*device_link.keys) ||
|
||||
!DeviceLinkNewID(device_link.id[:]) {
|
||||
DeviceLinkFail("device_link_failed")
|
||||
return false
|
||||
}
|
||||
text := DeviceLinkCodeText(TextUntilNul(device_link.id[:]), *device_link.keys, device_link.sends,
|
||||
TextUntilNul(device_link.server[:]))
|
||||
if text.count == 0 || text.count > DEVICE_LINK_CODE_MAX {
|
||||
DeviceLinkFail("device_link_failed")
|
||||
return false
|
||||
}
|
||||
for byte, index: text { device_link.code[index] = byte }
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkShowing
|
||||
device_link.expires_at = DeviceLinkClock() + DEVICE_LINK_LIFETIME
|
||||
device_link.next_poll = DeviceLinkClock()
|
||||
return true
|
||||
}
|
||||
|
||||
// Starts from a scanned code.
|
||||
DeviceLinkScan :: (text: string) -> bool {
|
||||
DeviceLinkReset()
|
||||
code := DeviceLinkParse(text)
|
||||
if !code.valid {
|
||||
DeviceLinkFail("device_link_not_a_code")
|
||||
return false
|
||||
}
|
||||
device_link.shows = false
|
||||
device_link.sends = code.sends
|
||||
for byte, index: code.id { device_link.id[index] = byte }
|
||||
for byte, index: code.public { device_link.other[index] = byte }
|
||||
for byte, index: code.server { device_link.server[index] = byte }
|
||||
if !DeviceLinkNewKeys(*device_link.keys) {
|
||||
DeviceLinkFail("device_link_failed")
|
||||
return false
|
||||
}
|
||||
device_link.expires_at = DeviceLinkClock() + DEVICE_LINK_LIFETIME
|
||||
if code.sends {
|
||||
// The other device holds the account: send our key and show the
|
||||
// digits it must match before it sends anything.
|
||||
device_link.confirmation = DeviceLinkConfirmation(*device_link.other[0], *device_link.keys.public[0])
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkWaiting
|
||||
DeviceLinkSend(DEVICE_LINK_PUT_REQUEST)
|
||||
return true
|
||||
}
|
||||
account: AccountKeys
|
||||
if sync_account_load(*account) == 0 {
|
||||
DeviceLinkFail("device_link_no_account")
|
||||
return false
|
||||
}
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkAsk
|
||||
return true
|
||||
}
|
||||
|
||||
// The person confirmed on this device: send the account.
|
||||
DeviceLinkAccept :: () {
|
||||
stage := device_link.stage
|
||||
if stage != cast(DeviceLinkStage)DeviceLinkConfirm && stage != cast(DeviceLinkStage)DeviceLinkAsk {
|
||||
return
|
||||
}
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkWorking
|
||||
DeviceLinkSend(DEVICE_LINK_PUT_RESPONSE)
|
||||
}
|
||||
|
||||
DeviceLinkCancel :: () {
|
||||
open := device_link.stage != cast(DeviceLinkStage)DeviceLinkIdle && device_link.id[0] != cast(u8)0 &&
|
||||
device_link.stage != cast(DeviceLinkStage)DeviceLinkConnected
|
||||
id := device_link.id
|
||||
server := device_link.server
|
||||
DeviceLinkReset()
|
||||
if open {
|
||||
// Let the other device stop waiting. The idle session still
|
||||
// finishes this one request.
|
||||
device_link.id = id
|
||||
device_link.server = server
|
||||
DeviceLinkSend(DEVICE_LINK_CLOSE)
|
||||
}
|
||||
}
|
||||
|
||||
DeviceLinkSend :: (request: s32) {
|
||||
if device_link.request_active {
|
||||
return
|
||||
}
|
||||
id := TextUntilNul(device_link.id[:])
|
||||
out: Vec(u8)
|
||||
path := "/api/v1/link/get"
|
||||
if request == DEVICE_LINK_PUT_REQUEST {
|
||||
public: [DEVICE_LINK_KEY * 2 + 1]u8
|
||||
unused BytesToHex(*device_link.keys.public[0], DEVICE_LINK_KEY, *public[0], public.count)
|
||||
BuilderPrint(*out, "{\"id\":\"%\",\"slot\":\"request\",\"data\":\"%\"}", id, TextUntilNul(public[:]))
|
||||
path = "/api/v1/link/put"
|
||||
} else if request == DEVICE_LINK_PUT_RESPONSE {
|
||||
account: AccountKeys
|
||||
if sync_account_load(*account) == 0 {
|
||||
DeviceLinkFail("device_link_no_account")
|
||||
return
|
||||
}
|
||||
server: [DEVICE_LINK_SERVER_MAX + 1]u8
|
||||
unused DeviceLinkServer(server[:])
|
||||
sealed := DeviceLinkSeal(*account, TextUntilNul(server[:]), id, *device_link.keys,
|
||||
*device_link.other[0], device_link.shows)
|
||||
if sealed.count == 0 {
|
||||
DeviceLinkFail("device_link_failed")
|
||||
return
|
||||
}
|
||||
BuilderPrint(*out, "{\"id\":\"%\",\"slot\":\"response\",\"data\":\"%\"}", id, sealed)
|
||||
path = "/api/v1/link/put"
|
||||
} else if request == DEVICE_LINK_CLOSE {
|
||||
BuilderPrint(*out, "{\"id\":\"%\"}", id)
|
||||
path = "/api/v1/link/close"
|
||||
} else {
|
||||
slot := ifx request == DEVICE_LINK_GET_REQUEST then "request" else "response"
|
||||
BuilderPrint(*out, "{\"id\":\"%\",\"slot\":\"%\"}", id, slot)
|
||||
}
|
||||
body := BuilderFinish(out)
|
||||
url: Vec(u8)
|
||||
BuilderPrint(*url, "%", TextUntilNul(device_link.server[:]))
|
||||
BuilderPrint(*url, "%", path)
|
||||
address := BuilderFinish(url)
|
||||
if body.count >= device_link_body.count || address.count >= device_link_url.count {
|
||||
DeviceLinkFail("device_link_failed")
|
||||
return
|
||||
}
|
||||
for byte, index: body { device_link_body[index] = byte }
|
||||
device_link_body[body.count] = cast(u8)0
|
||||
for byte, index: address { device_link_url[index] = byte }
|
||||
device_link_url[address.count] = cast(u8)0
|
||||
transport := NetworkTransport(*device_link_transfer)
|
||||
started := transport.start(transport.context, HttpRequest.{.method = "POST",
|
||||
.url = TextUntilNul(device_link_url[:]), .content_type = "application/json",
|
||||
.accept = "application/json", .body = TextUntilNul(device_link_body[:])},
|
||||
device_link_output[:])
|
||||
if !started {
|
||||
if request != DEVICE_LINK_CLOSE { DeviceLinkFail("device_link_offline") }
|
||||
return
|
||||
}
|
||||
device_link.request = request
|
||||
device_link.request_active = true
|
||||
}
|
||||
|
||||
// Handles a finished request. status is the HTTP status, 0 for no response.
|
||||
DeviceLinkFinished :: (status: s32) {
|
||||
request := device_link.request
|
||||
response := TextUntilNul(device_link_output[:])
|
||||
polling := request == DEVICE_LINK_GET_REQUEST || request == DEVICE_LINK_GET_RESPONSE
|
||||
// A poll that gets no answer, or reaches a node that is restarting or
|
||||
// busy (5xx, 429), is retried until the link expires.
|
||||
if polling && (status == 0 || status == 429 || status >= 500) {
|
||||
return
|
||||
}
|
||||
if status == 0 {
|
||||
DeviceLinkFailAt("device_link_offline", "no response", status)
|
||||
return
|
||||
}
|
||||
if request == DEVICE_LINK_PUT_REQUEST {
|
||||
if status != 200 { DeviceLinkFailAt("device_link_failed", "sending the key", status) }
|
||||
return
|
||||
}
|
||||
if request == DEVICE_LINK_PUT_RESPONSE {
|
||||
if status != 200 {
|
||||
DeviceLinkFailAt("device_link_failed", "sending the account", status)
|
||||
return
|
||||
}
|
||||
// Both devices now hold the account; the receiver closes the link.
|
||||
DeviceLinkForget(*device_link.keys)
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkConnected
|
||||
return
|
||||
}
|
||||
if request == DEVICE_LINK_CLOSE || status == 404 {
|
||||
return
|
||||
}
|
||||
if status != 200 {
|
||||
DeviceLinkFailAt("device_link_failed", "polling", status)
|
||||
return
|
||||
}
|
||||
length := ReadStringText(response, FieldAt(response, 0, "data"), device_link_message_in[:])
|
||||
message := TextFromBytes(device_link_message_in[:length])
|
||||
if request == DEVICE_LINK_GET_REQUEST {
|
||||
// The scanner's key: compare digits before sending the account.
|
||||
if length != DEVICE_LINK_KEY * 2 || HexToBytes(message, *device_link.other[0], DEVICE_LINK_KEY) == 0 {
|
||||
DeviceLinkFailAt("device_link_failed", "reading the key", status)
|
||||
return
|
||||
}
|
||||
device_link.confirmation = DeviceLinkConfirmation(*device_link.keys.public[0], *device_link.other[0])
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkConfirm
|
||||
return
|
||||
}
|
||||
// The sealed account. A scanner accepts only the key from the code.
|
||||
expected: *u8 = null
|
||||
if !device_link.shows { expected = *device_link.other[0] }
|
||||
device_link_pending = DeviceLinkOpen(message, TextUntilNul(device_link.id[:]), *device_link.keys,
|
||||
device_link.shows, expected)
|
||||
DeviceLinkForget(*device_link.keys)
|
||||
if !device_link_pending.valid {
|
||||
DeviceLinkFailAt("device_link_failed", "opening the account", status)
|
||||
return
|
||||
}
|
||||
if !DeviceLinkUseServer() {
|
||||
DeviceLinkFailAt("device_link_failed", "using the account's node", status)
|
||||
return
|
||||
}
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkReceived
|
||||
device_link.close_next = true
|
||||
}
|
||||
|
||||
// The account's node becomes this device's preferred node.
|
||||
DeviceLinkUseServer :: () -> bool {
|
||||
server := TextUntilNul(device_link_pending.server[:])
|
||||
return server.count == 0 || (SyncNodeAdd(server) && SyncNodeActivate(server))
|
||||
}
|
||||
|
||||
// The received account for the screen to import.
|
||||
DeviceLinkAccountReceived :: () -> *AccountKeys {
|
||||
if device_link.stage != cast(DeviceLinkStage)DeviceLinkReceived || !device_link_pending.valid {
|
||||
return null
|
||||
}
|
||||
return *device_link_pending.account
|
||||
}
|
||||
|
||||
DeviceLinkImported :: () {
|
||||
device_link_pending = DeviceLinkAccount.{}
|
||||
if device_link.stage == cast(DeviceLinkStage)DeviceLinkReceived {
|
||||
device_link.stage = cast(DeviceLinkStage)DeviceLinkConnected
|
||||
}
|
||||
}
|
||||
|
||||
// Advances the session; call once a frame while it is active.
|
||||
DeviceLinkPump :: () {
|
||||
if device_link.request_active {
|
||||
transport := NetworkTransport(*device_link_transfer)
|
||||
status: s32 = 0
|
||||
state := transport.poll(transport.context, *status)
|
||||
if state < 0 {
|
||||
return
|
||||
}
|
||||
device_link.request_active = false
|
||||
if device_link.stage != cast(DeviceLinkStage)DeviceLinkIdle {
|
||||
DeviceLinkFinished(ifx state == 0 then 0 else status)
|
||||
}
|
||||
return
|
||||
}
|
||||
if device_link.close_next {
|
||||
device_link.close_next = false
|
||||
DeviceLinkSend(DEVICE_LINK_CLOSE)
|
||||
return
|
||||
}
|
||||
stage := device_link.stage
|
||||
waiting := stage == cast(DeviceLinkStage)DeviceLinkShowing || stage == cast(DeviceLinkStage)DeviceLinkWaiting
|
||||
if !waiting {
|
||||
return
|
||||
}
|
||||
now := DeviceLinkClock()
|
||||
if now > device_link.expires_at {
|
||||
DeviceLinkFail("device_link_expired")
|
||||
return
|
||||
}
|
||||
if now < device_link.next_poll {
|
||||
return
|
||||
}
|
||||
device_link.next_poll = now + DEVICE_LINK_POLL
|
||||
if stage == cast(DeviceLinkStage)DeviceLinkShowing && device_link.sends {
|
||||
DeviceLinkSend(DEVICE_LINK_GET_REQUEST)
|
||||
} else {
|
||||
DeviceLinkSend(DEVICE_LINK_GET_RESPONSE)
|
||||
}
|
||||
}
|
||||
|
||||
// Tests on a desktop without a camera hand over a scanned code as a file
|
||||
// named by INBE_TEST_DEVICE_LINK_SCAN; the file is removed once read.
|
||||
DeviceLinkTestScan :: () {
|
||||
name: [32]u8
|
||||
if !CopyCString("INBE_TEST_DEVICE_LINK_SCAN", name[:]) {
|
||||
return
|
||||
}
|
||||
path := DeviceLinkGetenv(*name[0])
|
||||
if path == null || path[0] == cast(u8)0 {
|
||||
return
|
||||
}
|
||||
text := PackageRead(TextFromCString(path), DEVICE_LINK_CODE_MAX)
|
||||
defer { PackageFree(text) }
|
||||
end := text.count
|
||||
while end > 0 && (text[end - 1] == cast(u8)10 || text[end - 1] == cast(u8)13 || text[end - 1] == cast(u8)32) {
|
||||
end -= 1
|
||||
}
|
||||
if end == 0 {
|
||||
return
|
||||
}
|
||||
unused DeviceLinkRemove(path)
|
||||
unused DeviceLinkScan(text[:end])
|
||||
}
|
||||
@@ -57,7 +57,6 @@ app_apply_orientation_preference :: (app: *InnerBreeze) {
|
||||
}
|
||||
if WebPlatform() != 0 {
|
||||
DeviceWebOrientation(app.orientation_mode)
|
||||
DeviceWebResize()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#import, file "metrics.zi";
|
||||
#import, file "text_buffers.zi";
|
||||
#import, file "../platform/raylib_text_input.zi";
|
||||
#import, file "../platform/uri.zi";
|
||||
#import "open_uri"
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "dpi"
|
||||
#import "drawing_props"
|
||||
#import "geometry"
|
||||
#import, file "../platform/environment.zi";
|
||||
#import, file "../platform/raylib_host.zi";
|
||||
@@ -66,7 +67,11 @@ UpdateDPI :: (view_width: s32, view_height: s32) {
|
||||
// The user's zoom scales everything drawn and narrows or widens the
|
||||
// layout; the text is baked at the size it ends up on screen.
|
||||
dpi_state = ZoomDPI(dpi_state, dpi_user_zoom)
|
||||
#if #defined(PLATFORM_WEB) == false {
|
||||
// The camera draws at render_scale, so vector icons rasterize at it too
|
||||
// (the web canvas adds its devicePixelRatio itself).
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
SetPaintPixelScale(dpi_state.render_scale)
|
||||
} else {
|
||||
RaylibSetZoom(dpi_state.render_scale)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ HostGetEnvironment :: (name: *u8) -> *u8 #foreign c "getenv";
|
||||
}
|
||||
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
#import, file "../platform/android/activity_jni.zi";
|
||||
#import "android_jni"
|
||||
}
|
||||
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
@@ -94,9 +94,9 @@ app_locale_preferences :: () -> string {
|
||||
}
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
host_locale_preferences[0] = cast(u8)0
|
||||
session: ActivityJniSession
|
||||
if activity_jni_attach(*session) != 0 {
|
||||
method := JniMethod(*session, "localePreferences", "()Ljava/lang/String;")
|
||||
session: AndroidJniSession
|
||||
if AndroidJniAttachCurrent(*session) != 0 {
|
||||
method := AndroidJniMethod(*session, "localePreferences", "()Ljava/lang/String;")
|
||||
env := session.env
|
||||
if method != null {
|
||||
result := env.functions.CallObjectMethodA(env, session.activity,
|
||||
@@ -109,7 +109,7 @@ app_locale_preferences :: () -> string {
|
||||
}
|
||||
}
|
||||
}
|
||||
activity_jni_detach(*session)
|
||||
AndroidJniDetachCurrent(*session)
|
||||
}
|
||||
return app_text_from_cstring(*host_locale_preferences[0], 256)
|
||||
}
|
||||
|
||||
@@ -5,18 +5,21 @@
|
||||
using AppNavRoute;
|
||||
|
||||
// Storage follows the app catalog; there is no separate favorites quota.
|
||||
LAUNCHER_APP_COUNT :: 5
|
||||
LAUNCHER_APP_COUNT :: 6
|
||||
|
||||
LauncherRoutes :: () -> [LAUNCHER_APP_COUNT]s32 {
|
||||
// Leaderboard comes last, so adding it moved no existing app.
|
||||
return .{APP_NAV_ROUTE_DIARY, APP_NAV_ROUTE_HABITS,
|
||||
APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_LUMI, APP_NAV_ROUTE_PRACTICE}
|
||||
APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_LUMI, APP_NAV_ROUTE_PRACTICE,
|
||||
APP_NAV_ROUTE_LEADERBOARD}
|
||||
}
|
||||
|
||||
// Leaderboard is installed with the other apps but is not pinned.
|
||||
LauncherDefaults :: (routes: []s32, desktop: bool) -> s32 {
|
||||
defaults: [LAUNCHER_APP_COUNT]s32 = .{APP_NAV_ROUTE_LUMI,
|
||||
defaults: [5]s32 = .{APP_NAV_ROUTE_LUMI,
|
||||
APP_NAV_ROUTE_HABITS, APP_NAV_ROUTE_PRACTICE,
|
||||
APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_DIARY}
|
||||
count := cast(s32)(ifx desktop then LAUNCHER_APP_COUNT else 3)
|
||||
count := cast(s32)(ifx desktop then 5 else 3)
|
||||
if routes.count < count { return 0 }
|
||||
for index: cast(s32)0..count - 1 {
|
||||
routes[index] = defaults[index]
|
||||
|
||||
@@ -31,11 +31,5 @@ LocaleDropdown :: (session: Session, props: DropdownProps) -> DropdownResult {
|
||||
if resolved.selected_index < 0 || resolved.selected_index >= count {
|
||||
resolved.selected_index = 0
|
||||
}
|
||||
if resolved.highlight_index < 0 || resolved.highlight_index >= count {
|
||||
resolved.highlight_index = resolved.selected_index
|
||||
}
|
||||
if resolved.scroll_offset < 0 {
|
||||
resolved.scroll_offset = 0
|
||||
}
|
||||
return Dropdown(session, resolved, options[0:count])
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
#import, file "route_host.zi";
|
||||
#import, file "text_buffers.zi";
|
||||
#import, file "../core/types.zi";
|
||||
#import, file "../platform/uri.zi";
|
||||
#import "open_uri"
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
|
||||
@@ -21,6 +21,9 @@ app_main_tab_route :: (main_tab: s32) -> s32 {
|
||||
if main_tab == APP_MAIN_TAB_LUMI {
|
||||
return APP_NAV_ROUTE_LUMI
|
||||
}
|
||||
if main_tab == APP_MAIN_TAB_LEADERBOARD {
|
||||
return APP_NAV_ROUTE_LEADERBOARD
|
||||
}
|
||||
return APP_NAV_ROUTE_NONE
|
||||
}
|
||||
|
||||
@@ -41,6 +44,9 @@ app_main_tab_for_route :: (route: s32) -> s32 {
|
||||
if route == APP_NAV_ROUTE_LUMI {
|
||||
return APP_MAIN_TAB_LUMI
|
||||
}
|
||||
if route == APP_NAV_ROUTE_LEADERBOARD {
|
||||
return APP_MAIN_TAB_LEADERBOARD
|
||||
}
|
||||
return APP_MAIN_TAB_NONE
|
||||
}
|
||||
|
||||
@@ -58,6 +64,9 @@ app_screen_for_main_tab :: (main_tab: s32) -> s32 {
|
||||
if main_tab == APP_MAIN_TAB_LUMI {
|
||||
return ScreenLumi
|
||||
}
|
||||
if main_tab == APP_MAIN_TAB_LEADERBOARD {
|
||||
return ScreenLeaderboard
|
||||
}
|
||||
return ScreenStart
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 414 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user