Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
789db7cda5 | ||
|
|
fe042b64f0 | ||
|
|
762fa24b03 | ||
|
|
9e845cf24f | ||
|
|
0f3d54e21c | ||
|
|
44ac49655c | ||
|
|
10de2aae33 | ||
|
|
844eba30b8 | ||
|
|
356c51e0b5 | ||
|
|
dbaea786b1 | ||
|
|
005e3f3678 | ||
|
|
4749d9ed58 | ||
|
|
36f4e141e4 | ||
|
|
7d90c2ef21 | ||
|
|
bf5b521ad8 | ||
|
|
00aa79b87f | ||
|
|
e18a03a483 | ||
|
|
d33c565cfc | ||
|
|
060f5dd2b5 | ||
|
|
14e5412141 | ||
|
|
0a83f2119e | ||
|
|
66192aa502 | ||
|
|
7ccea34efb | ||
|
|
e93fce8460 | ||
|
|
dd3568583e | ||
|
|
0e7c456744 | ||
|
|
8f6b9dbae0 | ||
|
|
d48d80d716 | ||
|
|
ca6bc03eb0 | ||
|
|
141f6c4ddb | ||
|
|
e65c28aa09 | ||
|
|
92533a51e4 | ||
|
|
a1d9b90359 | ||
|
|
03b3f11fc0 | ||
|
|
5ddfef619d | ||
|
|
a4f0f53ae8 | ||
|
|
e45d781564 | ||
|
|
2545f50ac6 | ||
|
|
3c863218e9 | ||
|
|
309fabaeb3 | ||
|
|
c7be7b47c1 | ||
|
|
37a325b87d | ||
|
|
2807d7d905 | ||
|
|
aa501b500a | ||
|
|
9fecd988b7 | ||
|
|
abc10abb20 | ||
|
|
207ece5282 | ||
|
|
f6b05f8dd2 | ||
|
|
c2d451b35b | ||
|
|
788c29ac66 | ||
|
|
cdbb586e4b | ||
|
|
50249ad05b | ||
|
|
90c1855e57 | ||
|
|
7bf40199d0 | ||
|
|
6c983c1d70 | ||
|
|
f9c12273e1 | ||
|
|
989f484068 | ||
|
|
13099703ac | ||
|
|
600c9dc177 | ||
|
|
6e5836684a | ||
|
|
0d0438f912 | ||
|
|
bac4a1d519 | ||
|
|
b8bfb7ff1c | ||
|
|
8408d63f84 | ||
|
|
29594aa1ef | ||
|
|
30e3bf7623 | ||
|
|
f3d543afe8 | ||
|
|
93d3f5b607 | ||
|
|
2bbbe943f7 | ||
|
|
566f2bee8e | ||
|
|
3bcf2c0998 | ||
|
|
42af5a6ad2 | ||
|
|
b191dbb6e2 | ||
|
|
e5c5bdd65a | ||
|
|
a21f90b858 | ||
|
|
39df1dffc8 | ||
|
|
bd610f9d93 | ||
|
|
4ea83c536a | ||
|
|
9fdbdbdd52 | ||
|
|
0c86daacf3 | ||
|
|
dd02f7fd3c | ||
|
|
6271db0d6f | ||
|
|
2d213f777d | ||
|
|
0bd92cf953 | ||
|
|
6b5ca2d431 | ||
|
|
7198ba453e | ||
|
|
cf1323ac8f | ||
|
|
e2303c3ab4 | ||
|
|
afc9674b0a | ||
|
|
3c4416ba10 | ||
|
|
7123b1b722 | ||
|
|
e52588ce9a | ||
|
|
9abbea9ab2 | ||
|
|
10c353dd17 | ||
|
|
2149352b69 | ||
|
|
ee1109eef6 | ||
|
|
9f1fe26998 | ||
|
|
306e25e79a | ||
|
|
6ae3f5853d | ||
|
|
c9a0eae23c | ||
|
|
7ec840260e | ||
|
|
0acdc75398 | ||
|
|
28788c067a | ||
|
|
82ed01d010 | ||
|
|
6cd88c56c6 | ||
|
|
bb96835b32 | ||
|
|
42b01535f1 | ||
|
|
d3430e4f6a | ||
|
|
d121f630ab | ||
|
|
615ddbe53d | ||
|
|
58914982bb | ||
|
|
868e359d25 | ||
|
|
830e990583 | ||
|
|
0afc5867d1 | ||
|
|
ac19ebafaf | ||
|
|
f7e09e709c | ||
|
|
b46306d1e3 | ||
|
|
cee04c12a4 | ||
|
|
4e2c52b4c9 | ||
|
|
cdd6c86d0c | ||
|
|
b0f844c1c7 | ||
|
|
15d89c91e1 | ||
|
|
113d8dafdc | ||
|
|
8e06d7a84c | ||
|
|
025557456c | ||
|
|
0f314013f2 | ||
|
|
458596eefc | ||
|
|
18e0db51c5 | ||
|
|
1c12568e0e | ||
|
|
b76c150489 | ||
|
|
75a1146475 |
No files matched your search
@@ -1,4 +1,6 @@
|
||||
build-essential
|
||||
apt-utils
|
||||
gnupg
|
||||
ffmpeg
|
||||
ca-certificates
|
||||
desktop-file-utils
|
||||
|
||||
@@ -9,3 +9,5 @@ assets/profile-pictures/flowers.png
|
||||
# Narration receipts the practice packages are built from
|
||||
design/tai-chi/narration-receipt.json
|
||||
design/tai-chi/narration-male-receipt.json
|
||||
# Exact digest-bound Arcade library artwork shipped for offline browsing.
|
||||
apps/bundled/arcade.games/d7ab495066a69e7c09d490fdcc51f48e8e032dd2112372df800d8b2fe9c7df0b.zx
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
# lookup would try to run instead of the cmake program. The server generates
|
||||
# its Go with Ziran, Breeze's own toolchain.
|
||||
make /src/build/ziran-toolchain/bin/zi2c
|
||||
make -C "$server" BUILD_DIR=/src/build/sync-test-server CMAKE="$(command -v cmake)" \
|
||||
make -C "$server" BUILD_DIR="$server/build" CMAKE="$(command -v cmake)" \
|
||||
ZIRAN=/src/build/ziran-toolchain/bin/ziran build
|
||||
DAOCHI_BIN="$server/daochi" make sync-server-test
|
||||
git -c safe.directory="$server" -C "$server" diff --exit-code "$commit" -- .
|
||||
@@ -1 +1 @@
|
||||
c692ab12f21e5bf1c5901363bcd9b449b55efd2f
|
||||
487666062141742ad867223210799e4a4f6dbecd
|
||||
@@ -106,11 +106,6 @@ jobs:
|
||||
mkdir -p ~/.android
|
||||
printf '%s' "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
|
||||
|
||||
- name: Prepare Firebase config
|
||||
env:
|
||||
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
|
||||
run: ./scripts/write-google-services-json.sh
|
||||
|
||||
- name: Copy Android assets
|
||||
run: ./scripts/copy-android-assets.sh
|
||||
|
||||
|
||||
@@ -58,6 +58,18 @@ jobs:
|
||||
fi
|
||||
python3 scripts/check-file-size.py --since "$base"
|
||||
|
||||
google-free:
|
||||
name: Google libraries only in the gplay edition
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# The normal and F-Droid builds read no Google library or plugin; only
|
||||
# gplay-scoped configurations and gplay files may name one.
|
||||
- name: Keep Google libraries out of the normal and F-Droid build files
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
|
||||
guard-package-urls:
|
||||
name: Package URLs are public HTTPS
|
||||
runs-on: ubuntu-latest
|
||||
@@ -201,7 +213,7 @@ jobs:
|
||||
|
||||
- name: Install Web Dependencies
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
|
||||
|
||||
- name: Set up Emscripten
|
||||
uses: ./.github/actions/emscripten
|
||||
|
||||
@@ -65,6 +65,14 @@ jobs:
|
||||
- name: Build and scan with F-Droid without cached package sources
|
||||
run: python3 build/xyz.waozi.inbe/scripts/check-fdroid.py
|
||||
|
||||
# F-Droid's scanner checked the source; its APK must hold no Google
|
||||
# library either.
|
||||
- name: Keep Google libraries out of F-Droid's APK
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
with:
|
||||
packages: tmp/*.apk
|
||||
source: ''
|
||||
|
||||
- name: Preserve APK, exact metadata and scanner evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
- name: Install Packages
|
||||
if: ${{ env.USE_RELEASED_WEB != 'true' }}
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
|
||||
|
||||
- name: Set Up Emscripten
|
||||
if: ${{ env.USE_RELEASED_WEB != 'true' }}
|
||||
@@ -132,6 +132,17 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
# apt users follow the published release at https://breeze.waozi.xyz/apt.
|
||||
- name: Build APT Repository
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
command -v apt-ftparchive >/dev/null || sudo apt-get install -y --no-install-recommends apt-utils
|
||||
sh scripts/build-apt-repo.sh build/site/apt "$SITE_RELEASE_VERSION"
|
||||
|
||||
- name: Upload Web diagnostics after a failed build
|
||||
if: ${{ failure() && env.USE_RELEASED_WEB != 'true' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
name: Publish Amazon Appstore
|
||||
|
||||
# Retries the Amazon Appstore upload and submission for an already published
|
||||
# release. The Release workflow runs the same script for every new version.
|
||||
"on":
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Published release version, such as 2.1.60
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Upload release APK to Amazon Appstore
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
AMAZON_CLIENT_ID: ${{ secrets.AMAZON_CLIENT_ID }}
|
||||
AMAZON_CLIENT_SECRET: ${{ secrets.AMAZON_CLIENT_SECRET }}
|
||||
AMAZON_APP_ID: ${{ secrets.AMAZON_APP_ID }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download the published release APK
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "::error::version must be numeric, such as 2.1.60"
|
||||
exit 1
|
||||
fi
|
||||
apk="inbe-$VERSION.apk"
|
||||
mkdir -p build/release/android
|
||||
gh release download "v$VERSION" --repo "$GITHUB_REPOSITORY" --pattern "$apk" --dir build/release/android
|
||||
expected=$(gh release view "v$VERSION" --repo "$GITHUB_REPOSITORY" --json assets \
|
||||
--jq ".assets[] | select(.name == \"$apk\") | .digest")
|
||||
actual="sha256:$(sha256sum "build/release/android/$apk" | cut -d' ' -f1)"
|
||||
if [ "$actual" != "$expected" ]; then
|
||||
echo "::error::$apk digest $actual does not match the release asset $expected"
|
||||
exit 1
|
||||
fi
|
||||
echo "Verified $apk $actual"
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Upload APK to Amazon Appstore
|
||||
env:
|
||||
AMAZON_RELEASE_FILE: build/release/android/inbe-${{ inputs.version }}.apk
|
||||
run: node scripts/upload-amazon-appstore.mjs
|
||||
@@ -323,7 +323,7 @@ jobs:
|
||||
|
||||
- name: Install Web Dependencies
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
|
||||
|
||||
- name: Set up Emscripten
|
||||
uses: ./.github/actions/emscripten
|
||||
@@ -380,7 +380,7 @@ jobs:
|
||||
|
||||
- name: Install Web Dependencies
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
|
||||
|
||||
- name: Set up Emscripten
|
||||
uses: ./.github/actions/emscripten
|
||||
@@ -437,7 +437,7 @@ jobs:
|
||||
|
||||
- name: Install Web Dependencies
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt python3-pil
|
||||
|
||||
- name: Set up Emscripten
|
||||
uses: ./.github/actions/emscripten
|
||||
@@ -978,15 +978,30 @@ jobs:
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
WAOZI_DRIVE_PICKER_KEY: ${{ secrets.WAOZI_DRIVE_PICKER_KEY }}
|
||||
WAOZI_DRIVE_PROJECT_NUMBER: ${{ secrets.WAOZI_DRIVE_PROJECT_NUMBER }}
|
||||
WAOZI_DRIVE_PICKER_ORIGIN: ${{ secrets.WAOZI_DRIVE_PICKER_ORIGIN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
chmod +x droid/gradlew
|
||||
./droid/gradlew -p droid assembleRelease assembleGplay \
|
||||
./droid/gradlew -p droid assembleRelease \
|
||||
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
# Only the Google Play edition's own Gradle run reads its Google plugin.
|
||||
./droid/gradlew -p droid assembleGplay \
|
||||
-Pwaozi.drivePickerKey="$WAOZI_DRIVE_PICKER_KEY" \
|
||||
-Pwaozi.driveProjectNumber="$WAOZI_DRIVE_PROJECT_NUMBER" \
|
||||
-Pwaozi.drivePickerOrigin="$WAOZI_DRIVE_PICKER_ORIGIN" \
|
||||
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
./droid/gradlew -p droid bundleGplay \
|
||||
-Pwaozi.drivePickerKey="$WAOZI_DRIVE_PICKER_KEY" \
|
||||
-Pwaozi.driveProjectNumber="$WAOZI_DRIVE_PROJECT_NUMBER" \
|
||||
-Pwaozi.drivePickerOrigin="$WAOZI_DRIVE_PICKER_ORIGIN" \
|
||||
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
@@ -1034,6 +1049,24 @@ jobs:
|
||||
done
|
||||
cp "build/android/inbe-$VERSION-gplay.aab" build/release/android/
|
||||
|
||||
# Only the Google Play edition may hold a Google library, in its build
|
||||
# files as in its APK. The universal and both x86 APK names end in a digit.
|
||||
- name: Keep Google libraries out of the normal and F-Droid APKs
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
with:
|
||||
packages: >-
|
||||
build/release/android/inbe-*[0-9].apk
|
||||
build/release/android/inbe-*-arm*.apk
|
||||
build/release/android/inbe-*-fdroid.apk
|
||||
# The Google check must still recognise Play Billing, or its passes on
|
||||
# the other editions prove nothing.
|
||||
- name: Find Play Billing in the Google Play APK
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
with:
|
||||
packages: build/release/android/inbe-*-gplay.apk
|
||||
source: ''
|
||||
expect-google: 'true'
|
||||
|
||||
- name: Upload Android Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*.wasm
|
||||
build/
|
||||
/backup/
|
||||
/work/
|
||||
/notes/
|
||||
/output/
|
||||
tmp/
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
- Practice media (pictures, course data, recordings) lives in the
|
||||
`practices` package (waozixyz/practices), not under
|
||||
`assets/`. Commit media there, then update the lock here.
|
||||
- Add the numeric release to `CHANGELOG.md`, then run `./update_version.sh`.
|
||||
- Bump versions only for a release actually being made. Until then, note
|
||||
every change under one `## [Unreleased]` section of `CHANGELOG.md` (and of
|
||||
`apps/<app>/CHANGELOG.md`); App packages waits for the next version. At
|
||||
release, number that section, then run `./update_version.sh`.
|
||||
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.
|
||||
|
||||
@@ -1,7 +1,68 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.62] - 2026-11-03
|
||||
|
||||
- Invite friends with a referral code: receive 20 Dew immediately after accepting a valid code, without a purchase. Earn 5% Dew when invited friends buy Dew, and see everyone who accepted with their acceptance dates.
|
||||
- Shrink Arcade library artwork to 256-pixel WebP thumbnails while retaining every game and shipped app.
|
||||
- Include Arcade and its library artwork offline, while games download separately.
|
||||
- Keep every shipped app and also include complete apps below 1 MB without changing app selections.
|
||||
|
||||
- Edit app order with a single move grip and no extra Hide or Show overlay.
|
||||
- Close List settings after saving a list successfully.
|
||||
- Choose soda, coffee, bubble tea, chocolate and candle pictures for habit rewards.
|
||||
- Keep notifications visible longer and make habit reminders work when the app is closed, with notification permission and provider settings respected.
|
||||
|
||||
- Backups always need a password: the old unprotected key save is gone, and Android device backups no longer copy your account.
|
||||
- Fix Add friend failing with "Could not start this action".
|
||||
- Sign in with your backup file and its password, name backups after your username, and always protect new backups with a password.
|
||||
- Friends now opens the shared Profile page, and Dew gifts between friends are gone.
|
||||
- Your account follows you between waozi.xyz sites here too, including signing out everywhere.
|
||||
|
||||
- The Google Play edition can optionally save and open encrypted account backups with Google Drive after Google Cloud setup.
|
||||
|
||||
- Repeated local builds reuse storage instead of keeping a new copy for each run.
|
||||
- Linux: install from the signed APT repository and get updates with apt.
|
||||
- Filter Android account-key imports to key files and related backup types.
|
||||
- Practice results show smooth, labeled mood faces with a clear selection.
|
||||
- Apps keeps each grid card's ⋮ control unchanged while editing.
|
||||
- Mark Telegram-relayed Lumi messages with their source.
|
||||
- Collapse each break kind in settings and expand it on click.
|
||||
- Keep Linux break reminder text and progress bars in separate rows.
|
||||
- Catalog games can award their own achievements, with the usual top-right notification.
|
||||
- Friends, Lists and requests show the profile picture each friend chose in any app, abstract pictures included.
|
||||
- Your profile picture reaches friends the same way as from every other app, and only once you choose one.
|
||||
- A profile picture chosen in another app now shows in your own profile too.
|
||||
- Pictures in a practice no longer flicker while its narration downloads.
|
||||
- Sun Salutation narration speaks every pose and names the leg in each lunge.
|
||||
- Sun Salutation guides each pose with a form cue, the leg that steps back and the next pose, settles in before the first round and rests after the last.
|
||||
- Sun Salutation names the next pose in one quiet centered line.
|
||||
- Breath and bell cues play even when Practices is still loading at startup.
|
||||
- Sync recovers when an earlier full download stopped partway.
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Sync no longer gets stuck after something is deleted.
|
||||
- Photos in Trash stop using storage and are deleted after 30 days unless Diary shows them.
|
||||
- Cleared remote data stays 30 days; importing the same key brings it back.
|
||||
- The download is about 16 MB smaller.
|
||||
- Chinese, Japanese and Korean text displays correctly.
|
||||
- More of the app is translated, including Profile and update notes.
|
||||
|
||||
## [2.1.60] - 2026-10-29
|
||||
|
||||
- Hide apps from the library and restore them through Edit.
|
||||
- Use one simple reorder grip to the left of app icons in list and grid views.
|
||||
- Unify Profile rows and put sent friend requests beside names with a cancel action.
|
||||
|
||||
## [2.1.59] - 2026-10-28
|
||||
|
||||
- Keep habits, practices, session counts and game progress free of storage charges, even when account storage is full.
|
||||
- Count custom notes, Diary and media toward storage, and keep progress syncing past queued uploads that need more space.
|
||||
- Show full public IDs in centered, grouped fields.
|
||||
|
||||
## [2.1.58] - 2026-10-28
|
||||
|
||||
- Show friend pictures and equipped Apfelwurm skins in leaderboards; hide repeated headings and single-choice selectors.
|
||||
- Keep downloaded Arcade games and saved progress across updates.
|
||||
- Show premium username prices, confirm Dew purchases and open top-up when needed. Existing usernames stay free to keep.
|
||||
- Align Profile leaderboard columns and improve Friends input, profile pictures and app rearranging.
|
||||
|
||||
@@ -186,6 +186,8 @@ OQS_DIR ?= build/packages/oqs
|
||||
RAYLIB_DIR = build/packages/raylib/src
|
||||
RAYLIB_BUILD_DIR := $(NATIVE_VENDOR_BUILD_DIR)/raylib
|
||||
RAYLIB_A := $(RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WEBP_BUILD_DIR := $(NATIVE_VENDOR_BUILD_DIR)/kryon-webp
|
||||
WEBP_A := $(WEBP_BUILD_DIR)/libkryonwebp.a
|
||||
WIN64_ARCH := x86_64
|
||||
WIN64_CC ?= $(or $(WIN_CC),x86_64-w64-mingw32-gcc)
|
||||
WIN64_AR ?= $(or $(WIN_AR),x86_64-w64-mingw32-ar)
|
||||
@@ -208,7 +210,7 @@ WIN64_RESOURCE := $(BUILD_OBJ_DIR)/windows/$(WIN64_ARCH)/$(APP_NAME).res
|
||||
RAYLIB_SOURCES := $(if $(wildcard $(RAYLIB_DIR)),$(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.h' \)))
|
||||
|
||||
KRYON_ICON_DIR := icons
|
||||
KRYON_ICON_FILES := $(shell find $(KRYON_DIR)/$(KRYON_ICON_DIR) -path '*/review/*' -prune -o -type f \( -name '*.png' -o -name '*.json' \) -print 2>/dev/null | LC_ALL=C sort)
|
||||
KRYON_ICON_FILES := $(shell find $(KRYON_DIR)/$(KRYON_ICON_DIR) -path '*/review/*' -prune -o -type f \( -name '*.webp' -o -name '*.png' -o -name '*.json' \) -print 2>/dev/null | LC_ALL=C sort)
|
||||
KRYON_GENERATED_INCLUDE_DIR := $(BUILD_OBJ_DIR)/kryon/generated/include
|
||||
KRYON_GENERATED_SRC_DIR := $(BUILD_OBJ_DIR)/kryon/generated/src
|
||||
KRYON_UI_ZI := $(addprefix $(KRYON_DIR)/src/ui/,$(shell cat $(KRYON_DIR)/src/ui/modules.txt))
|
||||
@@ -368,7 +370,7 @@ LOCALE_FILES := $(wildcard locales/*.txt)
|
||||
# The practice media is the practices package, packaged under
|
||||
# assets/practices/ (scripts/practice_media.py).
|
||||
PRACTICE_MEDIA := build/packages/practices
|
||||
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png $(PRACTICE_MEDIA)/whm/1.png $(PRACTICE_MEDIA)/whm/2.png $(PRACTICE_MEDIA)/meditation/1.png assets/pet/egg1.png $(wildcard $(PRACTICE_MEDIA)/*/banner*.png) $(wildcard $(PRACTICE_MEDIA)/sunsalutation/characters/*/*.png) $(wildcard $(PRACTICE_MEDIA)/taichi/*.png $(PRACTICE_MEDIA)/taichi/*/*.png) $(PRACTICE_MEDIA)/taichi/course.tch
|
||||
IMAGE_FILES := assets/app/icon.webp assets/easteregg/art.webp assets/easteregg/waozi.png $(PRACTICE_MEDIA)/whm/1.webp $(PRACTICE_MEDIA)/whm/2.webp $(PRACTICE_MEDIA)/meditation/1.webp assets/pet/egg1.png $(wildcard $(PRACTICE_MEDIA)/*/banner*.webp) $(wildcard $(PRACTICE_MEDIA)/sunsalutation/characters/*/*.png) $(wildcard $(PRACTICE_MEDIA)/taichi/*.png $(PRACTICE_MEDIA)/taichi/*/*.png) $(PRACTICE_MEDIA)/taichi/course.tch
|
||||
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
|
||||
FONT_SUBSET_DIR := assets/fonts/subset
|
||||
FONT_SUBSET_CORPUS := locales assets/fonts/input_common.txt assets/fonts/ui_symbols.txt $(PRACTICE_MEDIA)/astral_projection/text $(PRACTICE_MEDIA)/workout/text
|
||||
@@ -382,10 +384,9 @@ EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
|
||||
STYLE_FILES := $(wildcard $(KSS_DIR)/styles/*.kss) \
|
||||
$(wildcard assets/styles/*.kss) \
|
||||
$(wildcard themes/catalog_*.kss)
|
||||
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
|
||||
IMAGE_FILES += assets/app/icon-sky-cradle.webp assets/app/icon-ink-and-air.webp
|
||||
IMAGE_FILES += assets/social/telegram.svg $(wildcard assets/social/*.png assets/social/*.webp)
|
||||
IMAGE_FILES += $(KRYON_DIR)/icons/ui.webp $(KRYON_DIR)/icons/pfp.webp
|
||||
APP_BUNDLES := $(addprefix $(BUILD_DIR)/apps/,lists.zx habits.zx practices.zx diary.zx lumi.zx leaderboard.zx)
|
||||
INBE_BUNDLE := $(BUILD_DIR)/inbe.zx
|
||||
INBE_FULL_BUNDLE := $(BUILD_DIR)/inbe-full.zx
|
||||
@@ -396,7 +397,7 @@ APP_RESOURCES += $(wildcard apps/*/achievements.json) $(wildcard apps/*/achievem
|
||||
APP_RESOURCES += $(wildcard assets/*/sidebar.shape)
|
||||
|
||||
APPS_BUNDLE ?= build/apps-ui/apps.zx
|
||||
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) $(APPS_BUNDLE) assets/app/icon.png
|
||||
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) $(APPS_BUNDLE) assets/app/icon.webp
|
||||
KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated
|
||||
# Dependencies are imported as PACKAGE/Module through their linked packages.
|
||||
ZI_PACKAGE_PATHS := $(shell sh scripts/package-paths.sh)
|
||||
@@ -499,7 +500,11 @@ BINARY_NAME := $(APP_EXECUTABLE)-$(NATIVE_PLATFORM)-$(ARCH)
|
||||
TARGET := $(NATIVE_BIN_DIR)/$(BINARY_NAME)
|
||||
# Native sources compile to per-file objects through mk/native-objects.mk.
|
||||
NATIVE_OBJ_DIR := $(abspath $(BUILD_OBJ_DIR)/native)
|
||||
NATIVE_JOBS ?= $(shell nproc 2>/dev/null || echo 4)
|
||||
# Native objects build on half of the CPUs at low priority, so the desktop
|
||||
# and other work keep the machine. `NATIVE_JOBS=N` and `NATIVE_NICE=` override.
|
||||
NATIVE_JOBS ?= $(shell n=$$(nproc 2>/dev/null || echo 4); n=$$((n / 2)); \
|
||||
[ $$n -lt 1 ] && n=1; echo $$n)
|
||||
NATIVE_NICE ?= nice -n 10
|
||||
NATIVE_COMPILE_FLAGS = $(KRYON_NATIVE_CFLAGS) $(APP_INCLUDE) $(KRYON_INCLUDE) \
|
||||
-iquote$(KRYON_LIBRARY_BUILD_DIR)/c $(SQLITE_INCLUDE) $(LIBOQS_INCLUDE) \
|
||||
$(KRYON_NATIVE_BACKEND_CFLAGS) -DHAS_LIBOQS=1 -DSUPPORT_MODULE_RAUDIO=1 \
|
||||
@@ -537,8 +542,12 @@ $(RAYLIB_A): $(RAYLIB_SOURCES) $(RAYLIB_DIR)/Makefile
|
||||
|
||||
KRYON_NATIVE_CFLAGS := $(CFLAGS)
|
||||
KRYON_SRCS += $(KRYON_RAYLIB_WRAPPERS_C)
|
||||
KRYON_NATIVE_BACKEND_DEPS := $(RAYLIB_A)
|
||||
KRYON_NATIVE_BACKEND_LIBS := $(RAYLIB_A)
|
||||
$(WEBP_A): $(KRYON_DIR)/cmake/WebP.cmake $(KRYON_DIR)/cmake/webp/CMakeLists.txt $(wildcard build/packages/libwebp/src/*/*.c build/packages/libwebp/src/*/*.h)
|
||||
$(CMAKE) -S $(KRYON_DIR)/cmake/webp -B $(WEBP_BUILD_DIR) -DWEBP_DIR="$(abspath build/packages/libwebp)" -DCMAKE_BUILD_TYPE=Release
|
||||
$(CMAKE) --build $(WEBP_BUILD_DIR) --target kryonwebp --parallel 2
|
||||
|
||||
KRYON_NATIVE_BACKEND_DEPS := $(RAYLIB_A) $(WEBP_A)
|
||||
KRYON_NATIVE_BACKEND_LIBS := $(RAYLIB_A) $(WEBP_A)
|
||||
KRYON_NATIVE_BACKEND_CFLAGS := -DKRYON_BACKEND_RAYLIB=1 $(RAY_CFLAGS)
|
||||
KRYON_NATIVE_BACKEND_LDLIBS := $(RAY_LDLIBS)
|
||||
ifneq ($(strip $(APP_GIO_LDLIBS)),)
|
||||
@@ -661,8 +670,9 @@ $(KRYON_KSS_C) $(KRYON_KSS_H): $(KRYON_KSS_STAMP)
|
||||
@test -f $@
|
||||
|
||||
$(KRY_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES) $(GAME2D_MODULES) $(DAOCHI_CLIENT_MODULES) $(wildcard build/packages/entity/src/*.zi) $(ZIRAN_STD_MODULES) $(SYNC_RETRY_SOURCE) | build-laws zi-check
|
||||
# Imports can change emitted paths; never retain an obsolete header/code pair.
|
||||
rm -rf $(KRY_GEN_DIR)
|
||||
# --prune-stale removes generated files this run no longer writes, so an
|
||||
# obsolete header/code pair never survives. Unchanged files keep their
|
||||
# timestamps, so only C that actually changed recompiles.
|
||||
mkdir -p $(KRY_GEN_DIR)
|
||||
sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --prune-stale --root . \
|
||||
$(foreach define,$(ZI_NATIVE_DEFINES),--define $(define)) \
|
||||
@@ -723,7 +733,7 @@ $(TARGET): | zi-check
|
||||
$(shell mkdir -p $(NATIVE_OBJ_DIR))
|
||||
$(file >$(NATIVE_OBJ_DIR)/inputs.mk,NATIVE_SOURCES := $(APP_SRCS) $(GENERATED_NATIVE_C) $(EMBEDDED_ASSETS_C) $(SQLITE_SRC))
|
||||
$(file >>$(NATIVE_OBJ_DIR)/inputs.mk,NATIVE_CFLAGS := $(NATIVE_COMPILE_FLAGS))
|
||||
+@$(MAKE) --no-print-directory -f mk/native-objects.mk \
|
||||
+@$(NATIVE_NICE) $(MAKE) --no-print-directory -f mk/native-objects.mk \
|
||||
$(if $(filter -j%,$(MAKEFLAGS)),,-j$(NATIVE_JOBS)) \
|
||||
CC='$(CC)' OBJ_DIR=$(NATIVE_OBJ_DIR)
|
||||
$(CC) $(KRYON_NATIVE_CFLAGS) \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"arcade": {
|
||||
"id": "inbe.arcade",
|
||||
"version": "0.7.118",
|
||||
"host_api": 41,
|
||||
"key_id": "inbe-2026-10",
|
||||
"bundled": true,
|
||||
"path": "apps/bundled/arcade.zx",
|
||||
"bytes": 7695,
|
||||
"sha256": "1f07d86328efd0a14a85ff69b58b9721b6d49e3e5e92849bc780fb8152f95560",
|
||||
"source": "https://github.com/waozixyz/arcade"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.26] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [1.3.25] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.3.24] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.3.23] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.3.22] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.16] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Choose soda, coffee, bubble tea, chocolate and candle pictures for custom rewards.
|
||||
|
||||
## [1.3.15] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.3.14] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.3.13] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.3.12] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -164,7 +164,7 @@ Alpha :: (color: Color, opacity: float32) -> Color {
|
||||
}
|
||||
|
||||
UiImage :: (label: string, x: float32, y: float32) -> ImageProps {
|
||||
return ImageProps.{.asset_path = "icons/ui.png", .alt_text = label,
|
||||
return ImageProps.{.asset_path = "icons/ui.webp", .alt_text = label,
|
||||
.source = Rectangle.{x, y, 64.0, 64.0}}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#import "modal_frame_widget"
|
||||
#import "scroll_props"
|
||||
#import "scroll_widget"
|
||||
#import "image_props"
|
||||
#import "image_widget"
|
||||
#import "svg_icon_props"
|
||||
#import "svg_icon_widget"
|
||||
#import "tree"
|
||||
@@ -33,7 +35,25 @@
|
||||
#import, file "../../src/apps/habits_types.zi";
|
||||
#import, file "../../src/habits/habit_types.zi";
|
||||
#import, file "../../src/habits/habit_icons.zi";
|
||||
#import, file "../../src/habits/reward_icons.zi";
|
||||
#import, file "../../src/habits/habit_coins.zi";
|
||||
// Generated reward artwork shares the regular image surface with other app media.
|
||||
RewardImage :: (icon: s32) -> ImageProps {
|
||||
return ImageProps.{.asset_path = RewardIconAsset(icon),
|
||||
.alt_text = Locale(RewardIconLabelKey(icon)), .smooth = true}
|
||||
}
|
||||
|
||||
RewardSymbol :: (icon: s32, bounds: Rectangle) {
|
||||
if RewardIconAsset(icon).count > 0 {
|
||||
picture := RewardImage(icon)
|
||||
picture.bounds = bounds
|
||||
Image(shop.session, picture)
|
||||
} else {
|
||||
SvgIcon(shop.session, SvgIconProps.{.bounds = bounds,
|
||||
.shape = HabitIconShape(icon), .color = shop.text_color})
|
||||
}
|
||||
}
|
||||
|
||||
CoinIcon :: #import "mingcute/mingcute_filled_copper_coin";
|
||||
|
||||
using ButtonTone;
|
||||
@@ -535,11 +555,13 @@ ActivityRow :: (index: s32, x: s32, y: s32, width: s32) -> s32 {
|
||||
first_height := ifx stacked then height - Scale(32) else height
|
||||
symbol := Scale(20)
|
||||
icon_height := ifx stacked then Scale(24) else height
|
||||
shape := ifx line.icon > 0 then HabitIconShape(line.icon) else ""
|
||||
SvgIcon(shop.session, SvgIconProps.{
|
||||
.bounds = Bounds(x, y + (icon_height - symbol) / 2, symbol, symbol),
|
||||
.shape = ifx shape.count > 0 then shape else SHOP_DONE_SHAPE,
|
||||
.color = shop.text_color})
|
||||
symbol_bounds := Bounds(x, y + (icon_height - symbol) / 2, symbol, symbol)
|
||||
if line.icon > 0 {
|
||||
RewardSymbol(HabitRewardIconClamp(line.icon), symbol_bounds)
|
||||
} else {
|
||||
SvgIcon(shop.session, SvgIconProps.{.bounds = symbol_bounds,
|
||||
.shape = SHOP_DONE_SHAPE, .color = shop.text_color})
|
||||
}
|
||||
amount := ActivityAmount(line)
|
||||
amount_w := CoinAmountWidth(amount, shop.font)
|
||||
day_w := Width(line.day, shop.small_font) + Scale(12)
|
||||
@@ -627,10 +649,8 @@ RewardRow :: (index: s32, x: s32, y: s32, width: s32) -> s32 {
|
||||
.disabled = shop.modal_active}) != 0 {
|
||||
FormEdit(reward)
|
||||
}
|
||||
SvgIcon(shop.session, SvgIconProps.{
|
||||
.bounds = Bounds(x + pad, name_y + (name_h - symbol) / 2, symbol, symbol),
|
||||
.shape = HabitIconShape(HabitRewardIconClamp(reward.icon)),
|
||||
.color = shop.text_color})
|
||||
RewardSymbol(HabitRewardIconClamp(reward.icon),
|
||||
Bounds(x + pad, name_y + (name_h - symbol) / 2, symbol, symbol))
|
||||
Text(shop.session, TextProps.{
|
||||
.bounds = Bounds(name_x, name_y, name_w, name_h), .text = reward.name,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter,
|
||||
@@ -663,7 +683,7 @@ IconColumns :: (width: s32) -> s32 {
|
||||
// The height of the open grid of symbols, one for each habit icon.
|
||||
IconGridHeight :: (width: s32) -> s32 {
|
||||
columns := IconColumns(width)
|
||||
rows := (HABIT_ICON_COUNT + columns - 1) / columns
|
||||
rows := (REWARD_ICON_COUNT + columns - 1) / columns
|
||||
return rows * Scale(SHOP_ICON_STEP_Y)
|
||||
}
|
||||
|
||||
@@ -672,7 +692,8 @@ IconGridHeight :: (width: s32) -> s32 {
|
||||
IconButton :: (bounds: Rectangle) {
|
||||
if Button(shop.session, ButtonProps.{
|
||||
.id = 8425, .bounds = bounds, .label = Locale("habit_icon_label"),
|
||||
.icon_shape = HabitIconShape(shop.icon), .icon_only = true,
|
||||
.icon_shape = ifx RewardIconAsset(shop.icon).count > 0 then "" else HabitIconShape(shop.icon),
|
||||
.image = RewardImage(shop.icon), .icon_only = true,
|
||||
.selected = shop.icon_open, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)(ifx shop.icon_open then
|
||||
ButtonEmphasisOutline else ButtonEmphasisSoft),
|
||||
@@ -688,7 +709,7 @@ IconButton :: (bounds: Rectangle) {
|
||||
IconGrid :: (x: s32, y: s32, width: s32) {
|
||||
columns := IconColumns(width)
|
||||
icon: s32 = 1
|
||||
while icon <= HABIT_ICON_COUNT {
|
||||
while icon <= REWARD_ICON_COUNT {
|
||||
index := icon - 1
|
||||
selected := shop.icon == icon
|
||||
if Button(shop.session, ButtonProps.{
|
||||
@@ -697,7 +718,9 @@ IconGrid :: (x: s32, y: s32, width: s32) {
|
||||
y + (index / columns) * Scale(SHOP_ICON_STEP_Y) + Scale(2),
|
||||
Scale(SHOP_ICON_SIZE), Scale(SHOP_ICON_SIZE)),
|
||||
.circle = true,
|
||||
.icon_shape = HabitIconShape(icon), .icon_only = true, .selected = selected,
|
||||
.label = Locale(RewardIconLabelKey(icon)),
|
||||
.icon_shape = ifx RewardIconAsset(icon).count > 0 then "" else HabitIconShape(icon),
|
||||
.image = RewardImage(icon), .icon_only = true, .selected = selected,
|
||||
.tone = cast(ButtonTone)(ifx selected then ButtonToneAccent else ButtonToneNeutral),
|
||||
.emphasis = cast(ButtonEmphasis)(ifx selected then
|
||||
ButtonEmphasisFilled else ButtonEmphasisSoft),
|
||||
@@ -937,9 +960,7 @@ BuyDialog :: () {
|
||||
y := cast(s32)content.y
|
||||
inner_w := cast(s32)content.width
|
||||
symbol := Scale(30)
|
||||
SvgIcon(shop.session, SvgIconProps.{.bounds = Bounds(x, y, symbol, symbol),
|
||||
.shape = HabitIconShape(HabitRewardIconClamp(reward.icon)),
|
||||
.color = shop.text_color})
|
||||
RewardSymbol(HabitRewardIconClamp(reward.icon), Bounds(x, y, symbol, symbol))
|
||||
strong: [1]TextRange
|
||||
strong[0] = TextRange.{.start = 0, .end = cast(s32)reward.name.count}
|
||||
Text(shop.session, TextProps.{
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.63] - 2026-11-02
|
||||
|
||||
- Bring Lumi 1.5.28, Habits 1.3.16, Practices 1.6.10, Lists 1.1.29, Diary 1.3.26 and Leaderboard 1.0.30 for Inner Breeze 2.1.62.
|
||||
|
||||
## [2.1.62] - 2026-10-29
|
||||
|
||||
- Bring Lumi 1.5.27, Habits 1.3.15, Practices 1.6.9, Lists 1.1.28, Diary 1.3.25 and Leaderboard 1.0.29 for Inner Breeze 2.1.61.
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Bring Lumi 1.5.26, Habits 1.3.14, Practices 1.6.8, Lists 1.1.27, Diary 1.3.24 and Leaderboard 1.0.28 for Inner Breeze 2.1.60.
|
||||
|
||||
## [2.1.60] - 2026-10-28
|
||||
|
||||
- Bring Lumi 1.5.25, Habits 1.3.13, Practices 1.6.7, Lists 1.1.26, Diary 1.3.23 and Leaderboard 1.0.27 for Inner Breeze 2.1.59.
|
||||
|
||||
## [2.1.59] - 2026-10-28
|
||||
|
||||
- Bring Lumi 1.5.24, Habits 1.3.12, Practices 1.6.6, Lists 1.1.25, Diary 1.3.22 and Leaderboard 1.0.26 for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.30] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [1.0.29] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.0.28] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.0.27] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.0.26] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Library
|
||||
|
||||
## [1.0.5] - 2026-10-29
|
||||
|
||||
- Download on Inner Breeze 2.1.61, which runs apps in a smaller format.
|
||||
|
||||
## [1.0.4] - 2026-10-24
|
||||
|
||||
- Browse books on wooden shelves, with the title and author on the cover.
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.29] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Close List settings after a successful save and keep edits open if saving fails.
|
||||
|
||||
- Show the profile pictures friends chose in any app, abstract pictures included.
|
||||
|
||||
## [1.1.28] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.1.27] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.1.26] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.1.25] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Lists owns its complete screen composition; the host supplies saved rows,
|
||||
// device input and ordinary Kryon widget effects.
|
||||
#import "session"
|
||||
#import "entity/model"
|
||||
#import "entity/picture_image"
|
||||
#import "geometry"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
@@ -122,8 +124,9 @@ AvatarFill :: (place: s32) -> Color {
|
||||
// A person's profile picture, or a round avatar with the first letter of
|
||||
// their name when they have not chosen one.
|
||||
Avatar :: (key: u64, name: string, place: s32, x: s32, y: s32, size: s32, icon: s32) {
|
||||
if (icon >= 41 && icon <= 65) || (icon >= 124 && icon <= 126) {
|
||||
picture := ImageForIcon(icon, Bounds(x, y, size, size), name)
|
||||
// Pictures chosen in any app, Entity's abstract ones included.
|
||||
if EntityPublicIconChosen(icon) {
|
||||
picture := EntityIconImage(icon, Bounds(x, y, size, size), name)
|
||||
picture.key = key
|
||||
Image(frame.session, picture)
|
||||
return
|
||||
@@ -658,6 +661,11 @@ ListsView :: (message: ListsMessage) -> ListsMessage {
|
||||
if settings_open && (state.selected_list < 0 || state.selected_list >= state.list_count) {
|
||||
CloseSettings()
|
||||
}
|
||||
// A successful list save resets editing in the applied message. The next
|
||||
// frame therefore leaves settings, while a failed save keeps editing_item.
|
||||
if settings_open && state.editing_item != -3 {
|
||||
CloseSettings()
|
||||
}
|
||||
input := frame.input
|
||||
if frame.panel != 0 {
|
||||
frame.input = TextFieldInput.{}
|
||||
@@ -824,7 +832,8 @@ ListSettingsPage :: () {
|
||||
.text = ListsLocaleHost("elist_settings"), .font = Scale(20),
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
y += Scale(60)
|
||||
// After Save the host clears the field; it opens again with the new name.
|
||||
// Save reports through the applied message before the next frame closes
|
||||
// settings, so a failed write can keep the edited name.
|
||||
if state.editing_item != -3 {
|
||||
BeginInput(-3, title)
|
||||
frame.focused = false
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## [1.5.28] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [1.5.27] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.5.26] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.5.25] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.5.24] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -541,7 +541,7 @@ FeedbackQuote :: (row: LumiChatRow, index: s32, x: s32, y: s32, width: s32) {
|
||||
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",
|
||||
.asset_path = "assets/lumi/mascot.webp", .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})
|
||||
@@ -578,7 +578,7 @@ LumiAvatar :: (index: s32, x: s32, y: s32) {
|
||||
}
|
||||
}
|
||||
Image(frame.session, ImageProps.{.key = cast(u64)(300400 + index * 4),
|
||||
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
|
||||
.asset_path = "assets/lumi/mascot.webp", .alt_text = "Lumi",
|
||||
.bounds = bounds, .source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
press := Press(frame.session, PressProps.{.key = cast(u64)(430000 + RowSlot(index) + 1),
|
||||
@@ -843,7 +843,14 @@ LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> Lum
|
||||
.text = ifx row.developer then LumiViewLocaleHost("lumi_developer") else "Lumi",
|
||||
.font = Scale(12)})
|
||||
}
|
||||
text_top := Scale(ifx row.user then 12 else 32)
|
||||
from_telegram := row.user && row.kind == LUMI_CHAT_TEXT && row.payload == "telegram"
|
||||
if from_telegram {
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(300408 + index * 4),
|
||||
.bounds = Bounds(left + Scale(14), top + Scale(8),
|
||||
bubble_width - Scale(28), Scale(16)),
|
||||
.text = LumiViewLocaleHost("lumi_from_telegram"), .font = Scale(11)})
|
||||
}
|
||||
text_top := Scale(ifx row.user then (ifx from_telegram then 30 else 12) else 32)
|
||||
if row.developer && row.quote.count > 0 {
|
||||
FeedbackQuote(row, index, left, top + text_top, bubble_width)
|
||||
text_top += Scale(LUMI_QUOTE_HEIGHT)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Photos changelog
|
||||
|
||||
## [1.0.5] - 2026-10-29
|
||||
|
||||
- Download on Inner Breeze 2.1.61, which runs apps in a smaller format.
|
||||
|
||||
## [1.0.4] - 2026-10-24
|
||||
|
||||
- Download on the current Inner Breeze, which only runs the new app format.
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## [1.6.10] - 2026-11-02
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.62.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Sun Salutation shows each pose's form cue, the leg that steps back and names the next pose in one quiet line.
|
||||
|
||||
## [1.6.9] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.61.
|
||||
|
||||
## [1.6.8] - 2026-10-29
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.60.
|
||||
|
||||
## [1.6.7] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.59.
|
||||
|
||||
## [1.6.6] - 2026-10-28
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.58.
|
||||
|
||||
@@ -256,12 +256,12 @@ PicturePage :: (x: s32, width: s32, y: *s32) {
|
||||
if manual.page == 0 {
|
||||
if astral {
|
||||
title = Locale("exercise_astral_projection")
|
||||
Picture(ifx manual.dark then "assets/practices/astral_projection/banner-dark.png"
|
||||
else "assets/practices/astral_projection/banner-light.png", title, hero,
|
||||
Picture(ifx manual.dark then "assets/practices/astral_projection/banner-dark.webp"
|
||||
else "assets/practices/astral_projection/banner-light.webp", title, hero,
|
||||
cast(ImageFit)ImageFitCover)
|
||||
} else {
|
||||
title = Locale("meditation_title")
|
||||
Picture("assets/practices/meditation/1.png", title, hero, cast(ImageFit)ImageFitContain)
|
||||
Picture("assets/practices/meditation/1.webp", title, hero, cast(ImageFit)ImageFitContain)
|
||||
}
|
||||
} else {
|
||||
CustomizeRing(hero, ifx astral then title else Locale("meditation_title"))
|
||||
@@ -393,7 +393,7 @@ WhmPage :: (x: s32, width: s32, y: *s32) {
|
||||
height := WhmVisualHeight(page)
|
||||
hero := Hero(x, width, y.*, height)
|
||||
if page == 0 || page == 3 {
|
||||
Picture(ifx page == 3 then "assets/practices/whm/2.png" else "assets/practices/whm/1.png",
|
||||
Picture(ifx page == 3 then "assets/practices/whm/2.webp" else "assets/practices/whm/1.webp",
|
||||
Locale(WhmTitleKey(page)), hero, cast(ImageFit)ImageFitContain)
|
||||
HeroDots(hero)
|
||||
y.* += height + Scale(16)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#import, file "../../src/apps/practice_types.zi";
|
||||
#import, file "../../src/app/exercise_types.zi";
|
||||
#import, file "workout_rules.zi";
|
||||
#import, file "../../src/practices/sun_salutation/sun_salutation_rules.zi";
|
||||
#import, file "figure_view.zi";
|
||||
|
||||
using ExerciseType;
|
||||
@@ -81,7 +82,7 @@ Controls :: () -> s32 {
|
||||
for index: cast(s32)0..2 {
|
||||
if Button(movement.session, ButtonProps.{.id = 83000 + index,
|
||||
.bounds = BottomIconRowButtonBoundsFor(layout, index), .label = labels[index],
|
||||
.icon_only = true, .image = ImageProps.{.asset_path = "icons/ui.png",
|
||||
.icon_only = true, .image = ImageProps.{.asset_path = "icons/ui.webp",
|
||||
.source = sources[index], .alt_text = labels[index]},
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft,
|
||||
.disabled = index == 0 && !movement.can_back}) != 0 {
|
||||
@@ -104,10 +105,71 @@ CenteredLine :: (text: string, y: s32, preferred: s32, minimum: s32, strong: boo
|
||||
return y + TextHeight(movement.session, TextProps.{.text = "M", .font = font})
|
||||
}
|
||||
|
||||
// The name of the step that follows, as one quiet line across the bottom of
|
||||
// the stage; returns the stage left for the moving figure.
|
||||
SunSalutationNext :: (stage: Rectangle, step: s32) -> Rectangle {
|
||||
joined: Vec(u8)
|
||||
BuilderPrint(*joined, "% ·", Locale("sun_salutation_next"))
|
||||
label := BuilderFinish(joined)
|
||||
name := Locale(SalutationStepKey(step))
|
||||
font := Scale(16)
|
||||
emphasis: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)name.count}]
|
||||
line_h := TextHeight(movement.session, TextProps.{.text = "M", .font = font})
|
||||
if cast(s32)stage.height - line_h < Scale(160) {
|
||||
return stage
|
||||
}
|
||||
// A word space between "Next ·" and the pose name.
|
||||
space := Scale(5)
|
||||
available := cast(s32)stage.width - Scale(32) - space
|
||||
label_w := TextWidth(movement.session, TextProps.{.text = label, .font = font})
|
||||
name_w := TextWidth(movement.session,
|
||||
TextProps.{.text = name, .font = font, .strong = emphasis[:1]})
|
||||
if label_w + name_w > available {
|
||||
font = Scale(14)
|
||||
line_h = TextHeight(movement.session, TextProps.{.text = "M", .font = font})
|
||||
label_w = TextWidth(movement.session, TextProps.{.text = label, .font = font})
|
||||
name_w = TextWidth(movement.session,
|
||||
TextProps.{.text = name, .font = font, .strong = emphasis[:1]})
|
||||
}
|
||||
if label_w + name_w > available && name_w > available - label_w {
|
||||
if label_w > available {
|
||||
label_w = available
|
||||
}
|
||||
name_w = available - label_w
|
||||
}
|
||||
line_w := label_w + space + name_w
|
||||
line_x := cast(s32)stage.x + (cast(s32)stage.width - line_w) / 2
|
||||
line_y := cast(s32)(stage.y + stage.height) - line_h
|
||||
Text(movement.session, TextProps.{.text = label, .bounds = Bounds(line_x, line_y, label_w, line_h),
|
||||
.font = font, .class_name = movement.muted_class, .wrap = cast(TextWrap)TextWrapEllipsis})
|
||||
Text(movement.session, TextProps.{.text = name, .bounds = Bounds(line_x + label_w + space, line_y, name_w, line_h),
|
||||
.font = font, .strong = emphasis[:1], .wrap = cast(TextWrap)TextWrapEllipsis})
|
||||
stage.height -= cast(float32)(line_h + Scale(8))
|
||||
return stage
|
||||
}
|
||||
|
||||
// The pose and how to hold it, the leg that is back in a lunge, the breath
|
||||
// with its bar, the moving figure and the pose that comes next.
|
||||
SunSalutation :: () {
|
||||
bottom := Controls() - Scale(18)
|
||||
y := CenteredLine(movement.heading, movement.top + Scale(18), Scale(24), Scale(20), true)
|
||||
y = CenteredLine(movement.cue, y + Scale(2), Scale(20), Scale(18), false)
|
||||
text_w := movement.view_width - Scale(48)
|
||||
if text_w > Scale(560) {
|
||||
text_w = Scale(560)
|
||||
}
|
||||
if movement.subtitle.count > 0 {
|
||||
cue_h := ParagraphHeight(movement.subtitle, text_w, Scale(16))
|
||||
Text(movement.session, TextProps.{.text = movement.subtitle,
|
||||
.bounds = Bounds((movement.view_width - text_w) / 2, y + Scale(2), text_w, cue_h),
|
||||
.font = Scale(16), .class_name = movement.muted_class,
|
||||
.align = cast(TextAlign)TextAlignCenter, .wrap = cast(TextWrap)TextWrapAuto})
|
||||
y += Scale(2) + cue_h
|
||||
}
|
||||
side := SalutationSideKey(movement.phase)
|
||||
if side.count > 0 {
|
||||
y = CenteredLine(Locale(side), y + Scale(4), Scale(18), Scale(16), true)
|
||||
}
|
||||
y = CenteredLine(movement.cue, y + Scale(6), Scale(20), Scale(18), false)
|
||||
width := movement.view_width - Scale(96)
|
||||
if width > Scale(280) {
|
||||
width = Scale(280)
|
||||
@@ -116,8 +178,11 @@ SunSalutation :: () {
|
||||
Progress(movement.session, ProgressProps.{.bounds = Bounds((movement.view_width - width) / 2,
|
||||
y, width, Scale(10)), .min = 0, .max = 1000, .value = movement.progress})
|
||||
y += Scale(22)
|
||||
Figure(Bounds(Scale(24), y, movement.view_width - Scale(48), bottom - y),
|
||||
"sun-salutation/figure", Locale("exercise_sun_salutation"))
|
||||
stage := Bounds(Scale(24), y, movement.view_width - Scale(48), bottom - y)
|
||||
if movement.exercise > 0 {
|
||||
stage = SunSalutationNext(stage, movement.exercise - 1)
|
||||
}
|
||||
Figure(stage, "sun-salutation/figure", Locale("exercise_sun_salutation"))
|
||||
}
|
||||
|
||||
TaiChi :: () {
|
||||
|
||||
@@ -202,80 +202,107 @@ RoundStats :: (best: *s32, average: *s32) {
|
||||
|
||||
// ---- Moods -----------------------------------------------------------------------------
|
||||
|
||||
// Soft hues from red at 1 to teal at 5, in step with the app's palette.
|
||||
MoodColor :: (mood: s32) -> Color {
|
||||
if mood <= 1 { return Color.{.r = 226, .g = 83, .b = 78, .a = 255} }
|
||||
if mood == 2 { return Color.{.r = 238, .g = 139, .b = 70, .a = 255} }
|
||||
if mood == 3 { return Color.{.r = 235, .g = 202, .b = 77, .a = 255} }
|
||||
if mood == 4 { return Color.{.r = 108, .g = 199, .b = 104, .a = 255} }
|
||||
return Color.{.r = 73, .g = 194, .b = 192, .a = 255}
|
||||
if mood <= 1 { return Color.{.r = 214, .g = 104, .b = 100, .a = 255} }
|
||||
if mood == 2 { return Color.{.r = 226, .g = 152, .b = 92, .a = 255} }
|
||||
if mood == 3 { return Color.{.r = 230, .g = 200, .b = 98, .a = 255} }
|
||||
if mood == 4 { return Color.{.r = 128, .g = 196, .b = 120, .a = 255} }
|
||||
return Color.{.r = 88, .g = 184, .b = 182, .a = 255}
|
||||
}
|
||||
|
||||
Pixel :: (x: s32, y: s32, width: s32, height: s32, color: Color) {
|
||||
Box(results.session, BoxProps.{.bounds = Bounds(x, y, width, height), .fill = color})
|
||||
// Half-way to grey and mostly see-through, for the faces that were not picked.
|
||||
MoodMuted :: (color: Color) -> Color {
|
||||
grey := (cast(s32)color.r + cast(s32)color.g + cast(s32)color.b) / 3
|
||||
color.r = cast(u8)((cast(s32)color.r + grey) / 2)
|
||||
color.g = cast(u8)((cast(s32)color.g + grey) / 2)
|
||||
color.b = cast(u8)((cast(s32)color.b + grey) / 2)
|
||||
return Alpha(color, 0.55)
|
||||
}
|
||||
|
||||
// A pixel face, from frowning red at 1 to grinning teal at 5.
|
||||
MoodPoint :: (x: float32, y: float32) -> Vector2 {
|
||||
return Vector2.{x, y}
|
||||
}
|
||||
|
||||
// A round face from frowning red at 1 to grinning teal at 5. Once a mood is
|
||||
// picked the others fade; the picked one gets an accent ring.
|
||||
MoodFace :: (mood: s32, center_x: s32, center_y: s32, size: s32) {
|
||||
u := size / 12
|
||||
if u < 2 {
|
||||
u = 2
|
||||
}
|
||||
face := u * 12
|
||||
x := center_x - face / 2
|
||||
y := center_y - face / 2
|
||||
radius := cast(float32)size * 0.5
|
||||
cx := cast(float32)center_x
|
||||
cy := cast(float32)center_y
|
||||
centre := MoodPoint(cx, cy)
|
||||
selected := results.mood == mood
|
||||
faded := results.mood > 0 && !selected
|
||||
fill := MoodColor(mood)
|
||||
stroke := DarkenColor(fill, 45)
|
||||
detail := Color.{.r = 38, .g = 40, .b = 48, .a = 255}
|
||||
shine := Color.{.r = 255, .g = 255, .b = 255, .a = 170}
|
||||
Pixel(x + u * 3, y, u * 6, u, stroke)
|
||||
Pixel(x + u * 2, y + u, u * 8, u, stroke)
|
||||
Pixel(x + u, y + u * 2, u * 10, u, stroke)
|
||||
Pixel(x, y + u * 3, u * 12, u * 6, stroke)
|
||||
Pixel(x + u, y + u * 9, u * 10, u, stroke)
|
||||
Pixel(x + u * 2, y + u * 10, u * 8, u, stroke)
|
||||
Pixel(x + u * 3, y + u * 11, u * 6, u, stroke)
|
||||
Pixel(x + u * 3, y + u, u * 6, u, fill)
|
||||
Pixel(x + u * 2, y + u * 2, u * 8, u, fill)
|
||||
Pixel(x + u, y + u * 3, u * 10, u * 6, fill)
|
||||
Pixel(x + u * 2, y + u * 9, u * 8, u, fill)
|
||||
Pixel(x + u * 3, y + u * 10, u * 6, u, fill)
|
||||
Pixel(x + u * 3, y + u * 2, u * 2, u, shine)
|
||||
detail := Color.{.r = 52, .g = 44, .b = 54, .a = 255}
|
||||
if faded {
|
||||
fill = MoodMuted(fill)
|
||||
detail = Alpha(detail, 0.45)
|
||||
}
|
||||
stroke := cast(float32)Scale(2)
|
||||
if selected {
|
||||
Ring(results.session, RingProps.{.center = centre, .inner_radius = radius + cast(float32)Scale(2),
|
||||
.outer_radius = radius + cast(float32)Scale(4), .end_angle = 360.0, .color = Accent()})
|
||||
}
|
||||
Circle(results.session, CircleProps.{.center = centre, .radius = radius, .fill = fill})
|
||||
Ring(results.session, RingProps.{.center = centre, .inner_radius = radius - 1.5, .outer_radius = radius,
|
||||
.end_angle = 360.0, .color = Alpha(DarkenColor(fill, 40), 0.55)})
|
||||
eye := radius * 0.11
|
||||
if eye < 1.5 {
|
||||
eye = 1.5
|
||||
}
|
||||
Circle(results.session, CircleProps.{.center = MoodPoint(cx - radius * 0.36, cy - radius * 0.2),
|
||||
.radius = eye, .fill = detail})
|
||||
Circle(results.session, CircleProps.{.center = MoodPoint(cx + radius * 0.36, cy - radius * 0.2),
|
||||
.radius = eye, .fill = detail})
|
||||
if mood <= 1 {
|
||||
Pixel(x + u * 2, y + u * 3, u * 3, u, detail)
|
||||
Pixel(x + u * 7, y + u * 3, u * 3, u, detail)
|
||||
Pixel(x + u * 3, y + u * 4, u, u, detail)
|
||||
Pixel(x + u * 8, y + u * 4, u, u, detail)
|
||||
Pixel(x + u * 3, y + u * 8, u, u, detail)
|
||||
Pixel(x + u * 4, y + u * 7, u * 4, u, detail)
|
||||
Pixel(x + u * 8, y + u * 8, u, u, detail)
|
||||
return
|
||||
}
|
||||
Pixel(x + u * 3, y + u * 4, u * 2, u * 2, detail)
|
||||
Pixel(x + u * 7, y + u * 4, u * 2, u * 2, detail)
|
||||
if mood == 2 {
|
||||
Pixel(x + u * 3, y + u * 8, u, u, detail)
|
||||
Pixel(x + u * 4, y + u * 7, u * 4, u, detail)
|
||||
Pixel(x + u * 8, y + u * 8, u, u, detail)
|
||||
Line(results.session, LineProps.{.start = MoodPoint(cx - radius * 0.56, cy - radius * 0.52),
|
||||
.end = MoodPoint(cx - radius * 0.2, cy - radius * 0.38), .thickness = stroke, .color = detail})
|
||||
Line(results.session, LineProps.{.start = MoodPoint(cx + radius * 0.56, cy - radius * 0.52),
|
||||
.end = MoodPoint(cx + radius * 0.2, cy - radius * 0.38), .thickness = stroke, .color = detail})
|
||||
Ring(results.session, RingProps.{.center = MoodPoint(cx, cy + radius * 0.74),
|
||||
.inner_radius = radius * 0.34 - stroke * 0.5, .outer_radius = radius * 0.34 + stroke * 0.5,
|
||||
.start_angle = 205.0, .end_angle = 335.0, .color = detail})
|
||||
} else if mood == 2 {
|
||||
Ring(results.session, RingProps.{.center = MoodPoint(cx, cy + radius * 0.7),
|
||||
.inner_radius = radius * 0.34 - stroke * 0.5, .outer_radius = radius * 0.34 + stroke * 0.5,
|
||||
.start_angle = 215.0, .end_angle = 325.0, .color = detail})
|
||||
} else if mood == 3 {
|
||||
Pixel(x + u * 3, y + u * 8, u * 6, u, detail)
|
||||
Line(results.session, LineProps.{.start = MoodPoint(cx - radius * 0.3, cy + radius * 0.42),
|
||||
.end = MoodPoint(cx + radius * 0.3, cy + radius * 0.42), .thickness = stroke, .color = detail})
|
||||
} else if mood == 4 {
|
||||
Pixel(x + u * 2, y + u * 7, u, u, detail)
|
||||
Pixel(x + u * 3, y + u * 8, u * 6, u, detail)
|
||||
Pixel(x + u * 9, y + u * 7, u, u, detail)
|
||||
Ring(results.session, RingProps.{.center = MoodPoint(cx, cy + radius * 0.06),
|
||||
.inner_radius = radius * 0.4 - stroke * 0.5, .outer_radius = radius * 0.4 + stroke * 0.5,
|
||||
.start_angle = 25.0, .end_angle = 155.0, .color = detail})
|
||||
} else {
|
||||
Pixel(x + u * 3, y + u * 7, u * 6, u * 3, detail)
|
||||
Pixel(x + u * 4, y + u * 7, u * 4, u, Color.{.r = 255, .g = 255, .b = 255, .a = 255})
|
||||
Pixel(x + u * 4, y + u * 9, u * 4, u, Color.{.r = 236, .g = 108, .b = 128, .a = 255})
|
||||
// A wide open smile: a half disc with a pink tongue at its bottom.
|
||||
Ring(results.session, RingProps.{.center = MoodPoint(cx, cy + radius * 0.12),
|
||||
.inner_radius = 0.0, .outer_radius = radius * 0.5, .start_angle = 0.0, .end_angle = 180.0,
|
||||
.color = detail})
|
||||
Circle(results.session, CircleProps.{.center = MoodPoint(cx, cy + radius * 0.5),
|
||||
.radius = radius * 0.16,
|
||||
.fill = ifx faded then Alpha(Color.{.r = 236, .g = 108, .b = 128, .a = 255}, 0.45)
|
||||
else Color.{.r = 236, .g = 108, .b = 128, .a = 255}})
|
||||
}
|
||||
}
|
||||
|
||||
MOOD_CARD_HEIGHT :: 132
|
||||
|
||||
MoodLabelKey :: (mood: s32) -> string {
|
||||
if mood <= 1 { return "results_mood_1" }
|
||||
if mood == 2 { return "results_mood_2" }
|
||||
if mood == 3 { return "results_mood_3" }
|
||||
if mood == 4 { return "results_mood_4" }
|
||||
return "results_mood_5"
|
||||
}
|
||||
|
||||
MoodPicker :: (x: s32, y: s32, width: s32) {
|
||||
padding := Scale(14)
|
||||
gap := Scale(7)
|
||||
item_width := (width - padding * 2 - gap * (RESULTS_MOODS - 1)) / RESULTS_MOODS
|
||||
button_y := y + Scale(49)
|
||||
button_height := Scale(60)
|
||||
Card(x, y, width, Scale(124))
|
||||
button_y := y + Scale(46)
|
||||
button_height := Scale(56)
|
||||
Card(x, y, width, Scale(MOOD_CARD_HEIGHT))
|
||||
Label(Locale("results_mood_title"), x + padding, y + Scale(10), width - padding * 2, Scale(30),
|
||||
Scale(18), cast(TextAlign)TextAlignStart)
|
||||
for index: cast(s32)0..RESULTS_MOODS - 1 {
|
||||
@@ -285,12 +312,23 @@ MoodPicker :: (x: s32, y: s32, width: s32) {
|
||||
if Button(results.session, ButtonProps.{
|
||||
.bounds = Bounds(button_x, button_y, button_width, button_height),
|
||||
.id = 24800 + index,
|
||||
.tone = cast(ButtonTone)(ifx selected then ButtonToneAccent else ButtonToneNeutral),
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft, .selected = selected}) != 0 {
|
||||
results.action = PRACTICE_RESULTS_MOOD
|
||||
results.value = index + 1
|
||||
}
|
||||
MoodFace(index + 1, button_x + button_width / 2, button_y + button_height / 2, Scale(28))
|
||||
MoodFace(index + 1, button_x + button_width / 2, button_y + button_height / 2,
|
||||
Scale(ifx selected then 36 else 30))
|
||||
// The label may spill into the gaps beside it on narrow phones.
|
||||
name := Locale(MoodLabelKey(index + 1))
|
||||
label_x := button_x - gap / 2
|
||||
label_width := button_width + gap
|
||||
strong: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)name.count}]
|
||||
Text(results.session, TextProps.{.bounds = Bounds(label_x, button_y + button_height + Scale(2),
|
||||
label_width, Scale(20)), .text = name,
|
||||
.font = FitFont(name, label_width, Scale(12), Scale(8)), .align = cast(TextAlign)TextAlignCenter,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter, .wrap = cast(TextWrap)TextWrapNone,
|
||||
.disabled = !selected, .strong = strong[:ifx selected then 1 else 0]})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,7 +650,7 @@ Content :: (x: s32, width: s32, top: s32, best: s32, average: s32) {
|
||||
}
|
||||
if !results.temporary {
|
||||
MoodPicker(x, y, width)
|
||||
y += Scale(124 + 14)
|
||||
y += Scale(MOOD_CARD_HEIGHT + 14)
|
||||
}
|
||||
if results.activity == EXERCISE_WIM_HOF && results.round_count > 1 {
|
||||
RoundList(x, y, width)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Radio
|
||||
|
||||
## [1.0.4] - 2026-10-29
|
||||
|
||||
- Download on Inner Breeze 2.1.61, which runs apps in a smaller format.
|
||||
|
||||
## [1.0.3] - 2026-10-24
|
||||
|
||||
- Download on the current Inner Breeze, which only runs the new app format.
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
{
|
||||
"host_api": 40,
|
||||
"oldest_host_api": 12,
|
||||
"host_api": 42,
|
||||
"oldest_host_api": 41,
|
||||
"package_format": "zx",
|
||||
"module_api": 2,
|
||||
"apps": {
|
||||
"inbe": {
|
||||
"id": "inbe",
|
||||
"version": "2.1.59",
|
||||
"sequence": 56,
|
||||
"version": "2.1.63",
|
||||
"sequence": 60,
|
||||
"bundled": true,
|
||||
"host_api": 40,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"habits": {
|
||||
"id": "inbe.habits",
|
||||
"version": "1.3.12",
|
||||
"sequence": 35,
|
||||
"version": "1.3.16",
|
||||
"sequence": 39,
|
||||
"bundled": true,
|
||||
"host_api": 38,
|
||||
"oldest_host_api": 30,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"oldest_host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"practices": {
|
||||
"id": "inbe.practices",
|
||||
"version": "1.6.6",
|
||||
"sequence": 35,
|
||||
"version": "1.6.10",
|
||||
"sequence": 39,
|
||||
"bundled": true,
|
||||
"host_api": 37,
|
||||
"oldest_host_api": 31,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"oldest_host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"lists": {
|
||||
"id": "inbe.lists",
|
||||
"version": "1.1.25",
|
||||
"sequence": 33,
|
||||
"version": "1.1.29",
|
||||
"sequence": 37,
|
||||
"bundled": true,
|
||||
"host_api": 27,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"diary": {
|
||||
"id": "inbe.diary",
|
||||
"version": "1.3.22",
|
||||
"sequence": 39,
|
||||
"version": "1.3.26",
|
||||
"sequence": 43,
|
||||
"bundled": true,
|
||||
"host_api": 21,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"lumi": {
|
||||
"id": "inbe.lumi",
|
||||
"version": "1.5.24",
|
||||
"sequence": 42,
|
||||
"version": "1.5.28",
|
||||
"sequence": 46,
|
||||
"bundled": true,
|
||||
"host_api": 20,
|
||||
"release": "2.1.58"
|
||||
"host_api": 41,
|
||||
"release": "2.1.62"
|
||||
},
|
||||
"leaderboard": {
|
||||
"id": "inbe.leaderboard",
|
||||
"version": "1.0.26",
|
||||
"sequence": 27,
|
||||
"version": "1.0.30",
|
||||
"sequence": 31,
|
||||
"bundled": true,
|
||||
"host_api": 40,
|
||||
"release": "2.1.58",
|
||||
"oldest_host_api": 40
|
||||
"host_api": 41,
|
||||
"release": "2.1.62",
|
||||
"oldest_host_api": 41
|
||||
}
|
||||
},
|
||||
"node_apps": {
|
||||
"photos": {
|
||||
"id": "inbe.photos",
|
||||
"title": "Photos",
|
||||
"version": "1.0.4",
|
||||
"sequence": 5,
|
||||
"host_api": 15
|
||||
"version": "1.0.5",
|
||||
"sequence": 6,
|
||||
"host_api": 41
|
||||
},
|
||||
"library": {
|
||||
"id": "inbe.library",
|
||||
"title": "Library",
|
||||
"version": "1.0.4",
|
||||
"sequence": 5,
|
||||
"host_api": 29
|
||||
"version": "1.0.5",
|
||||
"sequence": 6,
|
||||
"host_api": 41
|
||||
},
|
||||
"radio": {
|
||||
"id": "inbe.radio",
|
||||
"title": "Radio",
|
||||
"version": "1.0.3",
|
||||
"sequence": 4,
|
||||
"host_api": 18
|
||||
"version": "1.0.4",
|
||||
"sequence": 5,
|
||||
"host_api": 41
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 859 KiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -8,5 +8,15 @@
|
||||
"sun_salutation_voice_rise",
|
||||
"sun_salutation_voice_mountain_end",
|
||||
"sun_salutation_voice_breathe_in",
|
||||
"sun_salutation_voice_breathe_out"
|
||||
"sun_salutation_voice_breathe_out",
|
||||
"sun_salutation_voice_lunge_right",
|
||||
"sun_salutation_voice_lunge_left",
|
||||
"sun_salutation_voice_knees_chest_chin",
|
||||
"sun_salutation_voice_cobra",
|
||||
"sun_salutation_voice_step_forward_right",
|
||||
"sun_salutation_voice_step_forward_left",
|
||||
"sun_salutation_voice_intro_1",
|
||||
"sun_salutation_voice_intro_2",
|
||||
"sun_salutation_voice_intro_3",
|
||||
"sun_salutation_voice_closing"
|
||||
]
|
||||
@@ -28,9 +28,9 @@
|
||||
"zh": 1536
|
||||
},
|
||||
"transcription_contexts": {
|
||||
"ja": "These are Japanese yoga Sun Salutation instructions. Vocabulary includes 山のポーズ, プランク, 頭上, 両腕, お尻 and 前屈. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"ko": "These are Korean yoga Sun Salutation instructions. Vocabulary includes 산 자세, 플랭크, 엉덩이 and 들이쉬며/내쉬며. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"zh": "These are Simplified Chinese yoga Sun Salutation instructions. Vocabulary includes 山式、平板式、吸气、呼气、双臂、臀部、屈体. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words."
|
||||
"ja": "These are Japanese yoga Sun Salutation instructions. Vocabulary includes 山のポーズ, プランク, コブラ, マット, 頭上, 両腕, 両手, 右脚, 左脚, 膝, 胸, あご, お尻 and 前屈. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"ko": "These are Korean yoga Sun Salutation instructions. Vocabulary includes 산 자세, 플랭크, 코브라, 매트, 오른쪽/왼쪽, 오른발/왼발, 무릎, 가슴, 턱, 엉덩이 and 들이쉬며/내쉬며. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"zh": "These are Simplified Chinese yoga Sun Salutation instructions. Vocabulary includes 山式、平板式、眼镜蛇式、垫子、吸气、呼气、双臂、双手、右腿、左腿、膝盖、胸部、下巴、臀部、屈体. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words."
|
||||
},
|
||||
"minimum_match": 0.92,
|
||||
"verify_directions": true,
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
"zh": 1536
|
||||
},
|
||||
"transcription_contexts": {
|
||||
"ja": "These are Japanese yoga Sun Salutation instructions. Vocabulary includes 山のポーズ, プランク, 頭上, 両腕, お尻 and 前屈. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"ko": "These are Korean yoga Sun Salutation instructions. Vocabulary includes 산 자세, 플랭크, 엉덩이 and 들이쉬며/내쉬며. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"zh": "These are Simplified Chinese yoga Sun Salutation instructions. Vocabulary includes 山式、平板式、吸气、呼气、双臂、臀部、屈体. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words."
|
||||
"ja": "These are Japanese yoga Sun Salutation instructions. Vocabulary includes 山のポーズ, プランク, コブラ, マット, 頭上, 両腕, 両手, 右脚, 左脚, 膝, 胸, あご, お尻 and 前屈. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"ko": "These are Korean yoga Sun Salutation instructions. Vocabulary includes 산 자세, 플랭크, 코브라, 매트, 오른쪽/왼쪽, 오른발/왼발, 무릎, 가슴, 턱, 엉덩이 and 들이쉬며/내쉬며. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words.",
|
||||
"zh": "These are Simplified Chinese yoga Sun Salutation instructions. Vocabulary includes 山式、平板式、眼镜蛇式、垫子、吸气、呼气、双臂、双手、右腿、左腿、膝盖、胸部、下巴、臀部、屈体. Use this only to spell words actually heard. Never fill omitted words or replace other spoken words."
|
||||
},
|
||||
"minimum_match": 0.92,
|
||||
"verify_directions": true,
|
||||
|
||||
@@ -28,3 +28,33 @@ Nadechněte se.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Vydechněte.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Nadechněte se, pravou nohu dejte dozadu a koleno na zem.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Nadechněte se, levou nohu dejte dozadu a koleno na zem.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Vydechněte a položte kolena, hrudník a bradu.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Nadechněte se a zvedněte hrudník do kobry.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Nadechněte se a pravou nohu přeneste mezi dlaně.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Nadechněte se a levou nohu přeneste mezi dlaně.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Postavte se na přední okraj podložky, chodidla u sebe.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Paže nechte volně podél těla.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Dýchejte pomalu nosem.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Odpočívejte a vnímejte svůj dech.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Atme ein.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Atme aus.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Atme ein und stell das rechte Bein zurück, das Knie am Boden.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Atme ein und stell das linke Bein zurück, das Knie am Boden.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Atme aus und senke Knie, Brust und Kinn.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Atme ein und hebe die Brust in die Kobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Atme ein und setz den rechten Fuß zwischen die Hände.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Atme ein und setz den linken Fuß zwischen die Hände.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Stell dich vorn auf deine Matte, die Füße zusammen.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Lass die Arme locker neben dem Körper.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Atme ruhig durch die Nase.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Ruh dich aus und spüre deinen Atem.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Breathe in.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Breathe out.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Breathe in and step your right leg back, knee down.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Breathe in and step your left leg back, knee down.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Breathe out and lower knees, chest and chin.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Breathe in and lift your chest into cobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Breathe in and step your right foot between your hands.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Breathe in and step your left foot between your hands.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Stand at the front of your mat, feet together.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Let your arms rest by your sides.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Breathe slowly through your nose.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Rest here and notice your breath.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Inhala.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Exhala.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Inhala y lleva la pierna derecha atrás, rodilla al suelo.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Inhala y lleva la pierna izquierda atrás, rodilla al suelo.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Exhala y baja rodillas, pecho y barbilla.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Inhala y eleva el pecho a la cobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Inhala y lleva el pie derecho entre las manos.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Inhala y lleva el pie izquierdo entre las manos.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Ponte de pie al frente de la esterilla, pies juntos.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Deja los brazos relajados a los lados.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Respira despacio por la nariz.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Descansa aquí y observa tu respiración.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Inspirez.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Expirez.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Inspirez et reculez la jambe droite, genou au sol.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Inspirez et reculez la jambe gauche, genou au sol.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Expirez et posez genoux, poitrine et menton.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Inspirez et soulevez la poitrine en cobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Inspirez et avancez le pied droit entre les mains.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Inspirez et avancez le pied gauche entre les mains.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Placez-vous à l'avant du tapis, pieds joints.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Laissez les bras reposer le long du corps.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Respirez lentement par le nez.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Reposez-vous et observez votre respiration.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Tarik napas.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Buang napas.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Tarik napas dan langkahkan kaki kanan ke belakang, lutut turun.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Tarik napas dan langkahkan kaki kiri ke belakang, lutut turun.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Buang napas dan turunkan lutut, dada, dan dagu.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Tarik napas dan angkat dada ke pose kobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Tarik napas dan langkahkan kaki kanan di antara tangan.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Tarik napas dan langkahkan kaki kiri di antara tangan.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Berdiri di depan matras, kedua kaki rapat.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Biarkan lengan rileks di samping tubuh.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Bernapaslah perlahan melalui hidung.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Beristirahatlah dan rasakan napas Anda.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Inspira.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Espira.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Inspira e porta la gamba destra indietro, ginocchio a terra.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Inspira e porta la gamba sinistra indietro, ginocchio a terra.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Espira e abbassa ginocchia, petto e mento.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Inspira e solleva il petto nel cobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Inspira e porta il piede destro tra le mani.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Inspira e porta il piede sinistro tra le mani.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
In piedi davanti al tappetino, piedi uniti.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Lascia le braccia rilassate lungo i fianchi.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Respira lentamente con il naso.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Riposa e ascolta il tuo respiro.
|
||||
---
|
||||
@@ -28,3 +28,33 @@
|
||||
[sun_salutation_voice_breathe_out]
|
||||
息を吐いて。
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
息を吸って、右脚を後ろに引き、膝を床へ。
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
息を吸って、左脚を後ろに引き、膝を床へ。
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
息を吐いて、膝、胸、あごを床へ。
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
息を吸って、胸を持ち上げてコブラへ。
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
息を吸って、右足を両手の間へ。
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
息を吸って、左足を両手の間へ。
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
マットの前に立ち、両足を揃えて。
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
腕は体の横で楽にして。
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
鼻からゆっくり呼吸して。
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
ここで休み、呼吸を感じて。
|
||||
---
|
||||
@@ -28,3 +28,33 @@
|
||||
[sun_salutation_voice_breathe_out]
|
||||
숨을 내쉬세요.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
숨을 들이쉬며 오른쪽 다리를 뒤로, 무릎을 내리세요.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
숨을 들이쉬며 왼쪽 다리를 뒤로, 무릎을 내리세요.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
숨을 내쉬며 무릎, 가슴, 턱을 내리세요.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
숨을 들이쉬며 가슴을 들어 코브라 자세를 하세요.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
숨을 들이쉬며 오른발을 두 손 사이로 옮기세요.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
숨을 들이쉬며 왼발을 두 손 사이로 옮기세요.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
매트 앞쪽에 서서 두 발을 모으세요.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
팔은 몸 옆에 편하게 두세요.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
코로 천천히 숨을 쉬세요.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
편히 쉬며 호흡을 느껴 보세요.
|
||||
---
|
||||
@@ -28,3 +28,33 @@ Inspire.
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Expire.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Inspire e leve a perna direita para trás, joelho no chão.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Inspire e leve a perna esquerda para trás, joelho no chão.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Expire e desça joelhos, peito e queixo.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Inspire e eleve o peito na cobra.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Inspire e leve o pé direito entre as mãos.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Inspire e leve o pé esquerdo entre as mãos.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Fique em pé na frente do tapete, pés juntos.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Deixe os braços relaxados ao lado do corpo.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Respire devagar pelo nariz.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Descanse e perceba sua respiração.
|
||||
---
|
||||
@@ -28,3 +28,33 @@
|
||||
[sun_salutation_voice_breathe_out]
|
||||
Выдохните.
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
Вдохните и отведите правую ногу назад, колено на пол.
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
Вдохните и отведите левую ногу назад, колено на пол.
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
Выдохните и опустите колени, грудь и подбородок.
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
Вдохните и поднимите грудь в позу кобры.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
Вдохните и поставьте правую стопу между ладонями.
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
Вдохните и поставьте левую стопу между ладонями.
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
Встаньте у переднего края коврика, стопы вместе.
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
Руки свободно опущены вдоль тела.
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
Дышите медленно через нос.
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
Отдохните и понаблюдайте за дыханием.
|
||||
---
|
||||
@@ -28,3 +28,33 @@
|
||||
[sun_salutation_voice_breathe_out]
|
||||
呼气。
|
||||
---
|
||||
[sun_salutation_voice_lunge_right]
|
||||
吸气,右腿向后迈,膝盖落地。
|
||||
---
|
||||
[sun_salutation_voice_lunge_left]
|
||||
吸气,左腿向后迈,膝盖落地。
|
||||
---
|
||||
[sun_salutation_voice_knees_chest_chin]
|
||||
呼气,膝盖、胸部和下巴落地。
|
||||
---
|
||||
[sun_salutation_voice_cobra]
|
||||
吸气,胸部上抬成眼镜蛇式。
|
||||
---
|
||||
[sun_salutation_voice_step_forward_right]
|
||||
吸气,右脚向前迈到双手之间。
|
||||
---
|
||||
[sun_salutation_voice_step_forward_left]
|
||||
吸气,左脚向前迈到双手之间。
|
||||
---
|
||||
[sun_salutation_voice_intro_1]
|
||||
站在垫子前端,双脚并拢。
|
||||
---
|
||||
[sun_salutation_voice_intro_2]
|
||||
双臂自然垂放在身体两侧。
|
||||
---
|
||||
[sun_salutation_voice_intro_3]
|
||||
用鼻子缓慢呼吸。
|
||||
---
|
||||
[sun_salutation_voice_closing]
|
||||
在这里休息,感受你的呼吸。
|
||||
---
|
||||
@@ -315,6 +315,26 @@ publishing an immutable payload and atomically replacing its current pointer.
|
||||
Root packages must contain exactly the three signed recommended dependencies.
|
||||
Malformed packages cannot apply writes through a mismatched host protocol.
|
||||
|
||||
Bundling is additive: the existing six packages always ship regardless of
|
||||
size, and complete locally built node apps smaller than **1,000,000 bytes**
|
||||
also ship as offline baselines. Required app artwork counts toward that limit;
|
||||
the shared Apps controller already supplied by the host counts once. A tiny
|
||||
collection catalog is not the size of its downloadable games. Arcade is
|
||||
explicitly included in `apps/bundled.json`, independently of the automatic
|
||||
limit: its 7,674-byte catalog plus 1,512,084-byte library artwork ship together.
|
||||
Its five games (65,639,505 bytes) remain separate, consented downloads. The
|
||||
reviewed local artifacts are digest-pinned; builds never fetch or execute an
|
||||
unsigned remote app to qualify it. `scripts/small_app_bundling.py` writes the
|
||||
selection and sizes to `build/small-app-bundling.json`.
|
||||
|
||||
Optional baselines live under `assets/apps/bundled/`, preserving the historical
|
||||
`cells/` IDs and dependency validation. They appear in Apps even without a
|
||||
network and take a device-local slot only when added. Existing selections,
|
||||
hidden apps and sidebar order are unchanged. Signed installed updates take
|
||||
precedence; the embedded fallback retains publisher scope, host API, digest,
|
||||
resource, capability and identity validation. App size includes library art;
|
||||
downloadable games retain their own sizes and installation state.
|
||||
|
||||
Runtime resources are selected in `scripts/prepare-package-assets.py`; source
|
||||
icons, store banners, prompts and test images are excluded. Sun Salutation
|
||||
keeps its full four-character, 30 fps timeline while storing identical PNGs
|
||||
@@ -340,7 +360,11 @@ saved data and bundled package; the plus button adds it back immediately.
|
||||
Settings is fixed last and is absent
|
||||
from the editable list. Existing
|
||||
profiles retain their selection and saved sidebar order.
|
||||
Each app appears once, with active shortcuts in sidebar order and hidden apps
|
||||
The Apps library normally omits apps hidden with Edit → Hide app. Edit shows
|
||||
all hidden apps again with Show app so they can be restored. Hiding removes
|
||||
the app's pinned shortcut but keeps its package and saved data. Visibility is
|
||||
saved per app in the current account's device settings, including node offers.
|
||||
Each app appears once, with pinned apps in sidebar order and the remaining apps
|
||||
after them. The list shows icons, names and controls without status paragraphs.
|
||||
|
||||
## Practice content and narration
|
||||
@@ -505,9 +529,25 @@ 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`.
|
||||
A host loads only programs in its own Ziran program format, so a toolchain whose
|
||||
format changed is a new interface too: `oldest_host_api` and every package's
|
||||
`host_api` rise above the last released host. Host 12 is the first with
|
||||
format 58; released apps up to 2.1.34 (host 11) cannot load packages built
|
||||
since, and are not offered them.
|
||||
`host_api` rise above the last released host. Host 41 (2.1.61) is the
|
||||
first with format 59; released apps up to 2.1.60 (host 40) cannot load
|
||||
packages built since, and are not offered them.
|
||||
|
||||
A format bump publishes in this order, because a host only finds what the
|
||||
node already serves for its interface and `make package-compat-test` needs
|
||||
it:
|
||||
|
||||
1. Ziran, then the Apps package with its own lock; record the rebuilt
|
||||
controller's digest in `AppsControllerSha256`.
|
||||
2. Here: the toolchain and Apps pins, and `host_api`, `oldest_host_api` and
|
||||
every package's `host_api` in `apps/versions.json`. The Apps node host
|
||||
takes its limit from `PackageHostAPI`.
|
||||
3. Arcade: its toolchain and Apps pins, the game contract
|
||||
(`standards/game-v1.json`, `src/game_contract.zi`, every game's
|
||||
`catalog.json`) and a new version of every game, then its node release.
|
||||
Released hosts keep the Arcade built for them.
|
||||
4. The release here; App packages publishes the bundled apps, practice
|
||||
packs and node apps for the new interface on the release push.
|
||||
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
|
||||
@@ -586,8 +626,9 @@ so an app added to the node appears without an app update. The publisher pin
|
||||
Installing one assigns one of eight device-local slots (package indexes
|
||||
after the bundled seven, setting `node_app_slot_<n>`) and downloads it through
|
||||
the package manager with the same signature, hash, size, interface, trial
|
||||
and cache rules as the bundled apps. Such an app is never part of the root
|
||||
package or its dependencies. It runs in its own VM through one generic
|
||||
and cache rules as the bundled apps. Small local apps and explicitly declared
|
||||
apps can also have a root-embedded baseline, outside its dependencies. Each
|
||||
runs in its own VM through one generic
|
||||
interface (`apps/node_types` from the Apps package, host interface 12, and 13 for the
|
||||
media library, which Diary also reads from 14): frame and
|
||||
route messages, hosted Kryon widgets, `AppLocaleHost`, private records,
|
||||
@@ -944,7 +985,9 @@ A release names one fixed commit while peers keep working on master:
|
||||
Daochi sync server. Platform release builds remain separate. The existing
|
||||
repository overlay materializes every candidate file and recreates source
|
||||
directories, so later edits, new files and commits cannot enter the run.
|
||||
Outputs stay in `build/release-ready/`.
|
||||
Outputs stay in `build/release-ready/`. Custom `RELEASE_READY_OUTPUT` names
|
||||
reuse that folder; only `build/release-ready-phone/` has a separate purpose.
|
||||
Both use the shared, leased cache described in [building](building.md).
|
||||
3. Build the Moto APK in the same fixed-source overlay and save its content
|
||||
identity and SHA-256 build receipt. Use `ANDROID_VERIFY_INSTANCE=1` for
|
||||
the separate `xyz.waozi.inbe.verification` debug instance when the owner's
|
||||
|
||||
@@ -112,6 +112,31 @@ publisher setup are described in [app packages](apps.md).
|
||||
Native binaries are written to `build/bin/<platform>/`. Release artifacts are
|
||||
written under `build/dist/`.
|
||||
|
||||
Fixed-commit container builds (`make release-ready` and
|
||||
`scripts/phone-install.sh`) reuse `build/release-ready/` and
|
||||
`build/release-ready-phone/`, respectively. `RELEASE_READY_OUTPUT` still accepts
|
||||
`build/release-ready-NAME`, but names other than `phone` map to
|
||||
`build/release-ready/`; read artifacts and stamps from that canonical path.
|
||||
The release command uses the same mapping. Task names and versions never
|
||||
allocate more output folders. An active output is locked and a second run
|
||||
for it stops before changing its files.
|
||||
|
||||
Both purposes share the existing `build/release-ready/home/`, rather than
|
||||
creating a home per output. Keeping this regenerable cache under `build/` also
|
||||
keeps the fixed-source overlay from traversing it while recreating source
|
||||
directories.
|
||||
Ziran keeps sources by repository URL and exact commit under its `.cache/ziran/`,
|
||||
so different locks reuse identical dependencies while retaining distinct
|
||||
commits. Gradle downloads also reuse this home. Runs hold an exclusive cache
|
||||
lease through container exit, including failed builds; different purposes wait
|
||||
for that lease. Incremental source-time records and compilation outputs stay
|
||||
per purpose. No script prunes existing output or caches, including
|
||||
`promo-video` and `package-releases`. Other old per-output homes are not migrated
|
||||
or deleted automatically. Normal builds and CI keep their existing cache and
|
||||
`build/dist/` paths. Phone signing reuses
|
||||
`build/phone-install/app-ABI-debug-signed.apk` (one of the four supported Android
|
||||
ABIs) even with a versioned `--apk` input, preserving the default signed path.
|
||||
|
||||
Dependencies, including Kryon and the Ziran toolchain, are pinned in
|
||||
`ziran.lock`. `make` fetches them into the Ziran package cache and links them
|
||||
under `build/packages/`; `sh scripts/packages.sh` does the same by hand.
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
buildscript {
|
||||
// Only the Google Play edition may read a Google library or plugin
|
||||
// (gplay-classpath.gradle, gplay.gradle), so it builds in its own Gradle
|
||||
// run, apart from the direct and F-Droid builds.
|
||||
ext.buildingGplay = gradle.startParameter.taskNames.any { it.toLowerCase().contains('gplay') }
|
||||
if (buildingGplay && gradle.startParameter.taskNames.any {
|
||||
def name = it.toLowerCase()
|
||||
name.contains('release') || (name.contains('debug') && !name.contains('gplay'))
|
||||
}) {
|
||||
throw new GradleException('Build the gplay edition in its own Gradle run')
|
||||
}
|
||||
if (buildingGplay) {
|
||||
apply from: 'gplay-classpath.gradle', to: buildscript
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
def hasGplayFirebaseConfig = file("src/gplay/google-services.json").exists()
|
||||
if (hasGplayFirebaseConfig) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
tasks.configureEach { task ->
|
||||
if (task.name == "processDebugGoogleServices" || task.name == "processReleaseGoogleServices") {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
if (buildingGplay) {
|
||||
apply from: 'gplay.gradle'
|
||||
}
|
||||
def appOnlyAbi = (project.findProperty('app.onlyAbi') ?: '').toString()
|
||||
def verificationInstance = (project.findProperty('app.verificationInstance') ?: 'false').toString().toBoolean()
|
||||
@@ -25,6 +35,9 @@ def kryonDirOverride = (project.findProperty('kryon.dir') ?: System.getenv("KRYO
|
||||
// The same Kryon checkout CMake builds with; a relative path starts at the repository.
|
||||
def kryonDir = rootProject.file('..').toPath().resolve(kryonDirOverride ?: 'build/packages/kryon').toFile()
|
||||
|
||||
apply from: new File(kryonDir, 'templates/android-account-handoff.gradle')
|
||||
apply from: new File(kryonDir, 'templates/android-notifications.gradle')
|
||||
|
||||
android {
|
||||
useLibrary 'android.test.runner', false
|
||||
useLibrary 'android.test.base', false
|
||||
@@ -69,8 +82,8 @@ android {
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
||||
versionCode 195
|
||||
versionName "2.1.58"
|
||||
versionCode 199
|
||||
versionName "2.1.62"
|
||||
manifestPlaceholders = [
|
||||
inbeAppLabel: "Inner Breeze",
|
||||
inbeUsesCleartextTraffic: "false"
|
||||
@@ -118,6 +131,16 @@ android {
|
||||
buildConfigField "boolean", "SELF_UPDATE", "false"
|
||||
buildConfigField "String", "UPDATE_FEED", '""'
|
||||
}
|
||||
gplayDebug {
|
||||
initWith gplay
|
||||
applicationIdSuffix '.gplay.debug'
|
||||
signingConfig signingConfigs.debug
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
matchingFallbacks = ['gplay', 'debug']
|
||||
manifestPlaceholders.inbeAppLabel = "Inner Breeze Play Debug"
|
||||
}
|
||||
debug {
|
||||
// Device verification must not replace or restart the owner's debug app.
|
||||
applicationIdSuffix verificationInstance ? ".verification" : ".debug"
|
||||
@@ -154,6 +177,9 @@ android {
|
||||
// Kryon's Play Billing (kryon/play_billing finds it through the
|
||||
// activity's class loader); other editions carry no Google billing.
|
||||
sourceSets.gplay.java.srcDir new File(kryonDir, 'templates/droid/droid/app/src/gplay/java')
|
||||
sourceSets.gplayDebug.java.srcDirs += sourceSets.gplay.java.srcDirs
|
||||
sourceSets.gplayDebug.manifest.srcFile 'src/gplay/AndroidManifest.xml'
|
||||
sourceSets.main.java.srcDir new File(kryonDir, 'templates/droid/droid/app/src/main/java/org/kryonlabs/platform')
|
||||
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
@@ -185,6 +211,22 @@ androidComponents {
|
||||
beforeVariants(selector().withBuildType("gplay")) { variantBuilder ->
|
||||
variantBuilder.minSdk = 23
|
||||
}
|
||||
beforeVariants(selector().withBuildType("gplayDebug")) { variantBuilder ->
|
||||
variantBuilder.minSdk = 23
|
||||
}
|
||||
}
|
||||
|
||||
// Kryon selects exactly one provider edition and owns provider lifecycle/JNI.
|
||||
ext.set('kryon.dir', kryonDir.path)
|
||||
ext.set('app.edition', buildingGplay ? 'gplay' : (project.hasProperty('fDroidBuild') ? 'fdroid' : 'direct'))
|
||||
ext.set('app.pushService', buildingGplay ? 'xyz.waozi.inbe.FcmPushService' : 'xyz.waozi.inbe.PushServiceImpl')
|
||||
if (!buildingGplay) android.sourceSets.main.java.srcDir 'src/unified/java'
|
||||
apply from: new File(kryonDir, 'templates/android-notifications-push.gradle')
|
||||
|
||||
// Entity owns the Play-only Drive adapter; other editions never read its Gradle file.
|
||||
if (buildingGplay) {
|
||||
ext.waoziEntityDir = rootProject.file('../build/packages/entity')
|
||||
apply from: new File(waoziEntityDir, 'android/gplay.gradle')
|
||||
}
|
||||
|
||||
// Always run, including Java-only incremental builds. CMake independently
|
||||
@@ -270,15 +312,16 @@ gradle.taskGraph.whenReady { taskGraph ->
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
gplayDebugImplementation.extendsFrom gplayImplementation
|
||||
}
|
||||
|
||||
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'
|
||||
gplayImplementation 'com.android.billingclient:billing:9.1.0'
|
||||
// Billing's AndroidX libraries mix Kotlin 1.6 and 1.8 standard
|
||||
// libraries; one Kotlin version keeps their classes from colliding.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// The Google Play edition's Firebase Cloud Messaging plugin, which
|
||||
// build.gradle adds to its own classpath (beside the Android plugin it
|
||||
// extends) only in a Gradle run that builds the gplay build type.
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.google.gms:google-services:4.5.0'
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Firebase Cloud Messaging for the Google Play edition (classpath in
|
||||
// gplay-classpath.gradle). CI writes src/gplay/google-services.json; local
|
||||
// Play builds without it keep push inert.
|
||||
if (file('src/gplay/google-services.json').exists()) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
@@ -10,8 +10,12 @@
|
||||
}
|
||||
|
||||
# Manifest and platform callback entrypoints must keep their public shape.
|
||||
-keep class org.kryonlabs.notifications.NotificationReceiver { *; }
|
||||
-keep class xyz.waozi.inbe.FcmPushService { *; }
|
||||
-keep class xyz.waozi.inbe.PushServiceImpl { *; }
|
||||
-keep class xyz.waozi.inbe.SessionForegroundService { *; }
|
||||
-keep class xyz.waozi.inbe.StartPracticeTile { *; }
|
||||
-keep class xyz.waozi.inbe.StartPracticeWidget { *; }
|
||||
|
||||
-keep class xyz.waozi.inbe.UnifiedPushBridge { *; }
|
||||
-keep class org.kryonlabs.notifications.push.** { *; }
|
||||
@@ -6,16 +6,10 @@
|
||||
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
|
||||
tools:node="remove" />
|
||||
<application>
|
||||
<service
|
||||
android:name="xyz.waozi.inbe.PushServiceImpl"
|
||||
tools:node="remove" />
|
||||
|
||||
<service
|
||||
android:name="xyz.waozi.inbe.FcmPushService"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<activity
|
||||
android:name="xyz.waozi.entity.DriveActivity"
|
||||
android:exported="false"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:theme="@android:style/Theme.Material.Light.NoActionBar" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -1,19 +1,12 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.firebase.messaging.FirebaseMessagingService;
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
import org.kryonlabs.notifications.push.SharedFcmService;
|
||||
|
||||
public class FcmPushService extends FirebaseMessagingService {
|
||||
private static final String TAG = "FCM";
|
||||
|
||||
@Override
|
||||
public void onNewToken(String token) {
|
||||
Log.d(TAG, "new FCM token");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessageReceived(RemoteMessage message) {
|
||||
Log.d(TAG, "FCM message received");
|
||||
public class FcmPushService extends SharedFcmService {
|
||||
@Override protected void onPushMessage(RemoteMessage message) {
|
||||
// Only data messages with Kryon's current scope/generation reach here.
|
||||
PushNotificationDisplay.show(this, 2, message.getData().get("kryon_instance"),
|
||||
message.getData().get("title"), message.getData().get("body"));
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,18 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.widget.Toast;
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
|
||||
final class GplayPushBridge {
|
||||
private static String lastToken;
|
||||
|
||||
private GplayPushBridge() {}
|
||||
|
||||
static boolean isRegistered(MainActivity activity) {
|
||||
return lastToken != null && !lastToken.isEmpty();
|
||||
}
|
||||
|
||||
static String[] getDistributors(MainActivity activity) {
|
||||
return new String[] {"fcm"};
|
||||
}
|
||||
|
||||
static String[] getDistributorLabels(MainActivity activity) {
|
||||
return new String[] {"Google notifications"};
|
||||
return new String[] {activity.getString(R.string.push_google_name)};
|
||||
}
|
||||
|
||||
static String[] getDistributorIcons(MainActivity activity) {
|
||||
return new String[] {""};
|
||||
}
|
||||
|
||||
static void disable(MainActivity activity) {
|
||||
lastToken = null;
|
||||
try {
|
||||
FirebaseMessaging.getInstance().deleteToken();
|
||||
} catch (IllegalStateException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
static void configureWith(MainActivity activity, String pkg) {
|
||||
configure(activity);
|
||||
}
|
||||
|
||||
static void configure(final MainActivity activity) {
|
||||
try {
|
||||
FirebaseMessaging.getInstance().getToken()
|
||||
.addOnSuccessListener(token -> {
|
||||
lastToken = token;
|
||||
Toast.makeText(activity, "Google notifications enabled", Toast.LENGTH_SHORT).show();
|
||||
})
|
||||
.addOnFailureListener(error ->
|
||||
Toast.makeText(activity, "Google notifications unavailable", Toast.LENGTH_LONG).show());
|
||||
} catch (IllegalStateException e) {
|
||||
Toast.makeText(activity, "Google notifications unavailable", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
<!-- 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.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
<!-- Health Connect one-way session export (Data & export settings). -->
|
||||
@@ -21,6 +22,7 @@
|
||||
</intent>
|
||||
</queries>
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:hasCode="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="${inbeAppLabel}"
|
||||
@@ -41,6 +43,12 @@
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" android:host="dew.waozi.xyz" android:pathPrefix="/invite/" />
|
||||
</intent-filter>
|
||||
<!-- Health Connect: app info can deep-link to the permissions page. -->
|
||||
<intent-filter>
|
||||
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
|
||||
@@ -102,6 +110,17 @@
|
||||
android:name="xyz.waozi.inbe.AppUpdateReceiver"
|
||||
android:exported="false" />
|
||||
|
||||
<receiver
|
||||
android:name="org.kryonlabs.notifications.NotificationReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.TIME_SET" />
|
||||
<action android:name="android.intent.action.TIMEZONE_CHANGED" />
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name="xyz.waozi.inbe.StartPracticeWidget"
|
||||
android:exported="false"
|
||||
@@ -130,14 +149,6 @@
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="mediaPlayback" />
|
||||
|
||||
<service
|
||||
android:name="xyz.waozi.inbe.PushServiceImpl"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<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
|
||||
|
||||
@@ -20,6 +20,7 @@ if(NOT DEFINED KRYON_DIR)
|
||||
endif()
|
||||
get_filename_component(KRYON_DIR "${KRYON_DIR}" ABSOLUTE BASE_DIR "${REPO_ROOT}")
|
||||
set(RAYLIB_DIR "${REPO_ROOT}/build/packages/raylib/src")
|
||||
set(WEBP_DIR "${REPO_ROOT}/build/packages/libwebp")
|
||||
set(SQLITE_DIR "${REPO_ROOT}/build/packages/sqlite")
|
||||
set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
|
||||
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
|
||||
@@ -238,7 +239,7 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
|
||||
|
||||
set(APP_EMBEDDED_INPUTS
|
||||
apps/publishers.json
|
||||
assets/app/icon.png
|
||||
assets/app/icon.webp
|
||||
)
|
||||
set(APP_EMBEDDED_DEPS)
|
||||
foreach(asset ${APP_EMBEDDED_INPUTS})
|
||||
@@ -264,7 +265,7 @@ add_custom_command(
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
kryon_android_raylib("${RAYLIB_DIR}")
|
||||
kryon_android_raylib("${RAYLIB_DIR}" "${WEBP_DIR}")
|
||||
|
||||
add_library(main SHARED
|
||||
"${MONOCYPHER_DIR}/monocypher.c"
|
||||
@@ -317,7 +318,8 @@ target_compile_definitions(main PRIVATE
|
||||
# The VM locates this exported entry before native methods are registered.
|
||||
foreach(source ${APP_ZIRAN_GENERATED_SOURCES})
|
||||
get_filename_component(source_name "${source}" NAME)
|
||||
if(source_name STREQUAL "android_insets.c")
|
||||
if(source_name STREQUAL "android_insets.c" OR
|
||||
source_name MATCHES "(^|_)(android_notifications|notification_push)\\.c$")
|
||||
set_source_files_properties("${source}"
|
||||
PROPERTIES COMPILE_OPTIONS "-fvisibility=default")
|
||||
elseif(source_name STREQUAL "main.c")
|
||||
@@ -332,7 +334,7 @@ target_link_libraries(main oqs z "${APP_BUNDLE_RUNTIME}")
|
||||
|
||||
# Keep the Android entry points public and let the linker discard unreachable
|
||||
# functions from the statically linked runtime and graphics dependencies.
|
||||
set(APP_EXPORT_MAP "${CMAKE_CURRENT_SOURCE_DIR}/libmain.map.txt")
|
||||
set(APP_EXPORT_MAP "${KRYON_DIR}/cmake/libmain.map.txt")
|
||||
target_link_options(main PRIVATE
|
||||
"$<$<NOT:$<CONFIG:Debug>>:-Wl,-O2,--icf=safe>"
|
||||
"-Wl,--version-script,${APP_EXPORT_MAP}"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
global:
|
||||
# Android loads the NativeActivity entry and registers JNI methods.
|
||||
ANativeActivity_onCreate;
|
||||
JNI_OnLoad;
|
||||
# AndroidSurface resolves the statically linked raylib window state.
|
||||
CORE;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -52,7 +52,6 @@ import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class MainActivity extends NativeActivity {
|
||||
private final HttpTransport httpTransport = new HttpTransport();
|
||||
@@ -333,6 +332,27 @@ public class MainActivity extends NativeActivity {
|
||||
private int pendingQrScanKind = 5;
|
||||
String lastHealthConnectPath = null;
|
||||
private final AppShortcuts appShortcuts = new AppShortcuts(this);
|
||||
private static final int MAX_LAUNCH_URI_LENGTH = 4096;
|
||||
private static String pendingLaunchUri = "";
|
||||
|
||||
// Untrusted launch data only. Entity validates before opening review.
|
||||
private static synchronized void captureLaunchUri(Intent intent) {
|
||||
if (intent == null) return;
|
||||
try {
|
||||
String uri = intent.getDataString();
|
||||
if (uri != null && !uri.isEmpty() && uri.length() <= MAX_LAUNCH_URI_LENGTH) {
|
||||
pendingLaunchUri = uri;
|
||||
}
|
||||
} catch (RuntimeException ignored) {
|
||||
// A malformed intent must not prevent activity startup.
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized String takeLaunchUri() {
|
||||
String uri = pendingLaunchUri;
|
||||
pendingLaunchUri = "";
|
||||
return uri;
|
||||
}
|
||||
|
||||
public boolean launcherPinSupported() {
|
||||
return appShortcuts.supported();
|
||||
@@ -373,6 +393,16 @@ public class MainActivity extends NativeActivity {
|
||||
private native boolean nativeDebugImportMusicForPractice(String path, int practiceId);
|
||||
private native boolean nativeDebugStartMusicDownload();
|
||||
|
||||
// Kryon's native notification host calls this on the app thread.
|
||||
public void requestKryonNotifications() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
org.kryonlabs.notifications.NotificationReceiver.requestPermission(MainActivity.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void requestNotificationPermissionIfNeeded() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED &&
|
||||
@@ -409,7 +439,7 @@ public class MainActivity extends NativeActivity {
|
||||
if (manager != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(
|
||||
DOWNLOAD_CHANNEL_ID,
|
||||
"Downloads",
|
||||
getString(R.string.notification_channel_downloads),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
);
|
||||
manager.createNotificationChannel(channel);
|
||||
@@ -424,7 +454,7 @@ public class MainActivity extends NativeActivity {
|
||||
? new Notification.Builder(this, DOWNLOAD_CHANNEL_ID)
|
||||
: new Notification.Builder(this);
|
||||
builder.setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
.setContentTitle("Downloading audio")
|
||||
.setContentTitle(getString(R.string.notification_downloading_audio))
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true);
|
||||
if (total > 0) {
|
||||
@@ -711,13 +741,9 @@ public class MainActivity extends NativeActivity {
|
||||
if (Intent.ACTION_OPEN_DOCUMENT.equals(intent.getAction())) {
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
}
|
||||
String[] mimeTypes = parseMimeTypes(mimeTypesCsv);
|
||||
intent.setType(primaryMimeType(mimeTypes));
|
||||
if (mimeTypes.length > 0) {
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
|
||||
}
|
||||
org.kryonlabs.platform.DocumentTypes.apply(intent, mimeTypesCsv);
|
||||
pendingImportKind = kind;
|
||||
Log.d(TAG, "Opening import picker - kind=" + kind + ", mimeTypes=" + mimeTypesCsv + ", parsed=" + Arrays.toString(mimeTypes));
|
||||
Log.d(TAG, "Opening import picker - kind=" + kind + ", mimeTypes=" + mimeTypesCsv);
|
||||
try {
|
||||
startActivityForResult(intent, REQUEST_IMPORT_ZIP);
|
||||
} catch (android.content.ActivityNotFoundException unavailable) {
|
||||
@@ -755,36 +781,6 @@ public class MainActivity extends NativeActivity {
|
||||
return documentExport.commit(getContentResolver(), path);
|
||||
}
|
||||
|
||||
private static String[] parseMimeTypes(String mimeTypesCsv) {
|
||||
if (mimeTypesCsv == null || mimeTypesCsv.trim().isEmpty()) {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
String[] raw = mimeTypesCsv.split(",");
|
||||
java.util.ArrayList<String> result = new java.util.ArrayList<>();
|
||||
for (String mimeType : raw) {
|
||||
String trimmed = mimeType.trim();
|
||||
if (!trimmed.isEmpty()) {
|
||||
result.add(trimmed);
|
||||
}
|
||||
}
|
||||
return result.toArray(new String[0]);
|
||||
}
|
||||
|
||||
private static String primaryMimeType(String[] mimeTypes) {
|
||||
if (mimeTypes == null || mimeTypes.length == 0) {
|
||||
return "*/*";
|
||||
}
|
||||
for (String mimeType : mimeTypes) {
|
||||
if (mimeType != null && mimeType.endsWith("/*")) {
|
||||
return mimeType;
|
||||
}
|
||||
}
|
||||
return mimeTypes[0] != null && !mimeTypes[0].isEmpty()
|
||||
? mimeTypes[0]
|
||||
: "*/*";
|
||||
}
|
||||
|
||||
private String extensionForUri(Uri uri) {
|
||||
if (uri == null) return null;
|
||||
|
||||
@@ -1053,6 +1049,10 @@ public class MainActivity extends NativeActivity {
|
||||
return PushBridge.isRegistered(this);
|
||||
}
|
||||
|
||||
public void syncKryonPush(String scope) {
|
||||
PushBridge.syncScope(this, scope);
|
||||
}
|
||||
|
||||
public String[] getUnifiedPushDistributors() {
|
||||
return PushBridge.getDistributors(this);
|
||||
}
|
||||
@@ -1163,7 +1163,7 @@ public class MainActivity extends NativeActivity {
|
||||
clipboard.setPrimaryClip(ClipData.newPlainText("Inner Breeze", text == null ? "" : text));
|
||||
}
|
||||
String message = toastText == null || toastText.isEmpty()
|
||||
? "Copied"
|
||||
? getString(R.string.toast_copied)
|
||||
: toastText;
|
||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -1207,6 +1207,7 @@ public class MainActivity extends NativeActivity {
|
||||
configureSystemBars();
|
||||
// Set or clear the local override before the native app starts.
|
||||
offerLocalNodeApp();
|
||||
if (savedInstanceState == null) captureLaunchUri(getIntent());
|
||||
super.onCreate(savedInstanceState);
|
||||
configureSystemBars();
|
||||
textInputView = new TextInputView(this, new TextInputView.Listener() {
|
||||
@@ -1528,6 +1529,7 @@ public class MainActivity extends NativeActivity {
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
captureLaunchUri(intent);
|
||||
appShortcuts.accept(intent);
|
||||
configureSystemBars();
|
||||
requestInsetRefresh();
|
||||
|
||||
@@ -1,151 +1,115 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.widget.Toast;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.unifiedpush.android.connector.UnifiedPush;
|
||||
import org.json.JSONObject;
|
||||
import org.kryonlabs.notifications.push.PushCallbacks;
|
||||
|
||||
final class PushBridge {
|
||||
private static final String PREFERENCES = "push";
|
||||
private static final String AUTO_CONNECT_DISABLED = "auto_connect_disabled";
|
||||
private static final String ACCOUNT_SCOPE = "account_scope";
|
||||
private static final String FEATURE_ENABLED = "feature_enabled";
|
||||
private static boolean nativeScopeKnown;
|
||||
|
||||
private PushBridge() {}
|
||||
|
||||
static boolean isRegistered(MainActivity activity) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("isRegistered", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof Boolean) {
|
||||
return (Boolean) value;
|
||||
}
|
||||
// A provider endpoint alone is not a server registration. No push
|
||||
// server registration contract exists in Breeze yet.
|
||||
return false;
|
||||
}
|
||||
|
||||
static synchronized void syncScope(Context context, String scope) {
|
||||
String next = scope == null ? "" : scope;
|
||||
if (next.length() > 128) next = "";
|
||||
android.content.SharedPreferences prefs = preferences(context);
|
||||
String previous = prefs.getString(ACCOUNT_SCOPE, "");
|
||||
boolean changed = !previous.equals(next);
|
||||
boolean first = !nativeScopeKnown;
|
||||
nativeScopeKnown = true;
|
||||
if (changed || (next.isEmpty() && (first || prefs.getBoolean(FEATURE_ENABLED, false)))) {
|
||||
// Persist denial before cancelling the former native generation.
|
||||
prefs.edit().putBoolean(FEATURE_ENABLED, false).commit();
|
||||
PushNotificationDisplay.cancel(context);
|
||||
if (!previous.isEmpty()) PushCallbacks.cancel(context, previous);
|
||||
prefs.edit().putString(ACCOUNT_SCOPE, next)
|
||||
.putBoolean(FEATURE_ENABLED, !next.isEmpty()).commit();
|
||||
}
|
||||
if ((first || changed) && !next.isEmpty()) startCurrent(context);
|
||||
}
|
||||
|
||||
private static void startCurrent(Context context) {
|
||||
android.content.SharedPreferences prefs = preferences(context);
|
||||
String scope = prefs.getString(ACCOUNT_SCOPE, "");
|
||||
if (!nativeScopeKnown || scope.isEmpty() ||
|
||||
!prefs.getBoolean(FEATURE_ENABLED, false) ||
|
||||
prefs.getBoolean(AUTO_CONNECT_DISABLED, false)) return;
|
||||
PushCallbacks.start(context, scope, "Inner Breeze");
|
||||
}
|
||||
|
||||
static synchronized boolean canDisplay(Context context) {
|
||||
android.content.SharedPreferences prefs = preferences(context);
|
||||
String scope = prefs.getString(ACCOUNT_SCOPE, "");
|
||||
if (scope.isEmpty() || !prefs.getBoolean(FEATURE_ENABLED, false) ||
|
||||
prefs.getBoolean(AUTO_CONNECT_DISABLED, false)) return false;
|
||||
try {
|
||||
JSONObject state = new JSONObject(PushCallbacks.snapshot(context, scope));
|
||||
int status = state.optInt("status");
|
||||
return (status == 4 || status == 5 || status == 7) && !state.optString("wire").isEmpty();
|
||||
} catch (Exception invalidState) {
|
||||
return false;
|
||||
}
|
||||
return PushServiceImpl.getEndpoint(activity) != null;
|
||||
}
|
||||
|
||||
static String[] getDistributors(MainActivity activity) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributors", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
}
|
||||
}
|
||||
List<String> distributors = UnifiedPush.getDistributors(activity);
|
||||
return distributors.toArray(new String[0]);
|
||||
Object value = callEdition("getDistributors", new Class<?>[] {MainActivity.class}, activity);
|
||||
return value instanceof String[] ? (String[]) value : new String[0];
|
||||
}
|
||||
|
||||
static String[] getDistributorLabels(MainActivity activity) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributorLabels", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
}
|
||||
}
|
||||
PackageManager pm = activity.getPackageManager();
|
||||
List<String> labels = new ArrayList<>();
|
||||
for (String pkg : UnifiedPush.getDistributors(activity)) {
|
||||
try {
|
||||
labels.add(pm.getApplicationLabel(pm.getApplicationInfo(pkg, 0)).toString());
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
labels.add(pkg);
|
||||
}
|
||||
}
|
||||
return labels.toArray(new String[0]);
|
||||
Object value = callEdition("getDistributorLabels", new Class<?>[] {MainActivity.class}, activity);
|
||||
return value instanceof String[] ? (String[]) value : new String[0];
|
||||
}
|
||||
|
||||
static String[] getDistributorIcons(MainActivity activity) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributorIcons", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
}
|
||||
}
|
||||
PackageManager pm = activity.getPackageManager();
|
||||
File dir = new File(activity.getCacheDir(), "push-icons");
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
List<String> paths = new ArrayList<>();
|
||||
List<String> distributors = UnifiedPush.getDistributors(activity);
|
||||
for (int i = 0; i < distributors.size(); i++) {
|
||||
File out = new File(dir, "icon_" + i + ".png");
|
||||
try {
|
||||
Drawable drawable = pm.getApplicationIcon(distributors.get(i));
|
||||
Bitmap bmp = Bitmap.createBitmap(96, 96, Bitmap.Config.ARGB_8888);
|
||||
Canvas canvas = new Canvas(bmp);
|
||||
drawable.setBounds(0, 0, 96, 96);
|
||||
drawable.draw(canvas);
|
||||
FileOutputStream fos = new FileOutputStream(out);
|
||||
bmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
|
||||
fos.close();
|
||||
paths.add(out.getAbsolutePath());
|
||||
} catch (Exception e) {
|
||||
paths.add("");
|
||||
}
|
||||
}
|
||||
return paths.toArray(new String[0]);
|
||||
Object value = callEdition("getDistributorIcons", new Class<?>[] {MainActivity.class}, activity);
|
||||
return value instanceof String[] ? (String[]) value : new String[0];
|
||||
}
|
||||
|
||||
static void configureWith(final MainActivity activity, final String pkg) {
|
||||
if (BuildConfig.GPLAY && callGplay("configureWith",
|
||||
new Class<?>[] {MainActivity.class, String.class}, activity, pkg) != null) {
|
||||
return;
|
||||
}
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnifiedPush.saveDistributor(activity, pkg);
|
||||
UnifiedPush.register(activity, "inbe", "Inner Breeze", null);
|
||||
Toast.makeText(activity, "Push: registering with " + pkg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
static synchronized void configureWith(final MainActivity activity, final String pkg) {
|
||||
if (!BuildConfig.GPLAY) callEdition("configureWith",
|
||||
new Class<?>[] {MainActivity.class, String.class}, activity, pkg);
|
||||
configure(activity);
|
||||
}
|
||||
|
||||
static void configure(final MainActivity activity) {
|
||||
if (BuildConfig.GPLAY && callGplay("configure",
|
||||
new Class<?>[] {MainActivity.class}, activity) != null) {
|
||||
return;
|
||||
}
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!UnifiedPush.getDistributors(activity).isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Toast.makeText(activity, "Install a UnifiedPush distributor (e.g. Sunup)", Toast.LENGTH_LONG).show();
|
||||
try {
|
||||
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(
|
||||
"https://f-droid.org/en/packages/org.unifiedpush.distributor.sunup/")));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
});
|
||||
static synchronized void configure(final MainActivity activity) {
|
||||
preferences(activity).edit().putBoolean(AUTO_CONNECT_DISABLED, false).commit();
|
||||
startCurrent(activity);
|
||||
}
|
||||
|
||||
static synchronized void autoConnect(final MainActivity activity) {
|
||||
// Native account/settings initialization must run before registration.
|
||||
startCurrent(activity);
|
||||
}
|
||||
|
||||
// "None" in the picker: unregister and forget the distributor, so push
|
||||
// notifications stay off until one is chosen again.
|
||||
static void disable(final MainActivity activity) {
|
||||
if (BuildConfig.GPLAY && callGplay("disable",
|
||||
new Class<?>[] {MainActivity.class}, activity) != null) {
|
||||
return;
|
||||
}
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnifiedPush.unregister(activity, "inbe");
|
||||
UnifiedPush.removeDistributor(activity);
|
||||
PushServiceImpl.forgetEndpoint(activity);
|
||||
}
|
||||
});
|
||||
static synchronized void disable(final MainActivity activity) {
|
||||
preferences(activity).edit().putBoolean(AUTO_CONNECT_DISABLED, true).commit();
|
||||
PushNotificationDisplay.cancel(activity);
|
||||
String scope = preferences(activity).getString(ACCOUNT_SCOPE, "");
|
||||
if (!scope.isEmpty()) PushCallbacks.cancel(activity, scope);
|
||||
}
|
||||
|
||||
private static Object callGplay(String name, Class<?>[] parameterTypes, Object... args) {
|
||||
private static SharedPreferences preferences(Context context) {
|
||||
return context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
private static Object callEdition(String name, Class<?>[] parameterTypes, Object... args) {
|
||||
try {
|
||||
Method method = Class.forName("xyz.waozi.inbe.GplayPushBridge").getDeclaredMethod(name, parameterTypes);
|
||||
Method method = Class.forName(BuildConfig.GPLAY ? "xyz.waozi.inbe.GplayPushBridge" : "xyz.waozi.inbe.UnifiedPushBridge").getDeclaredMethod(name, parameterTypes);
|
||||
method.setAccessible(true);
|
||||
Object value = method.invoke(null, args);
|
||||
return value != null ? value : Boolean.TRUE;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import org.kryonlabs.notifications.push.PushCallbacks;
|
||||
|
||||
/** Display only accepted, enabled account messages, including cold background delivery. */
|
||||
final class PushNotificationDisplay {
|
||||
private static final String CHANNEL_ID = "inbe.push";
|
||||
private static final int NOTIFICATION_ID = 0x7042;
|
||||
|
||||
private PushNotificationDisplay() {}
|
||||
|
||||
// Call under PushBridge's lock so revocation also removes an already
|
||||
// visible former-account body before another account can be published.
|
||||
static void cancel(Context context) {
|
||||
NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (manager != null) manager.cancel(NOTIFICATION_ID);
|
||||
}
|
||||
|
||||
static void show(Context context, int provider, String wire, String title, String body) {
|
||||
if (body == null || body.trim().isEmpty() || body.length() > 4096 ||
|
||||
(title != null && title.length() > 256) || !PushBridge.canDisplay(context) ||
|
||||
!PushCallbacks.accepts(context, provider, wire)) return;
|
||||
if (Build.VERSION.SDK_INT >= 33 && context.checkSelfPermission(
|
||||
Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) return;
|
||||
NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (manager == null || (Build.VERSION.SDK_INT >= 24 && !manager.areNotificationsEnabled())) return;
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
manager.createNotificationChannel(new NotificationChannel(CHANNEL_ID,
|
||||
context.getString(R.string.notification_channel_push), NotificationManager.IMPORTANCE_DEFAULT));
|
||||
NotificationChannel channel = manager.getNotificationChannel(CHANNEL_ID);
|
||||
if (channel == null || channel.getImportance() == NotificationManager.IMPORTANCE_NONE) return;
|
||||
}
|
||||
Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
||||
if (launch == null) return;
|
||||
PendingIntent intent = PendingIntent.getActivity(context, 0, launch,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
Notification.Builder builder = Build.VERSION.SDK_INT >= 26
|
||||
? new Notification.Builder(context, CHANNEL_ID) : new Notification.Builder(context);
|
||||
Notification notification = builder.setSmallIcon(context.getApplicationInfo().icon)
|
||||
.setContentTitle(title == null || title.trim().isEmpty() ? "Inner Breeze" : title)
|
||||
.setContentText(body).setStyle(new Notification.BigTextStyle().bigText(body))
|
||||
.setAutoCancel(true).setContentIntent(intent).build();
|
||||
// Serialize posting with disable/account replacement so a former scope
|
||||
// cannot pass a stale decision while it is being revoked.
|
||||
synchronized (PushBridge.class) {
|
||||
if (PushBridge.canDisplay(context) && PushCallbacks.accepts(context, provider, wire)) {
|
||||
try { manager.notify(NOTIFICATION_ID, notification); }
|
||||
catch (SecurityException permissionRevoked) { /* OS permission changed during dispatch. */ }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import org.unifiedpush.android.connector.FailedReason;
|
||||
import org.unifiedpush.android.connector.PushService;
|
||||
import org.unifiedpush.android.connector.data.PublicKeySet;
|
||||
import org.unifiedpush.android.connector.data.PushEndpoint;
|
||||
import org.unifiedpush.android.connector.data.PushMessage;
|
||||
|
||||
public class PushServiceImpl extends PushService {
|
||||
private static final String TAG = "PUSH";
|
||||
private static final String PREFS = "push";
|
||||
private static final String PREF_ENDPOINT = "endpoint";
|
||||
private static final String PREF_AUTH = "auth";
|
||||
private static final String PREF_P256DH = "p256dh";
|
||||
private static final String CHANNEL_ID = "inbe.push";
|
||||
private static final int NOTIFICATION_ID = 0x7042;
|
||||
|
||||
@Override
|
||||
public void onMessage(PushMessage message, String instance) {
|
||||
if (!NotificationPresence.canPostPush(this)) {
|
||||
Log.d(TAG, "Ignoring push without a visible app or session indicator");
|
||||
return;
|
||||
}
|
||||
String text = new String(message.getContent());
|
||||
String title = "Inner Breeze";
|
||||
String body = text;
|
||||
int nl = text.indexOf('\n');
|
||||
if (nl >= 0) {
|
||||
title = text.substring(0, nl);
|
||||
body = text.substring(nl + 1);
|
||||
}
|
||||
showNotification(title, body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewEndpoint(PushEndpoint endpoint, String instance) {
|
||||
Log.d(TAG, "new endpoint (temporary=" + endpoint.getTemporary() + ")");
|
||||
SharedPreferences.Editor e = prefs().edit().putString(PREF_ENDPOINT, endpoint.getUrl());
|
||||
PublicKeySet keys = endpoint.getPubKeySet();
|
||||
if (keys != null) {
|
||||
e.putString(PREF_AUTH, keys.getAuth()).putString(PREF_P256DH, keys.getPubKey());
|
||||
} else {
|
||||
e.remove(PREF_AUTH).remove(PREF_P256DH);
|
||||
}
|
||||
e.apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegistrationFailed(FailedReason reason, String instance) {
|
||||
Log.w(TAG, "registration failed: " + reason);
|
||||
prefs().edit().remove(PREF_ENDPOINT).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnregistered(String instance) {
|
||||
prefs().edit().remove(PREF_ENDPOINT).apply();
|
||||
}
|
||||
|
||||
public static String getEndpoint(Context context) {
|
||||
return context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getString(PREF_ENDPOINT, null);
|
||||
}
|
||||
|
||||
// Push turned off: no endpoint until a distributor is chosen again.
|
||||
public static void forgetEndpoint(Context context) {
|
||||
context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit()
|
||||
.remove(PREF_ENDPOINT).remove(PREF_AUTH).remove(PREF_P256DH).apply();
|
||||
}
|
||||
|
||||
private SharedPreferences prefs() {
|
||||
return getSharedPreferences(PREFS, Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
private void showNotification(String title, String body) {
|
||||
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
if (nm == null) return;
|
||||
if (Build.VERSION.SDK_INT >= 26 && nm.getNotificationChannel(CHANNEL_ID) == null) {
|
||||
nm.createNotificationChannel(new NotificationChannel(CHANNEL_ID, "Push messages", NotificationManager.IMPORTANCE_DEFAULT));
|
||||
}
|
||||
PendingIntent pi = PendingIntent.getActivity(this, 0,
|
||||
getPackageManager().getLaunchIntentForPackage(getPackageName()),
|
||||
PendingIntent.FLAG_IMMUTABLE);
|
||||
Notification.Builder b = Build.VERSION.SDK_INT >= 26
|
||||
? new Notification.Builder(this, CHANNEL_ID)
|
||||
: new Notification.Builder(this);
|
||||
b.setSmallIcon(getApplicationInfo().icon)
|
||||
.setContentTitle(title)
|
||||
.setContentText(body)
|
||||
.setAutoCancel(true)
|
||||
.setContentIntent(pi);
|
||||
if (!NotificationPresence.canPostPush(this)) {
|
||||
return;
|
||||
}
|
||||
nm.notify(NOTIFICATION_ID, b.build());
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.0 KiB |
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_air_foreground" />
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 7.0 KiB |