Compare commits

...
19 Commits
Author SHA1 Message Date
waozi a3743c9b37 improve profile screen 2026-06-29 03:16:43 -03:00
waozi fe96b6c61e bug fixes 2026-06-29 03:06:17 -03:00
waozi eabbff2972 fix critical inset issue 2026-06-29 00:15:28 -03:00
waozi 157788fa5c improve habit management 2026-06-28 23:58:01 -03:00
waozi e89f63e382 improve my profile screen 2026-06-28 23:45:36 -03:00
waozi 1105b51c24 fix translations 2026-06-28 22:08:00 -03:00
waozi c9cf77d05a new version 2026-06-28 21:31:46 -03:00
waozi 8315898d00 Fix profile sync and leaderboard flow 2026-06-28 21:26:38 -03:00
waozi f61a9e9094 update web release for chrome 2026-06-28 12:01:24 -03:00
waozi f7cb61cf57 updated practic screen layout 2026-06-28 11:36:06 -03:00
waozi 407e4fa2a0 fix sync 2026-06-28 01:41:05 -03:00
waozi 7093dd1a51 Publish Chrome Web Store extension 2026-06-27 22:57:05 -03:00
waozi f78cd854c8 Use current Google Play upload track input 2026-06-27 19:42:51 -03:00
waozi 44725b5bf6 fix changelog 2026-06-27 18:55:59 -03:00
waozi 894552e1b6 update version 2026-06-27 18:55:11 -03:00
waozi 2695cf99a1 Update Flint vendor runtime paths 2026-06-27 18:39:48 -03:00
waozi 62317fa294 improved meditation practice 2026-06-27 18:15:36 -03:00
waozi b492e59c90 move liboqs account managemnt to flint 2026-06-27 16:14:13 -03:00
waozi 86e529db36 polish theme and translations 2026-06-27 15:37:08 -03:00
121 changed files with 7456 additions and 3258 deletions

No files matched your search

+135 -1
View File
@@ -393,7 +393,7 @@ jobs:
- name: Copy Android Assets
run: ./scripts/copy-android-assets.sh
- name: Build Android APK
- name: Build Android APK and AAB
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
@@ -405,7 +405,13 @@ jobs:
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
./droid/gradlew -p droid bundleRelease \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
make android-copy-release-apks
make android-copy-bundle
- name: Collect Android Release Files
run: |
@@ -417,6 +423,12 @@ jobs:
exit 1
fi
cp "build/android/inbe-$VERSION.apk" build/release/android/
aab="$(find droid/app/build/outputs/bundle/release build/android -type f -name '*.aab' | head -n 1)"
if [ -z "$aab" ]; then
echo "No release AAB was produced"
exit 1
fi
cp "$aab" "build/release/android/inbe-$VERSION.aab"
- name: Upload Android Artifacts
uses: actions/upload-artifact@v4
@@ -557,3 +569,125 @@ jobs:
butler push "$android_apk" waozi/inbe:android --userversion "$VERSION"
butler push "$windows_zip" waozi/inbe:windows --userversion "$VERSION"
butler push "$linux_appimage" waozi/inbe:linux --userversion "$VERSION"
publish-google-play:
name: Publish Google Play Open Testing
runs-on: ubuntu-latest
needs:
- build-android
- release
if: needs.release.outputs.tag_pushed == 'true'
steps:
- name: Check Google Play Secret
env:
PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
run: |
set -euo pipefail
if [ -z "${PLAY_STORE_JSON_KEY:-}" ]; then
echo "PLAY_STORE_JSON_KEY secret is required to publish Google Play"
exit 1
fi
- name: Download Android Release Artifact
uses: actions/download-artifact@v4
with:
name: release-android
path: build/release/android
- name: Publish AAB to Play Games on PC Open Testing
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_JSON_KEY }}
packageName: xyz.waozi.inbe
releaseFiles: build/release/android/*.aab
tracks: google_play_games_pc:beta
status: completed
publish-chrome-web-store:
name: Publish Chrome Web Store
runs-on: ubuntu-latest
needs:
- build-chrome-extension
- release
if: needs.release.outputs.tag_pushed == 'true'
steps:
- name: Check Chrome Web Store Secrets
env:
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
run: |
set -euo pipefail
if [ -z "${CHROME_CLIENT_ID:-}" ]; then
echo "CHROME_CLIENT_ID secret is required to publish Chrome Web Store"
exit 1
fi
if [ -z "${CHROME_CLIENT_SECRET:-}" ]; then
echo "CHROME_CLIENT_SECRET secret is required to publish Chrome Web Store"
exit 1
fi
if [ -z "${CHROME_REFRESH_TOKEN:-}" ]; then
echo "CHROME_REFRESH_TOKEN secret is required to publish Chrome Web Store"
exit 1
fi
- name: Download Chrome Extension Artifact
uses: actions/download-artifact@v4
with:
name: release-chrome-web-store
path: build/release/chrome-web-store
- name: Publish Chrome Extension
env:
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
CHROME_EXTENSION_ID: lballhghblaenelehneigekpofgcaifa
CHROME_EXTENSION_ZIP: build/release/chrome-web-store/inbe-chrome-web-store.zip
run: |
set -euo pipefail
token_response="$(curl --fail --silent --show-error \
--request POST \
--data-urlencode "client_id=${CHROME_CLIENT_ID}" \
--data-urlencode "client_secret=${CHROME_CLIENT_SECRET}" \
--data-urlencode "refresh_token=${CHROME_REFRESH_TOKEN}" \
--data-urlencode "grant_type=refresh_token" \
https://oauth2.googleapis.com/token)"
access_token="$(python3 -c 'import json, sys; print(json.load(sys.stdin)["access_token"])' <<< "$token_response")"
upload_response="$(curl --fail --silent --show-error \
--request PUT \
--header "Authorization: Bearer ${access_token}" \
--header "x-goog-api-version: 2" \
--upload-file "${CHROME_EXTENSION_ZIP}" \
"https://www.googleapis.com/upload/chromewebstore/v1.1/items/${CHROME_EXTENSION_ID}")"
python3 - "$upload_response" <<'PY'
import json
import sys
response = json.loads(sys.argv[1])
if response.get("uploadState") != "SUCCESS":
print(json.dumps(response, indent=2), file=sys.stderr)
raise SystemExit("Chrome Web Store upload failed")
PY
publish_response="$(curl --fail --silent --show-error \
--request POST \
--header "Authorization: Bearer ${access_token}" \
--header "x-goog-api-version: 2" \
"https://www.googleapis.com/chromewebstore/v1.1/items/${CHROME_EXTENSION_ID}/publish")"
python3 - "$publish_response" <<'PY'
import json
import sys
response = json.loads(sys.argv[1])
if "OK" not in response.get("status", []):
print(json.dumps(response, indent=2), file=sys.stderr)
raise SystemExit("Chrome Web Store publish failed")
PY
-6
View File
@@ -4,12 +4,6 @@
[submodule "vendor/sqlite"]
path = vendor/sqlite
url = https://github.com/sqlite/sqlite
[submodule "vendor/liboqs"]
path = vendor/liboqs
url = https://github.com/open-quantum-safe/liboqs.git
[submodule "vendor/curl"]
path = vendor/curl
url = https://github.com/curl/curl.git
[submodule "vendor/flint"]
path = vendor/flint
url = [email protected]:waozixyz/flint.git
+56 -2
View File
@@ -1,10 +1,64 @@
# Changelog
## [1.7.4] - 2026-06-29
### Fixed
- Clean up practice stats, friend removal, sync review, and Android inset handling.
## [1.7.3] - 2026-06-29
### Fixed
- bottom inset in practice
### Changed
- Improve habit management
## [1.7.2] - 2026-06-29
### Added
- Add local `make install` target.
- Add Profile controls for habit ordering and practice visibility.
### Changed
- Move sync status into the Data view and simplify the habits add option.
- Clean up the README.
## [1.7.1] - 2026-06-28
### Changed
- Move shared Lyra sync protocol code into Flint and simplify Inbe sync client wiring.
## [1.7.0] - 2026-06-28
### Changed
- Rework Android safe-area handling to use one native inset path with stable bottom navigation spacing.
- Move leaderboard stats to synced source data, with local current-user rows shown immediately.
### Fixed
- Fix profile/friend sync freshness, leaderboard empty states, modal input capture, pet asset embedding, and wrapped text previews.
## [1.6.6] - 2026-06-28
### Changed
- updated the practice screen ui/ux
## [1.6.5] - 2026-06-28
### Fixed
- Repair habit-day sync for zero-count completions.
- Require liboqs at build time for every sync-enabled target.
## [1.6.4] - 2026-06-27
### Changed
- Move meditation duration selection into practice configuration with custom time support.
- Add centered in-session meditation add-time controls.
- Use Flint-managed liboqs, LibreSSL, and curl build paths.
### Fixed
- Fix Android native build to use Flint's liboqs submodule.
## [1.6.3] - 2026-06-27
### Changed
- Improve theme, habit, and localization UI polish
## [1.6.2] - 2026-06-27
## Changed
### Changed
- Improve sun salutation
## [1.6.1] - 2026-06-27
## Changed
### Changed
- Improved notification in session
- Standardized settings screen1
+141 -107
View File
@@ -47,6 +47,9 @@ CLICK_BIN := $(CLICK_BIN_DIR)/$(APP_NAME)
CLICK_BIN_INPUT := $(if $(strip $(CLICK_BIN_SOURCE)),$(CLICK_BIN_SOURCE),$(CLICK_BIN))
CLICK_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/raylib
CLICK_RAYLIB_A := $(CLICK_RAYLIB_BUILD_DIR)/libraylib.a
CLICK_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/liboqs
CLICK_LIBOQS_A := $(CLICK_LIBOQS_BUILD_DIR)/lib/liboqs.a
CLICK_LIBOQS_INCLUDE := -I$(CLICK_LIBOQS_BUILD_DIR)/include
CLICK_PATCHELF_INTERPRETER ?= /lib/ld-linux-aarch64.so.1
CLICK_RUNTIME_LIBS ?= $(AARCH64_CLICK_RUNTIME_LIBS)
WINDOWS_OBJ_DIR := $(BUILD_OBJ_DIR)/windows
@@ -70,6 +73,7 @@ WIN64_CC ?= $(or $(WIN_CC),x86_64-w64-mingw32-gcc)
WIN64_AR ?= $(or $(WIN_AR),x86_64-w64-mingw32-ar)
WIN64_RANLIB ?= $(or $(WIN_RANLIB),x86_64-w64-mingw32-ranlib)
WIN64_STRIP ?= $(or $(WIN_STRIP),x86_64-w64-mingw32-strip)
WIN64_CMAKE_SYSTEM_PROCESSOR ?= x86_64
WIN64_CC_PATH := $(shell command -v $(WIN64_CC) 2>/dev/null || printf '%s' $(WIN64_CC))
WIN64_AR_PATH := $(shell command -v $(WIN64_AR) 2>/dev/null || printf '%s' $(WIN64_AR))
WIN64_RANLIB_PATH := $(shell command -v $(WIN64_RANLIB) 2>/dev/null || printf '%s' $(WIN64_RANLIB))
@@ -78,6 +82,7 @@ WIN32_CC ?= i686-w64-mingw32-gcc
WIN32_AR ?= i686-w64-mingw32-ar
WIN32_RANLIB ?= i686-w64-mingw32-ranlib
WIN32_STRIP ?= i686-w64-mingw32-strip
WIN32_CMAKE_SYSTEM_PROCESSOR ?= x86
WIN32_CC_PATH := $(shell command -v $(WIN32_CC) 2>/dev/null || printf '%s' $(WIN32_CC))
WIN32_AR_PATH := $(shell command -v $(WIN32_AR) 2>/dev/null || printf '%s' $(WIN32_AR))
WIN32_RANLIB_PATH := $(shell command -v $(WIN32_RANLIB) 2>/dev/null || printf '%s' $(WIN32_RANLIB))
@@ -88,9 +93,15 @@ WIN32_RAYLIB_A := $(WIN32_RAYLIB_BUILD_DIR)/libraylib.a
WIN64_CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/curl
WIN64_CURL_INCLUDE_DIR := $(WIN64_CURL_BUILD_DIR)/include
WIN64_CURL_A := $(WIN64_CURL_BUILD_DIR)/lib/libcurl.a
WIN64_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/liboqs
WIN64_LIBOQS_A := $(WIN64_LIBOQS_BUILD_DIR)/lib/liboqs.a
WIN64_LIBOQS_INCLUDE := -I$(WIN64_LIBOQS_BUILD_DIR)/include
WIN32_CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/curl
WIN32_CURL_INCLUDE_DIR := $(WIN32_CURL_BUILD_DIR)/include
WIN32_CURL_A := $(WIN32_CURL_BUILD_DIR)/lib/libcurl.a
WIN32_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/liboqs
WIN32_LIBOQS_A := $(WIN32_LIBOQS_BUILD_DIR)/lib/liboqs.a
WIN32_LIBOQS_INCLUDE := -I$(WIN32_LIBOQS_BUILD_DIR)/include
WEB_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/raylib
WEB_RAYLIB_A := $(WEB_RAYLIB_BUILD_DIR)/libraylib.web.a
RAYLIB_SOURCES := $(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.h' \))
@@ -102,22 +113,37 @@ FLINT_SRCS := $(filter-out $(FLINT_ICON_ASSETS_C),$(wildcard $(FLINT_DIR)/src/*.
FLINT_WEB_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
FLINT_WINDOWS_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
FLINT_INCLUDE := -I$(FLINT_DIR)/include
CURL_DIR := vendor/curl
CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/curl
CURL_INCLUDE_DIR := $(CURL_BUILD_DIR)/include
CURL_LIB_DIR := $(CURL_BUILD_DIR)/lib64
CURL_SO := $(CURL_LIB_DIR)/libcurl.so
CURL_PROTOCOL_CHECK := $(CURL_BUILD_DIR)/.protocols-ok
OPENSSL_ROOT_DIR ?= $(shell pkg-config --variable=prefix openssl 2>/dev/null)
OPENSSL_CMAKE_OPT := $(if $(strip $(OPENSSL_ROOT_DIR)),-DOPENSSL_ROOT_DIR=$(OPENSSL_ROOT_DIR),)
OPENSSL_INCLUDE_CMAKE_OPT := $(if $(strip $(OPENSSL_INCLUDE_DIR)),-DOPENSSL_INCLUDE_DIR=$(OPENSSL_INCLUDE_DIR),)
OPENSSL_SSL_CMAKE_OPT := $(if $(strip $(OPENSSL_SSL_LIBRARY)),-DOPENSSL_SSL_LIBRARY=$(OPENSSL_SSL_LIBRARY),)
OPENSSL_CRYPTO_CMAKE_OPT := $(if $(strip $(OPENSSL_CRYPTO_LIBRARY)),-DOPENSSL_CRYPTO_LIBRARY=$(OPENSSL_CRYPTO_LIBRARY),)
OPENSSL_LIB_DIR := $(patsubst %/,%,$(dir $(OPENSSL_SSL_LIBRARY)))
OPENSSL_LDLIBS := $(if $(strip $(OPENSSL_SSL_LIBRARY) $(OPENSSL_CRYPTO_LIBRARY)),-Xlinker -rpath -Xlinker $(OPENSSL_LIB_DIR) $(OPENSSL_SSL_LIBRARY) $(OPENSSL_CRYPTO_LIBRARY),$(or $(shell pkg-config --libs openssl 2>/dev/null),-lssl -lcrypto))
FLINT_CURL_CFLAGS := -I$(CURL_INCLUDE_DIR)
FLINT_CURL_LDLIBS := -L$(CURL_LIB_DIR) -Wl,-rpath,$(abspath $(CURL_LIB_DIR)) -lcurl $(OPENSSL_LDLIBS)
FLINT_CURL_VERSION_NUM ?= $(shell printf '%s\n' '#include <curl/curlver.h>' 'LIBCURL_VERSION_NUM' | $(CC) -I$(CURL_DIR)/include -E -P - 2>/dev/null | tail -n 1)
FLINT_VENDOR_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)
FLINT_LIBOQS_BUILD_DIR := $(FLINT_VENDOR_BUILD_DIR)/liboqs
FLINT_WEB_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/liboqs
FLINT_CURL_BUILD_DIR := $(FLINT_VENDOR_BUILD_DIR)/curl
FLINT_CURL_REQUIRE_WEBSOCKETS := 1
FLINT_CURL_EXTRA_CMAKE_FLAGS := \
-DCURL_DISABLE_WEBSOCKETS=OFF \
-DCURL_DISABLE_INSTALL=OFF \
-DCURL_DISABLE_DICT=ON \
-DCURL_DISABLE_FILE=ON \
-DCURL_DISABLE_FTP=ON \
-DCURL_DISABLE_GOPHER=ON \
-DCURL_DISABLE_IMAP=ON \
-DCURL_DISABLE_MQTT=ON \
-DCURL_DISABLE_POP3=ON \
-DCURL_DISABLE_RTSP=ON \
-DCURL_DISABLE_SMTP=ON \
-DCURL_DISABLE_TELNET=ON \
-DCURL_DISABLE_TFTP=ON \
-DCURL_DISABLE_LIBCURL_OPTION=ON \
-DCURL_ZLIB=OFF \
-DCURL_BROTLI=OFF \
-DCURL_ZSTD=OFF
include $(FLINT_DIR)/mk/vendor.mk
CURL_DIR := $(FLINT_CURL_DIR)
CURL_BUILD_DIR := $(FLINT_CURL_BUILD_DIR)
CURL_INCLUDE_DIR := $(FLINT_CURL_INCLUDE_DIR)
CURL_LIB_DIR := $(FLINT_CURL_LIB_DIR)
CURL_SO := $(FLINT_CURL_SO)
CURL_PROTOCOL_CHECK := $(FLINT_CURL_PROTOCOL_CHECK)
FLINT_CURL_VERSION_NUM ?= $(shell printf '%s\n' '#include <curl/curlver.h>' 'LIBCURL_VERSION_NUM' | $(CC) -I$(FLINT_CURL_DIR)/include -E -P - 2>/dev/null | tail -n 1)
FLINT_CURL_VERSION_HEX := $(patsubst 0x%,%,$(FLINT_CURL_VERSION_NUM))
SQLITE_DIR := vendor/sqlite
SQLITE_BUILD_DIR := $(VENDOR_BUILD_DIR)/sqlite
@@ -125,12 +151,12 @@ SQLITE_AMALGAMATION_C := $(SQLITE_BUILD_DIR)/sqlite3.c
SQLITE_AMALGAMATION_H := $(SQLITE_BUILD_DIR)/sqlite3.h
SQLITE_SRC := $(SQLITE_AMALGAMATION_C)
SQLITE_INCLUDE := -I$(SQLITE_BUILD_DIR)
LIBOQS_DIR := vendor/liboqs
LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/liboqs
LIBOQS_A := $(LIBOQS_BUILD_DIR)/lib/liboqs.a
LIBOQS_INCLUDE := -I$(LIBOQS_BUILD_DIR)/include
WEB_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/liboqs
WEB_LIBOQS_A := $(WEB_LIBOQS_BUILD_DIR)/lib/liboqs.a
LIBOQS_DIR := $(FLINT_LIBOQS_DIR)
LIBOQS_BUILD_DIR := $(FLINT_LIBOQS_BUILD_DIR)
LIBOQS_A := $(FLINT_LIBOQS_A)
LIBOQS_INCLUDE := $(FLINT_LIBOQS_INCLUDE)
WEB_LIBOQS_BUILD_DIR := $(FLINT_WEB_LIBOQS_BUILD_DIR)
WEB_LIBOQS_A := $(FLINT_WEB_LIBOQS_A)
WEB_LIBOQS_INCLUDE := -I$(WEB_LIBOQS_BUILD_DIR)/include
TEST_BIN_DIR := $(BUILD_BIN_DIR)/tests
STORAGE_IMPORT_TEST := $(TEST_BIN_DIR)/storage_import_test
@@ -148,6 +174,7 @@ APP_SRCS := \
src/main.c \
src/core/breath_engine.c \
src/app/app.c \
src/app/app_nav.c \
src/app/app_settings.c \
src/app/device_preferences.c \
src/practices/practice_registry.c \
@@ -165,6 +192,8 @@ APP_SRCS := \
src/screens/statistics_screen.c \
src/screens/habits/edit.c \
src/screens/habits/session.c \
src/screens/profile_screen.c \
src/screens/pet_screen.c \
src/practices/meditation/meditation_music.c \
src/storage/data.c \
src/storage/db.c \
@@ -182,11 +211,12 @@ APP_SRCS := \
src/screens/settings/settings_device.c \
src/screens/settings/settings_session.c \
src/screens/settings/settings_theme.c \
src/screens/settings/settings_about.c \
src/screens/settings/settings_data.c \
src/screens/settings/settings_sync_account.c
LOCALE_FILES := $(wildcard locales/*.txt)
IMAGE_FILES := assets/practices/whm/1.jpg assets/practices/whm/2.jpg assets/practices/meditation/1.jpg $(wildcard assets/practices/sunsalutation/pos_*.png)
IMAGE_FILES := assets/practices/whm/1.jpg assets/practices/whm/2.jpg assets/practices/meditation/1.jpg assets/pet/egg1.png $(wildcard assets/practices/sunsalutation/pos_*.png)
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
FONT_OUTPUTS := assets/fonts/locales.png assets/fonts/locales.dat
OTFCHOP_DIR ?= $(FLINT_DIR)/tools/otfchop
@@ -247,13 +277,27 @@ UNPACKAGED_AUDIO_DIR := unpackaged_assets/audio
UNPACKAGED_AUDIO_FILES := $(shell find $(UNPACKAGED_AUDIO_DIR) -type f 2>/dev/null)
MEDITATION_AUDIO_ZIP := web-assets/dl/inbe-meditation-audio-v1.zip
.PHONY: all native run run-fresh screenshot test dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows clean clean-linux clean-vendor-builds android-avd android-check-keystore android-copy-assets android-local-properties android-debug android-debug-fast android-release android-bundle android-install android-install-fast android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web site chrome-web-store
.PHONY: all native install run run-fresh screenshot test dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows clean clean-linux clean-vendor-builds android-avd android-check-keystore android-copy-assets android-local-properties android-debug android-debug-fast android-release android-bundle android-install android-install-fast android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web site chrome-web-store
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle click
all: native
native: $(TARGET)
install: $(TARGET)
@install_dir="$(HOME)/.local/lib/$(APP_NAME)"; \
bin_dir="$(HOME)/.local/bin"; \
mkdir -p "$$install_dir" "$$bin_dir"; \
cp "$(TARGET)" "$$install_dir/$(APP_NAME)"; \
chmod 755 "$$install_dir/$(APP_NAME)"; \
ln -sf "$$install_dir/$(APP_NAME)" "$$bin_dir/$(APP_NAME)"; \
if [ -d "$(HOME)/bin" ]; then \
ln -sf "$$install_dir/$(APP_NAME)" "$(HOME)/bin/$(APP_NAME)"; \
echo "Installed $(APP_NAME) to $$install_dir and linked $$bin_dir/$(APP_NAME), $(HOME)/bin/$(APP_NAME)"; \
else \
echo "Installed $(APP_NAME) to $$install_dir and linked $$bin_dir/$(APP_NAME)"; \
fi
dist:
@password="$(PASSWORD)"; \
if [ -z "$$password" ]; then \
@@ -294,7 +338,7 @@ vendor-prebuilds-native: $(RAYLIB_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMAT
vendor-prebuilds-web: $(WEB_RAYLIB_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H) $(WEB_LIBOQS_A)
vendor-prebuilds-windows: $(WIN64_RAYLIB_A) $(WIN32_RAYLIB_A) $(WIN64_CURL_A) $(WIN32_CURL_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H)
vendor-prebuilds-windows: $(WIN64_RAYLIB_A) $(WIN32_RAYLIB_A) $(WIN64_CURL_A) $(WIN32_CURL_A) $(WIN64_LIBOQS_A) $(WIN32_LIBOQS_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H)
run: $(TARGET)
./$(TARGET)
@@ -347,18 +391,18 @@ $(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
-o $@ \
tests/locale_keys_test.c
$(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sync_client.h $(CURL_PROTOCOL_CHECK) | $(TEST_BIN_DIR)
$(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sync_client.h $(FLINT_DIR)/src/flint_lyra_sync.c $(FLINT_DIR)/src/flint_lyra_account.c $(CURL_PROTOCOL_CHECK) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -Wno-unused-function -std=c99 -D_DEFAULT_SOURCE -DINBE_SYNC_CLIENT_TESTS -ffunction-sections -fdata-sections \
-Isrc/storage -Isrc -Isrc/core $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(FLINT_CURL_CFLAGS) -o $@ \
tests/sync_url_test.c src/storage/sync_client.c \
tests/sync_url_test.c src/storage/sync_client.c $(FLINT_DIR)/src/flint_lyra_sync.c $(FLINT_DIR)/src/flint_lyra_account.c \
-Wl,--gc-sections $(FLINT_CURL_LDLIBS)
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c src/storage/sync_account.c src/storage/sync_account.h src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c src/storage/sync_account.c src/storage/sync_account.h $(FLINT_DIR)/src/flint_lyra_account.c $(FLINT_DIR)/include/flint_lyra_account.h src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(LIBOQS_A) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DFLINT_HAS_LIBOQS=1 -ffunction-sections -fdata-sections \
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(FLINT_INCLUDE) $(LIBOQS_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
-o $@ \
tests/sync_account_test.c src/storage/sync_account.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
-Wl,--gc-sections -lm -lpthread -ldl
tests/sync_account_test.c src/storage/sync_account.c $(FLINT_DIR)/src/flint_lyra_account.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
$(LIBOQS_A) -Wl,--gc-sections -lm -lpthread -ldl
$(SYNC_REVIEW_TEST): tests/sync_review_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
@@ -453,6 +497,23 @@ $(CLICK_RAYLIB_A): $(RAYLIB_SOURCES)
SDL_LIBRARIES="$(AARCH64_RAY_SDL_LDLIBS)" \
CUSTOM_CFLAGS="-DUSING_SDL2_PROJECT $(AARCH64_RAY_CFLAGS) $(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
$(CLICK_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
rm -rf $(CLICK_LIBOQS_BUILD_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(CLICK_LIBOQS_BUILD_DIR) \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=$(AARCH64_CC) \
-DCMAKE_AR=$(AARCH64_AR) \
-DCMAKE_RANLIB=$(AARCH64_RANLIB) \
-DCMAKE_BUILD_TYPE=$(FLINT_LIBOQS_BUILD_TYPE) \
-DBUILD_SHARED_LIBS=OFF \
-DOQS_BUILD_ONLY_LIB=ON \
-DOQS_USE_OPENSSL=OFF \
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
-DOQS_MINIMAL_BUILD=$(FLINT_LIBOQS_MINIMAL_BUILD)
$(CMAKE) --build $(CLICK_LIBOQS_BUILD_DIR) --target oqs
$(WIN64_RAYLIB_A): $(RAYLIB_SOURCES)
rm -rf $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src
mkdir -p $(VENDOR_BUILD_DIR)/windows/$(WIN64_ARCH)/raylib-src $(WIN64_RAYLIB_BUILD_DIR)
@@ -492,76 +553,6 @@ $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H): $(SQLITE_DIR)/configure $(SQL
cd $(SQLITE_BUILD_DIR) && $(abspath $(SQLITE_DIR))/configure
$(MAKE) -C $(SQLITE_BUILD_DIR) sqlite3.c sqlite3.h
$(LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt | $(BUILD_OBJ_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(LIBOQS_BUILD_DIR) \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DBUILD_SHARED_LIBS=OFF \
-DOQS_BUILD_ONLY_LIB=ON \
-DOQS_USE_OPENSSL=OFF \
-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44
$(CMAKE) --build $(LIBOQS_BUILD_DIR) --target oqs
$(WEB_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt | $(BUILD_OBJ_DIR)
emcmake $(CMAKE) -S $(LIBOQS_DIR) -B $(WEB_LIBOQS_BUILD_DIR) \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DBUILD_SHARED_LIBS=OFF \
-DOQS_BUILD_ONLY_LIB=ON \
-DOQS_USE_OPENSSL=OFF \
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44
$(CMAKE) --build $(WEB_LIBOQS_BUILD_DIR) --target oqs
$(CURL_SO): $(CURL_DIR)/CMakeLists.txt
$(CMAKE) -S $(CURL_DIR) -B $(CURL_BUILD_DIR) \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=$(abspath $(CURL_BUILD_DIR)) \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DBUILD_CURL_EXE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCURL_USE_OPENSSL=ON \
$(OPENSSL_CMAKE_OPT) \
$(OPENSSL_INCLUDE_CMAKE_OPT) \
$(OPENSSL_SSL_CMAKE_OPT) \
$(OPENSSL_CRYPTO_CMAKE_OPT) \
-DCURL_DISABLE_WEBSOCKETS=OFF \
-DCURL_DISABLE_INSTALL=OFF \
-DCURL_DISABLE_LDAP=ON \
-DCURL_DISABLE_LDAPS=ON \
-DCURL_DISABLE_DICT=ON \
-DCURL_DISABLE_FILE=ON \
-DCURL_DISABLE_FTP=ON \
-DCURL_DISABLE_GOPHER=ON \
-DCURL_DISABLE_IMAP=ON \
-DCURL_DISABLE_MQTT=ON \
-DCURL_DISABLE_POP3=ON \
-DCURL_DISABLE_RTSP=ON \
-DCURL_DISABLE_SMB=ON \
-DCURL_DISABLE_SMTP=ON \
-DCURL_DISABLE_TELNET=ON \
-DCURL_DISABLE_TFTP=ON \
-DCURL_DISABLE_LIBCURL_OPTION=ON \
-DCURL_ZLIB=OFF \
-DCURL_BROTLI=OFF \
-DCURL_ZSTD=OFF \
-DCURL_USE_LIBPSL=OFF \
-DCURL_USE_LIBSSH2=OFF \
-DCURL_USE_GSSAPI=OFF \
-DUSE_NGHTTP2=OFF \
-DUSE_LIBIDN2=OFF \
-DENABLE_CURL_MANUAL=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_LIBCURL_DOCS=OFF \
-DBUILD_MISC_DOCS=OFF \
-DBUILD_TESTING=OFF
$(CMAKE) --build $(CURL_BUILD_DIR) --target install
$(CURL_PROTOCOL_CHECK): $(CURL_SO)
@$(CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WS([[:space:]]|$$)' || { echo "vendored libcurl was built without WS protocol support"; exit 1; }
@$(CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WSS([[:space:]]|$$)' || { echo "vendored libcurl was built without WSS protocol support"; exit 1; }
@touch $@
$(WIN64_CURL_A): $(CURL_DIR)/CMakeLists.txt
rm -rf $(WIN64_CURL_BUILD_DIR)
$(CMAKE) -S $(CURL_DIR) -B $(WIN64_CURL_BUILD_DIR) \
@@ -593,6 +584,23 @@ $(WIN64_CURL_A): $(CURL_DIR)/CMakeLists.txt
-DBUILD_TESTING=OFF
$(CMAKE) --build $(WIN64_CURL_BUILD_DIR) --target install
$(WIN64_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
rm -rf $(WIN64_LIBOQS_BUILD_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(WIN64_LIBOQS_BUILD_DIR) \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=$(WIN64_CMAKE_SYSTEM_PROCESSOR) \
-DCMAKE_C_COMPILER=$(WIN64_CC_PATH) \
-DCMAKE_AR=$(WIN64_AR_PATH) \
-DCMAKE_RANLIB=$(WIN64_RANLIB_PATH) \
-DCMAKE_BUILD_TYPE=$(FLINT_LIBOQS_BUILD_TYPE) \
-DBUILD_SHARED_LIBS=OFF \
-DOQS_BUILD_ONLY_LIB=ON \
-DOQS_USE_OPENSSL=OFF \
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
-DOQS_MINIMAL_BUILD=$(FLINT_LIBOQS_MINIMAL_BUILD)
$(CMAKE) --build $(WIN64_LIBOQS_BUILD_DIR) --target oqs
$(WIN32_CURL_A): $(CURL_DIR)/CMakeLists.txt
rm -rf $(WIN32_CURL_BUILD_DIR)
$(CMAKE) -S $(CURL_DIR) -B $(WIN32_CURL_BUILD_DIR) \
@@ -624,6 +632,23 @@ $(WIN32_CURL_A): $(CURL_DIR)/CMakeLists.txt
-DBUILD_TESTING=OFF
$(CMAKE) --build $(WIN32_CURL_BUILD_DIR) --target install
$(WIN32_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
rm -rf $(WIN32_LIBOQS_BUILD_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(WIN32_LIBOQS_BUILD_DIR) \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=$(WIN32_CMAKE_SYSTEM_PROCESSOR) \
-DCMAKE_C_COMPILER=$(WIN32_CC_PATH) \
-DCMAKE_AR=$(WIN32_AR_PATH) \
-DCMAKE_RANLIB=$(WIN32_RANLIB_PATH) \
-DCMAKE_BUILD_TYPE=$(FLINT_LIBOQS_BUILD_TYPE) \
-DBUILD_SHARED_LIBS=OFF \
-DOQS_BUILD_ONLY_LIB=ON \
-DOQS_USE_OPENSSL=OFF \
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
-DOQS_MINIMAL_BUILD=$(FLINT_LIBOQS_MINIMAL_BUILD)
$(CMAKE) --build $(WIN32_LIBOQS_BUILD_DIR) --target oqs
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(LINUX_BIN_DIR)
$(CC) $(CFLAGS) \
$(APP_INCLUDE) \
@@ -632,7 +657,7 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQL
$(LIBOQS_INCLUDE) \
-I$(RAYLIB_DIR) \
$(RAY_CFLAGS) \
-DINBE_HAS_LIBOQS=1 \
-DFLINT_HAS_LIBOQS=1 \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
@@ -647,13 +672,15 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQL
-lm -lpthread -ldl -lrt \
$(LDFLAGS)
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) | $(CLICK_BIN_DIR)
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) $(CLICK_LIBOQS_A) | $(CLICK_BIN_DIR)
$(AARCH64_CC) $(CLICK_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
$(SQLITE_INCLUDE) \
$(CLICK_LIBOQS_INCLUDE) \
-I$(RAYLIB_DIR) \
$(AARCH64_RAY_CFLAGS) \
-DFLINT_HAS_LIBOQS=1 \
-DPLATFORM_DESKTOP \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
@@ -663,6 +690,7 @@ $(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(
$(FLINT_SRCS) \
$(SQLITE_SRC) \
$(CLICK_RAYLIB_A) \
$(CLICK_LIBOQS_A) \
$(AARCH64_RAY_LDLIBS) \
$(AARCH64_FLINT_CURL_LDLIBS) \
-lm -lpthread -ldl -lrt \
@@ -703,13 +731,15 @@ $(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_T
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps/inbe.png
cd $(CLICK_ROOT) && zip -qr $(abspath $@) .
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) $(WIN64_LIBOQS_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
$(WIN64_CC) $(WINDOWS_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
$(SQLITE_INCLUDE) \
$(WIN64_LIBOQS_INCLUDE) \
-I$(WIN64_CURL_INCLUDE_DIR) \
-I$(RAYLIB_DIR) \
-DFLINT_HAS_LIBOQS=1 \
-DPLATFORM_DESKTOP \
-DCURL_STATICLIB \
-o $@ \
@@ -718,18 +748,21 @@ $(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQL
$(SQLITE_SRC) \
$(WIN64_RAYLIB_A) \
$(WIN64_CURL_A) \
$(WIN64_LIBOQS_A) \
$(WINDOWS_LDLIBS) \
$(WIN64_THREAD_LDFLAGS) \
$(WINDOWS_LDFLAGS)
$(WIN64_STRIP) $@
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) $(WIN32_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) $(WIN32_CURL_A) $(WIN32_LIBOQS_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
$(WIN32_CC) $(WINDOWS_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
$(SQLITE_INCLUDE) \
$(WIN32_LIBOQS_INCLUDE) \
-I$(WIN32_CURL_INCLUDE_DIR) \
-I$(RAYLIB_DIR) \
-DFLINT_HAS_LIBOQS=1 \
-DPLATFORM_DESKTOP \
-DCURL_STATICLIB \
-o $@ \
@@ -738,6 +771,7 @@ $(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQL
$(SQLITE_SRC) \
$(WIN32_RAYLIB_A) \
$(WIN32_CURL_A) \
$(WIN32_LIBOQS_A) \
$(WINDOWS_LDLIBS) \
$(WIN32_THREAD_LDFLAGS) \
$(WINDOWS_LDFLAGS)
@@ -819,7 +853,7 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SR
$(SQLITE_INCLUDE) \
$(WEB_LIBOQS_INCLUDE) \
-I$(RAYLIB_DIR) \
-DINBE_HAS_LIBOQS=1 \
-DFLINT_HAS_LIBOQS=1 \
-DPLATFORM_WEB \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
+28 -89
View File
@@ -1,111 +1,50 @@
# Inner Breeze
Inner Breeze is a free, open-source practice app for breathing, meditation, and habit tracking.
Inner Breeze is a free, open-source app for breathing, meditation, and habit tracking.
## Features
## Build
- Guided practice sessions with visual and audio cues
- Mind, Yoga, and Fitness organization for habits and practice views
- Configurable breathing sessions and meditation timers
- Habit tracking with session history
- Local SQLite storage with import/export support
- Theme customization with light and dark variants
- Touch-optimized UI for desktop and mobile
## Building
inbe uses [raylib](https://github.com/raysan5/raylib) and requires a Nix development environment.
### Prerequisites
- [Nix](https://nixos.org/download.html) with flakes enabled
- For Android builds: Java 17+ JDK
### Native Build
Use the Nix development shell:
```bash
# Enter the development shell
nix develop
# Build for your current platform
make native
# Run
make run
```
### Cross-Platform Builds
Install locally:
```bash
# Android debug APK
make install
```
This installs the app to `~/.local/lib/inbe` and links `~/.local/bin/inbe`.
If `~/bin` exists, it links `~/bin/inbe` too.
## Other Targets
```bash
make test
make android-debug
# Android release APK
make android-release PASSWORD=your-keystore-password
make web
make appimage
make windows
```
## Release Automation
## Project Layout
GitHub Actions builds release artifacts for web, Linux, Windows, Android, and
the Chrome extension. When a new version tag is created by the release workflow,
the web, Android, Windows, and Linux builds are also published to itch.io.
- `src/` - app code
- `assets/` - images, fonts, and sounds
- `locales/` - translations
- `droid/` - Android project
- `site/` - website
- `vendor/flint/` - Flint UI/runtime submodule
Required repository secrets:
## Notes
- `ITCH_API_KEY` - itch.io Butler API key for publishing `waozi/inbe:html5`,
`waozi/inbe:android`, `waozi/inbe:windows`, and `waozi/inbe:linux`
### Android Emulator Testing
For automated testing with camera notch (cutout) support:
```bash
# Enter the development shell and run everything automatically
nix develop
./scripts/emulator.sh # Creates and launches the test AVD
make android-install # Builds, installs, and launches the app
```
This single script handles:
- AVD creation (if missing)
- Emulator launch
- APK build
- App installation and launch
The AVD is configured with:
- **Device**: Pixel 6 (punch-hole camera style)
- **Display**: 1080×2400 @ 420dpi
- **RAM**: 4GB with hardware acceleration
- **Cutout**: Punch-hole camera for testing window insets
### Platform-Specific Notes
- **Linux**: Requires SDL2 runtime libraries
- **Windows**: Standalone executable, no dependencies
- **Android**: Requires Android NDK in the development shell
- **Web**: Requires Emscripten toolchain
## Project Structure
- `src/` - Inbe application code
- `vendor/` - external third-party dependencies
- `vendor/flint/` - **git submodule** for first-party UI/runtime support code used directly by Inbe
- `wasm4/` - Standalone WASM-4 version
- `assets/` - Images and sounds
- `droid/` - Android build configuration
## Flint submodule workflow
`vendor/flint` is a source submodule (not a one-off copied sync). To update Inbe after a Flint change:
1. Push changes in the Flint repo.
2. In Inbe, update the submodule pointer:
- `git submodule update --init --recursive vendor/flint`
- `git -C vendor/flint pull`
3. Commit Inbe with the updated `vendor/flint` submodule reference.
When updating other projects that vendor Flint as a submodule, this keeps UI behavior and API docs aligned.
Inbe stores app data locally in SQLite. Optional sync can mirror user-owned
data through a Lyra-compatible sync server.
## License
MIT - see [LICENSE](LICENSE)
MIT. See [LICENSE](LICENSE).
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+2 -2
View File
@@ -35,8 +35,8 @@ android {
defaultConfig {
minSdk 21
targetSdk 35
versionCode 58
versionName "1.6.2"
versionCode 67
versionName "1.7.4"
}
+1 -1
View File
@@ -12,7 +12,7 @@
android:roundIcon="@mipmap/ic_launcher_round">
<activity
android:name="xyz.waozi.inbe.MainActivity"
android:configChanges="keyboardHidden|uiMode"
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|uiMode"
android:exported="true"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
android:windowLayoutInDisplayCutoutMode="never">
+11 -2
View File
@@ -21,7 +21,10 @@ set(NATIVE_APP_GLUE_DIR "${ANDROID_NDK}/sources/android/native_app_glue")
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "" FORCE)
set(OQS_USE_OPENSSL OFF CACHE BOOL "" FORCE)
set(OQS_MINIMAL_BUILD "SIG_ml_dsa_44" CACHE STRING "" FORCE)
add_subdirectory("${REPO_ROOT}/vendor/liboqs" "${CMAKE_BINARY_DIR}/liboqs")
add_subdirectory("${FLINT_DIR}/vendor/liboqs" "${CMAKE_BINARY_DIR}/liboqs")
if(NOT TARGET oqs)
message(FATAL_ERROR "Inbe Android builds require liboqs for sync account crypto")
endif()
file(GLOB FLINT_SOURCES CONFIGURE_DEPENDS "${FLINT_DIR}/src/*.c" "${FLINT_DIR}/src/ui/*.c")
list(REMOVE_ITEM FLINT_SOURCES "${FLINT_DIR}/src/flint_file_dialog.c")
file(GLOB INBE_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
@@ -31,6 +34,7 @@ set(INBE_EMBEDDED_INPUTS
assets/practices/whm/1.jpg
assets/practices/whm/2.jpg
assets/practices/meditation/1.jpg
assets/pet/egg1.png
assets/practices/sunsalutation/pos_0001.png
assets/practices/sunsalutation/pos_0002.png
assets/practices/sunsalutation/pos_0003.png
@@ -107,6 +111,7 @@ add_library(main SHARED
"${SRC_DIR}/main.c"
"${SRC_DIR}/core/breath_engine.c"
"${SRC_DIR}/app/app.c"
"${SRC_DIR}/app/app_nav.c"
"${SRC_DIR}/app/app_settings.c"
"${SRC_DIR}/app/device_preferences.c"
"${SRC_DIR}/practices/practice_registry.c"
@@ -124,6 +129,8 @@ add_library(main SHARED
"${SRC_DIR}/screens/statistics_screen.c"
"${SRC_DIR}/screens/habits/edit.c"
"${SRC_DIR}/screens/habits/session.c"
"${SRC_DIR}/screens/profile_screen.c"
"${SRC_DIR}/screens/pet_screen.c"
"${SRC_DIR}/practices/meditation/meditation_music.c"
"${SRC_DIR}/storage/data.c"
"${SRC_DIR}/storage/db.c"
@@ -145,6 +152,7 @@ add_library(main SHARED
"${SRC_DIR}/screens/settings/settings_device.c"
"${SRC_DIR}/screens/settings/settings_session.c"
"${SRC_DIR}/screens/settings/settings_theme.c"
"${SRC_DIR}/screens/settings/settings_about.c"
"${SRC_DIR}/screens/settings/settings_data.c"
"${SRC_DIR}/screens/settings/settings_sync_account.c"
"${INBE_EMBEDDED_ASSETS_C}"
@@ -185,7 +193,7 @@ target_compile_definitions(main PRIVATE
SUPPORT_MODULE_RAUDIO=1
SUPPORT_FILEFORMAT_OGG=1
FLINT_EMBEDDED_ONLY=1
INBE_HAS_LIBOQS=1
FLINT_HAS_LIBOQS=1
)
target_compile_options(main PRIVATE
@@ -199,6 +207,7 @@ target_link_options(main PRIVATE
-Wl,--gc-sections
-Wl,--strip-all
-Wl,-z,max-page-size=16384
-Wl,-z,common-page-size=16384
-Wl,--wrap=fopen
)
@@ -11,16 +11,17 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Insets;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import android.view.DisplayCutout;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.WindowInsetsController;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import java.io.File;
@@ -28,15 +29,10 @@ import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.UnknownHostException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import javax.net.ssl.SSLSocketFactory;
public class MainActivity extends NativeActivity {
private static final String TAG = "InbeMainActivity";
@@ -49,7 +45,7 @@ public class MainActivity extends NativeActivity {
System.loadLibrary("main");
}
// [status_bar, nav_bar, cutout_left, cutout_top, cutout_right, cutout_bottom]
// [status_bar, nav_bar, cutouts] mirrored in native.
private final int[] cachedInsets = new int[6];
private boolean insetsInitialized = false;
private boolean activityPaused = false;
@@ -305,224 +301,11 @@ public class MainActivity extends NativeActivity {
}
public String syncHttpRequest(String method, String urlText, String body, String[] headers) {
HttpURLConnection connection = null;
int status = 0;
try {
byte[] bodyBytes = body != null ? body.getBytes(StandardCharsets.UTF_8) : new byte[0];
connection = (HttpURLConnection)new URL(urlText).openConnection();
connection.setInstanceFollowRedirects(false);
connection.setConnectTimeout(15000);
connection.setReadTimeout(30000);
connection.setRequestMethod(method);
connection.setRequestProperty("User-Agent", "inbe-sync/1");
if (headers != null) {
for (String header : headers) {
if (header == null) continue;
int colon = header.indexOf(':');
if (colon <= 0) continue;
String key = header.substring(0, colon).trim();
String value = header.substring(colon + 1).trim();
if (!key.isEmpty()) {
connection.setRequestProperty(key, value);
}
}
}
if ("POST".equals(method) || "DELETE".equals(method)) {
connection.setDoOutput(true);
connection.setFixedLengthStreamingMode(bodyBytes.length);
try (OutputStream output = connection.getOutputStream()) {
output.write(bodyBytes);
}
}
status = connection.getResponseCode();
InputStream stream = status >= 400 ? connection.getErrorStream() : connection.getInputStream();
String response = "";
if (stream != null) {
try (InputStream input = stream) {
byte[] bytes = readAllBytesCompat(input);
response = new String(bytes, StandardCharsets.UTF_8);
}
}
return status + "\n" + response;
} catch (Exception e) {
Log.e(TAG, "Sync HTTP request failed", e);
return status + "\n" + (e.getMessage() != null ? e.getMessage() : "request failed");
} finally {
if (connection != null) {
connection.disconnect();
}
}
return SyncNetwork.httpRequest(TAG, method, urlText, body, headers);
}
public String syncWebSocketWait(String urlText, String[] headers) {
Socket socket = null;
try {
URI url = new URI(urlText);
String protocol = url.getScheme();
boolean secure = "wss".equals(protocol);
int port = url.getPort();
String path = url.getRawPath();
if (path == null || path.isEmpty()) path = "/";
if (url.getRawQuery() != null && !url.getRawQuery().isEmpty()) {
path += "?" + url.getRawQuery();
}
if (port <= 0) port = secure ? 443 : 80;
if (!secure && !"ws".equals(protocol)) {
return "0\ninvalid websocket url";
}
socket = secure
? SSLSocketFactory.getDefault().createSocket(url.getHost(), port)
: new Socket(url.getHost(), port);
socket.setTcpNoDelay(true);
byte[] keyBytes = new byte[16];
new SecureRandom().nextBytes(keyBytes);
String key = Base64.encodeToString(keyBytes, Base64.NO_WRAP);
StringBuilder request = new StringBuilder();
request.append("GET ").append(path).append(" HTTP/1.1\r\n");
request.append("Host: ").append(url.getHost());
if ((secure && port != 443) || (!secure && port != 80)) {
request.append(":").append(port);
}
request.append("\r\n");
request.append("Upgrade: websocket\r\n");
request.append("Connection: Upgrade\r\n");
request.append("Sec-WebSocket-Version: 13\r\n");
request.append("Sec-WebSocket-Key: ").append(key).append("\r\n");
request.append("User-Agent: inbe-sync/1\r\n");
if (headers != null) {
for (String header : headers) {
if (header != null && !header.isEmpty()) {
request.append(header).append("\r\n");
}
}
}
request.append("\r\n");
socket.getOutputStream().write(request.toString().getBytes(StandardCharsets.US_ASCII));
socket.getOutputStream().flush();
String statusLine = readAsciiLine(socket);
int status = parseHttpStatus(statusLine);
while (true) {
String line = readAsciiLine(socket);
if (line == null || line.isEmpty()) break;
}
if (status != 101) {
return status + "\nwebsocket upgrade failed";
}
Log.i(TAG, "Sync WebSocket connected");
while (true) {
String message = readWebSocketText(socket);
if (message == null) {
return "0\nwebsocket closed";
}
if (message.contains("\"type\":\"sync_changed\"")) {
return "101\n" + message;
}
}
} catch (Exception e) {
Log.w(TAG, "WebSocket wait failed", e);
return "0\n" + (e.getMessage() != null ? e.getMessage() : "websocket failed");
} finally {
if (socket != null) {
try {
socket.close();
} catch (Exception ignored) {
}
}
}
}
private static int parseHttpStatus(String statusLine) {
if (statusLine == null) return 0;
String[] parts = statusLine.split(" ", 3);
if (parts.length < 2) return 0;
try {
return Integer.parseInt(parts[1]);
} catch (NumberFormatException e) {
return 0;
}
}
private static String readAsciiLine(Socket socket) throws java.io.IOException {
StringBuilder line = new StringBuilder();
while (true) {
int b = socket.getInputStream().read();
if (b < 0) {
return line.length() > 0 ? line.toString() : null;
}
if (b == '\n') break;
if (b != '\r') line.append((char)b);
}
return line.toString();
}
private static String readWebSocketText(Socket socket) throws java.io.IOException {
int b0 = socket.getInputStream().read();
int b1 = socket.getInputStream().read();
if (b0 < 0 || b1 < 0) return null;
int opcode = b0 & 0x0f;
boolean masked = (b1 & 0x80) != 0;
long length = b1 & 0x7f;
if (length == 126) {
length = ((long)readByte(socket) << 8) | readByte(socket);
} else if (length == 127) {
length = 0;
for (int i = 0; i < 8; i++) {
length = (length << 8) | readByte(socket);
}
}
if (length < 0 || length > 1024 * 1024) {
throw new java.io.IOException("websocket frame too large");
}
byte[] mask = null;
if (masked) {
mask = readExact(socket, 4);
}
byte[] payload = readExact(socket, (int)length);
if (masked) {
for (int i = 0; i < payload.length; i++) {
payload[i] = (byte)(payload[i] ^ mask[i % 4]);
}
}
if (opcode == 8) return null;
if (opcode != 1) return "";
return new String(payload, StandardCharsets.UTF_8);
}
private static int readByte(Socket socket) throws java.io.IOException {
int b = socket.getInputStream().read();
if (b < 0) throw new java.io.IOException("unexpected eof");
return b;
}
private static byte[] readExact(Socket socket, int count) throws java.io.IOException {
byte[] data = new byte[count];
int offset = 0;
while (offset < count) {
int read = socket.getInputStream().read(data, offset, count - offset);
if (read < 0) throw new java.io.IOException("unexpected eof");
offset += read;
}
return data;
}
private static byte[] readAllBytesCompat(InputStream input) throws java.io.IOException {
byte[] buffer = new byte[8192];
int read;
java.io.ByteArrayOutputStream output = new java.io.ByteArrayOutputStream();
while ((read = input.read(buffer)) != -1) {
output.write(buffer, 0, read);
}
return output.toByteArray();
return SyncNetwork.webSocketWait(TAG, urlText, headers);
}
public void openImportPicker(final String mimeTypesCsv) {
@@ -624,8 +407,7 @@ public class MainActivity extends NativeActivity {
}
public void updateSessionNotification(final String statusText) {
if (statusText == null || statusText.isEmpty()) return;
SessionForegroundService.updateStatus(statusText);
SessionForegroundService.updateStatus(statusText == null ? "" : statusText);
}
public void keepScreenOn() {
@@ -650,7 +432,9 @@ public class MainActivity extends NativeActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
configureSystemBars();
super.onCreate(savedInstanceState);
configureSystemBars();
synchronized (cachedInsets) {
for (int i = 0; i < 6; i++) {
@@ -663,17 +447,51 @@ public class MainActivity extends NativeActivity {
// Notify native code that activity is ready for wake lock
nativeWakeLockReady();
requestNotificationPermissionIfNeeded();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
nativeInvalidateGraphicsResources();
configureSystemBars();
pushDeviceConfiguration();
requestInsetRefresh();
}
private void configureSystemBars() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false);
}
getWindow().setNavigationBarColor(Color.BLACK);
getWindow().setStatusBarColor(Color.BLACK);
int flags = getWindow().getDecorView().getSystemUiVisibility();
flags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
flags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
flags &= ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
flags &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;
flags &= ~View.SYSTEM_UI_FLAG_IMMERSIVE;
flags &= ~View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
flags &= ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
}
getWindow().getDecorView().setSystemUiVisibility(flags);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
WindowInsetsController controller = getWindow().getInsetsController();
if (controller != null) {
controller.hide(WindowInsets.Type.statusBars());
controller.show(WindowInsets.Type.navigationBars());
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
getWindow().setNavigationBarContrastEnforced(false);
}
}
private void pushDeviceConfiguration() {
Configuration config = getResources().getConfiguration();
int nightMask = config.uiMode & Configuration.UI_MODE_NIGHT_MASK;
@@ -740,38 +558,9 @@ public class MainActivity extends NativeActivity {
}
}
});
} else {
fallbackForOldPhones();
}
}
private void fallbackForOldPhones() {
int statusBarHeight = 0;
int navBarHeight = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
statusBarHeight = getResources().getDimensionPixelSize(resourceId);
}
int navResourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android");
if (navResourceId > 0) {
navBarHeight = getResources().getDimensionPixelSize(navResourceId);
}
synchronized (cachedInsets) {
cachedInsets[0] = statusBarHeight;
cachedInsets[1] = navBarHeight;
cachedInsets[2] = 0;
cachedInsets[3] = 0;
cachedInsets[4] = 0;
cachedInsets[5] = 0;
}
insetsInitialized = true;
nativeSetInsets(statusBarHeight, navBarHeight, 0, 0, 0, 0);
}
private void updateInsets(WindowInsets insets) {
if (insets == null) return;
@@ -780,7 +569,8 @@ public class MainActivity extends NativeActivity {
int navBar = 0;
int cLeft = 0, cTop = 0, cRight = 0, cBottom = 0;
// System bar calculations
// Inbe owns a single edge-to-edge native surface. Java reports the
// system bar insets; native applies them once against the real GL surface.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Insets systemBars = insets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars());
statusBar = systemBars.top;
@@ -789,7 +579,6 @@ public class MainActivity extends NativeActivity {
statusBar = insets.getSystemWindowInsetTop();
navBar = insets.getSystemWindowInsetBottom();
}
// Display cutout calculations
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
DisplayCutout cutout = insets.getDisplayCutout();
@@ -868,6 +657,7 @@ public class MainActivity extends NativeActivity {
protected void onResume() {
super.onResume();
activityPaused = false;
configureSystemBars();
nativeInvalidateGraphicsResources();
requestInsetRefresh();
syncLifecycleState("onResume");
@@ -877,6 +667,10 @@ public class MainActivity extends NativeActivity {
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
windowFocused = hasFocus;
if (hasFocus) {
configureSystemBars();
requestInsetRefresh();
}
syncLifecycleState("onWindowFocusChanged");
}
@@ -59,6 +59,7 @@ public class SessionForegroundService extends Service {
}
private void startSession() {
currentStatusText = "";
Notification notification = buildNotification();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(
@@ -74,6 +75,7 @@ public class SessionForegroundService extends Service {
}
private void stopSession() {
currentStatusText = "";
releaseWakeLock();
stopForegroundCompat();
stopSelf();
@@ -81,9 +83,7 @@ public class SessionForegroundService extends Service {
}
public static void updateStatus(String statusText) {
if (statusText != null && !statusText.isEmpty()) {
currentStatusText = statusText;
}
currentStatusText = statusText != null ? statusText : "";
SessionForegroundService service = activeService;
if (service == null) {
@@ -0,0 +1,240 @@
package xyz.waozi.inbe;
import android.util.Base64;
import android.util.Log;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.Socket;
import java.net.URI;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import javax.net.ssl.SSLSocketFactory;
final class SyncNetwork {
private SyncNetwork() {
}
static String httpRequest(String logTag, String method, String urlText, String body,
String[] headers) {
HttpURLConnection connection = null;
int status = 0;
try {
byte[] bodyBytes = body != null ? body.getBytes(StandardCharsets.UTF_8) : new byte[0];
connection = (HttpURLConnection)new URL(urlText).openConnection();
connection.setInstanceFollowRedirects(false);
connection.setConnectTimeout(15000);
connection.setReadTimeout(30000);
connection.setRequestMethod(method);
connection.setRequestProperty("User-Agent", "inbe-sync/1");
if (headers != null) {
for (String header : headers) {
if (header == null) continue;
int colon = header.indexOf(':');
if (colon <= 0) continue;
String key = header.substring(0, colon).trim();
String value = header.substring(colon + 1).trim();
if (!key.isEmpty()) {
connection.setRequestProperty(key, value);
}
}
}
if (bodyBytes.length > 0) {
connection.setDoOutput(true);
connection.setFixedLengthStreamingMode(bodyBytes.length);
try (OutputStream output = connection.getOutputStream()) {
output.write(bodyBytes);
}
}
status = connection.getResponseCode();
InputStream stream = status >= 400 ? connection.getErrorStream() : connection.getInputStream();
String response = "";
if (stream != null) {
try (InputStream input = stream) {
byte[] bytes = readAllBytesCompat(input);
response = new String(bytes, StandardCharsets.UTF_8);
}
}
return status + "\n" + response;
} catch (Exception e) {
Log.e(logTag, "Sync HTTP request failed", e);
return status + "\n" + (e.getMessage() != null ? e.getMessage() : "request failed");
} finally {
if (connection != null) {
connection.disconnect();
}
}
}
static String webSocketWait(String logTag, String urlText, String[] headers) {
Socket socket = null;
try {
URI url = new URI(urlText);
String protocol = url.getScheme();
boolean secure = "wss".equals(protocol);
int port = url.getPort();
String path = url.getRawPath();
if (path == null || path.isEmpty()) path = "/";
if (url.getRawQuery() != null && !url.getRawQuery().isEmpty()) {
path += "?" + url.getRawQuery();
}
if (port <= 0) port = secure ? 443 : 80;
if (!secure && !"ws".equals(protocol)) {
return "0\ninvalid websocket url";
}
socket = secure
? SSLSocketFactory.getDefault().createSocket(url.getHost(), port)
: new Socket(url.getHost(), port);
socket.setTcpNoDelay(true);
byte[] keyBytes = new byte[16];
new SecureRandom().nextBytes(keyBytes);
String key = Base64.encodeToString(keyBytes, Base64.NO_WRAP);
StringBuilder request = new StringBuilder();
request.append("GET ").append(path).append(" HTTP/1.1\r\n");
request.append("Host: ").append(url.getHost());
if ((secure && port != 443) || (!secure && port != 80)) {
request.append(":").append(port);
}
request.append("\r\n");
request.append("Upgrade: websocket\r\n");
request.append("Connection: Upgrade\r\n");
request.append("Sec-WebSocket-Version: 13\r\n");
request.append("Sec-WebSocket-Key: ").append(key).append("\r\n");
request.append("User-Agent: inbe-sync/1\r\n");
if (headers != null) {
for (String header : headers) {
if (header != null && !header.isEmpty()) {
request.append(header).append("\r\n");
}
}
}
request.append("\r\n");
socket.getOutputStream().write(request.toString().getBytes(StandardCharsets.US_ASCII));
socket.getOutputStream().flush();
String statusLine = readAsciiLine(socket);
int status = parseHttpStatus(statusLine);
while (true) {
String line = readAsciiLine(socket);
if (line == null || line.isEmpty()) break;
}
if (status != 101) {
return status + "\nwebsocket upgrade failed";
}
Log.i(logTag, "Sync WebSocket connected");
while (true) {
String message = readWebSocketText(socket);
if (message == null) {
return "0\nwebsocket closed";
}
if (message.contains("\"type\":\"sync_changed\"")) {
return "101\n" + message;
}
}
} catch (Exception e) {
Log.w(logTag, "WebSocket wait failed", e);
return "0\n" + (e.getMessage() != null ? e.getMessage() : "websocket failed");
} finally {
if (socket != null) {
try {
socket.close();
} catch (Exception ignored) {
}
}
}
}
private static int parseHttpStatus(String statusLine) {
if (statusLine == null) return 0;
String[] parts = statusLine.split(" ", 3);
if (parts.length < 2) return 0;
try {
return Integer.parseInt(parts[1]);
} catch (NumberFormatException e) {
return 0;
}
}
private static String readAsciiLine(Socket socket) throws java.io.IOException {
StringBuilder line = new StringBuilder();
while (true) {
int b = socket.getInputStream().read();
if (b < 0) {
return line.length() > 0 ? line.toString() : null;
}
if (b == '\n') break;
if (b != '\r') line.append((char)b);
}
return line.toString();
}
private static String readWebSocketText(Socket socket) throws java.io.IOException {
int b0 = socket.getInputStream().read();
int b1 = socket.getInputStream().read();
if (b0 < 0 || b1 < 0) return null;
int opcode = b0 & 0x0f;
boolean masked = (b1 & 0x80) != 0;
long length = b1 & 0x7f;
if (length == 126) {
length = ((long)readByte(socket) << 8) | readByte(socket);
} else if (length == 127) {
length = 0;
for (int i = 0; i < 8; i++) {
length = (length << 8) | readByte(socket);
}
}
if (length < 0 || length > 1024 * 1024) {
throw new java.io.IOException("websocket frame too large");
}
byte[] mask = null;
if (masked) {
mask = readExact(socket, 4);
}
byte[] payload = readExact(socket, (int)length);
if (masked) {
for (int i = 0; i < payload.length; i++) {
payload[i] = (byte)(payload[i] ^ mask[i % 4]);
}
}
if (opcode == 8) return null;
if (opcode != 1) return "";
return new String(payload, StandardCharsets.UTF_8);
}
private static int readByte(Socket socket) throws java.io.IOException {
int b = socket.getInputStream().read();
if (b < 0) throw new java.io.IOException("unexpected eof");
return b;
}
private static byte[] readExact(Socket socket, int count) throws java.io.IOException {
byte[] data = new byte[count];
int offset = 0;
while (offset < count) {
int read = socket.getInputStream().read(data, offset, count - offset);
if (read < 0) throw new java.io.IOException("unexpected eof");
offset += read;
}
return data;
}
private static byte[] readAllBytesCompat(InputStream input) throws java.io.IOException {
byte[] buffer = new byte[8192];
int read;
java.io.ByteArrayOutputStream output = new java.io.ByteArrayOutputStream();
while ((read = input.read(buffer)) != -1) {
output.write(buffer, 0, read);
}
return output.toByteArray();
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

+1 -1
View File
@@ -1,3 +1,3 @@
plugins {
id 'com.android.application' version '8.4.2' apply false
id 'com.android.application' version '8.5.1' apply false
}
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
@@ -0,0 +1 @@
- Improve theme, habit, and localization UI polish
@@ -0,0 +1,4 @@
- Move meditation duration selection into practice configuration with custom time support.
- Add centered in-session meditation add-time controls.
- Use Flint-managed liboqs, LibreSSL, and curl build paths.
- Fix Android native build to use Flint's liboqs submodule.
@@ -0,0 +1,4 @@
Fixed
---
- Repair habit-day sync for zero-count completions.
- Require liboqs at build time for every sync-enabled target.
@@ -0,0 +1,3 @@
Changed
---
- updated the practice screen ui/ux
@@ -0,0 +1,7 @@
Changed
---
- Rework Android safe-area handling to use one native inset path with stable bottom navigation spacing.
- Move leaderboard stats to synced source data, with local current-user rows shown immediately.
Fixed
---
- Fix profile/friend sync freshness, leaderboard empty states, modal input capture, pet asset embedding, and wrapped text previews.
@@ -0,0 +1,3 @@
Changed
---
- Move shared Lyra sync protocol code into Flint and simplify Inbe sync client wiring.
@@ -0,0 +1,8 @@
Added
---
- Add local `make install` target.
- Add Profile controls for habit ordering and practice visibility.
Changed
---
- Move sync status into the Data view and simplify the habits add option.
- Clean up the README.
@@ -0,0 +1,3 @@
Changed
---
- Improve habit management
@@ -0,0 +1,3 @@
Fixed
---
- bottom inset in practice
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+176 -57
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Historie
---
[tab_profile]
Profil
---
[tab_habits]
Návyky
---
@@ -22,6 +25,117 @@ Označit
[tab_manual]
Návod
---
[tab_pet]
Pet
---
[profile_data_title]
Data
---
[profile_data_button]
Nastavit data
---
[profile_habits_label]
Navyky
---
[profile_sessions_label]
Sezeni
---
[profile_storage_label]
Uloziste
---
[profile_friends_title]
Pratele
---
[profile_leaderboard_title]
Zebricek
---
[profile_metric_streak]
Serie
---
[profile_metric_avg_time]
Prumerny cas
---
[profile_metric_avg_hold]
Prumerna vydrz
---
[profile_none_label]
Zadne
---
[profile_friend_accept_button]
Prijmout
---
[profile_friend_decline_button]
Odmitnout
---
[profile_friend_remove_title]
Odebrat pritele?
---
[profile_friend_remove_message]
%s bude odebran. Pro obnoveni poslete novou zadost.
---
[profile_updating_status]
Aktualizace
---
[profile_no_account]
Zadny ucet
---
[profile_account_section]
Ucet
---
[profile_configure_button]
Nastavit
---
[profile_data_section]
Data
---
[profile_sync_section]
Synchronizace
---
[profile_friends_count_format]
%d pratel
---
[profile_pending_count_format]
%d cekajici
---
[profile_social_section]
Socialni
---
[profile_add_friend_button]
Pridat pritele
---
[profile_refresh_button]
Obnovit
---
[profile_incoming_title]
Prichozi
---
[profile_outgoing_title]
Odchozi
---
[profile_no_leaderboard_data]
Zadna data zebricku
---
[profile_practice_label]
Cviceni
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Nastavení
---
@@ -157,6 +271,21 @@ Nelze načíst soubor s meditační hudbou. Zkontrolujte připojení k internetu
[duration_2h]
2 h
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
DÝCHAT
---
@@ -250,15 +379,12 @@ Vzhled
[settings_section_language]
Jazyk
---
[settings_tab_data]
Data
---
[settings_section_data]
Data
---
[settings_tab_about]
O aplikaci
---
[about_text]
Klidny pruvodce pro dychani, navyky a synchronizaci.
---
[theme_label]
Motiv
---
@@ -305,10 +431,19 @@ Pauza po kole
Pokročilé ovládání sezení
---
[double_tap_to_breathe_label]
Double tap to breathe
Dvojí klepnutí pro nádech
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Dvakrát klepněte na obrazovku pro nádech
---
[session_count_singular]
%d sezení
---
[session_count_plural]
%d sezení
---
[no_sessions]
Žádná sezení
---
[hold_display_label]
Zobrazeni zadrze
@@ -323,7 +458,7 @@ Kruh
Hlasitost
---
[show_session_volume_control_label]
Zobrazit ovladani hlasitosti
Zobrazit ovládání hlasitosti
---
[reset_to_defaults_label]
Obnovit výchozí
@@ -549,7 +684,7 @@ Oceán
Les
---
[theme_sunset]
Západ slunce
Soumrak
---
[theme_lavender]
Levandule
@@ -734,14 +869,17 @@ Upravit návyk
[habit_name_label]
Název
---
[habit_description_label]
Description
---
[habit_underline_label]
Podtržení
---
[habit_practice_list_title]
Session Data From
Data sezení z
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Vyberte, která cvičební sezení se počítají do tohoto návyku. Odpovídající dny se zobrazí jako splněné a mohou otevřít editor sezení.
---
[habit_counting_title]
Počítání
@@ -776,6 +914,9 @@ Vytvořit návyk
[habit_stats_no_rounds_week]
Za poslední týden nejsou žádná kola
---
[habit_stats_no_rounds_month]
Za poslední měsíc nejsou žádná kola
---
[habit_stats_current_streak]
Aktuální série
---
@@ -800,40 +941,12 @@ Celková zádrž
[habit_stats_best_streak]
Nejlepší série
---
[bottom_nav_customize_button]
Upravit spodní navigaci
[habit_stats_day_singular]
%d den
---
[bottom_nav_customize_title]
Spodní navigace
---
[bottom_nav_add_button]
Přidat položku
---
[bottom_nav_slot_1]
Položka 1
---
[bottom_nav_slot_2]
Položka 2
---
[bottom_nav_slot_3]
Položka 3
---
[bottom_nav_slot_4]
Položka 4
---
[bottom_nav_slot_5]
Položka 5
---
[bottom_nav_slot_6]
Položka 6
---
[bottom_nav_slot_7]
Položka 7
---
[bottom_nav_slot_8]
Položka 8
---
[reset_button]
[habit_stats_day_plural]
%d dní
---[reset_button]
Obnovit
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Zde si vyberte praxi.
[practice_guide_manual]
Pred zahajenim praxe si prectete navod, abyste porozumeli celemu cviceni.
---
[practice_guide_sun]
Az budete pripraveni zacit cviceni, pouzijte kartu se sluncem.
---
[practice_guide_config]
Upravte konfiguraci praxe podle svych potreb.
---
@@ -860,6 +970,18 @@ Zvolte Tyden nebo Kalendar pro kontrolu navyku.
[habits_guide_statistics]
Zde zobrazite statistiky navyku.
---
[profile_guide_account]
Zde nastavite synchronizacni ucet.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Odtud otevete pratele a zebricek.
---
[profile_guide_social_no_account]
Vytvorte synchronizacni ucet pro odemceni pratel a zebricku.
---
[nav_mode_label]
Navigace
---
@@ -871,13 +993,13 @@ Karty
---
[transition_label]
Transition
Přechod
[transition_none]
None
Žádný
[transition_fade]
Fade
Prolnutí
[theme_picker_title]
Choose Theme
Vybrat motiv
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Relace je aktivni
---
[notification_starting_seconds]
Start: %ds
---
@@ -935,7 +1054,7 @@ Zadrz: %ds
[notification_breath_in_seconds]
Nadech: %ds
---
[notification_next_round]
Dalsi kolo
[notification_results]
Results
---
---
+179 -60
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Verlauf
---
[tab_profile]
Profil
---
[tab_habits]
Gewohnheiten
---
@@ -22,6 +25,117 @@ Markieren
[tab_manual]
Anleitung
---
[tab_pet]
Pet
---
[profile_data_title]
Daten
---
[profile_data_button]
Daten konfigurieren
---
[profile_habits_label]
Gewohnheiten
---
[profile_sessions_label]
Sitzungen
---
[profile_storage_label]
Speicher
---
[profile_friends_title]
Freunde
---
[profile_leaderboard_title]
Bestenliste
---
[profile_metric_streak]
Serie
---
[profile_metric_avg_time]
Durchschnittszeit
---
[profile_metric_avg_hold]
Durchschn. Halten
---
[profile_none_label]
Keine
---
[profile_friend_accept_button]
Annehmen
---
[profile_friend_decline_button]
Ablehnen
---
[profile_friend_remove_title]
Freund entfernen?
---
[profile_friend_remove_message]
%s wird entfernt. Sende eine neue Anfrage zum Wiederverbinden.
---
[profile_updating_status]
Aktualisieren
---
[profile_no_account]
Kein Konto
---
[profile_account_section]
Konto
---
[profile_configure_button]
Konfigurieren
---
[profile_data_section]
Daten
---
[profile_sync_section]
Sync
---
[profile_friends_count_format]
%d Freunde
---
[profile_pending_count_format]
%d ausstehend
---
[profile_social_section]
Sozial
---
[profile_add_friend_button]
Freund hinzufuegen
---
[profile_refresh_button]
Aktualisieren
---
[profile_incoming_title]
Eingehend
---
[profile_outgoing_title]
Ausgehend
---
[profile_no_leaderboard_data]
Keine Bestenlistendaten
---
[profile_practice_label]
Praxis
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Einstellungen
---
@@ -157,6 +271,21 @@ Der Meditations-Musikserver konnte nicht erreicht werden. Prüfe die Android-Net
[duration_2h]
2 Std.
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
ATEM
---
@@ -250,14 +379,11 @@ Darstellung
[settings_section_language]
Sprache
---
[settings_tab_data]
Daten
---
[settings_section_data]
Daten
---
[settings_tab_about]
Über
Info
---
[about_text]
Ein ruhiger Begleiter fuer Atemuebungen, Gewohnheiten und Synchronisierung.
---
[theme_label]
Thema
@@ -305,10 +431,19 @@ Pause nach Runde
Erweiterte Sitzungssteuerung
---
[double_tap_to_breathe_label]
Double tap to breathe
Doppeltippen zum Atmen
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Doppeltippe auf den Bildschirm, um zu atmen
---
[session_count_singular]
%d Sitzung
---
[session_count_plural]
%d Sitzungen
---
[no_sessions]
Keine Sitzungen
---
[hold_display_label]
Atemhalteanzeige
@@ -323,7 +458,7 @@ Kreis
Lautstärke
---
[show_session_volume_control_label]
Lautstaerkeregler anzeigen
Lautstärkeregler anzeigen
---
[reset_to_defaults_label]
Auf Standard zurücksetzen
@@ -549,7 +684,7 @@ Ozean
Wald
---
[theme_sunset]
Sonnenuntergang
Abendrot
---
[theme_lavender]
Lavendel
@@ -734,14 +869,17 @@ Gewohnheit bearbeiten
[habit_name_label]
Bezeichnung
---
[habit_description_label]
Description
---
[habit_underline_label]
Unterstreichung
---
[habit_practice_list_title]
Session Data From
Sitzungsdaten aus
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Wähle, welche Übungssitzungen für diese Gewohnheit zählen. Passende Tage werden als erledigt angezeigt und können den Sitzungseditor öffnen.
---
[habit_counting_title]
Zählen
@@ -776,6 +914,9 @@ Gewohnheit erstellen
[habit_stats_no_rounds_week]
Keine Runden in der letzten Woche
---
[habit_stats_no_rounds_month]
Keine Runden im letzten Monat
---
[habit_stats_current_streak]
Aktuelle Serie
---
@@ -800,40 +941,12 @@ Gesamte Atemhaltezeit
[habit_stats_best_streak]
Beste Serie
---
[bottom_nav_customize_button]
Untere Navigation anpassen
[habit_stats_day_singular]
%d Tag
---
[bottom_nav_customize_title]
Untere Navigation
---
[bottom_nav_add_button]
Eintrag hinzufügen
---
[bottom_nav_slot_1]
Eintrag 1
---
[bottom_nav_slot_2]
Eintrag 2
---
[bottom_nav_slot_3]
Eintrag 3
---
[bottom_nav_slot_4]
Eintrag 4
---
[bottom_nav_slot_5]
Eintrag 5
---
[bottom_nav_slot_6]
Eintrag 6
---
[bottom_nav_slot_7]
Eintrag 7
---
[bottom_nav_slot_8]
Eintrag 8
---
[reset_button]
[habit_stats_day_plural]
%d Tage
---[reset_button]
Zurücksetzen
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Wahle hier deine Praxis aus.
[practice_guide_manual]
Lies das Tutorial, bevor du eine Praxis startest, damit du die ganze Uebung verstehst.
---
[practice_guide_sun]
Nutze den Sonnen-Tab, wenn du bereit bist, die Uebung zu starten.
---
[practice_guide_config]
Passe die Konfiguration der Praxis an deine Anforderungen an.
---
@@ -860,24 +970,36 @@ Wahle Woche oder Kalender, um deine Gewohnheit zu pruefen.
[habits_guide_statistics]
Sieh dir hier deine Gewohnheitsstatistiken an.
---
[profile_guide_account]
Richte hier dein Sync-Konto ein.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Oeffne Freunde und Bestenliste von hier.
---
[profile_guide_social_no_account]
Erstelle ein Sync-Konto, um Freunde und Bestenliste freizuschalten.
---
[nav_mode_label]
Navigation
---
[nav_mode_dropdown]
Dropdown
Liste
---
[nav_mode_tabbar]
Tabs
Reiter
---
[transition_label]
Transition
Übergang
[transition_none]
None
Keine
[transition_fade]
Fade
Blende
[theme_picker_title]
Choose Theme
Thema wählen
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Sitzung aktiv
---
[notification_starting_seconds]
Start: %ds
---
@@ -935,7 +1054,7 @@ Halten: %ds
[notification_breath_in_seconds]
Einatmen: %ds
---
[notification_next_round]
Naechste Runde
[notification_results]
Results
---
---
+169 -50
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
History
---
[tab_profile]
Profile
---
[tab_habits]
Habits
---
@@ -22,6 +25,117 @@ Mark Done
[tab_manual]
Tutorial
---
[tab_pet]
Pet
---
[profile_data_title]
Data
---
[profile_data_button]
Configure Data
---
[profile_habits_label]
Habits
---
[profile_sessions_label]
Sessions
---
[profile_storage_label]
Storage
---
[profile_friends_title]
Friends
---
[profile_leaderboard_title]
Leaderboard
---
[profile_metric_streak]
Streak
---
[profile_metric_avg_time]
Avg time
---
[profile_metric_avg_hold]
Avg hold
---
[profile_none_label]
None
---
[profile_friend_accept_button]
Accept
---
[profile_friend_decline_button]
Decline
---
[profile_friend_remove_title]
Remove friend?
---
[profile_friend_remove_message]
%s will be removed. Send a new request to reconnect.
---
[profile_updating_status]
Updating
---
[profile_no_account]
No account
---
[profile_account_section]
Account
---
[profile_configure_button]
Configure
---
[profile_data_section]
Data
---
[profile_sync_section]
Sync
---
[profile_friends_count_format]
%d friends
---
[profile_pending_count_format]
%d pending
---
[profile_social_section]
Social
---
[profile_add_friend_button]
Add friend
---
[profile_refresh_button]
Refresh
---
[profile_incoming_title]
Incoming
---
[profile_outgoing_title]
Outgoing
---
[profile_no_leaderboard_data]
No leaderboard data
---
[profile_practice_label]
Practice
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Settings
---
@@ -160,6 +274,21 @@ Music by Elijah_K.
[duration_2h]
2h
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
BREATH
---
@@ -256,15 +385,12 @@ Appearance
[settings_section_language]
Language
---
[settings_tab_data]
Data
---
[settings_section_data]
Data
---
[settings_tab_about]
About
---
[about_text]
A quiet breathing companion for practice, habits, and sync.
---
[theme_label]
Theme
---
@@ -370,6 +496,15 @@ Double tap to breathe
[double_tap_to_breathe_hint]
Double tap screen to breathe
---
[session_count_singular]
%d session
---
[session_count_plural]
%d sessions
---
[no_sessions]
No sessions
---
[hold_display_label]
Hold display
---
@@ -776,11 +911,14 @@ Edit Habit
[habit_name_label]
Name
---
[habit_description_label]
Description
---
[habit_underline_label]
Underline
---
[habit_practice_list_title]
Practice list
Session data from
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
@@ -818,6 +956,9 @@ Create habit
[habit_stats_no_rounds_week]
No rounds in the last week
---
[habit_stats_no_rounds_month]
No rounds in the last month
---
[habit_stats_current_streak]
Current streak
---
@@ -842,53 +983,22 @@ Total hold
[habit_stats_best_streak]
Best streak
---
[bottom_nav_customize_button]
Customize bottom navigation
[habit_stats_day_singular]
%d day
---
[bottom_nav_customize_title]
Bottom Navigation
---
[bottom_nav_add_button]
Add item
---
[bottom_nav_slot_1]
Item 1
---
[bottom_nav_slot_2]
Item 2
---
[bottom_nav_slot_3]
Item 3
---
[bottom_nav_slot_4]
Item 4
---
[bottom_nav_slot_5]
Item 5
---
[bottom_nav_slot_6]
Item 6
---
[bottom_nav_slot_7]
Item 7
---
[bottom_nav_slot_8]
Item 8
---
[reset_button]
[habit_stats_day_plural]
%d days
---[reset_button]
Reset
---
[practice_guide_dropdown]
Choose your practice here.
---
[practice_guide_manual]
Read the tutorial before starting a practice so you understand the full exercise.
---
[practice_guide_sun]
Use the sun tab when you are ready to start the exercise.
Use this manual icon to open the tutorial before starting.
---
[practice_guide_config]
Change the practice configuration to meet your standards.
Use this wrench icon to adjust the practice configuration.
---
[habits_guide_dropdown]
Select habits here or create a new one.
@@ -902,6 +1012,18 @@ Choose Weekly or Calendar to review your habit.
[habits_guide_statistics]
View habit statistics here.
---
[profile_guide_account]
Configure your sync account here.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Open friends and leaderboard from here.
---
[profile_guide_social_no_account]
Create a sync account to unlock friends and leaderboard.
---
[nav_mode_label]
Navigation
---
@@ -923,9 +1045,6 @@ Fade
[theme_picker_title]
Choose Theme
---
[notification_session_active]
Session active
---
[notification_starting_seconds]
Starting: %ds
---
@@ -938,6 +1057,6 @@ Hold: %ds
[notification_breath_in_seconds]
Breath in: %ds
---
[notification_next_round]
Next round
[notification_results]
Results
---
+174 -55
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Historial
---
[tab_profile]
Perfil
---
[tab_habits]
Hábitos
---
@@ -22,6 +25,117 @@ Marcar
[tab_manual]
Manual
---
[tab_pet]
Pet
---
[profile_data_title]
Datos
---
[profile_data_button]
Configurar datos
---
[profile_habits_label]
Habitos
---
[profile_sessions_label]
Sesiones
---
[profile_storage_label]
Almacenamiento
---
[profile_friends_title]
Amigos
---
[profile_leaderboard_title]
Clasificacion
---
[profile_metric_streak]
Racha
---
[profile_metric_avg_time]
Tiempo medio
---
[profile_metric_avg_hold]
Retencion media
---
[profile_none_label]
Ninguno
---
[profile_friend_accept_button]
Aceptar
---
[profile_friend_decline_button]
Rechazar
---
[profile_friend_remove_title]
¿Eliminar amigo?
---
[profile_friend_remove_message]
Se eliminara a %s. Envia una nueva solicitud para reconectar.
---
[profile_updating_status]
Actualizando
---
[profile_no_account]
Sin cuenta
---
[profile_account_section]
Cuenta
---
[profile_configure_button]
Configurar
---
[profile_data_section]
Datos
---
[profile_sync_section]
Sincronizacion
---
[profile_friends_count_format]
%d amigos
---
[profile_pending_count_format]
%d pendientes
---
[profile_social_section]
Social
---
[profile_add_friend_button]
Anadir amigo
---
[profile_refresh_button]
Actualizar
---
[profile_incoming_title]
Entrantes
---
[profile_outgoing_title]
Salientes
---
[profile_no_leaderboard_data]
Sin datos de clasificacion
---
[profile_practice_label]
Practica
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Configuración
---
@@ -157,6 +271,21 @@ No se pudo acceder al archivo de música de meditación. Revisa tu conexión a i
[duration_2h]
2 h
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
RESPIRACIÓN
---
@@ -250,15 +379,12 @@ Apariencia
[settings_section_language]
Idioma
---
[settings_tab_data]
Datos
---
[settings_section_data]
Datos
---
[settings_tab_about]
Acerca de
---
[about_text]
Un companero tranquilo para respiracion, habitos y sincronizacion.
---
[theme_label]
Tema
---
@@ -305,10 +431,19 @@ Pausa después de ronda
Controles avanzados de sesión
---
[double_tap_to_breathe_label]
Double tap to breathe
Doble toque para respirar
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Toca dos veces la pantalla para respirar
---
[session_count_singular]
%d sesión
---
[session_count_plural]
%d sesiones
---
[no_sessions]
Sin sesiones
---
[hold_display_label]
Visualizacion de retencion
@@ -734,14 +869,17 @@ Editar hábito
[habit_name_label]
Nombre
---
[habit_description_label]
Description
---
[habit_underline_label]
Subrayado
---
[habit_practice_list_title]
Session Data From
Datos de sesión
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Elige qué sesiones de práctica cuentan para este hábito. Los días coincidentes se muestran como completados y pueden abrir el editor de sesión.
---
[habit_counting_title]
Conteo
@@ -776,6 +914,9 @@ Crear hábito
[habit_stats_no_rounds_week]
No hay rondas en la última semana
---
[habit_stats_no_rounds_month]
No hay rondas en el último mes
---
[habit_stats_current_streak]
Racha actual
---
@@ -800,40 +941,12 @@ Retención total
[habit_stats_best_streak]
Mejor racha
---
[bottom_nav_customize_button]
Personalizar navegación inferior
[habit_stats_day_singular]
%d día
---
[bottom_nav_customize_title]
Navegación inferior
---
[bottom_nav_add_button]
Añadir elemento
---
[bottom_nav_slot_1]
Elemento 1
---
[bottom_nav_slot_2]
Elemento 2
---
[bottom_nav_slot_3]
Elemento 3
---
[bottom_nav_slot_4]
Elemento 4
---
[bottom_nav_slot_5]
Elemento 5
---
[bottom_nav_slot_6]
Elemento 6
---
[bottom_nav_slot_7]
Elemento 7
---
[bottom_nav_slot_8]
Elemento 8
---
[reset_button]
[habit_stats_day_plural]
%d días
---[reset_button]
Restablecer
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Elige tu practica aqui.
[practice_guide_manual]
Lee el tutorial antes de iniciar una practica para entender todo el ejercicio.
---
[practice_guide_sun]
Usa la pestana del sol cuando estes listo para iniciar el ejercicio.
---
[practice_guide_config]
Cambia la configuracion de la practica segun tus necesidades.
---
@@ -860,6 +970,18 @@ Elige Semanal o Calendario para revisar tu habito.
[habits_guide_statistics]
Consulta tus estadisticas de habitos aqui.
---
[profile_guide_account]
Configura tu cuenta de sincronizacion aqui.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Abre amigos y clasificacion desde aqui.
---
[profile_guide_social_no_account]
Crea una cuenta de sincronizacion para desbloquear amigos y clasificacion.
---
[nav_mode_label]
Navegación
---
@@ -871,13 +993,13 @@ Pestañas
---
[transition_label]
Transition
Transición
[transition_none]
None
Ninguna
[transition_fade]
Fade
Fundido
[theme_picker_title]
Choose Theme
Elegir tema
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Sesion activa
---
[notification_starting_seconds]
Inicio: %ds
---
@@ -935,7 +1054,7 @@ Retencion: %ds
[notification_breath_in_seconds]
Inhala: %ds
---
[notification_next_round]
Siguiente ronda
[notification_results]
Results
---
---
+178 -58
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Historique
---
[tab_profile]
Profil
---
[tab_habits]
Habitudes
---
@@ -22,6 +25,117 @@ Marquer
[tab_manual]
Tutoriel
---
[tab_pet]
Pet
---
[profile_data_title]
Donnees
---
[profile_data_button]
Configurer les donnees
---
[profile_habits_label]
Habitudes
---
[profile_sessions_label]
Seances
---
[profile_storage_label]
Stockage
---
[profile_friends_title]
Amis
---
[profile_leaderboard_title]
Classement
---
[profile_metric_streak]
Serie
---
[profile_metric_avg_time]
Temps moyen
---
[profile_metric_avg_hold]
Retenue moyenne
---
[profile_none_label]
Aucun
---
[profile_friend_accept_button]
Accepter
---
[profile_friend_decline_button]
Refuser
---
[profile_friend_remove_title]
Supprimer l'ami ?
---
[profile_friend_remove_message]
%s sera supprime. Envoyez une nouvelle demande pour vous reconnecter.
---
[profile_updating_status]
Mise a jour
---
[profile_no_account]
Aucun compte
---
[profile_account_section]
Compte
---
[profile_configure_button]
Configurer
---
[profile_data_section]
Donnees
---
[profile_sync_section]
Synchronisation
---
[profile_friends_count_format]
%d amis
---
[profile_pending_count_format]
%d en attente
---
[profile_social_section]
Social
---
[profile_add_friend_button]
Ajouter un ami
---
[profile_refresh_button]
Actualiser
---
[profile_incoming_title]
Recues
---
[profile_outgoing_title]
Envoyees
---
[profile_no_leaderboard_data]
Aucune donnee de classement
---
[profile_practice_label]
Pratique
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Réglages
---
@@ -157,6 +271,21 @@ Impossible de joindre le fichier de musique de méditation. Vérifiez votre conn
[duration_2h]
2 h
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
RESPIRER
---
@@ -253,14 +382,11 @@ Apparence
[settings_section_language]
Langue
---
[settings_tab_data]
Données
---
[settings_section_data]
Données
---
[settings_tab_about]
À propos
A propos
---
[about_text]
Un compagnon discret pour la respiration, les habitudes et la synchronisation.
---
[theme_label]
Thème
@@ -308,10 +434,19 @@ Pause après cycle
Contrôles avancés de séance
---
[double_tap_to_breathe_label]
Double tap to breathe
Double toucher pour respirer
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Touchez deux fois l'écran pour respirer
---
[session_count_singular]
%d session
---
[session_count_plural]
%d sessions
---
[no_sessions]
Aucune session
---
[hold_display_label]
Affichage de la retention
@@ -326,7 +461,7 @@ Cercle
Volume
---
[show_session_volume_control_label]
Afficher le controle du volume
Afficher le contrôle du volume
---
[reset_to_defaults_label]
Réinitialiser
@@ -552,7 +687,7 @@ Océan
Forêt
---
[theme_sunset]
Coucher de soleil
Crépuscule
---
[theme_lavender]
Lavande
@@ -776,14 +911,17 @@ Modifier l'habitude
[habit_name_label]
Nom
---
[habit_description_label]
Description
---
[habit_underline_label]
Soulignement
---
[habit_practice_list_title]
Session Data From
Données de session
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Choisissez quelles sessions de pratique comptent pour cette habitude. Les jours correspondants sont marqués comme faits et peuvent ouvrir l'éditeur de session.
---
[habit_counting_title]
Comptage
@@ -818,6 +956,9 @@ Créer une habitude
[habit_stats_no_rounds_week]
Aucune série la semaine dernière
---
[habit_stats_no_rounds_month]
Aucune série le mois dernier
---
[habit_stats_current_streak]
Série actuelle
---
@@ -842,40 +983,12 @@ Rétention totale
[habit_stats_best_streak]
Meilleure série
---
[bottom_nav_customize_button]
Personnaliser la navigation du bas
[habit_stats_day_singular]
%d jour
---
[bottom_nav_customize_title]
Navigation du bas
---
[bottom_nav_add_button]
Ajouter un élément
---
[bottom_nav_slot_1]
Élément 1
---
[bottom_nav_slot_2]
Élément 2
---
[bottom_nav_slot_3]
Élément 3
---
[bottom_nav_slot_4]
Élément 4
---
[bottom_nav_slot_5]
Élément 5
---
[bottom_nav_slot_6]
Élément 6
---
[bottom_nav_slot_7]
Élément 7
---
[bottom_nav_slot_8]
Élément 8
---
[reset_button]
[habit_stats_day_plural]
%d jours
---[reset_button]
Réinitialiser
---
[practice_guide_dropdown]
@@ -884,9 +997,6 @@ Choisissez votre pratique ici.
[practice_guide_manual]
Lisez le tutoriel avant de commencer une pratique afin de comprendre tout l'exercice.
---
[practice_guide_sun]
Utilisez l'onglet soleil lorsque vous etes pret a commencer l'exercice.
---
[practice_guide_config]
Modifiez la configuration de la pratique selon vos besoins.
---
@@ -902,6 +1012,18 @@ Choisissez Hebdomadaire ou Calendrier pour suivre votre habitude.
[habits_guide_statistics]
Consultez vos statistiques d'habitudes ici.
---
[profile_guide_account]
Configurez votre compte de synchronisation ici.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Ouvrez les amis et le classement ici.
---
[profile_guide_social_no_account]
Creez un compte de synchronisation pour debloquer les amis et le classement.
---
[nav_mode_label]
Navigation
---
@@ -913,16 +1035,13 @@ Onglets
---
[transition_label]
Transition
Effet
[transition_none]
None
Aucune
[transition_fade]
Fade
Fondu
[theme_picker_title]
Choose Theme
---
[notification_session_active]
Session active
Choisir un thème
---
[notification_starting_seconds]
Demarrage : %ds
@@ -936,5 +1055,6 @@ Retention : %ds
[notification_breath_in_seconds]
Inspirez : %ds
---
[notification_next_round]
Tour suivant
[notification_results]
Results
---
+175 -56
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Riwayat
---
[tab_profile]
Profil
---
[tab_habits]
Kebiasaan
---
@@ -22,6 +25,117 @@ Tandai
[tab_manual]
Manual
---
[tab_pet]
Pet
---
[profile_data_title]
Data
---
[profile_data_button]
Atur data
---
[profile_habits_label]
Kebiasaan
---
[profile_sessions_label]
Sesi
---
[profile_storage_label]
Penyimpanan
---
[profile_friends_title]
Teman
---
[profile_leaderboard_title]
Papan peringkat
---
[profile_metric_streak]
Rangkaian
---
[profile_metric_avg_time]
Waktu rata-rata
---
[profile_metric_avg_hold]
Tahan rata-rata
---
[profile_none_label]
Tidak ada
---
[profile_friend_accept_button]
Terima
---
[profile_friend_decline_button]
Tolak
---
[profile_friend_remove_title]
Hapus teman?
---
[profile_friend_remove_message]
%s akan dihapus. Kirim permintaan baru untuk terhubung lagi.
---
[profile_updating_status]
Memperbarui
---
[profile_no_account]
Tidak ada akun
---
[profile_account_section]
Akun
---
[profile_configure_button]
Atur
---
[profile_data_section]
Data
---
[profile_sync_section]
Sinkronisasi
---
[profile_friends_count_format]
%d teman
---
[profile_pending_count_format]
%d tertunda
---
[profile_social_section]
Sosial
---
[profile_add_friend_button]
Tambah teman
---
[profile_refresh_button]
Segarkan
---
[profile_incoming_title]
Masuk
---
[profile_outgoing_title]
Keluar
---
[profile_no_leaderboard_data]
Tidak ada data papan peringkat
---
[profile_practice_label]
Latihan
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Pengaturan
---
@@ -157,6 +271,21 @@ Tidak dapat membuka file musik meditasi. Periksa koneksi internetmu, lalu coba l
[duration_2h]
2j
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
NAFAS
---
@@ -250,15 +379,12 @@ Tampilan
[settings_section_language]
Bahasa
---
[settings_tab_data]
Data
---
[settings_section_data]
Data
---
[settings_tab_about]
Tentang
---
[about_text]
Pendamping tenang untuk pernapasan, kebiasaan, dan sinkronisasi.
---
[theme_label]
Tema
---
@@ -305,10 +431,19 @@ Jeda setelah ronde
Kontrol sesi lanjutan
---
[double_tap_to_breathe_label]
Double tap to breathe
Ketuk dua kali untuk bernapas
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Ketuk layar dua kali untuk bernapas
---
[session_count_singular]
%d sesi
---
[session_count_plural]
%d sesi
---
[no_sessions]
Tidak ada sesi
---
[hold_display_label]
Tampilan tahan napas
@@ -734,14 +869,17 @@ Edit kebiasaan
[habit_name_label]
Nama
---
[habit_description_label]
Description
---
[habit_underline_label]
Garis bawah
---
[habit_practice_list_title]
Session Data From
Data sesi dari
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Pilih sesi latihan mana yang dihitung untuk kebiasaan ini. Hari yang cocok ditandai selesai dan dapat membuka editor sesi.
---
[habit_counting_title]
Penghitungan
@@ -776,6 +914,9 @@ Buat kebiasaan
[habit_stats_no_rounds_week]
Tidak ada ronde minggu lalu
---
[habit_stats_no_rounds_month]
Tidak ada ronde bulan lalu
---
[habit_stats_current_streak]
Rangkaian saat ini
---
@@ -800,40 +941,12 @@ Total tahan
[habit_stats_best_streak]
Rangkaian terbaik
---
[bottom_nav_customize_button]
Sesuaikan navigasi bawah
[habit_stats_day_singular]
%d hari
---
[bottom_nav_customize_title]
Navigasi bawah
---
[bottom_nav_add_button]
Tambah item
---
[bottom_nav_slot_1]
Item 1
---
[bottom_nav_slot_2]
Item 2
---
[bottom_nav_slot_3]
Item 3
---
[bottom_nav_slot_4]
Item 4
---
[bottom_nav_slot_5]
Item 5
---
[bottom_nav_slot_6]
Item 6
---
[bottom_nav_slot_7]
Item 7
---
[bottom_nav_slot_8]
Item 8
---
[reset_button]
[habit_stats_day_plural]
%d hari
---[reset_button]
Reset
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Pilih praktik Anda di sini.
[practice_guide_manual]
Baca tutorial sebelum memulai praktik agar Anda memahami seluruh latihan.
---
[practice_guide_sun]
Gunakan tab matahari saat Anda siap memulai latihan.
---
[practice_guide_config]
Ubah konfigurasi praktik agar sesuai dengan kebutuhan Anda.
---
@@ -860,24 +970,36 @@ Pilih Mingguan atau Kalender untuk meninjau kebiasaan.
[habits_guide_statistics]
Lihat statistik kebiasaan Anda di sini.
---
[profile_guide_account]
Atur akun sinkronisasi Anda di sini.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Buka teman dan papan peringkat dari sini.
---
[profile_guide_social_no_account]
Buat akun sinkronisasi untuk membuka teman dan papan peringkat.
---
[nav_mode_label]
Navigasi
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Tab
---
[transition_label]
Transition
Transisi
[transition_none]
None
Tidak ada
[transition_fade]
Fade
Pudar
[theme_picker_title]
Choose Theme
Pilih Tema
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Sesi aktif
---
[notification_starting_seconds]
Mulai: %ds
---
@@ -935,7 +1054,7 @@ Tahan: %ds
[notification_breath_in_seconds]
Tarik napas: %ds
---
[notification_next_round]
Ronde berikutnya
[notification_results]
Results
---
---
+177 -58
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Cronologia
---
[tab_profile]
Profilo
---
[tab_habits]
Abitudini
---
@@ -22,6 +25,117 @@ Segna Come Fatto
[tab_manual]
Manuale
---
[tab_pet]
Pet
---
[profile_data_title]
Dati
---
[profile_data_button]
Configura dati
---
[profile_habits_label]
Abitudini
---
[profile_sessions_label]
Sessioni
---
[profile_storage_label]
Archiviazione
---
[profile_friends_title]
Amici
---
[profile_leaderboard_title]
Classifica
---
[profile_metric_streak]
Serie
---
[profile_metric_avg_time]
Tempo medio
---
[profile_metric_avg_hold]
Tenuta media
---
[profile_none_label]
Nessuno
---
[profile_friend_accept_button]
Accetta
---
[profile_friend_decline_button]
Rifiuta
---
[profile_friend_remove_title]
Rimuovere amico?
---
[profile_friend_remove_message]
%s sara rimosso. Invia una nuova richiesta per riconnetterti.
---
[profile_updating_status]
Aggiornamento
---
[profile_no_account]
Nessun account
---
[profile_account_section]
Account
---
[profile_configure_button]
Configura
---
[profile_data_section]
Dati
---
[profile_sync_section]
Sincronizzazione
---
[profile_friends_count_format]
%d amici
---
[profile_pending_count_format]
%d in attesa
---
[profile_social_section]
Social
---
[profile_add_friend_button]
Aggiungi amico
---
[profile_refresh_button]
Aggiorna
---
[profile_incoming_title]
In arrivo
---
[profile_outgoing_title]
In uscita
---
[profile_no_leaderboard_data]
Nessun dato classifica
---
[profile_practice_label]
Pratica
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Impostazioni
---
@@ -157,6 +271,21 @@ Impossibile raggiungere il file musicale per la meditazione. Controlla la connes
[duration_2h]
2 ore
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
RESPIRO
---
@@ -250,14 +379,11 @@ Aspetto
[settings_section_language]
Lingua
---
[settings_tab_data]
Dati
---
[settings_section_data]
Dati
---
[settings_tab_about]
Info
Informazioni
---
[about_text]
Un compagno discreto per respirazione, abitudini e sincronizzazione.
---
[theme_label]
Tema
@@ -359,10 +485,19 @@ Pausa dopo round
Controlli avanzati sessione
---
[double_tap_to_breathe_label]
Double tap to breathe
Doppio tap per respirare
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Tocca due volte lo schermo per respirare
---
[session_count_singular]
%d sessione
---
[session_count_plural]
%d sessioni
---
[no_sessions]
Nessuna sessione
---
[hold_display_label]
Visualizzazione trattenuta
@@ -377,7 +512,7 @@ Cerchio
Volume
---
[show_session_volume_control_label]
Mostra il controllo volume
Mostra controllo volume
---
[reset_to_defaults_label]
Ripristina predefiniti
@@ -734,14 +869,17 @@ Modifica abitudine
[habit_name_label]
Nome
---
[habit_description_label]
Description
---
[habit_underline_label]
Sottolineatura
---
[habit_practice_list_title]
Session Data From
Dati sessione da
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Scegli quali sessioni di pratica contano per questa abitudine. I giorni corrispondenti risultano completati e possono aprire l'editor della sessione.
---
[habit_counting_title]
Conteggio
@@ -776,6 +914,9 @@ Crea abitudine
[habit_stats_no_rounds_week]
Nessun round nell'ultima settimana
---
[habit_stats_no_rounds_month]
Nessun round nell'ultimo mese
---
[habit_stats_current_streak]
Serie attuale
---
@@ -800,40 +941,12 @@ Apnea totale
[habit_stats_best_streak]
Migliore serie
---
[bottom_nav_customize_button]
Personalizza navigazione inferiore
[habit_stats_day_singular]
%d giorno
---
[bottom_nav_customize_title]
Navigazione inferiore
---
[bottom_nav_add_button]
Aggiungi elemento
---
[bottom_nav_slot_1]
Elemento 1
---
[bottom_nav_slot_2]
Elemento 2
---
[bottom_nav_slot_3]
Elemento 3
---
[bottom_nav_slot_4]
Elemento 4
---
[bottom_nav_slot_5]
Elemento 5
---
[bottom_nav_slot_6]
Elemento 6
---
[bottom_nav_slot_7]
Elemento 7
---
[bottom_nav_slot_8]
Elemento 8
---
[reset_button]
[habit_stats_day_plural]
%d giorni
---[reset_button]
Ripristina
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Scegli qui la tua pratica.
[practice_guide_manual]
Leggi il tutorial prima di iniziare una pratica per capire l'esercizio completo.
---
[practice_guide_sun]
Usa la scheda con il sole quando sei pronto per iniziare l'esercizio.
---
[practice_guide_config]
Modifica la configurazione della pratica in base alle tue esigenze.
---
@@ -860,24 +970,36 @@ Scegli Settimanale o Calendario per rivedere l'abitudine.
[habits_guide_statistics]
Visualizza qui le statistiche delle abitudini.
---
[profile_guide_account]
Configura qui il tuo account di sincronizzazione.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Apri amici e classifica da qui.
---
[profile_guide_social_no_account]
Crea un account di sincronizzazione per sbloccare amici e classifica.
---
[nav_mode_label]
Navigazione
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Schede
---
[transition_label]
Transition
Transizione
[transition_none]
None
Nessuna
[transition_fade]
Fade
Dissolvenza
[theme_picker_title]
Choose Theme
Scegli tema
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Sessione attiva
---
[notification_starting_seconds]
Avvio: %ds
---
@@ -935,7 +1054,7 @@ Trattieni: %ds
[notification_breath_in_seconds]
Inspira: %ds
---
[notification_next_round]
Round successivo
[notification_results]
Results
---
---
+175 -56
View File
@@ -4,6 +4,9 @@
[tab_history]
履歴
---
[tab_profile]
プロフィール
---
[tab_habits]
習慣
---
@@ -22,6 +25,117 @@
[tab_manual]
チュートリアル
---
[tab_pet]
Pet
---
[profile_data_title]
データ
---
[profile_data_button]
データを設定
---
[profile_habits_label]
習慣
---
[profile_sessions_label]
セッション
---
[profile_storage_label]
ストレージ
---
[profile_friends_title]
フレンド
---
[profile_leaderboard_title]
ランキング
---
[profile_metric_streak]
連続日数
---
[profile_metric_avg_time]
平均時間
---
[profile_metric_avg_hold]
平均保持
---
[profile_none_label]
なし
---
[profile_friend_accept_button]
承認
---
[profile_friend_decline_button]
拒否
---
[profile_friend_remove_title]
フレンドを削除?
---
[profile_friend_remove_message]
%s を削除します。再接続には新しいリクエストが必要です。
---
[profile_updating_status]
更新中
---
[profile_no_account]
アカウントなし
---
[profile_account_section]
アカウント
---
[profile_configure_button]
設定
---
[profile_data_section]
データ
---
[profile_sync_section]
同期
---
[profile_friends_count_format]
%d人のフレンド
---
[profile_pending_count_format]
%d件保留中
---
[profile_social_section]
ソーシャル
---
[profile_add_friend_button]
フレンドを追加
---
[profile_refresh_button]
更新
---
[profile_incoming_title]
受信
---
[profile_outgoing_title]
送信
---
[profile_no_leaderboard_data]
ランキングデータなし
---
[profile_practice_label]
プラクティス
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
設定
---
@@ -157,6 +271,21 @@ Sun Salutation
[duration_2h]
2時間
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
呼吸
---
@@ -250,14 +379,11 @@ OK
[settings_section_language]
言語
---
[settings_tab_data]
データ
---
[settings_section_data]
データ
---
[settings_tab_about]
情報
アプリについて
---
[about_text]
呼吸、習慣、同期のための静かなパートナーです。
---
[theme_label]
テーマ
@@ -305,10 +431,19 @@ OK
詳細なセッション設定
---
[double_tap_to_breathe_label]
Double tap to breathe
ダブルタップで呼吸
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
画面をダブルタップして呼吸
---
[session_count_singular]
%dセッション
---
[session_count_plural]
%dセッション
---
[no_sessions]
セッションなし
---
[hold_display_label]
ホールド表示
@@ -734,14 +869,17 @@ https:// または localhost:8080 のようなループバックを使用して
[habit_name_label]
名前
---
[habit_description_label]
Description
---
[habit_underline_label]
下線
---
[habit_practice_list_title]
Session Data From
セッションデータ
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
この習慣に含める練習セッションを選びます。一致する日は完了として表示され、セッション編集画面を開けます。
---
[habit_counting_title]
カウント
@@ -776,6 +914,9 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_no_rounds_week]
過去1週間にラウンドはありません
---
[habit_stats_no_rounds_month]
過去1か月にラウンドはありません
---
[habit_stats_current_streak]
現在の連続記録
---
@@ -800,40 +941,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
最長連続記録
---
[bottom_nav_customize_button]
下部ナビゲーションをカスタマイズ
[habit_stats_day_singular]
%d日
---
[bottom_nav_customize_title]
下部ナビゲーション
---
[bottom_nav_add_button]
項目を追加
---
[bottom_nav_slot_1]
項目1
---
[bottom_nav_slot_2]
項目2
---
[bottom_nav_slot_3]
項目3
---
[bottom_nav_slot_4]
項目4
---
[bottom_nav_slot_5]
項目5
---
[bottom_nav_slot_6]
項目6
---
[bottom_nav_slot_7]
項目7
---
[bottom_nav_slot_8]
項目8
---
[reset_button]
[habit_stats_day_plural]
%d日
---[reset_button]
リセット
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Choose which practice sessions count for this habit. Matching days show as compl
[practice_guide_manual]
練習を始める前にチュートリアルを読んで、エクササイズ全体を理解してください。
---
[practice_guide_sun]
エクササイズを始める準備ができたら、太陽タブを使います。
---
[practice_guide_config]
自分に合うように練習の設定を変更できます。
---
@@ -860,6 +970,18 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habits_guide_statistics]
ここで習慣の統計を確認できます。
---
[profile_guide_account]
ここで同期アカウントを設定します。
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
ここからフレンドとランキングを開きます。
---
[profile_guide_social_no_account]
フレンドとランキングを使うには同期アカウントを作成してください。
---
[nav_mode_label]
ナビゲーション
---
@@ -871,13 +993,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
切り替え
[transition_none]
None
なし
[transition_fade]
Fade
フェード
[theme_picker_title]
Choose Theme
テーマ選択
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
セッション中
---
[notification_starting_seconds]
開始: %d秒
---
@@ -935,7 +1054,7 @@ Alias saved
[notification_breath_in_seconds]
吸う: %d秒
---
[notification_next_round]
次のラウンド
[notification_results]
Results
---
---
+174 -55
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
기록
---
[tab_profile]
프로필
---
[tab_habits]
습관
---
@@ -22,6 +25,117 @@ Inner Breeze
[tab_manual]
튜토리얼
---
[tab_pet]
Pet
---
[profile_data_title]
데이터
---
[profile_data_button]
데이터 설정
---
[profile_habits_label]
습관
---
[profile_sessions_label]
세션
---
[profile_storage_label]
저장 공간
---
[profile_friends_title]
친구
---
[profile_leaderboard_title]
순위표
---
[profile_metric_streak]
연속 기록
---
[profile_metric_avg_time]
평균 시간
---
[profile_metric_avg_hold]
평균 유지
---
[profile_none_label]
없음
---
[profile_friend_accept_button]
수락
---
[profile_friend_decline_button]
거절
---
[profile_friend_remove_title]
친구 삭제?
---
[profile_friend_remove_message]
%s 님이 삭제됩니다. 다시 연결하려면 새 요청을 보내세요.
---
[profile_updating_status]
업데이트 중
---
[profile_no_account]
계정 없음
---
[profile_account_section]
계정
---
[profile_configure_button]
설정
---
[profile_data_section]
데이터
---
[profile_sync_section]
동기화
---
[profile_friends_count_format]
친구 %d명
---
[profile_pending_count_format]
대기 %d개
---
[profile_social_section]
소셜
---
[profile_add_friend_button]
친구 추가
---
[profile_refresh_button]
새로 고침
---
[profile_incoming_title]
받은 요청
---
[profile_outgoing_title]
보낸 요청
---
[profile_no_leaderboard_data]
순위표 데이터 없음
---
[profile_practice_label]
연습
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
설정
---
@@ -157,6 +271,21 @@ Sun Salutation
[duration_2h]
2시간
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
호흡
---
@@ -250,15 +379,12 @@ Sun Salutation
[settings_section_language]
언어
---
[settings_tab_data]
데이터
---
[settings_section_data]
데이터
---
[settings_tab_about]
정보
---
[about_text]
호흡, 습관, 동기화를 위한 조용한 동반자입니다.
---
[theme_label]
테마
---
@@ -359,10 +485,19 @@ Sun Salutation
고급 세션 제어
---
[double_tap_to_breathe_label]
Double tap to breathe
두 번 탭해 호흡
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
화면을 두 번 탭해 호흡
---
[session_count_singular]
%d개 세션
---
[session_count_plural]
%d개 세션
---
[no_sessions]
세션 없음
---
[hold_display_label]
홀드 표시
@@ -733,14 +868,17 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
[habit_name_label]
이름
---
[habit_description_label]
Description
---
[habit_underline_label]
밑줄
---
[habit_practice_list_title]
Session Data From
세션 데이터
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
이 습관에 포함할 연습 세션을 선택하세요. 일치하는 날은 완료로 표시되며 세션 편집기를 열 수 있습니다.
---
[habit_counting_title]
횟수
@@ -775,6 +913,9 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_no_rounds_week]
지난주 라운드 없음
---
[habit_stats_no_rounds_month]
지난달 라운드 없음
---
[habit_stats_current_streak]
현재 연속 기록
---
@@ -799,40 +940,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
최고 연속 기록
---
[bottom_nav_customize_button]
하단 내비게이션 사용자화
[habit_stats_day_singular]
%d일
---
[bottom_nav_customize_title]
하단 내비게이션
---
[bottom_nav_add_button]
항목 추가
---
[bottom_nav_slot_1]
항목 1
---
[bottom_nav_slot_2]
항목 2
---
[bottom_nav_slot_3]
항목 3
---
[bottom_nav_slot_4]
항목 4
---
[bottom_nav_slot_5]
항목 5
---
[bottom_nav_slot_6]
항목 6
---
[bottom_nav_slot_7]
항목 7
---
[bottom_nav_slot_8]
항목 8
---
[reset_button]
[habit_stats_day_plural]
%d일
---[reset_button]
초기화
---
[practice_guide_dropdown]
@@ -841,9 +954,6 @@ Choose which practice sessions count for this habit. Matching days show as compl
[practice_guide_manual]
연습을 시작하기 전에 튜토리얼을 읽고 전체 운동을 이해하세요.
---
[practice_guide_sun]
운동을 시작할 준비가 되면 태양 탭을 사용하세요.
---
[practice_guide_config]
필요에 맞게 연습 설정을 변경하세요.
---
@@ -859,6 +969,18 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habits_guide_statistics]
여기에서 습관 통계를 확인하세요.
---
[profile_guide_account]
여기에서 동기화 계정을 설정하세요.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
여기에서 친구와 순위표를 엽니다.
---
[profile_guide_social_no_account]
친구와 순위표를 사용하려면 동기화 계정을 만드세요.
---
[nav_mode_label]
탐색
---
@@ -870,13 +992,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
전환
[transition_none]
None
없음
[transition_fade]
Fade
페이드
[theme_picker_title]
Choose Theme
테마 선택
[skip_button]
Skip
---
@@ -919,9 +1041,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
세션 진행 중
---
[notification_starting_seconds]
시작: %d초
---
@@ -934,7 +1053,7 @@ Alias saved
[notification_breath_in_seconds]
들이쉬기: %d초
---
[notification_next_round]
다음 라운드
[notification_results]
Results
---
---
+176 -57
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
Histórico
---
[tab_profile]
Perfil
---
[tab_habits]
Hábitos
---
@@ -22,6 +25,117 @@ Marcar
[tab_manual]
Manual
---
[tab_pet]
Pet
---
[profile_data_title]
Dados
---
[profile_data_button]
Configurar dados
---
[profile_habits_label]
Habitos
---
[profile_sessions_label]
Sessoes
---
[profile_storage_label]
Armazenamento
---
[profile_friends_title]
Amigos
---
[profile_leaderboard_title]
Classificacao
---
[profile_metric_streak]
Sequencia
---
[profile_metric_avg_time]
Tempo medio
---
[profile_metric_avg_hold]
Retencao media
---
[profile_none_label]
Nenhum
---
[profile_friend_accept_button]
Aceitar
---
[profile_friend_decline_button]
Recusar
---
[profile_friend_remove_title]
Remover amigo?
---
[profile_friend_remove_message]
%s sera removido. Envie uma nova solicitacao para reconectar.
---
[profile_updating_status]
Atualizando
---
[profile_no_account]
Sem conta
---
[profile_account_section]
Conta
---
[profile_configure_button]
Configurar
---
[profile_data_section]
Dados
---
[profile_sync_section]
Sincronizacao
---
[profile_friends_count_format]
%d amigos
---
[profile_pending_count_format]
%d pendentes
---
[profile_social_section]
Social
---
[profile_add_friend_button]
Adicionar amigo
---
[profile_refresh_button]
Atualizar
---
[profile_incoming_title]
Recebidos
---
[profile_outgoing_title]
Enviados
---
[profile_no_leaderboard_data]
Sem dados de classificacao
---
[profile_practice_label]
Pratica
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Configurações
---
@@ -157,6 +271,21 @@ Não foi possível acessar o arquivo de música de meditação. Verifique sua co
[duration_2h]
2 h
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
RESPIRAR
---
@@ -250,15 +379,12 @@ Aparência
[settings_section_language]
Idioma
---
[settings_tab_data]
Dados
---
[settings_section_data]
Dados
---
[settings_tab_about]
Sobre
---
[about_text]
Um companheiro tranquilo para respiracao, habitos e sincronizacao.
---
[theme_label]
Tema
---
@@ -305,10 +431,19 @@ Pausa após rodada
Controles avançados da sessão
---
[double_tap_to_breathe_label]
Double tap to breathe
Toque duplo para respirar
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Toque duas vezes na tela para respirar
---
[session_count_singular]
%d sessão
---
[session_count_plural]
%d sessões
---
[no_sessions]
Sem sessões
---
[hold_display_label]
Exibicao da retencao
@@ -549,7 +684,7 @@ Oceano
Floresta
---
[theme_sunset]
Pôr do sol
Poente
---
[theme_lavender]
Lavanda
@@ -734,14 +869,17 @@ Editar hábito
[habit_name_label]
Nome
---
[habit_description_label]
Description
---
[habit_underline_label]
Sublinhado
---
[habit_practice_list_title]
Session Data From
Dados de sessão
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Escolha quais sessões de prática contam para este hábito. Dias correspondentes aparecem como concluídos e podem abrir o editor de sessão.
---
[habit_counting_title]
Contagem
@@ -776,6 +914,9 @@ Criar hábito
[habit_stats_no_rounds_week]
Nenhuma rodada na última semana
---
[habit_stats_no_rounds_month]
Nenhuma rodada no último mês
---
[habit_stats_current_streak]
Sequência atual
---
@@ -800,40 +941,12 @@ Retenção total
[habit_stats_best_streak]
Melhor sequência
---
[bottom_nav_customize_button]
Personalizar navegação inferior
[habit_stats_day_singular]
%d dia
---
[bottom_nav_customize_title]
Navegação inferior
---
[bottom_nav_add_button]
Adicionar item
---
[bottom_nav_slot_1]
Item 1
---
[bottom_nav_slot_2]
Item 2
---
[bottom_nav_slot_3]
Item 3
---
[bottom_nav_slot_4]
Item 4
---
[bottom_nav_slot_5]
Item 5
---
[bottom_nav_slot_6]
Item 6
---
[bottom_nav_slot_7]
Item 7
---
[bottom_nav_slot_8]
Item 8
---
[reset_button]
[habit_stats_day_plural]
%d dias
---[reset_button]
Redefinir
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Escolha a sua pratica aqui.
[practice_guide_manual]
Leia o tutorial antes de iniciar uma pratica para entender o exercicio completo.
---
[practice_guide_sun]
Use a aba do sol quando estiver pronto para iniciar o exercicio.
---
[practice_guide_config]
Altere a configuracao da pratica de acordo com as suas necessidades.
---
@@ -860,24 +970,36 @@ Escolha Semanal ou Calendario para revisar seu habito.
[habits_guide_statistics]
Veja suas estatisticas de habitos aqui.
---
[profile_guide_account]
Configure sua conta de sincronizacao aqui.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Abra amigos e classificacao aqui.
---
[profile_guide_social_no_account]
Crie uma conta de sincronizacao para liberar amigos e classificacao.
---
[nav_mode_label]
Navegação
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Abas
---
[transition_label]
Transition
Transição
[transition_none]
None
Nenhuma
[transition_fade]
Fade
Desvanecer
[theme_picker_title]
Choose Theme
Escolher tema
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Sessao ativa
---
[notification_starting_seconds]
Inicio: %ds
---
@@ -935,7 +1054,7 @@ Segure: %ds
[notification_breath_in_seconds]
Inspire: %ds
---
[notification_next_round]
Proxima rodada
[notification_results]
Results
---
---
+174 -55
View File
@@ -4,6 +4,9 @@ Inner Breeze
[tab_history]
История
---
[tab_profile]
Профиль
---
[tab_habits]
Привычки
---
@@ -22,6 +25,117 @@ Inner Breeze
[tab_manual]
Обучение
---
[tab_pet]
Pet
---
[profile_data_title]
Данные
---
[profile_data_button]
Настроить данные
---
[profile_habits_label]
Привычки
---
[profile_sessions_label]
Сессии
---
[profile_storage_label]
Хранилище
---
[profile_friends_title]
Друзья
---
[profile_leaderboard_title]
Рейтинг
---
[profile_metric_streak]
Серия
---
[profile_metric_avg_time]
Среднее время
---
[profile_metric_avg_hold]
Средняя задержка
---
[profile_none_label]
Нет
---
[profile_friend_accept_button]
Принять
---
[profile_friend_decline_button]
Отклонить
---
[profile_friend_remove_title]
Удалить друга?
---
[profile_friend_remove_message]
%s будет удален. Для связи отправьте новый запрос.
---
[profile_updating_status]
Обновление
---
[profile_no_account]
Нет аккаунта
---
[profile_account_section]
Аккаунт
---
[profile_configure_button]
Настроить
---
[profile_data_section]
Данные
---
[profile_sync_section]
Синхронизация
---
[profile_friends_count_format]
%d друзей
---
[profile_pending_count_format]
%d ожидают
---
[profile_social_section]
Социальное
---
[profile_add_friend_button]
Добавить друга
---
[profile_refresh_button]
Обновить
---
[profile_incoming_title]
Входящие
---
[profile_outgoing_title]
Исходящие
---
[profile_no_leaderboard_data]
Нет данных рейтинга
---
[profile_practice_label]
Практика
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
Настройки
---
@@ -160,6 +274,21 @@ Sun Salutation
[duration_2h]
2 ч
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
ДЫШАТЬ
---
@@ -253,15 +382,12 @@ OK
[settings_section_language]
Язык
---
[settings_tab_data]
Данные
---
[settings_section_data]
Данные
---
[settings_tab_about]
О приложении
---
[about_text]
Спокойный помощник для дыхания, привычек и синхронизации.
---
[theme_label]
Тема
---
@@ -362,10 +488,19 @@ OK
Расширенное управление сессией
---
[double_tap_to_breathe_label]
Double tap to breathe
Двойное касание для вдоха
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Коснитесь экрана дважды, чтобы вдохнуть
---
[session_count_singular]
%d сессия
---
[session_count_plural]
%d сессий
---
[no_sessions]
Нет сессий
---
[hold_display_label]
Отображение задержки
@@ -734,14 +869,17 @@ liboqs не собран для этой платформы.
[habit_name_label]
Название
---
[habit_description_label]
Description
---
[habit_underline_label]
Подчеркивание
---
[habit_practice_list_title]
Session Data From
Данные сессий из
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Выберите, какие сессии практик учитываются для этой привычки. Совпадающие дни отмечаются как выполненные и могут открыть редактор сессии.
---
[habit_counting_title]
Подсчет
@@ -776,6 +914,9 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_no_rounds_week]
За последнюю неделю раундов нет
---
[habit_stats_no_rounds_month]
За последний месяц раундов нет
---
[habit_stats_current_streak]
Текущая серия
---
@@ -800,40 +941,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
Лучшая серия
---
[bottom_nav_customize_button]
Настроить нижнюю навигацию
[habit_stats_day_singular]
%d день
---
[bottom_nav_customize_title]
Нижняя навигация
---
[bottom_nav_add_button]
Добавить пункт
---
[bottom_nav_slot_1]
Пункт 1
---
[bottom_nav_slot_2]
Пункт 2
---
[bottom_nav_slot_3]
Пункт 3
---
[bottom_nav_slot_4]
Пункт 4
---
[bottom_nav_slot_5]
Пункт 5
---
[bottom_nav_slot_6]
Пункт 6
---
[bottom_nav_slot_7]
Пункт 7
---
[bottom_nav_slot_8]
Пункт 8
---
[reset_button]
[habit_stats_day_plural]
%d дней
---[reset_button]
Сбросить
---
[practice_guide_dropdown]
@@ -842,9 +955,6 @@ Choose which practice sessions count for this habit. Matching days show as compl
[practice_guide_manual]
Прочитайте руководство перед началом практики, чтобы понять упражнение полностью.
---
[practice_guide_sun]
Используйте вкладку с солнцем, когда будете готовы начать упражнение.
---
[practice_guide_config]
Измените настройки практики под свои требования.
---
@@ -860,6 +970,18 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habits_guide_statistics]
Здесь можно посмотреть статистику привычек.
---
[profile_guide_account]
Настройте аккаунт синхронизации здесь.
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
Откройте друзей и рейтинг здесь.
---
[profile_guide_social_no_account]
Создайте аккаунт синхронизации, чтобы открыть друзей и рейтинг.
---
[nav_mode_label]
Навигация
---
@@ -871,13 +993,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
Переход
[transition_none]
None
Нет
[transition_fade]
Fade
Плавно
[theme_picker_title]
Choose Theme
Выбор темы
[skip_button]
Skip
---
@@ -920,9 +1042,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
Сессия активна
---
[notification_starting_seconds]
Старт: %dс
---
@@ -935,7 +1054,7 @@ Alias saved
[notification_breath_in_seconds]
Вдох: %dс
---
[notification_next_round]
Следующий раунд
[notification_results]
Results
---
---
+174 -55
View File
@@ -4,6 +4,9 @@
[tab_history]
历史
---
[tab_profile]
个人资料
---
[tab_habits]
习惯
---
@@ -22,6 +25,117 @@
[tab_manual]
教程
---
[tab_pet]
Pet
---
[profile_data_title]
数据
---
[profile_data_button]
配置数据
---
[profile_habits_label]
习惯
---
[profile_sessions_label]
会话
---
[profile_storage_label]
存储
---
[profile_friends_title]
好友
---
[profile_leaderboard_title]
排行榜
---
[profile_metric_streak]
连续记录
---
[profile_metric_avg_time]
平均时间
---
[profile_metric_avg_hold]
平均保持
---
[profile_none_label]
无
---
[profile_friend_accept_button]
接受
---
[profile_friend_decline_button]
拒绝
---
[profile_friend_remove_title]
删除好友?
---
[profile_friend_remove_message]
将删除 %s。重新连接需发送新请求。
---
[profile_updating_status]
正在更新
---
[profile_no_account]
没有账户
---
[profile_account_section]
账户
---
[profile_configure_button]
配置
---
[profile_data_section]
数据
---
[profile_sync_section]
同步
---
[profile_friends_count_format]
%d 位好友
---
[profile_pending_count_format]
%d 个待处理
---
[profile_social_section]
社交
---
[profile_add_friend_button]
添加好友
---
[profile_refresh_button]
刷新
---
[profile_incoming_title]
收到
---
[profile_outgoing_title]
发出
---
[profile_no_leaderboard_data]
没有排行榜数据
---
[profile_practice_label]
练习
---
[profile_my_habits_button]
My habits
---
[profile_my_practices_button]
My practices
---
[profile_my_habits_title]
My habits
---
[profile_my_practices_title]
My practices
---
[move_up_button]
Up
---
[move_down_button]
Down
---
[tab_settings]
设置
---
@@ -157,6 +271,21 @@ Sun Salutation
[duration_2h]
2小时
---
[meditation_duration_setting]
Meditation length
---
[meditation_duration_custom]
Custom
---
[meditation_custom_minutes]
Custom time
---
[meditation_extend_controls_label]
Show add-time buttons during meditation
---
[finish_button]
Finish
---
[breath_button]
呼吸
---
@@ -250,15 +379,12 @@ Sun Salutation
[settings_section_language]
语言
---
[settings_tab_data]
数据
---
[settings_section_data]
数据
---
[settings_tab_about]
关于
---
[about_text]
用于呼吸、习惯和同步的安静伙伴。
---
[theme_label]
主题
---
@@ -305,10 +431,19 @@ Sun Salutation
高级练习控制
---
[double_tap_to_breathe_label]
Double tap to breathe
双击呼吸
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
双击屏幕开始呼吸
---
[session_count_singular]
%d次会话
---
[session_count_plural]
%d次会话
---
[no_sessions]
没有会话
---
[hold_display_label]
屏息显示
@@ -732,14 +867,17 @@ liboqs 未为此目标构建。
[habit_name_label]
名称
---
[habit_description_label]
Description
---
[habit_underline_label]
下划线
---
[habit_practice_list_title]
Session Data From
会话数据来自
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
选择哪些练习会话计入此习惯。匹配的日期会显示为已完成,并可打开会话编辑器。
---
[habit_counting_title]
计数
@@ -774,6 +912,9 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_no_rounds_week]
过去一周没有轮次
---
[habit_stats_no_rounds_month]
过去一个月没有轮次
---
[habit_stats_current_streak]
当前连续记录
---
@@ -798,40 +939,12 @@ Wim Hof 屏息轮次
[habit_stats_best_streak]
最佳连续记录
---
[bottom_nav_customize_button]
自定义底部导航
[habit_stats_day_singular]
%d天
---
[bottom_nav_customize_title]
底部导航
---
[bottom_nav_add_button]
添加项目
---
[bottom_nav_slot_1]
项目 1
---
[bottom_nav_slot_2]
项目 2
---
[bottom_nav_slot_3]
项目 3
---
[bottom_nav_slot_4]
项目 4
---
[bottom_nav_slot_5]
项目 5
---
[bottom_nav_slot_6]
项目 6
---
[bottom_nav_slot_7]
项目 7
---
[bottom_nav_slot_8]
项目 8
---
[reset_button]
[habit_stats_day_plural]
%d天
---[reset_button]
重置
---
[practice_guide_dropdown]
@@ -840,9 +953,6 @@ Wim Hof 屏息轮次
[practice_guide_manual]
开始练习前请先阅读教程,了解完整的练习流程。
---
[practice_guide_sun]
准备开始练习时,请使用太阳标签。
---
[practice_guide_config]
根据你的需要调整练习配置。
---
@@ -858,6 +968,18 @@ Wim Hof 屏息轮次
[habits_guide_statistics]
在这里查看习惯统计。
---
[profile_guide_account]
在这里配置同步账户。
---
[profile_guide_data]
Manage data, habit order, and visible practices here.
---
[profile_guide_social]
从这里打开好友和排行榜。
---
[profile_guide_social_no_account]
创建同步账户以解锁好友和排行榜。
---
[nav_mode_label]
导航
---
@@ -869,13 +991,13 @@ Wim Hof 屏息轮次
---
[transition_label]
Transition
过渡
[transition_none]
None
无
[transition_fade]
Fade
淡入淡出
[theme_picker_title]
Choose Theme
选择主题
[skip_button]
Skip
---
@@ -918,9 +1040,6 @@ Save Alias
[sync_alias_saved]
Alias saved
---
[notification_session_active]
练习进行中
---
[notification_starting_seconds]
开始: %d秒
---
@@ -933,7 +1052,7 @@ Alias saved
[notification_breath_in_seconds]
吸气: %d秒
---
[notification_next_round]
下一轮
[notification_results]
Results
---
---
Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 658 B

+2 -1
View File
@@ -4,7 +4,7 @@ set -e
AVD_NAME="${1:-inbe-test}"
echo "📱 Creating AVD: $AVD_NAME (Pixel 8 Pro - Android 14)"
echo "📱 Creating AVD: $AVD_NAME (Pixel 8 Pro - Android 14, punch-hole test profile)"
# Check for Android SDK location
if [ -z "$ANDROID_SDK_ROOT" ] && [ -z "$ANDROID_HOME" ]; then
@@ -177,5 +177,6 @@ echo "✅ Done!"
echo " Device: Pixel 8 Pro"
echo " Android: 14 (API $ANDROID_API)"
echo " ABI: $ABI_DISPLAY"
echo " Cutout: punch-hole overlay enabled by scripts/emulator.sh after boot"
echo ""
echo " Run with: bash scripts/emulator.sh"
+20
View File
@@ -12,6 +12,14 @@ fi
# Set up writable SDK location
PERSISTENT_SDK_ROOT="$HOME/.android-sdk-writable"
ORIGINAL_SDK_ROOT="${ANDROID_SDK_ROOT:-$ANDROID_HOME}"
mkdir -p "$PERSISTENT_SDK_ROOT"
for component in build-tools cmake cmdline-tools emulator licenses ndk platforms platform-tools tools; do
if [ -n "$ORIGINAL_SDK_ROOT" ] && [ -e "$ORIGINAL_SDK_ROOT/$component" ] && [ ! -e "$PERSISTENT_SDK_ROOT/$component" ]; then
ln -sf "$ORIGINAL_SDK_ROOT/$component" "$PERSISTENT_SDK_ROOT/$component"
fi
done
if [ -d "$PERSISTENT_SDK_ROOT" ] && [ -d "$PERSISTENT_SDK_ROOT/avd/$AVD_NAME.avd" ]; then
export ANDROID_SDK_ROOT="$PERSISTENT_SDK_ROOT"
@@ -86,6 +94,18 @@ while ! "$ADB_CMD" -e shell getprop sys.boot_completed 2>/dev/null | grep -q "1"
done
echo "✅ Pixel 8 Pro emulator ready!"
echo "🎯 Enabling punch-hole display cutout overlay if available..."
if "$ADB_CMD" -e shell cmd overlay list 2>/dev/null | grep -q "com.android.internal.display.cutout.emulation.hole"; then
"$ADB_CMD" -e shell cmd overlay enable --user 0 com.android.internal.display.cutout.emulation.hole || true
elif "$ADB_CMD" -e shell cmd overlay list 2>/dev/null | grep -q "com.android.internal.display.cutout.emulation.corner"; then
"$ADB_CMD" -e shell cmd overlay enable --user 0 com.android.internal.display.cutout.emulation.corner || true
elif "$ADB_CMD" -e shell cmd overlay list 2>/dev/null | grep -q "com.android.internal.display.cutout.emulation.tall"; then
"$ADB_CMD" -e shell cmd overlay enable --user 0 com.android.internal.display.cutout.emulation.tall || true
else
echo " No display cutout emulation overlay found on this image"
fi
echo ""
echo "📱 Device info:"
"$ADB_CMD" -e shell getprop ro.product.model
Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 B

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+5 -3
View File
@@ -131,13 +131,15 @@
form.addEventListener("submit", async (event) => {
event.preventDefault();
const exportedKey = keyText.value.trim();
if (!exportedKey.startsWith("inbe-sync-key-v1")) {
setStatus("error", "Upload the exported inbe-sync.key file.");
if (!exportedKey.startsWith("lyra-account-key-v1") &&
!exportedKey.startsWith("inbe-sync-key-v1") &&
!exportedKey.startsWith("account-key-v1")) {
setStatus("error", "Upload the exported account key file.");
return;
}
const userID = keyField(exportedKey, "public_id").toLowerCase();
if (!/^[0-9a-f]{64}$/.test(userID)) {
setStatus("error", "This key file does not include public_id. Export a new inbe-sync.key from the current Inner Breeze app.");
setStatus("error", "This key file does not include public_id. Export a new account key from the current app.");
return;
}
button.disabled = true;
+5 -3
View File
@@ -131,13 +131,15 @@
form.addEventListener("submit", async (event) => {
event.preventDefault();
const exportedKey = keyText.value.trim();
if (!exportedKey.startsWith("inbe-sync-key-v1")) {
setStatus("error", "Upload the exported inbe-sync.key file.");
if (!exportedKey.startsWith("lyra-account-key-v1") &&
!exportedKey.startsWith("inbe-sync-key-v1") &&
!exportedKey.startsWith("account-key-v1")) {
setStatus("error", "Upload the exported account key file.");
return;
}
const userID = keyField(exportedKey, "public_id").toLowerCase();
if (!/^[0-9a-f]{64}$/.test(userID)) {
setStatus("error", "This key file does not include public_id. Export a new inbe-sync.key from the current Inner Breeze app.");
setStatus("error", "This key file does not include public_id. Export a new account key from the current app.");
return;
}
button.disabled = true;
+461 -531
View File
File diff suppressed because it is too large. Load diff
+62 -16
View File
@@ -44,10 +44,26 @@ enum {
SETTINGS_TAB_SESSION = 0,
SETTINGS_TAB_DEVICE,
SETTINGS_TAB_THEME,
SETTINGS_TAB_DATA,
SETTINGS_TAB_ABOUT,
SETTINGS_TAB_COUNT
};
enum {
PROFILE_VIEW_MAIN = 0,
PROFILE_VIEW_DATA,
PROFILE_VIEW_SYNC_ACCOUNT,
PROFILE_VIEW_HABITS,
PROFILE_VIEW_PRACTICES,
};
enum {
PROFILE_TAB_OVERVIEW = 0,
PROFILE_TAB_FRIENDS,
PROFILE_TAB_LEADERBOARD,
PROFILE_TAB_DATA,
PROFILE_TAB_COUNT
};
enum {
PRACTICE_CATEGORY_MIND = 0,
PRACTICE_CATEGORY_YOGA,
@@ -75,11 +91,13 @@ typedef enum {
UIModalConfirmDeleteSyncAccount,
UIModalHabitPracticeListInfo,
UIModalHabitCountingInfo,
UIModalBottomNavConfig,
UIModalPracticeManual,
UIModalPracticeConfig,
UIModalThemePicker,
UIModalSyncReview,
UIModalSyncAlias,
UIModalSyncPublicId,
UIModalConfirmRemoveFriend,
} UIModalType;
typedef struct {
@@ -145,14 +163,14 @@ typedef enum AppMainTab {
typedef enum AppNavRoute {
APP_NAV_ROUTE_NONE = -1,
APP_NAV_ROUTE_PRACTICE = 0,
APP_NAV_ROUTE_PROFILE = 0,
APP_NAV_ROUTE_HABITS = 1,
APP_NAV_ROUTE_SETTINGS = 2,
APP_NAV_ROUTE_COUNT = 3,
APP_NAV_ROUTE_PRACTICE = 2,
APP_NAV_ROUTE_PET = 3,
APP_NAV_ROUTE_SETTINGS = 4,
APP_NAV_ROUTE_COUNT = 5,
} AppNavRoute;
#define APP_BOTTOM_NAV_MAX_ITEMS 8
typedef struct WhmPracticeState {
Texture2D image_1;
Texture2D image_2;
@@ -163,6 +181,10 @@ typedef struct MeditationPracticeState {
int duration_seconds;
int remaining_seconds;
int frame_ticks;
int complete_waiting;
int duration_mode;
int custom_minutes;
int show_extend_controls;
int music_enabled;
int music_shuffle;
int music_track;
@@ -187,6 +209,10 @@ typedef struct SunSalutationPracticeState {
int step_ticks;
} SunSalutationPracticeState;
typedef struct PetPreviewState {
Texture2D egg;
} PetPreviewState;
typedef struct HabitSessionEditState {
int scroll;
int active;
@@ -202,8 +228,11 @@ typedef struct HabitEditState {
int is_new;
int index;
int cursor;
int description_cursor;
int focused;
int description_focused;
char text[INBE_HABIT_NAME_SIZE];
char description[INBE_HABIT_DESCRIPTION_SIZE];
Color color;
int sync_mode;
int sync_activity;
@@ -224,6 +253,7 @@ struct InbeApp {
WhmPracticeState whm;
MeditationPracticeState meditation;
SunSalutationPracticeState sun_salutation;
PetPreviewState pet;
Texture2D font_shapes_texture;
Font locale_font;
Font locale_font_8;
@@ -244,7 +274,22 @@ struct InbeApp {
int settings_dirty;
int settings_save_delay_ticks;
int settings_tab;
int settings_data_view;
int profile_view;
int profile_tab;
int profile_tab_scroll;
int profile_scroll;
int profile_leaderboard_practice;
int profile_leaderboard_metric;
int profile_leaderboard_loaded;
int profile_friend_input_cursor;
int profile_friend_input_focused;
int profile_friends_loaded;
char profile_friend_input[80];
char profile_pending_friend_remove_id[80];
char profile_pending_friend_remove_name[96];
char profile_friends_json[8192];
char profile_friend_requests_json[8192];
char profile_leaderboard_json[8192];
int sync_server_url_cursor;
int sync_server_url_focused;
char sync_server_url[256];
@@ -268,7 +313,10 @@ struct InbeApp {
int tutorial_seen;
int habits_guide_step;
int habits_guide_seen;
int profile_guide_step;
int profile_guide_seen;
int exercise_manual_seen_mask;
int practice_visible_mask;
int theme_id;
int dark_mode;
@@ -278,12 +326,6 @@ struct InbeApp {
int transition_mode;
int android_orientation;
int main_tab;
int sidebar_open;
int pending_sidebar_route;
int bottom_nav_count;
int bottom_nav_routes[APP_BOTTOM_NAV_MAX_ITEMS];
int bottom_nav_draft_count;
int bottom_nav_draft_routes[APP_BOTTOM_NAV_MAX_ITEMS];
InbeHabits habits;
int habit_detail_index;
int habit_detail_day;
@@ -327,11 +369,14 @@ void app_update_draw(void *app, Rectangle viewport);
void app_destroy(void *app);
void app_switch_screen(InbeApp *app, int screen);
void app_leave_practice_config(InbeApp *app);
int app_draw_sidebar_toggle(InbeApp *app, int x, int y);
int app_content_top_reserved(const InbeApp *app);
int app_content_bottom_reserved(const InbeApp *app);
int app_toolbar_height(void);
int app_auto_sync(InbeApp *app);
void app_request_social_refresh(InbeApp *app);
void app_request_friend_send(InbeApp *app, const char *target);
void app_request_friend_accept(InbeApp *app, const char *request_id);
void app_request_friend_decline(InbeApp *app, const char *request_id);
void app_request_friend_remove(InbeApp *app, const char *friend_user_id);
int app_should_use_tab_bar(const InbeApp *app);
void app_play_sound(InbeApp *app, Sound sound, float scale);
Texture2D app_load_asset_texture(const char *name);
@@ -353,6 +398,7 @@ void mark_exercise_manual_seen(InbeApp *app, int exercise_type);
void sync_habits_for_activity(InbeApp *app, int exercise_type);
void draw_preview_inbe(Inbe *inbe, int center_x, int center_y);
#include "app_nav.h"
#include "app_settings.h"
#endif
+249
View File
@@ -0,0 +1,249 @@
#include "app_nav.h"
#include "app.h"
#include "flint_locale.h"
#include "flint_ui.h"
#include "screens/settings/settings_screen.h"
extern int view_width;
extern int view_height;
static int android_bottom_nav_height = 0;
void
app_set_android_bottom_nav_height(int height)
{
android_bottom_nav_height = height > 0 ? height : 0;
}
int
app_android_bottom_nav_height(void)
{
return android_bottom_nav_height;
}
static void
app_open_main_tab(InbeApp *app, int main_tab, int persist)
{
if(app == NULL)
return;
if(app->practice_tab == PRACTICE_TAB_CONFIG)
app_leave_practice_config(app);
app->main_tab = clampi(main_tab, APP_MAIN_TAB_HABITS, APP_MAIN_TAB_PRACTICE);
if(app->main_tab == APP_MAIN_TAB_PRACTICE)
app->practice_tab = PRACTICE_TAB_PLAY;
app_switch_screen(app, app->main_tab == APP_MAIN_TAB_HABITS
? InbeScreenHabits
: InbeScreenStart);
if(persist)
save_settings(app);
}
void
app_apply_nav_route(InbeApp *app, int route)
{
if(app == NULL)
return;
switch(route) {
case APP_NAV_ROUTE_PROFILE:
if(app->practice_tab == PRACTICE_TAB_CONFIG)
app_leave_practice_config(app);
app->profile_view = PROFILE_VIEW_MAIN;
app->profile_scroll = 0;
app->sync_server_url_focused = 0;
settings_screen_clear_status();
app_switch_screen(app, InbeScreenProfile);
break;
case APP_NAV_ROUTE_PRACTICE:
app_open_main_tab(app, APP_MAIN_TAB_PRACTICE, 1);
break;
case APP_NAV_ROUTE_HABITS:
app_open_main_tab(app, APP_MAIN_TAB_HABITS, 1);
if(app->habits.tab == HABIT_TAB_STATISTICS || app->habits.tab == HABIT_TAB_EDIT)
app->habits.tab = app->habits.view_mode == HABIT_VIEW_WEEKLY
? HABIT_TAB_WEEKLY
: HABIT_TAB_MONTHLY;
break;
case APP_NAV_ROUTE_SETTINGS:
if(app->practice_tab == PRACTICE_TAB_CONFIG)
app_leave_practice_config(app);
reset_settings_preview(app);
app->settings_tab = SETTINGS_TAB_SESSION;
app->settings_scroll = 0;
app_switch_screen(app, InbeScreenSettings);
break;
case APP_NAV_ROUTE_PET:
if(app->practice_tab == PRACTICE_TAB_CONFIG)
app_leave_practice_config(app);
app_switch_screen(app, InbeScreenPet);
break;
default:
break;
}
}
int
app_content_bottom_reserved(const InbeApp *app)
{
if(app == NULL)
return 0;
if(app_current_nav_route(app) == APP_NAV_ROUTE_NONE)
return 0;
return ui_bottom_nav_height();
}
int
app_page_height(const InbeApp *app, int full_height)
{
int bottom_reserved;
if(full_height <= 0)
return 0;
bottom_reserved = app_fullscreen_bottom_reserved(app);
if(bottom_reserved > 0 && bottom_reserved < full_height)
return full_height - bottom_reserved;
return full_height;
}
static int
app_has_fullscreen_overlay(const InbeApp *app)
{
if(app == NULL || !app->modal.active)
return 0;
return app->modal.type == UIModalPracticeManual ||
app->modal.type == UIModalPracticeConfig ||
app->modal.type == UIModalEditProgressiveStartSpeed;
}
static const char *
app_nav_route_label(int route)
{
switch(route) {
case APP_NAV_ROUTE_PROFILE: return locale_get("tab_profile");
case APP_NAV_ROUTE_HABITS: return locale_get("tab_habits");
case APP_NAV_ROUTE_PRACTICE: return locale_get("tab_practice");
case APP_NAV_ROUTE_PET: return locale_get("tab_pet");
case APP_NAV_ROUTE_SETTINGS: return locale_get("tab_settings");
default: break;
}
return "";
}
static Texture2D
app_nav_route_icon(InbeApp *app, int route)
{
if(app == NULL)
return (Texture2D){0};
switch(route) {
case APP_NAV_ROUTE_PROFILE: return app->icons[UI_ICON_TYPE_PROFILE];
case APP_NAV_ROUTE_HABITS: return app->icons[UI_ICON_TYPE_HABIT];
case APP_NAV_ROUTE_PRACTICE: return app->icons[UI_ICON_TYPE_AMEN];
case APP_NAV_ROUTE_PET: return app->icons[UI_ICON_TYPE_PET];
case APP_NAV_ROUTE_SETTINGS: return app->icons[UI_ICON_TYPE_GEAR];
default: break;
}
return (Texture2D){0};
}
int
app_current_nav_route(const InbeApp *app)
{
if(app == NULL)
return APP_NAV_ROUTE_NONE;
switch(app->inbe.screen) {
case InbeScreenProfile:
return APP_NAV_ROUTE_PROFILE;
case InbeScreenStart:
return APP_NAV_ROUTE_PRACTICE;
case InbeScreenHabits:
return APP_NAV_ROUTE_HABITS;
case InbeScreenPet:
return APP_NAV_ROUTE_PET;
case InbeScreenSettings:
return APP_NAV_ROUTE_SETTINGS;
default:
break;
}
return APP_NAV_ROUTE_NONE;
}
static int
app_nav_route_active(const InbeApp *app, int route)
{
if(app == NULL)
return 0;
if(route == APP_NAV_ROUTE_PROFILE)
return app->inbe.screen == InbeScreenProfile;
if(route == APP_NAV_ROUTE_PRACTICE)
return app->inbe.screen == InbeScreenStart;
if(route == APP_NAV_ROUTE_HABITS)
return app->inbe.screen == InbeScreenHabits ||
app->inbe.screen == InbeScreenHabitEdit ||
app->inbe.screen == InbeScreenHabitSessionEdit;
if(route == APP_NAV_ROUTE_PET)
return app->inbe.screen == InbeScreenPet;
if(route == APP_NAV_ROUTE_SETTINGS)
return app->inbe.screen == InbeScreenSettings;
return 0;
}
static int
app_should_draw_bottom_nav(const InbeApp *app)
{
if(app == NULL)
return 0;
if(app_has_fullscreen_overlay(app))
return 0;
return app_current_nav_route(app) != APP_NAV_ROUTE_NONE;
}
int
app_fullscreen_bottom_reserved(const InbeApp *app)
{
if(app == NULL)
return 0;
return app_android_bottom_nav_height();
}
void
app_draw_bottom_nav(InbeApp *app)
{
enum { BOTTOM_NAV_ROUTE_COUNT = 5 };
const int routes[BOTTOM_NAV_ROUTE_COUNT] = {
APP_NAV_ROUTE_PROFILE,
APP_NAV_ROUTE_HABITS,
APP_NAV_ROUTE_PRACTICE,
APP_NAV_ROUTE_PET,
APP_NAV_ROUTE_SETTINGS
};
FlintUIBottomNavItem items[BOTTOM_NAV_ROUTE_COUNT];
FlintUIBottomNavResult result;
if(app_android_bottom_nav_height() > 0)
DrawRectangle(0, view_height - app_android_bottom_nav_height(),
view_width, app_android_bottom_nav_height(), BLACK);
if(!app_should_draw_bottom_nav(app))
return;
for(int i = 0; i < BOTTOM_NAV_ROUTE_COUNT; i++) {
int route = routes[i];
items[i] = (FlintUIBottomNavItem){
route,
app_nav_route_label(route),
app_nav_route_icon(app, route),
app_nav_route_active(app, route),
app->modal.active
};
}
result = ui_draw_bottom_nav((FlintUIBottomNav){
.view_width = view_width,
.view_height = view_height,
.bottom_margin = app_android_bottom_nav_height(),
.count = BOTTOM_NAV_ROUTE_COUNT,
.items = items
});
if(result.clicked_route != APP_NAV_ROUTE_NONE)
app_apply_nav_route(app, result.clicked_route);
}
+15
View File
@@ -0,0 +1,15 @@
#ifndef INBE_APP_NAV_H
#define INBE_APP_NAV_H
#include "app_fwd.h"
int app_current_nav_route(const InbeApp *app);
int app_page_height(const InbeApp *app, int full_height);
int app_content_bottom_reserved(const InbeApp *app);
int app_fullscreen_bottom_reserved(const InbeApp *app);
void app_set_android_bottom_nav_height(int height);
int app_android_bottom_nav_height(void);
void app_draw_bottom_nav(InbeApp *app);
void app_apply_nav_route(InbeApp *app, int route);
#endif
+16 -27
View File
@@ -160,7 +160,9 @@ save_settings(InbeApp *app)
{"sound_volume", app->sound_volume},
{"tutorial_seen", app->tutorial_seen ? 1 : 0},
{"habits_guide_seen", app->habits_guide_seen ? 1 : 0},
{"profile_guide_seen", app->profile_guide_seen ? 1 : 0},
{"exercise_manual_seen_mask", app->exercise_manual_seen_mask},
{"practice_visible_mask", app->practice_visible_mask},
{"theme", app->theme_id},
{"dark_mode", app->dark_mode},
{"theme_mode", app->theme_mode},
@@ -170,15 +172,6 @@ save_settings(InbeApp *app)
{"main_tab", app->main_tab},
{"fullscreen", app->fullscreen_enabled ? 1 : 0},
{"on_screen_keyboard", app->on_screen_keyboard_enabled ? 1 : 0},
{"bottom_nav_count", app->bottom_nav_count},
{"bottom_nav_slot_0", app->bottom_nav_routes[0]},
{"bottom_nav_slot_1", app->bottom_nav_routes[1]},
{"bottom_nav_slot_2", app->bottom_nav_routes[2]},
{"bottom_nav_slot_3", app->bottom_nav_routes[3]},
{"bottom_nav_slot_4", app->bottom_nav_routes[4]},
{"bottom_nav_slot_5", app->bottom_nav_routes[5]},
{"bottom_nav_slot_6", app->bottom_nav_routes[6]},
{"bottom_nav_slot_7", app->bottom_nav_routes[7]},
{"progressive_speed", app->inbe.progressive_speed},
{"progressive_start_speed", app->inbe.progressive_start_speed},
{"breath_animation", app->inbe.breath_animation},
@@ -190,6 +183,9 @@ save_settings(InbeApp *app)
{"sun_salutation_repetitions", app->sun_salutation.repetitions},
{"sun_salutation_start_seconds", app->sun_salutation.start_seconds},
{"sun_salutation_end_seconds", app->sun_salutation.end_seconds},
{"meditation_duration_mode", app->meditation.duration_mode},
{"meditation_custom_minutes", app->meditation.custom_minutes},
{"meditation_show_extend_controls", app->meditation.show_extend_controls ? 1 : 0},
{"meditation_music_enabled", app->meditation.music_enabled ? 1 : 0},
{"meditation_music_shuffle", app->meditation.music_shuffle ? 1 : 0},
{"meditation_music_track", app->meditation.music_track},
@@ -264,6 +260,7 @@ app_load_settings(InbeApp *app)
LoadedBoolSetting settings[] = {
{&app->tutorial_seen, "tutorial_seen", 0},
{&app->habits_guide_seen, "habits_guide_seen", 0},
{&app->profile_guide_seen, "profile_guide_seen", 0},
{&app->dark_mode, "dark_mode", 0},
{&app->fullscreen_enabled, "fullscreen", 0},
#if ANDROID_BUILD
@@ -275,6 +272,7 @@ app_load_settings(InbeApp *app)
{&app->advanced_session_controls, "advanced_session_controls", 0},
{&app->double_tap_to_breathe, "double_tap_to_breathe", 0},
{&app->show_session_volume_control, "show_session_volume_control", 0},
{&app->meditation.show_extend_controls, "meditation_show_extend_controls", 1},
{&app->meditation.music_enabled, "meditation_music_enabled", 1},
{&app->meditation.music_shuffle, "meditation_music_shuffle", 0},
};
@@ -292,24 +290,6 @@ app_load_settings(InbeApp *app)
APP_ORIENTATION_SYSTEM, APP_ORIENTATION_SENSOR},
{&app->main_tab, "main_tab", APP_MAIN_TAB_PRACTICE,
APP_MAIN_TAB_HABITS, APP_MAIN_TAB_PRACTICE},
{&app->bottom_nav_count, "bottom_nav_count", 3,
0, APP_BOTTOM_NAV_MAX_ITEMS},
{&app->bottom_nav_routes[0], "bottom_nav_slot_0", APP_NAV_ROUTE_HABITS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[1], "bottom_nav_slot_1", APP_NAV_ROUTE_PRACTICE,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[2], "bottom_nav_slot_2", APP_NAV_ROUTE_SETTINGS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[3], "bottom_nav_slot_3", APP_NAV_ROUTE_SETTINGS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[4], "bottom_nav_slot_4", APP_NAV_ROUTE_HABITS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[5], "bottom_nav_slot_5", APP_NAV_ROUTE_PRACTICE,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[6], "bottom_nav_slot_6", APP_NAV_ROUTE_SETTINGS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->bottom_nav_routes[7], "bottom_nav_slot_7", APP_NAV_ROUTE_SETTINGS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_SETTINGS},
{&app->inbe.progressive_start_speed, "progressive_start_speed",
DefaultProgressiveStartSpeed, SETTINGS_SPEED_MIN, SETTINGS_SPEED_MAX},
{&app->inbe.breath_animation, "breath_animation", InbeBreathAnimationLinear,
@@ -324,6 +304,10 @@ app_load_settings(InbeApp *app)
3, 12},
{&app->sun_salutation.end_seconds, "sun_salutation_end_seconds", 5,
3, 12},
{&app->meditation.duration_mode, "meditation_duration_mode", 1,
0, 5},
{&app->meditation.custom_minutes, "meditation_custom_minutes", 20,
1, 240},
{&app->meditation.music_track, "meditation_music_track", 0,
0, MEDITATION_MUSIC_TRACK_COUNT - 1},
{&app->practice_category_tab, "practice_category_tab", PRACTICE_CATEGORY_MIND,
@@ -340,6 +324,11 @@ app_load_settings(InbeApp *app)
if(manual_seen_mask < 0)
manual_seen_mask = app->tutorial_seen ? exercise_manual_bit(EXERCISE_WIM_HOF) : 0;
app->exercise_manual_seen_mask = manual_seen_mask & ((1 << EXERCISE_COUNT) - 1);
app->practice_visible_mask = storage_get_setting_int("practice_visible_mask",
(1 << EXERCISE_COUNT) - 1);
app->practice_visible_mask &= (1 << EXERCISE_COUNT) - 1;
if(app->practice_visible_mask == 0)
app->practice_visible_mask = (1 << EXERCISE_COUNT) - 1;
load_language_setting(app, settings_missing);
+2
View File
@@ -40,7 +40,9 @@ enum {
InbeScreenPracticeConfig,
InbeScreenLanguage,
InbeScreenManual,
InbeScreenProfile,
InbeScreenHabits,
InbeScreenPet,
InbeScreenHabitEdit,
InbeScreenHabitSessionEdit,
};
+3 -3
View File
@@ -2,8 +2,8 @@
#define INBE_VERSION_H
#define INBE_VERSION_MAJOR 1
#define INBE_VERSION_MINOR 6
#define INBE_VERSION_PATCH 2
#define INBE_VERSION_STRING "1.6.2"
#define INBE_VERSION_MINOR 7
#define INBE_VERSION_PATCH 4
#define INBE_VERSION_STRING "1.7.4"
#endif
+14 -39
View File
@@ -207,12 +207,6 @@ android_clamp_content_size(int size, int leading_inset, int trailing_inset)
return content_size;
}
static int
android_maxi(int a, int b)
{
return a > b ? a : b;
}
static int
android_nonnegative(int value)
{
@@ -224,34 +218,24 @@ android_resolve_viewport(int width, int height, AndroidInsets value)
{
static AndroidViewport last_logged = {-1, -1, -1, -1, -1, -1, -1, -1};
AndroidViewport viewport;
int status = android_nonnegative(value.status_bar);
int nav = android_nonnegative(value.nav_bar);
int cutout_left = android_nonnegative(value.cutout_left);
int cutout_top = android_nonnegative(value.cutout_top);
int cutout_right = android_nonnegative(value.cutout_right);
// cutout_bottom intentionally ignored - Android API is unreliable
int min_content_h = height / 2;
int nav_bar = android_nonnegative(value.nav_bar);
int content_top = android_nonnegative(value.status_bar);
int cutout_top = android_nonnegative(value.cutout_top);
if(cutout_top > content_top)
content_top = cutout_top;
viewport.left = cutout_left;
viewport.right = cutout_right;
viewport.top = android_maxi(cutout_top, status);
// Ignore cutout_bottom - Android's getDisplayCutout() API is unreliable and
// incorrectly reports bottom cutout values. Real cutouts are notches/camera
// holes at the top, not the bottom. The bottom inset should only be nav bar.
viewport.bottom = nav;
if(min_content_h < 1)
min_content_h = 1;
if(viewport.top + viewport.bottom >= height - min_content_h) {
viewport.top = cutout_top;
// Keep nav bar for bottom, don't use unreliable cutout_bottom
viewport.bottom = nav;
}
viewport.top = content_top;
viewport.bottom = 0;
viewport.x = viewport.left;
viewport.y = viewport.top;
viewport.width = android_clamp_content_size(width, viewport.left, viewport.right);
viewport.height = android_clamp_content_size(height, viewport.top, viewport.bottom);
viewport.height = height - viewport.top;
if(viewport.width <= 0) {
viewport.x = 0;
@@ -267,8 +251,9 @@ android_resolve_viewport(int width, int height, AndroidInsets value)
viewport.top != last_logged.top || viewport.bottom != last_logged.bottom ||
viewport.left != last_logged.left || viewport.right != last_logged.right) {
TraceLog(LOG_INFO,
"ANDROID_VIEWPORT: screen=%dx%d viewport=%d,%d %dx%d insets l=%d t=%d r=%d b=%d",
width, height, viewport.x, viewport.y, viewport.width, viewport.height,
"ANDROID_VIEWPORT: surface=%dx%d top=%d nav=%d viewport=%d,%d %dx%d insets l=%d t=%d r=%d b=%d",
width, height, content_top, nav_bar,
viewport.x, viewport.y, viewport.width, viewport.height,
viewport.left, viewport.top, viewport.right, viewport.bottom);
last_logged = viewport;
}
@@ -305,17 +290,7 @@ frame(void)
int width = GetScreenWidth();
int height = GetScreenHeight();
#if ANDROID_BUILD
struct android_app *android_app = GetAndroidApp();
if(android_app != NULL && android_app->window != NULL) {
int window_width = ANativeWindow_getWidth(android_app->window);
int window_height = ANativeWindow_getHeight(android_app->window);
if(window_width > 0)
width = window_width;
if(window_height > 0)
height = window_height;
}
#elif !defined(PLATFORM_WEB)
#if !ANDROID_BUILD && !defined(PLATFORM_WEB)
int render_width = GetRenderWidth();
int render_height = GetRenderHeight();
@@ -330,12 +305,12 @@ frame(void)
static AndroidViewport previous_viewport = {-1, -1, -1, -1, -1, -1, -1, -1};
android_insets_get(&insets);
// Safety check: Don't render if insets haven't been initialized yet
// This prevents rendering with incorrect positioning on app start/restart
if (!android_insets_is_initialized()) {
return; // Skip this frame, BeginDrawing() hasn't been called yet
}
app_set_android_bottom_nav_height(android_nonnegative(insets.nav_bar));
viewport = android_resolve_viewport(width, height, insets);
if(viewport.x != previous_viewport.x || viewport.y != previous_viewport.y ||
+2 -1
View File
@@ -57,7 +57,8 @@ static void nativeSetInsets(JNIEnv *env, jobject thiz,
jint status_bar, jint nav_bar,
jint cutout_left, jint cutout_top, jint cutout_right, jint cutout_bottom)
{
TraceLog(LOG_INFO, "INBE: Java insets: status=%d, nav=%d, cutout_top=%d",
TraceLog(LOG_INFO,
"INBE: Java insets: status=%d nav=%d cutout_top=%d",
status_bar, nav_bar, cutout_top);
pthread_mutex_lock(&insets_mutex);
+1 -1
View File
@@ -81,7 +81,7 @@ void android_wakelock_acquire(void) {
}
void android_wakelock_update_session_notification(const char *status_text) {
if(status_text == NULL || status_text[0] == '\0')
if(status_text == NULL)
return;
pthread_mutex_lock(&wakelock_mutex);
+136 -10
View File
@@ -7,14 +7,132 @@
#include "flint_ui.h"
#include "raylib.h"
#include <stdio.h>
extern int view_width;
extern int view_height;
static const int meditation_config_preset_count = 5;
static int
meditation_config_duration_height(int content_w)
{
int columns = content_w >= flint_px(520) ? 3 : 2;
int count = meditation_config_preset_count + 1;
int rows = (count + columns - 1) / columns;
return flint_px(30) + rows * flint_px(42) + (rows - 1) * flint_px(8) +
flint_px(96) + flint_px(78) + flint_px(18);
}
static int
meditation_config_content_height(InbeApp *app, int content_w)
{
return meditation_music_measure_settings(app, content_w, 1, 1) +
app_content_bottom_reserved(app) + flint_px(24);
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeConfig;
return meditation_config_duration_height(content_w) +
meditation_music_measure_settings(app, content_w, 1, 1) +
(integrated ? app_content_bottom_reserved(app) : 0) + flint_px(24);
}
static void
meditation_config_save(InbeApp *app)
{
if(app == NULL)
return;
app->settings_dirty = 1;
save_settings(app);
}
static void
meditation_config_draw_duration(InbeApp *app, int x, int w, int *y)
{
const char *labels[] = {
locale_get("duration_5m"),
locale_get("duration_15m"),
locale_get("duration_30m"),
locale_get("duration_1h"),
locale_get("duration_2h"),
locale_get("meditation_duration_custom")
};
int mode;
int columns;
int gap = flint_px(8);
int btn_h = flint_px(36);
int btn_w;
int row_y;
int custom_row_y;
int toggle_value;
int hover = 0;
char custom_text[64];
if(app == NULL || y == NULL)
return;
mode = clampi(app->meditation.duration_mode, 0, meditation_config_preset_count);
app->meditation.duration_mode = mode;
app->meditation.custom_minutes = clampi(app->meditation.custom_minutes, 1, 240);
flint_text_draw(locale_get("meditation_duration_setting"), x, *y,
flint_ui_font(), flint_theme_get_text());
*y += flint_px(30);
columns = w >= flint_px(520) ? 3 : 2;
btn_w = (w - gap * (columns - 1)) / columns;
for(int i = 0; i < meditation_config_preset_count + 1; i++) {
int col = i % columns;
int row = i / columns;
int bx = x + col * (btn_w + gap);
int by = *y + row * (btn_h + gap);
int style = i == mode ? UI_BUTTON_STYLE_PRIMARY : UI_BUTTON_STYLE_SECONDARY;
if(ui_draw_generic_button(bx, by, btn_w, btn_h, labels[i], style, 0, &hover)) {
app->meditation.duration_mode = i;
meditation_config_save(app);
}
}
row_y = *y + ((meditation_config_preset_count + 1 + columns - 1) / columns) *
(btn_h + gap);
*y = row_y + flint_px(8);
custom_row_y = *y;
snprintf(custom_text, sizeof(custom_text), "%s: %d min",
locale_get("meditation_custom_minutes"), app->meditation.custom_minutes);
flint_text_draw(custom_text, x, custom_row_y,
flint_ui_font(), flint_theme_get_text());
{
const char *adjust_labels[] = {"-5", "-1", "+1", "+5"};
const int adjust_values[] = {-5, -1, 1, 5};
int adjust_w = flint_px(50);
int adjust_total = adjust_w * 4 + gap * 3;
int adjust_x = x + (w - adjust_total) / 2;
int adjust_y = custom_row_y + flint_px(34);
for(int i = 0; i < 4; i++) {
if(ui_draw_generic_button(adjust_x + i * (adjust_w + gap), adjust_y,
adjust_w, btn_h, adjust_labels[i],
UI_BUTTON_STYLE_SECONDARY, 0, &hover)) {
app->meditation.custom_minutes =
clampi(app->meditation.custom_minutes + adjust_values[i], 1, 240);
app->meditation.duration_mode = meditation_config_preset_count;
meditation_config_save(app);
}
}
}
*y += flint_px(96);
flint_text_draw(locale_get("meditation_extend_controls_label"), x, *y,
flint_ui_font(), flint_theme_get_text());
toggle_value = app->meditation.show_extend_controls;
if(ui_draw_toggle_switch(x, *y + flint_px(26), flint_px(56), flint_px(30),
&toggle_value, locale_get("toggle_off"),
locale_get("toggle_on"))) {
app->meditation.show_extend_controls = toggle_value;
meditation_config_save(app);
}
*y += flint_px(78);
}
typedef struct MeditationConfigScrollPageContext {
@@ -32,26 +150,33 @@ meditation_config_scroll_page_content_height(int content_w, void *user_data)
void
meditation_config_screen_draw(InbeApp *app)
{
int integrated = app->inbe.screen == InbeScreenStart;
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeConfig;
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
int scroll_y;
int scroll_h;
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
if(!integrated) {
FlintUIHeader header = ui_draw_title_header(title_h, locale_get("practice_config_title"),
(Texture2D){0}, app->icons[UI_ICON_TYPE_X]);
if(header.right_clicked) {
if(app->settings_dirty)
save_settings(app);
meditation_practice_leave_config(app);
app->settings_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
app_switch_screen(app, InbeScreenStart);
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
app_close_modal(app);
} else {
if(app->settings_dirty)
save_settings(app);
meditation_practice_leave_config(app);
app->settings_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
app_switch_screen(app, InbeScreenStart);
}
}
}
scroll_y = title_h + flint_px(16);
scroll_h = view_height - scroll_y - app_content_bottom_reserved(app) - flint_px(8);
scroll_h = view_height - scroll_y - bottom_reserved -
(integrated ? flint_px(8) : 0);
if(scroll_h < 0)
scroll_h = 0;
@@ -68,6 +193,7 @@ meditation_config_screen_draw(InbeApp *app)
});
int y = page.content_y;
meditation_config_draw_duration(app, page.content_x, page.content_w, &y);
meditation_music_draw_settings(app, page.content_x, page.content_w,
&y, 1, 1);
ui_scroll_page_end(page);
+16 -4
View File
@@ -30,6 +30,10 @@ meditation_manual_close(InbeApp *app, int mark_seen)
return;
if(mark_seen)
mark_exercise_manual_seen(app, EXERCISE_MEDITATION);
if(app->modal.active && app->modal.type == UIModalPracticeManual) {
app_close_modal(app);
return;
}
app->tutorial_step = 0;
app->manual_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
@@ -77,10 +81,12 @@ meditation_manual_scroll_page_content_height(int content_w, void *user_data)
void
meditation_manual_draw(InbeApp *app)
{
int integrated = app->inbe.screen == InbeScreenStart;
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeManual;
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
int nav_h = MEDITATION_MANUAL_PAGES > 1 ? manual_screen_guide_nav_height() : 0;
int nav_y = view_height - app_content_bottom_reserved(app) - nav_h;
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
int nav_y = view_height - bottom_reserved - nav_h;
int content_y = title_h + flint_px(16);
int content_h = nav_y - content_y - flint_px(16);
int responsive_max_w = (int)(view_width * 0.90f);
@@ -95,8 +101,14 @@ meditation_manual_draw(InbeApp *app)
page = manual_screen_guide_update_page(app, MEDITATION_MANUAL_PAGES,
meditation_manual_start,
meditation_manual_close);
if(!integrated && ui_draw_screen_header(locale_get("meditation_manual_title"), 1))
meditation_manual_close(app, 0);
if(!integrated) {
FlintUIHeader header = ui_draw_title_header(title_h,
locale_get("meditation_manual_title"),
(Texture2D){0},
app->icons[UI_ICON_TYPE_X]);
if(header.right_clicked)
meditation_manual_close(app, 0);
}
if(content_h < flint_px(120))
content_h = flint_px(120);
@@ -25,8 +25,7 @@ meditation_practice_start(InbeApp *app)
if(app == NULL)
return;
mark_exercise_manual_seen(app, EXERCISE_MEDITATION);
app_open_modal(app, UIModalMeditationSetup);
app_switch_screen(app, InbeScreenStart);
meditation_start_configured(app);
}
void
@@ -8,6 +8,8 @@ void meditation_practice_destroy(InbeApp *app);
void meditation_practice_start(InbeApp *app);
void meditation_practice_update(InbeApp *app);
void meditation_practice_leave_config(InbeApp *app);
int meditation_configured_duration_seconds(const InbeApp *app);
void meditation_start_configured(InbeApp *app);
void meditation_manual_draw(InbeApp *app);
void meditation_manual_close(InbeApp *app, int mark_seen);
void meditation_config_screen_draw(InbeApp *app);
+120 -3
View File
@@ -16,6 +16,16 @@ extern int view_height;
static int meditation_background_remainder_ms = 0;
static const int meditation_duration_presets[] = {
5 * 60,
15 * 60,
30 * 60,
60 * 60,
2 * 60 * 60
};
static void meditation_timer_complete(InbeApp *app);
static Texture2D
meditation_sound_icon_for_volume(InbeApp *app)
{
@@ -35,9 +45,13 @@ meditation_start(InbeApp *app, int seconds)
if(app == NULL)
return;
if(seconds < 60)
seconds = 60;
app->meditation.duration_seconds = seconds;
app->meditation.remaining_seconds = seconds;
app->meditation.frame_ticks = 0;
app->meditation.complete_waiting = 0;
meditation_background_remainder_ms = 0;
app->session_paused = 0;
app->volume_popup_active = 0;
@@ -48,6 +62,28 @@ meditation_start(InbeApp *app, int seconds)
practice_background_start(app, PRACTICE_MEDITATION);
}
int
meditation_configured_duration_seconds(const InbeApp *app)
{
int mode;
if(app == NULL)
return meditation_duration_presets[1];
mode = app->meditation.duration_mode;
if(mode >= 0 && mode < (int)(sizeof(meditation_duration_presets) /
sizeof(meditation_duration_presets[0])))
return meditation_duration_presets[mode];
return clampi(app->meditation.custom_minutes, 1, 240) * 60;
}
void
meditation_start_configured(InbeApp *app)
{
meditation_start(app, meditation_configured_duration_seconds(app));
}
static void
meditation_finish(InbeApp *app)
{
@@ -65,10 +101,12 @@ meditation_finish(InbeApp *app)
app_auto_sync(app);
}
}
app_play_sound(app, app->bell_sound, 1.0f);
if(!app->meditation.complete_waiting)
app_play_sound(app, app->bell_sound, 1.0f);
app->meditation.duration_seconds = 0;
app->meditation.remaining_seconds = 0;
app->meditation.frame_ticks = 0;
app->meditation.complete_waiting = 0;
meditation_background_remainder_ms = 0;
app->session_paused = 0;
app->volume_popup_active = 0;
@@ -77,6 +115,25 @@ meditation_finish(InbeApp *app)
app_switch_screen(app, InbeScreenStart);
}
static void
meditation_timer_complete(InbeApp *app)
{
if(app == NULL)
return;
if(app->meditation.show_extend_controls) {
app->meditation.remaining_seconds = 0;
app->meditation.frame_ticks = 0;
if(!app->meditation.complete_waiting) {
app->meditation.complete_waiting = 1;
app_play_sound(app, app->bell_sound, 1.0f);
}
return;
}
meditation_finish(app);
}
void
meditation_advance_elapsed(InbeApp *app, int elapsed_ms)
{
@@ -103,7 +160,7 @@ meditation_advance_elapsed(InbeApp *app, int elapsed_ms)
app->meditation.frame_ticks = 0;
if(app->meditation.remaining_seconds <= 0)
meditation_finish(app);
meditation_timer_complete(app);
}
static int
@@ -148,6 +205,7 @@ meditation_exit_to_start(InbeApp *app)
app->meditation.duration_seconds = 0;
app->meditation.remaining_seconds = 0;
app->meditation.frame_ticks = 0;
app->meditation.complete_waiting = 0;
meditation_background_remainder_ms = 0;
app->session_paused = 0;
app->volume_popup_active = 0;
@@ -193,6 +251,18 @@ draw_meditation_duration_button(int x, int y, int w, int h, const char *label)
return ui_draw_generic_button(x, y, w, h, label, UI_BUTTON_STYLE_PRIMARY, 0, &hover);
}
static void
meditation_extend_session(InbeApp *app, int seconds)
{
if(app == NULL || seconds <= 0)
return;
app->meditation.duration_seconds += seconds;
app->meditation.remaining_seconds += seconds;
app->meditation.complete_waiting = 0;
app->meditation.frame_ticks = 0;
}
void
meditation_draw_setup_modal(InbeApp *app)
{
@@ -294,6 +364,49 @@ draw_meditation_sound_controls(InbeApp *app)
}
}
static void
draw_meditation_extend_controls(InbeApp *app, int center_x, int y)
{
static const int add_seconds[] = {60, 5 * 60, 10 * 60};
const char *labels[] = {"+1", "+5", "+10"};
int gap = flint_px(8);
int btn_h = flint_px(34);
int btn_w = flint_px(58);
int finish_w = flint_px(96);
int total_w = btn_w * 3 + gap * 2;
int x = center_x - total_w / 2;
int hover = 0;
if(app == NULL || !app->meditation.show_extend_controls)
return;
if(x < flint_px(12))
x = flint_px(12);
if(x + total_w > view_width - flint_px(12))
x = view_width - flint_px(12) - total_w;
for(int i = 0; i < 3; i++) {
if(ui_draw_generic_button(x + i * (btn_w + gap), y, btn_w, btn_h, labels[i],
UI_BUTTON_STYLE_SECONDARY, 0, &hover))
meditation_extend_session(app, add_seconds[i]);
}
if(app->meditation.complete_waiting) {
int finish_x = center_x - finish_w / 2;
int finish_y = y + btn_h + flint_px(10);
if(finish_x < flint_px(12))
finish_x = flint_px(12);
if(finish_x + finish_w > view_width - flint_px(12))
finish_x = view_width - flint_px(12) - finish_w;
if(ui_draw_generic_button(finish_x, finish_y, finish_w, btn_h,
locale_get("finish_button"), UI_BUTTON_STYLE_PRIMARY,
0, &hover))
meditation_finish(app);
}
}
void
meditation_draw_screen(InbeApp *app, int center_x, int center_y)
{
@@ -352,6 +465,10 @@ meditation_draw_screen(InbeApp *app, int center_x, int center_y)
flint_ui_text_y(time_text, center_y - font, font * 2, font),
font, flint_theme_get_text());
draw_meditation_extend_controls(app, center_x, center_y + flint_px(42));
if(app->meditation.complete_waiting)
return;
if((
#if defined(PLATFORM_WEB)
!app->backgrounded
@@ -365,7 +482,7 @@ meditation_draw_screen(InbeApp *app, int center_x, int center_y)
if(app->meditation.remaining_seconds > 0)
app->meditation.remaining_seconds--;
if(app->meditation.remaining_seconds <= 0)
meditation_finish(app);
meditation_timer_complete(app);
}
}
}
@@ -10,6 +10,7 @@
#include <stdio.h>
extern int view_width;
extern int view_height;
static const int g_sun_salutation_pose_sequence[SUN_SALUTATION_STEP_COUNT] = {
0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 1, 0
@@ -208,6 +209,7 @@ sun_salutation_config_screen_draw(InbeApp *app)
int content_x;
int content_w;
int y;
int title_h = app_content_top_reserved(app);
int repetitions;
int start_seconds;
int end_seconds;
@@ -215,9 +217,20 @@ sun_salutation_config_screen_draw(InbeApp *app)
if(app == NULL)
return;
sun_salutation_normalize_settings(app);
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
FlintUIHeader header = ui_draw_title_header(ui_screen_header_height(),
locale_get("practice_config_title"),
(Texture2D){0},
app->icons[UI_ICON_TYPE_X]);
title_h = ui_screen_header_height();
if(header.right_clicked) {
app_close_modal(app);
return;
}
}
flint_centered_column(CONTENT_MAX_W, CONTENT_SIDE_PAD, &content_x, &content_w);
y = app_content_top_reserved(app) + flint_px(20);
y = title_h + flint_px(20);
draw_sun_salutation_preview(app, content_x, y, content_w);
y += sun_salutation_preview_height(content_w) + flint_px(16);
+18 -8
View File
@@ -295,7 +295,10 @@ whm_config_draw_session_tab(InbeApp *app, int content_x, int content_w, int y)
static int
whm_config_content_height(InbeApp *app, int content_w)
{
int bottom_padding = app_content_bottom_reserved(app) + flint_px(24);
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeConfig;
int bottom_padding = (integrated ? app_content_bottom_reserved(app) : 0) +
flint_px(24);
if(app->practice_config_tab == 0) {
int span = content_w < flint_px(240) ? content_w : flint_px(240);
@@ -337,12 +340,14 @@ whm_config_scroll_page_content_height(int content_w, void *user_data)
void
whm_config_screen_draw(InbeApp *app)
{
int integrated = app->inbe.screen == InbeScreenStart;
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeConfig;
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
int config_tab_h = flint_px(40);
int config_tab_gap = flint_px(14);
int scroll_y;
int scroll_h;
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
int draw_breath_animation_menu = 0;
int clicked_config_tab = -1;
const char *config_tabs[] = {
@@ -359,11 +364,15 @@ whm_config_screen_draw(InbeApp *app)
FlintUIHeader header = ui_draw_title_header(title_h, locale_get("practice_config_title"),
(Texture2D){0}, app->icons[UI_ICON_TYPE_X]);
if(header.right_clicked) {
if(app->settings_dirty)
save_settings(app);
app->settings_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
app_switch_screen(app, InbeScreenStart);
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
app_close_modal(app);
} else {
if(app->settings_dirty)
save_settings(app);
app->settings_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
app_switch_screen(app, InbeScreenStart);
}
}
}
@@ -374,7 +383,8 @@ whm_config_screen_draw(InbeApp *app)
app->settings_scroll = 0;
}
scroll_y = title_h + config_tab_h + config_tab_gap;
scroll_h = view_height - scroll_y - app_content_bottom_reserved(app) - flint_px(8);
scroll_h = view_height - scroll_y - bottom_reserved -
(integrated ? flint_px(8) : 0);
if(scroll_h < 0)
scroll_h = 0;
+15 -4
View File
@@ -151,6 +151,10 @@ whm_manual_close(InbeApp *app, int mark_seen)
{
if(mark_seen)
mark_exercise_manual_seen(app, EXERCISE_WIM_HOF);
if(app != NULL && app->modal.active && app->modal.type == UIModalPracticeManual) {
app_close_modal(app);
return;
}
app->tutorial_step = 0;
app->manual_scroll = 0;
app->practice_tab = PRACTICE_TAB_PLAY;
@@ -169,10 +173,12 @@ manual_screen_start_exercise(InbeApp *app)
void
whm_manual_draw(InbeApp *app)
{
int integrated = app->inbe.screen == InbeScreenStart;
int integrated = app->inbe.screen == InbeScreenStart &&
app->modal.type != UIModalPracticeManual;
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
int nav_h = manual_screen_guide_nav_height();
int nav_y = view_height - app_content_bottom_reserved(app) - nav_h;
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
int nav_y = view_height - bottom_reserved - nav_h;
int content_y = title_h;
int viewport_h = nav_y - content_y;
int body_font = flint_ui_font();
@@ -193,8 +199,13 @@ whm_manual_draw(InbeApp *app)
default: break;
}
if(!integrated && ui_draw_screen_header(title, 1))
whm_manual_close(app, 0);
if(!integrated) {
FlintUIHeader header = ui_draw_title_header(title_h, title,
(Texture2D){0},
app->icons[UI_ICON_TYPE_X]);
if(header.right_clicked)
whm_manual_close(app, 0);
}
{
int top_padding = flint_px(16);
+12 -4
View File
@@ -165,7 +165,14 @@ session_update_notification(InbeApp *app)
char text[96] = "";
int count;
if(app == NULL || app->inbe.screen != InbeScreenSession)
if(app == NULL)
return;
if(app->inbe.screen == InbeScreenResults) {
locale_format(text, sizeof(text), "notification_results");
goto update;
}
if(app->inbe.screen != InbeScreenSession)
return;
count = int_from_count(app->inbe.count);
@@ -186,13 +193,11 @@ session_update_notification(InbeApp *app)
: 0);
break;
case InbePhaseNext:
locale_format(text, sizeof(text), "notification_next_round");
break;
default:
locale_format(text, sizeof(text), "notification_session_active");
break;
}
update:
if(strcmp(text, whm_last_notification_text) == 0)
return;
@@ -423,6 +428,9 @@ finish_round(InbeApp *app)
stop_android_background_session(app);
#endif
app_switch_screen(app, InbeScreenResults);
#if ANDROID_BUILD
session_update_notification(app);
#endif
} else {
app_init(app);
}
+76 -26
View File
@@ -6,19 +6,23 @@ habit_edit_begin_new(InbeApp *app)
{
const char *default_name;
Color default_color = {99, 196, 165, 255};
int created;
if(app == NULL)
return;
default_name = locale_get("habit_new_default_name");
created = habits_add_custom(&app->habits, default_name, default_color,
INBE_HABIT_SYNC_NONE, 0);
if(created < 0)
return;
app_auto_sync(app);
habit_edit_begin(app, created);
app->habit_edit = (HabitEditState){
.active = 1,
.is_new = 1,
.index = -1,
.color = default_color,
.sync_mode = INBE_HABIT_SYNC_NONE
};
snprintf(app->habit_edit.text, sizeof(app->habit_edit.text), "%s", default_name);
app->habit_edit.cursor = (int)strlen(app->habit_edit.text);
app->habit_edit.focused = 1;
app->habits.tab = HABIT_TAB_EDIT;
app_switch_screen(app, InbeScreenHabits);
}
void
@@ -37,7 +41,10 @@ habit_edit_begin(InbeApp *app, int index)
};
snprintf(app->habit_edit.text, sizeof(app->habit_edit.text), "%s",
app->habits.items[index].name);
snprintf(app->habit_edit.description, sizeof(app->habit_edit.description), "%s",
app->habits.items[index].description);
app->habit_edit.cursor = (int)strlen(app->habit_edit.text);
app->habit_edit.description_cursor = (int)strlen(app->habit_edit.description);
app->habits.tab = HABIT_TAB_EDIT;
app_switch_screen(app, InbeScreenHabits);
}
@@ -85,6 +92,7 @@ habit_edit_info_modal(const char *title, const char *message)
FlintUIScrollArea scroll_area;
int y;
int modal_h;
int modal_w;
int paragraph_h;
int button_w = flint_px(112);
int button_h = flint_px(36);
@@ -93,19 +101,31 @@ habit_edit_info_modal(const char *title, const char *message)
int hover = 0;
int result = 0;
modal_w = view_width - flint_px(36);
if(modal_w > flint_px(420))
modal_w = flint_px(420);
if(modal_w < flint_px(320))
modal_w = flint_px(320);
if(modal_w > view_width - flint_px(24))
modal_w = view_width - flint_px(24);
if(modal_w < flint_px(240))
modal_w = flint_px(240);
paragraph = (FlintUIParagraph){
.text = message,
.width = flint_px(320) - flint_px(36)
.width = modal_w - flint_px(36),
.font = flint_ui_font(),
.line_gap = flint_px(4)
};
modal_h = ui_paragraph_modal_height((FlintUIParagraphModalMeasure){
.message = message,
.width = flint_px(320),
.width = modal_w,
.button_h = button_h,
.extra_lines = 2,
.min_height = flint_px(196)
});
frame = ui_draw_modal_frame(flint_px(320), modal_h, title,
frame = ui_draw_modal_frame(modal_w, modal_h, title,
(Texture2D){0}, (Texture2D){0});
paragraph.width = frame.content_w;
paragraph_h = flint_ui_paragraph_height(paragraph);
@@ -170,6 +190,9 @@ habit_edit_commit(InbeApp *app)
app->habit_edit.sync_activity);
if(created >= 0 && created < app->habits.count) {
app->habits.items[created].counter_enabled = app->habit_edit.counter_enabled != 0;
snprintf(app->habits.items[created].description,
sizeof(app->habits.items[created].description), "%s",
app->habit_edit.description);
habits_save(&app->habits);
}
} else {
@@ -182,6 +205,9 @@ habit_edit_commit(InbeApp *app)
}
snprintf(app->habits.items[index].name,
sizeof(app->habits.items[index].name), "%s", text);
snprintf(app->habits.items[index].description,
sizeof(app->habits.items[index].description), "%s",
app->habit_edit.description);
app->habits.items[index].color = app->habit_edit.color;
app->habits.items[index].color.a = 255;
app->habits.items[index].sync_mode = app->habit_edit.sync_mode;
@@ -200,18 +226,18 @@ habit_edit_commit(InbeApp *app)
}
static void
habit_edit_clamp_cursor(InbeApp *app)
habit_edit_clamp_cursor(char *text, int *cursor)
{
int len;
if(app == NULL)
if(text == NULL || cursor == NULL)
return;
len = (int)strlen(app->habit_edit.text);
if(app->habit_edit.cursor < 0)
app->habit_edit.cursor = 0;
if(app->habit_edit.cursor > len)
app->habit_edit.cursor = len;
len = (int)strlen(text);
if(*cursor < 0)
*cursor = 0;
if(*cursor > len)
*cursor = len;
}
static void
@@ -226,7 +252,8 @@ habit_edit_handle_keyboard(InbeApp *app)
}
static FlintUITextField
habit_edit_text_field(InbeApp *app, int font)
habit_edit_text_field(char *text, size_t text_size, int *cursor, int *focused,
int max_codepoints, int font)
{
FlintUITextInputStyle style = {
.background = flint_darken(flint_theme_get_bg(), 4),
@@ -240,11 +267,11 @@ habit_edit_text_field(InbeApp *app, int font)
return (FlintUITextField){
.bounds = {0},
.text = app->habit_edit.text,
.text_size = sizeof(app->habit_edit.text),
.cursor_position = &app->habit_edit.cursor,
.focused = &app->habit_edit.focused,
.max_codepoints = INBE_HABIT_NAME_SIZE - 1,
.text = text,
.text_size = text_size,
.cursor_position = cursor,
.focused = focused,
.max_codepoints = max_codepoints,
.font = font,
.style = style
};
@@ -289,6 +316,10 @@ habit_edit_scroll_content_height(int content_w, void *user_data)
.label = locale_get("habit_name_label"),
.field_h = flint_px(40)
});
height += ui_label_text_field_height((FlintUILabelTextField){
.label = locale_get("habit_description_label"),
.field_h = flint_px(40)
});
height += flint_px(32) + flint_px(34);
height += ui_section_label_height((FlintUISectionLabel){0});
for(int i = 0; i < EXERCISE_COUNT; i++)
@@ -425,12 +456,31 @@ draw_habit_edit_screen(InbeApp *app)
}
(void)ui_draw_label_text_field((FlintUILabelTextField){
.label = locale_get("habit_name_label"),
.field = habit_edit_text_field(app, font),
.field = habit_edit_text_field(app->habit_edit.text,
sizeof(app->habit_edit.text),
&app->habit_edit.cursor,
&app->habit_edit.focused,
INBE_HABIT_NAME_SIZE - 1, font),
.field_h = field_h,
.label_font = label_font,
.label_color = flint_darken(flint_theme_get_text(), 34)
}, content_x, y, content_w);
habit_edit_clamp_cursor(app);
habit_edit_clamp_cursor(app->habit_edit.text, &app->habit_edit.cursor);
y += ui_label_text_field_height((FlintUILabelTextField){.field_h = field_h});
(void)ui_draw_label_text_field((FlintUILabelTextField){
.label = locale_get("habit_description_label"),
.field = habit_edit_text_field(app->habit_edit.description,
sizeof(app->habit_edit.description),
&app->habit_edit.description_cursor,
&app->habit_edit.description_focused,
INBE_HABIT_DESCRIPTION_SIZE - 1, font),
.field_h = field_h,
.label_font = label_font,
.label_color = flint_darken(flint_theme_get_text(), 34)
}, content_x, y, content_w);
habit_edit_clamp_cursor(app->habit_edit.description,
&app->habit_edit.description_cursor);
y += ui_label_text_field_height((FlintUILabelTextField){.field_h = field_h});
flint_text_draw(locale_get("habit_underline_label"), content_x, y,
+4 -2
View File
@@ -239,7 +239,8 @@ draw_habit_session_edit_content(InbeApp *app, HabitLinkedContext *ctx, int conte
if(ctx->count <= 0) {
if(draw)
flint_text_draw("No sessions", content_x, y, flint_ui_font(), flint_theme_get_text());
flint_text_draw(locale_get("no_sessions"), content_x, y,
flint_ui_font(), flint_theme_get_text());
return y + row_h;
}
@@ -277,7 +278,8 @@ draw_habit_session_edit_content(InbeApp *app, HabitLinkedContext *ctx, int conte
snprintf(time_text, sizeof(time_text), "%02d:%02d",
ctx->entries[i].hour, ctx->entries[i].minute);
if(activity == EXERCISE_SUN_SALUTATION)
snprintf(summary_text, sizeof(summary_text), "1 session");
locale_format(summary_text, sizeof(summary_text),
"session_count_singular", 1);
else if(activity == EXERCISE_MEDITATION)
habit_format_duration(ctx->entries[i].total_seconds,
summary_text, sizeof(summary_text));
+104 -17
View File
@@ -328,6 +328,40 @@ habits_delete(InbeHabits *habits, int index)
habits_save(habits);
}
int
habits_move(InbeHabits *habits, int from_index, int to_index)
{
InbeHabit moved;
if(habits == NULL || from_index < 0 || to_index < 0 ||
from_index >= habits->count || to_index >= habits->count ||
from_index == to_index)
return 0;
moved = habits->items[from_index];
if(from_index < to_index) {
for(int i = from_index; i < to_index; i++)
habits->items[i] = habits->items[i + 1];
} else {
for(int i = from_index; i > to_index; i--)
habits->items[i] = habits->items[i - 1];
}
habits->items[to_index] = moved;
if(habits->selected == from_index) {
habits->selected = to_index;
} else if(from_index < to_index &&
habits->selected > from_index && habits->selected <= to_index) {
habits->selected--;
} else if(from_index > to_index &&
habits->selected >= to_index && habits->selected < from_index) {
habits->selected++;
}
habits_save(habits);
return 1;
}
int
habits_name_exists(const InbeHabits *habits, const char *name, int exclude_index)
{
@@ -424,8 +458,12 @@ habits_init(InbeHabits *habits)
{
if(habits == NULL)
return;
if(habits->hold_stats_range_days != 31)
habits->hold_stats_range_days = 7;
data_init();
if(storage_habits_load(habits)) {
if(habits->hold_stats_range_days != 31)
habits->hold_stats_range_days = 7;
if(habits->count <= 0) {
habits_add_default_set(habits);
return;
@@ -443,6 +481,8 @@ habits_init(InbeHabits *habits)
return;
}
habits_add_default_set(habits);
if(habits->hold_stats_range_days != 31)
habits->hold_stats_range_days = 7;
}
void
@@ -802,6 +842,7 @@ habits_screen_draw_desktop_tab_bar(InbeApp *app, int y)
{
FlintUITab tabs[INBE_HABIT_MAX + 1];
int tab_count = 0;
int selected_index;
if(app == NULL)
return -1;
@@ -825,11 +866,14 @@ habits_screen_draw_desktop_tab_bar(InbeApp *app, int y)
.disabled = app->modal.active
};
selected_index = app->habit_edit.active && app->habit_edit.is_new
? -1
: app->habits.selected;
int clicked = ui_draw_tab_bar((FlintUITabBar){
.bounds = {0, (float)y, (float)view_width, (float)ui_tab_bar_height()},
.tabs = tabs,
.count = tab_count,
.selected_index = app->habits.selected,
.selected_index = selected_index,
.min_tab_width = flint_px(100),
.max_tab_width = flint_px(160),
.scroll_offset = &app->habits.tab_scroll,
@@ -855,10 +899,13 @@ habits_screen_top_reserved(InbeApp *app)
static void
draw_habits_top_bar(InbeApp *app, int draw_menu)
{
static const char *options[INBE_HABIT_MAX + 1];
static const char *options[INBE_HABIT_MAX + 2];
static int dropdown_selected = 0;
FlintUISubtab tabs[HABIT_TAB_COUNT];
int option_count;
int habit_offset = 0;
int add_option_index;
int draft_new;
int selected;
int top_h = flint_px(58);
int tab_h = flint_px(40);
@@ -869,15 +916,19 @@ draw_habits_top_bar(InbeApp *app, int draw_menu)
if(app == NULL)
return;
option_count = app->habits.count;
if(option_count > INBE_HABIT_MAX)
option_count = INBE_HABIT_MAX;
for(int i = 0; i < option_count; i++)
options[i] = app->habits.items[i].name;
options[option_count++] = locale_get("habit_add_new_option");
draft_new = app->habit_edit.active && app->habit_edit.is_new;
option_count = 0;
if(draft_new) {
options[option_count++] = "";
habit_offset = 1;
}
for(int i = 0; i < app->habits.count && i < INBE_HABIT_MAX; i++)
options[option_count++] = app->habits.items[i].name;
add_option_index = option_count;
options[option_count++] = "+ Habit";
selected = app->habits.selected;
if(selected < 0 || selected >= app->habits.count)
selected = draft_new ? 0 : app->habits.selected + habit_offset;
if(!draft_new && (app->habits.selected < 0 || app->habits.selected >= app->habits.count))
selected = 0;
if(!draw_menu) {
@@ -988,15 +1039,20 @@ draw_habits_top_bar(InbeApp *app, int draw_menu)
.selected_index = &dropdown_selected
});
if(toolbar_result.selected_menu_item >= 0) {
if(dropdown_selected == app->habits.count) {
int selected_habit = dropdown_selected - habit_offset;
if(draft_new && dropdown_selected == 0)
return;
if(dropdown_selected == add_option_index) {
habit_edit_begin_new(app);
return;
}
if(app->habits.selected != dropdown_selected) {
if(selected_habit >= 0 && selected_habit < app->habits.count &&
app->habits.selected != selected_habit) {
int was_edit_tab = app->habits.tab == HABIT_TAB_EDIT;
if(was_edit_tab && app->habit_edit.active)
habit_edit_commit(app);
app->habits.selected = dropdown_selected;
app->habits.selected = selected_habit;
app->habits.scroll = 0;
app->habits.weekly_days = HABIT_WEEKLY_INITIAL_DAYS;
if(was_edit_tab) {
@@ -1039,7 +1095,8 @@ habits_screen_prepare_first_run_guide(InbeApp *app)
app->habits.tab = HABIT_TAB_EDIT;
app->habits.scroll = 0;
if(app->habits.count > 0) {
if(!app->habit_edit.active || app->habit_edit.index != app->habits.selected)
if(!app->habit_edit.active ||
(!app->habit_edit.is_new && app->habit_edit.index != app->habits.selected))
habit_edit_begin(app, app->habits.selected);
} else if(!app->habit_edit.active) {
habit_edit_begin_new(app);
@@ -1131,6 +1188,7 @@ habits_screen_practice_list_anchor(InbeApp *app)
flint_centered_column(flint_px(CONTENT_MAX_W), flint_page_side_padding(),
&content_x, &content_w);
y += ui_label_text_field_height((FlintUILabelTextField){.field_h = field_h});
y += ui_label_text_field_height((FlintUILabelTextField){.field_h = field_h});
y += flint_px(32);
y += flint_px(34);
@@ -1246,11 +1304,36 @@ habit_weekly_draw_text_line(const char *text, int x, int y, int w, int h,
int text_size, Color color)
{
int font_size;
const char *draw_text = text;
char fitted[128];
if(text == NULL || text[0] == '\0' || w <= 0 || h <= 0)
return;
font_size = text_size;
flint_text_draw(text, x, flint_text_y(text, y, h, font_size), font_size, color);
while(font_size > FLINT_TEXT_8 && flint_text_measure(text, font_size) > w)
font_size -= flint_px(1);
if(flint_text_measure(text, font_size) > w) {
snprintf(fitted, sizeof(fitted), "%s", text);
while(fitted[0] != '\0' && flint_text_measure(fitted, font_size) > w) {
size_t len = strlen(fitted);
size_t cut = len;
if(len <= 3)
break;
if(len > 3 && strcmp(fitted + len - 3, "...") == 0)
len -= 3;
cut = len;
do {
cut--;
} while(cut > 0 && (((unsigned char)fitted[cut] & 0xC0) == 0x80));
fitted[cut] = '\0';
if(cut + 3 < sizeof(fitted))
strncat(fitted, "...", sizeof(fitted) - strlen(fitted) - 1);
}
draw_text = fitted;
}
flint_text_draw(draw_text, x + (w - flint_text_measure(draw_text, font_size)) / 2,
flint_text_y(draw_text, y, h, font_size), font_size, color);
}
static int
@@ -1290,7 +1373,10 @@ habit_weekly_summary(const HabitLinkedContext *ctx, int day_index,
mixed ? "Mixed practice" : practice_activity_label(first_activity));
}
if(secondary != NULL && secondary_size > 0)
snprintf(secondary, secondary_size, "%d session%s", count, count == 1 ? "" : "s");
locale_format(secondary, secondary_size,
count == 1 ? "session_count_singular"
: "session_count_plural",
count);
return count;
}
@@ -1674,7 +1760,8 @@ draw_habits_screen(InbeApp *app)
}
if(app->habits.tab == HABIT_TAB_EDIT) {
if(!app->habit_edit.active || app->habit_edit.index != app->habits.selected)
if(!app->habit_edit.active ||
(!app->habit_edit.is_new && app->habit_edit.index != app->habits.selected))
habit_edit_begin(app, app->habits.selected);
draw_habit_edit_screen(app);
draw_habits_top_bar(app, 0);
+4
View File
@@ -17,6 +17,7 @@ enum {
INBE_HABIT_MAX = 10,
INBE_HABIT_ID_SIZE = 32,
INBE_HABIT_NAME_SIZE = 40,
INBE_HABIT_DESCRIPTION_SIZE = 256,
HABIT_LINKED_ENTRY_MAX = 128,
HABIT_LINKED_PATH_SIZE = 80
};
@@ -50,6 +51,7 @@ typedef struct InbeHabitDay {
typedef struct InbeHabit {
char id[INBE_HABIT_ID_SIZE];
char name[INBE_HABIT_NAME_SIZE];
char description[INBE_HABIT_DESCRIPTION_SIZE];
Color color;
int sync_mode;
int sync_activity;
@@ -73,6 +75,7 @@ typedef struct InbeHabits {
int view_mode;
int tab;
int weekly_days;
int hold_stats_range_days;
int loaded;
int dirty;
} InbeHabits;
@@ -122,6 +125,7 @@ void habit_toggle_today(InbeHabits *habits, int index);
void habits_add_default(InbeHabits *habits);
void habits_add_default_set(InbeHabits *habits);
void habits_delete(InbeHabits *habits, int index);
int habits_move(InbeHabits *habits, int from_index, int to_index);
int habits_name_exists(const InbeHabits *habits, const char *name, int exclude_index);
void habits_generate_unique_name(InbeHabits *habits, char *name_buffer, size_t buffer_size, const char *base_name);
int habits_add_custom(InbeHabits *habits, const char *name, Color color,
+93
View File
@@ -0,0 +1,93 @@
#include "pet_screen.h"
#include "app.h"
#include "flint_color.h"
#include "flint_scaling.h"
#include "flint_text.h"
#include "flint_theme.h"
#include "flint_ui.h"
#include "raylib.h"
#include <math.h>
extern int view_height;
extern int view_width;
static void
pet_screen_ensure_assets(InbeApp *app)
{
if(app != NULL && app->pet.egg.id == 0)
app->pet.egg = app_load_asset_texture("pet/egg1.png");
}
void
pet_screen_draw(InbeApp *app)
{
const char *text = "Gamification in progress...";
const char *subtext = "Preview only. This tab is not implemented yet.";
FlintUIParagraph paragraph;
int reserved_bottom;
int content_h;
int center_x = view_width / 2;
int center_y;
int egg_size;
int text_w;
int text_x;
int text_y;
float t;
float scale;
Color muted = flint_darken(flint_theme_get_text(), 34);
if(app == NULL)
return;
reserved_bottom = app_content_bottom_reserved(app);
content_h = view_height - reserved_bottom;
if(content_h < flint_px(120))
content_h = flint_px(120);
center_y = content_h / 2 - flint_px(18);
pet_screen_ensure_assets(app);
egg_size = view_width < view_height ? view_width : view_height;
egg_size = egg_size * 42 / 100;
if(egg_size < flint_px(120))
egg_size = flint_px(120);
if(egg_size > flint_px(240))
egg_size = flint_px(240);
t = (float)app->inbe.frame / 60.0f;
scale = 1.0f + 0.035f * sinf(t * 2.0f);
if(app->pet.egg.id != 0) {
Rectangle src = {0, 0, (float)app->pet.egg.width, (float)app->pet.egg.height};
Rectangle dst = {(float)center_x, (float)center_y,
(float)egg_size * scale, (float)egg_size * scale};
Vector2 origin = {dst.width / 2.0f, dst.height / 2.0f};
DrawTexturePro(app->pet.egg, src, dst, origin, 0.0f, WHITE);
}
text_w = view_width - flint_px(48);
if(text_w > flint_px(360))
text_w = flint_px(360);
if(text_w < flint_px(160))
text_w = flint_px(160);
text_x = center_x - text_w / 2;
text_y = center_y + egg_size / 2 + flint_px(28);
paragraph = (FlintUIParagraph){
.text = text,
.width = text_w,
.font = FLINT_TEXT_16,
.line_gap = flint_px(3),
.color = flint_theme_get_text()
};
flint_ui_paragraph_draw(paragraph, text_x, &text_y);
text_y += flint_px(6);
paragraph = (FlintUIParagraph){
.text = subtext,
.width = text_w,
.font = FLINT_TEXT_12,
.line_gap = flint_px(3),
.color = muted
};
flint_ui_paragraph_draw(paragraph, text_x, &text_y);
}
+8
View File
@@ -0,0 +1,8 @@
#ifndef INBE_PET_SCREEN_H
#define INBE_PET_SCREEN_H
#include "app_fwd.h"
void pet_screen_draw(InbeApp *app);
#endif
+178 -108
View File
@@ -1,16 +1,69 @@
#include "practice_screen.h"
#include "app.h"
#include "screens/manual_screen.h"
#include "practices/practice_registry.h"
#include "flint_locale.h"
#include "flint_theme.h"
#include "flint_ui.h"
extern int view_width;
extern int view_height;
enum {
PRACTICE_GUIDE_STEPS = 4
PRACTICE_GUIDE_STEPS = 3
};
int
practice_visible_mask_all(void)
{
return (1 << EXERCISE_COUNT) - 1;
}
static int
practice_sanitize_visible_mask(int mask)
{
mask &= practice_visible_mask_all();
return mask != 0 ? mask : practice_visible_mask_all();
}
int
practice_is_visible(const InbeApp *app, int exercise)
{
int mask;
if(exercise < 0 || exercise >= EXERCISE_COUNT)
return 0;
mask = practice_sanitize_visible_mask(app != NULL ? app->practice_visible_mask : 0);
return (mask & (1 << exercise)) != 0;
}
static int
practice_first_visible(const InbeApp *app)
{
for(int i = 0; i < EXERCISE_COUNT; i++) {
if(practice_is_visible(app, i))
return i;
}
return EXERCISE_WIM_HOF;
}
void
practice_set_visible(InbeApp *app, int exercise, int visible)
{
int mask;
if(app == NULL || exercise < 0 || exercise >= EXERCISE_COUNT)
return;
mask = practice_sanitize_visible_mask(app->practice_visible_mask);
if(visible)
mask |= 1 << exercise;
else if((mask & ~(1 << exercise)) != 0)
mask &= ~(1 << exercise);
app->practice_visible_mask = practice_sanitize_visible_mask(mask);
practice_clamp_activity_to_tab(app);
save_settings(app);
}
int
practice_activity_count_for_tab(int tab)
{
@@ -29,17 +82,6 @@ practice_activity_for_tab(int tab, int index)
return index;
}
static int
practice_screen_play_only(InbeApp *app)
{
const PracticeDefinition *practice;
if(app == NULL)
return 0;
practice = practice_get(app->exercise_type);
return practice->draw_manual == NULL && practice->draw_config == NULL;
}
const char *
practice_activity_label(int exercise)
{
@@ -52,70 +94,10 @@ practice_clamp_activity_to_tab(InbeApp *app)
{
if(app == NULL)
return;
app->practice_visible_mask = practice_sanitize_visible_mask(app->practice_visible_mask);
app->exercise_type = practice_clamp_id(app->exercise_type);
}
static int
practice_screen_draw_tab_bar(InbeApp *app, int y)
{
FlintUISubtab tabs[PRACTICE_TAB_COUNT];
int tab_values[PRACTICE_TAB_COUNT];
const PracticeDefinition *practice;
int tab_h = flint_px(PRACTICE_CATEGORY_TAB_H);
int tab_count = 0;
int selected_index = 0;
int clicked;
if(app == NULL)
return -1;
practice = practice_get(app->exercise_type);
if(practice_screen_play_only(app)) {
app->practice_tab = PRACTICE_TAB_PLAY;
return -1;
}
if(practice->draw_manual != NULL) {
tabs[tab_count] = (FlintUISubtab){
.icon = app->icons[UI_ICON_TYPE_MANUAL],
.icon_size = flint_px(20),
.disabled = app->modal.active
};
tab_values[tab_count++] = PRACTICE_TAB_MANUAL;
}
tabs[tab_count] = (FlintUISubtab){
.icon = app->icons[UI_ICON_TYPE_SUN],
.icon_size = flint_px(20),
.disabled = app->modal.active
};
tab_values[tab_count++] = PRACTICE_TAB_PLAY;
if(practice->draw_config != NULL) {
tabs[tab_count] = (FlintUISubtab){
.icon = app->icons[UI_ICON_TYPE_WRENCH],
.icon_size = flint_px(20),
.disabled = app->modal.active
};
tab_values[tab_count++] = PRACTICE_TAB_CONFIG;
}
if(app->practice_tab < 0 || app->practice_tab >= PRACTICE_TAB_COUNT)
app->practice_tab = PRACTICE_TAB_PLAY;
for(int i = 0; i < tab_count; i++) {
if(tab_values[i] == app->practice_tab) {
selected_index = i;
break;
}
}
if(tab_values[selected_index] != app->practice_tab)
app->practice_tab = PRACTICE_TAB_PLAY;
clicked = ui_draw_subtab_bar((FlintUISubtabBar){
.bounds = {0, (float)y, (float)view_width, (float)tab_h},
.tabs = tabs,
.count = tab_count,
.selected_index = selected_index
});
return clicked >= 0 && clicked < tab_count ? tab_values[clicked] : -1;
if(!practice_is_visible(app, app->exercise_type))
app->exercise_type = practice_first_visible(app);
}
void
@@ -128,6 +110,9 @@ practice_screen_open_tab(InbeApp *app, int tab)
if(app->practice_tab == PRACTICE_TAB_CONFIG)
app_leave_practice_config(app);
app->practice_tab = PRACTICE_TAB_PLAY;
if(app->modal.type == UIModalPracticeManual ||
app->modal.type == UIModalPracticeConfig)
app_close_modal(app);
app_switch_screen(app, InbeScreenStart);
} else if(tab == PRACTICE_TAB_MANUAL) {
if(practice_get(app->exercise_type)->draw_manual == NULL)
@@ -137,6 +122,7 @@ practice_screen_open_tab(InbeApp *app, int tab)
app->practice_tab = PRACTICE_TAB_MANUAL;
app->tutorial_step = 0;
app->manual_scroll = 0;
app_open_modal(app, UIModalPracticeManual);
app_switch_screen(app, InbeScreenStart);
} else if(tab == PRACTICE_TAB_CONFIG) {
if(practice_get(app->exercise_type)->draw_config == NULL)
@@ -147,6 +133,7 @@ practice_screen_open_tab(InbeApp *app, int tab)
app->practice_config_tab = 0;
}
app->practice_tab = PRACTICE_TAB_CONFIG;
app_open_modal(app, UIModalPracticeConfig);
app_switch_screen(app, InbeScreenStart);
}
}
@@ -155,13 +142,20 @@ static int
practice_screen_draw_desktop_tab_bar(InbeApp *app, int y)
{
FlintUITab tabs[EXERCISE_COUNT];
int values[EXERCISE_COUNT];
int tab_count = 0;
int selected_index = 0;
int clicked;
if(app == NULL)
return -1;
// Create tab for each exercise type
for(int i = 0; i < EXERCISE_COUNT; i++) {
if(!practice_is_visible(app, i))
continue;
if(i == app->exercise_type)
selected_index = tab_count;
values[tab_count] = i;
tabs[tab_count++] = (FlintUITab){
.label = practice_activity_label(i),
.icon = (Texture2D){0},
@@ -169,15 +163,18 @@ practice_screen_draw_desktop_tab_bar(InbeApp *app, int y)
.disabled = app->modal.active
};
}
if(tab_count <= 0)
return -1;
return ui_draw_tab_bar((FlintUITabBar){
clicked = ui_draw_tab_bar((FlintUITabBar){
.bounds = {0, (float)y, (float)view_width, (float)ui_tab_bar_height()},
.tabs = tabs,
.count = tab_count,
.selected_index = app->exercise_type,
.selected_index = selected_index,
.min_tab_width = flint_px(120),
.max_tab_width = flint_px(180)
});
return clicked >= 0 && clicked < tab_count ? values[clicked] : -1;
}
static int
@@ -198,12 +195,20 @@ practice_screen_draw_top_bar(InbeApp *app, int draw_menu)
if(app == NULL)
return;
activity_count = EXERCISE_COUNT;
for(int i = 0; i < activity_count; i++) {
exercise_values[i] = i;
exercise_options[i] = practice_activity_label(exercise_values[i]);
practice_clamp_activity_to_tab(app);
activity_count = 0;
activity_index = 0;
for(int i = 0; i < EXERCISE_COUNT; i++) {
if(!practice_is_visible(app, i))
continue;
if(i == app->exercise_type)
activity_index = activity_count;
exercise_values[activity_count] = i;
exercise_options[activity_count] = practice_activity_label(i);
activity_count++;
}
activity_index = clampi(app->exercise_type, 0, EXERCISE_COUNT - 1);
if(activity_count <= 0)
return;
if(draw_menu) {
FlintUIToolbarResult menu_result = ui_draw_toolbar_header((FlintUIToolbarHeader){
@@ -258,14 +263,68 @@ practice_screen_draw_top_bar(InbeApp *app, int draw_menu)
});
}
// Keep existing subtab bar for Play/Manual/Config (works in both modes)
if(!practice_screen_play_only(app)) {
int clicked = practice_screen_draw_tab_bar(app,
practice_screen_selector_height(app));
if(clicked >= 0 && clicked != app->practice_tab)
practice_screen_open_tab(app, clicked);
} else {
if(!app->modal.active)
app->practice_tab = PRACTICE_TAB_PLAY;
}
void
practice_screen_draw_floating_actions(InbeApp *app)
{
const PracticeDefinition *practice;
int icon_size = flint_px(22);
int icon_padding = flint_px(9);
int button_w = icon_size + icon_padding * 2;
int gap = flint_px(10);
int margin = flint_px(14);
int y = app_content_top_reserved(app) + flint_px(10);
int x = view_width - margin;
if(app == NULL || app->modal.active || app->inbe.screen != InbeScreenStart)
return;
practice = practice_get(app->exercise_type);
if(practice->draw_config != NULL) {
int hover = 0;
x -= button_w;
if(ui_draw_icon_btn_padded(x, y, icon_size, icon_padding,
app->icons[UI_ICON_TYPE_WRENCH], &hover))
practice_screen_open_tab(app, PRACTICE_TAB_CONFIG);
x -= gap;
}
if(practice->draw_manual != NULL) {
int hover = 0;
x -= button_w;
if(ui_draw_icon_btn_padded(x, y, icon_size, icon_padding,
app->icons[UI_ICON_TYPE_MANUAL], &hover))
practice_screen_open_tab(app, PRACTICE_TAB_MANUAL);
}
}
void
practice_screen_draw_modal(InbeApp *app)
{
if(app == NULL || !app->modal.active)
return;
if(app->modal.type != UIModalPracticeManual &&
app->modal.type != UIModalPracticeConfig &&
app->modal.type != UIModalEditProgressiveStartSpeed)
return;
DrawRectangle(0, 0, view_width, view_height, flint_theme_get_bg());
if(app->modal.type == UIModalEditProgressiveStartSpeed) {
const PracticeDefinition *practice = practice_get(app->exercise_type);
if(practice->draw_config != NULL)
practice->draw_config(app);
return;
}
if(app->modal.type == UIModalPracticeManual) {
app->practice_tab = PRACTICE_TAB_MANUAL;
manual_screen_draw(app);
} else {
const PracticeDefinition *practice = practice_get(app->exercise_type);
app->practice_tab = PRACTICE_TAB_CONFIG;
if(practice->draw_config != NULL)
practice->draw_config(app);
}
}
@@ -290,19 +349,34 @@ practice_screen_dropdown_anchor(void)
}
static Rectangle
practice_screen_tab_anchor(InbeApp *app, int tab)
practice_screen_floating_action_anchor(InbeApp *app, int tab)
{
int tab_h = flint_px(PRACTICE_CATEGORY_TAB_H);
int tab_w = view_width / PRACTICE_TAB_COUNT;
int x = tab * tab_w;
int w = tab == PRACTICE_TAB_COUNT - 1 ? view_width - x : tab_w;
int icon_size = flint_px(22);
int icon_padding = flint_px(9);
int size = icon_size + icon_padding * 2;
int gap = flint_px(10);
int margin = flint_px(14);
int x = view_width - margin;
int y = app_content_top_reserved(app) + flint_px(10);
const PracticeDefinition *practice;
return (Rectangle){
(float)x,
(float)practice_screen_selector_height(app),
(float)w,
(float)tab_h
};
if(app == NULL)
return (Rectangle){0};
practice = practice_get(app->exercise_type);
if(practice->draw_config != NULL) {
x -= size;
if(tab == PRACTICE_TAB_CONFIG)
return (Rectangle){(float)x, (float)y, (float)size, (float)size};
x -= gap;
}
if(practice->draw_manual != NULL) {
x -= size;
if(tab == PRACTICE_TAB_MANUAL)
return (Rectangle){(float)x, (float)y, (float)size, (float)size};
}
return (Rectangle){(float)(view_width - margin - size), (float)y,
(float)size, (float)size};
}
static Rectangle
@@ -366,15 +440,11 @@ practice_screen_draw_first_run_guide(InbeApp *app)
locale_get("practice_guide_dropdown")
};
steps[1] = (FlintUIGuideStep){
practice_screen_tab_anchor(app, PRACTICE_TAB_MANUAL),
practice_screen_floating_action_anchor(app, PRACTICE_TAB_MANUAL),
locale_get("practice_guide_manual")
};
steps[2] = (FlintUIGuideStep){
practice_screen_tab_anchor(app, PRACTICE_TAB_PLAY),
locale_get("practice_guide_sun")
};
steps[3] = (FlintUIGuideStep){
practice_screen_tab_anchor(app, PRACTICE_TAB_CONFIG),
practice_screen_floating_action_anchor(app, PRACTICE_TAB_CONFIG),
locale_get("practice_guide_config")
};
@@ -384,7 +454,7 @@ practice_screen_draw_first_run_guide(InbeApp *app)
.step = &app->tutorial_step,
.view_width = view_width,
.view_height = view_height,
.reserved_top = practice_screen_selector_height(app) + flint_px(PRACTICE_CATEGORY_TAB_H),
.reserved_top = practice_screen_selector_height(app),
.reserved_bottom = ui_bottom_nav_height(),
.max_width = flint_px(300),
.close_icon = app->icons[UI_ICON_TYPE_X],
+5
View File
@@ -11,9 +11,14 @@
int practice_activity_count_for_tab(int tab);
int practice_activity_for_tab(int tab, int index);
const char *practice_activity_label(int exercise);
int practice_visible_mask_all(void);
int practice_is_visible(const InbeApp *app, int exercise);
void practice_set_visible(InbeApp *app, int exercise, int visible);
void practice_clamp_activity_to_tab(InbeApp *app);
void practice_screen_open_tab(InbeApp *app, int tab);
void practice_screen_draw_top_bar(InbeApp *app, int draw_menu);
void practice_screen_draw_floating_actions(InbeApp *app);
void practice_screen_draw_modal(InbeApp *app);
int practice_screen_first_run_guide_active(const InbeApp *app);
void practice_screen_prepare_first_run_guide(InbeApp *app);
void practice_screen_draw_first_run_guide(InbeApp *app);
File diff suppressed because it is too large. Load diff
+13
View File
@@ -0,0 +1,13 @@
#ifndef INBE_PROFILE_SCREEN_H
#define INBE_PROFILE_SCREEN_H
#include "app_fwd.h"
int profile_screen_draw(InbeApp *app);
void profile_screen_draw_remove_friend_modal(InbeApp *app);
void profile_screen_refresh_social_cache(InbeApp *app);
int profile_screen_first_run_guide_active(const InbeApp *app);
void profile_screen_prepare_first_run_guide(InbeApp *app);
void profile_screen_draw_first_run_guide(InbeApp *app);
#endif
+136
View File
@@ -0,0 +1,136 @@
#include "settings_about.h"
#include "app.h"
#include "flint_locale.h"
#include "flint_theme.h"
#include "flint_ui.h"
#include "version.h"
#include "raylib.h"
#include <stdio.h>
static int
about_link_icon_columns(int content_w)
{
int link_count = 5;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int icon_spacing = flint_px(20);
int icon_btn_w = icon_size + icon_padding * 2;
int max_columns = link_count;
int min_columns = content_w >= flint_px(240) ? 3 : 2;
for(int columns = max_columns; columns >= min_columns; columns--) {
int total_w = icon_btn_w * columns + icon_spacing * (columns - 1);
if(total_w <= content_w)
return columns;
}
return min_columns;
}
static int
about_link_icons_height(int content_w)
{
int link_count = 5;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int row_spacing = flint_px(16);
int icon_btn_w = icon_size + icon_padding * 2;
int columns = about_link_icon_columns(content_w);
int rows = (link_count + columns - 1) / columns;
return rows * icon_btn_w + (rows - 1) * row_spacing;
}
int
settings_about_content_height(int content_w)
{
FlintUIParagraph description = {
.text = locale_get("about_text"),
.width = content_w,
.font = flint_ui_font(),
.line_gap = flint_px(4),
.color = flint_darken(flint_theme_get_text(), 35)
};
return flint_px(194) + flint_ui_paragraph_height(description) +
about_link_icons_height(content_w);
}
static void
about_draw_link_icons(InbeApp *app, int content_x, int content_w, int *y)
{
int link_count = 5;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int icon_spacing = flint_px(20);
int icon_btn_w = icon_size + icon_padding * 2;
int columns = about_link_icon_columns(content_w);
int grid_w = icon_btn_w * columns + icon_spacing * (columns - 1);
int links_start_x = content_x + (content_w - grid_w) / 2;
int row_spacing = flint_px(16);
Texture2D icons[5] = {
app->icons[UI_ICON_TYPE_DISCORD],
app->icons[UI_ICON_TYPE_TELEGRAM],
app->icons[UI_ICON_TYPE_GITHUB],
app->icons[UI_ICON_TYPE_BTC],
app->icons[UI_ICON_TYPE_MONERO]
};
const char *urls[5] = {
"https://discord.com/invite/JbGZ4yENDt",
"https://t.me/lotusinbe",
"https://github.com/waozixyz/inbe",
"https://trocador.app/en/anonpay/?ticker_to=btc&network_to=Mainnet&address=bc1qxzcetg50f6epgddc09n82xqn3zswlmk44235y5&donation=True&simple_mode=True&amount=0.001&name=Inner+Breeze&[email protected]&ticker_from=btc&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff",
"https://trocador.app/en/anonpay/?ticker_to=xmr&network_to=Mainnet&address=86CbC3d4a2GhT9auh6X99JhmhTMFKVVk8Q9cLrKTHkBu8LLkoNWgkBeAT3YZrvDM6NczYe8brUJNsTiFmwpWDZYnFG5kzSH&donation=True&simple_mode=True&amount=0.1&name=Inner+Breeze&[email protected]&ticker_from=xmr&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff"
};
for(int i = 0; i < link_count; i++) {
int col = i % columns;
int row = i / columns;
int icon_x = links_start_x + col * (icon_btn_w + icon_spacing) + icon_padding;
int icon_y = *y + row * (icon_btn_w + row_spacing);
ui_draw_icon_link(icon_x, icon_y, icon_size, icons[i], urls[i]);
}
*y += about_link_icons_height(content_w);
}
void
settings_about_draw(InbeApp *app, int x, int w, int *y)
{
char version_text[32];
int title_font = flint_ui_title_font(locale_get("app_title"), w);
int font = flint_ui_font();
int small_font = flint_ui_font_small();
int logo_size = flint_px(56);
int text_w;
Color muted = flint_darken(flint_theme_get_text(), 35);
FlintUIParagraph description;
*y += flint_px(16);
ui_draw_icon_texture(x + (w - logo_size) / 2, *y, logo_size,
app->icons[UI_ICON_TYPE_INBE], WHITE);
*y += logo_size + flint_px(12);
text_w = flint_text_measure(locale_get("app_title"), title_font);
flint_text_draw(locale_get("app_title"), x + (w - text_w) / 2, *y, title_font,
flint_theme_get_text());
*y += flint_px(34);
snprintf(version_text, sizeof(version_text), "v%s", INBE_VERSION_STRING);
text_w = flint_text_measure(version_text, small_font);
flint_text_draw(version_text, x + (w - text_w) / 2, *y, small_font, muted);
*y += flint_px(28);
description = (FlintUIParagraph){
.text = locale_get("about_text"),
.width = w,
.font = font,
.line_gap = flint_px(4),
.color = muted
};
flint_ui_paragraph_draw(description, x, y);
*y += flint_px(18);
about_draw_link_icons(app, x, w, y);
*y += flint_px(32);
}
+9
View File
@@ -0,0 +1,9 @@
#ifndef INBE_SETTINGS_ABOUT_H
#define INBE_SETTINGS_ABOUT_H
#include "app_fwd.h"
int settings_about_content_height(int content_w);
void settings_about_draw(InbeApp *app, int x, int w, int *y);
#endif
+64 -120
View File
@@ -8,7 +8,6 @@
#include "storage.h"
#include "sync_account.h"
#include "flint_theme.h"
#include "version.h"
#include "flint_theme_meta.h"
#include "flint_ui.h"
#if !ANDROID_BUILD && !defined(_WIN32) && !defined(PLATFORM_WEB)
@@ -34,11 +33,6 @@ enum {
SETTINGS_DATA_ACTION_SYNC_KEY_IMPORT
};
enum {
SETTINGS_DATA_VIEW_MAIN = 0,
SETTINGS_DATA_VIEW_SYNC_ACCOUNT = 1
};
#define INBE_SYNC_SERVER_URL_KEY "sync_server_url"
#define INBE_SYNC_SERVER_URL_DEFAULT "https://api.waozi.xyz"
#define SETTINGS_DATA_IMPORT_FILTER ".db,.zip"
@@ -57,8 +51,9 @@ typedef struct SettingsFileDialogOrigin {
int active;
int screen;
int settings_tab;
int settings_data_view;
int settings_scroll;
int profile_view;
int profile_scroll;
} SettingsFileDialogOrigin;
static SettingsFileDialogOrigin file_dialog_origin;
@@ -70,6 +65,8 @@ static void settings_export_data(InbeApp *app);
static void settings_request_delete_all_data(InbeApp *app);
static void settings_sync_server_load(InbeApp *app);
static int settings_import_sync_key_path(InbeApp *app, const char *path);
static int settings_start_sync_key_export_dialog(InbeApp *app, const char *filename);
static int settings_start_sync_key_import_dialog(InbeApp *app);
static void
settings_clear_pending_import(void)
@@ -87,8 +84,9 @@ settings_file_dialog_begin(InbeApp *app, int action)
file_dialog_origin.active = 1;
file_dialog_origin.screen = app->inbe.screen;
file_dialog_origin.settings_tab = app->settings_tab;
file_dialog_origin.settings_data_view = app->settings_data_view;
file_dialog_origin.settings_scroll = app->settings_scroll;
file_dialog_origin.profile_view = app->profile_view;
file_dialog_origin.profile_scroll = app->profile_scroll;
}
static int
@@ -98,8 +96,9 @@ settings_file_dialog_finish(InbeApp *app)
if(app != NULL && file_dialog_origin.active) {
app->inbe.screen = file_dialog_origin.screen;
app->settings_tab = file_dialog_origin.settings_tab;
app->settings_data_view = file_dialog_origin.settings_data_view;
app->settings_scroll = file_dialog_origin.settings_scroll;
app->profile_view = file_dialog_origin.profile_view;
app->profile_scroll = file_dialog_origin.profile_scroll;
}
file_dialog_origin.active = 0;
data_file_dialog_action = SETTINGS_DATA_ACTION_NONE;
@@ -306,60 +305,69 @@ settings_draw_sync_review_modal(InbeApp *app)
return 0;
}
static int
settings_link_icon_columns(int content_w)
{
int max_columns = 5;
int min_columns = 2;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int icon_spacing = flint_px(20);
int icon_btn_w = icon_size + icon_padding * 2;
for(int columns = max_columns; columns > min_columns; columns--) {
int total_w = icon_btn_w * columns + icon_spacing * (columns - 1);
if(total_w <= content_w)
return columns;
}
return min_columns;
}
static int
settings_link_icons_height(int content_w)
{
int link_count = 5;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int row_spacing = flint_px(16);
int icon_btn_w = icon_size + icon_padding * 2;
int columns = settings_link_icon_columns(content_w);
int rows = (link_count + columns - 1) / columns;
return flint_px(8) + rows * icon_btn_w + (rows - 1) * row_spacing;
}
int
settings_data_content_height(int content_w)
{
int data_button_h = flint_px(36);
(void)content_w;
return flint_px(SETTINGS_DATA_TOP_PADDING) +
data_button_h + flint_px(12) +
data_button_h + flint_px(12) +
data_button_h + flint_px(12) +
data_button_h + flint_px(12) +
flint_px(42) +
settings_link_icons_height(content_w) +
flint_px(8) + flint_px(22) +
flint_px(40);
}
int
settings_data_is_configuring(const InbeApp *app)
void
settings_data_draw_sync_status(int x, int w, int *y)
{
return app != NULL && app->settings_tab == SETTINGS_TAB_DATA &&
app->settings_data_view == SETTINGS_DATA_VIEW_SYNC_ACCOUNT;
InbeStorageSyncStatus status;
char line[160];
int font = flint_ui_font_small();
int label_font = flint_ui_font();
Color label_color = flint_theme_get_text();
Color text_color = flint_darken(flint_theme_get_text(), 25);
Color warn_color = (Color){196, 126, 45, 255};
Color ok_color = (Color){70, 150, 96, 255};
int row_y;
int left_w;
if(!storage_sync_status(&status) || !status.has_account)
return;
flint_text_draw("Sync status", x, *y, label_font, label_color);
*y += flint_px(24);
left_w = w / 2;
row_y = *y;
snprintf(line, sizeof(line), "Account: %s", status.has_account ? "connected" : "not set");
flint_text_draw(line, x, row_y, font, status.has_account ? ok_color : text_color);
snprintf(line, sizeof(line), "Queued: %lld", status.queued_changes);
flint_text_draw(line, x + left_w, row_y, font,
status.queued_changes > 0 ? warn_color : text_color);
row_y += flint_px(22);
snprintf(line, sizeof(line), "Server: %lld", status.server_version);
flint_text_draw(line, x, row_y, font, text_color);
snprintf(line, sizeof(line), "Clock: %lld", status.server_clock);
flint_text_draw(line, x + left_w, row_y, font, text_color);
row_y += flint_px(22);
if(status.review_pending)
snprintf(line, sizeof(line), "Review pending");
else if(status.repair_pending)
snprintf(line, sizeof(line), "Repair sync pending");
else if(status.queued_changes > 0)
snprintf(line, sizeof(line), "Local changes queued");
else if(!status.full_upload_done)
snprintf(line, sizeof(line), "Initial upload pending");
else
snprintf(line, sizeof(line), "Ready");
flint_text_draw(line, x, row_y, font,
(status.review_pending || status.repair_pending) ? warn_color : text_color);
*y += flint_px(74);
}
static void
@@ -377,14 +385,16 @@ settings_sync_server_load(InbeApp *app)
app->sync_server_url_cursor = (int)strlen(app->sync_server_url);
}
static void
settings_open_sync_account_config(InbeApp *app)
void
settings_data_open_sync_account_config(InbeApp *app)
{
if(app == NULL)
return;
settings_sync_account_set_save_dialog(settings_start_sync_key_export_dialog);
settings_sync_account_set_import_dialog(settings_start_sync_key_import_dialog);
settings_sync_server_load(app);
app->settings_data_view = SETTINGS_DATA_VIEW_SYNC_ACCOUNT;
app->settings_scroll = 0;
app->profile_view = PROFILE_VIEW_SYNC_ACCOUNT;
app->profile_scroll = 0;
app->sync_server_url_focused = 0;
settings_screen_clear_status();
}
@@ -483,64 +493,11 @@ settings_start_sync_key_import_dialog(InbeApp *app)
#endif
}
static void
settings_draw_link_icons(InbeApp *app, int content_x, int content_w, int *y)
{
int link_count = 5;
int icon_size = flint_px(32);
int icon_padding = flint_px(4);
int icon_spacing = flint_px(20);
int icon_btn_w = icon_size + icon_padding * 2;
int columns = settings_link_icon_columns(content_w);
int grid_w = icon_btn_w * columns + icon_spacing * (columns - 1);
int links_start_x = content_x + (content_w - grid_w) / 2;
int row_spacing = flint_px(16);
Texture2D icons[5] = {
app->icons[UI_ICON_TYPE_DISCORD],
app->icons[UI_ICON_TYPE_TELEGRAM],
app->icons[UI_ICON_TYPE_GITHUB],
app->icons[UI_ICON_TYPE_BTC],
app->icons[UI_ICON_TYPE_MONERO]
};
const char *urls[5] = {
"https://discord.com/invite/JbGZ4yENDt",
"https://t.me/lotusinbe",
"https://github.com/waozixyz/inbe",
"https://trocador.app/en/anonpay/?ticker_to=btc&network_to=Mainnet&address=bc1qxzcetg50f6epgddc09n82xqn3zswlmk44235y5&donation=True&simple_mode=True&amount=0.001&name=Inner+Breeze&[email protected]&ticker_from=btc&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff",
"https://trocador.app/en/anonpay/?ticker_to=xmr&network_to=Mainnet&address=86CbC3d4a2GhT9auh6X99JhmhTMFKVVk8Q9cLrKTHkBu8LLkoNWgkBeAT3YZrvDM6NczYe8brUJNsTiFmwpWDZYnFG5kzSH&donation=True&simple_mode=True&amount=0.1&name=Inner+Breeze&[email protected]&ticker_from=xmr&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff"
};
*y += flint_px(8);
for(int i = 0; i < link_count; i++) {
int col = i % columns;
int row = i / columns;
int icon_x = links_start_x + col * (icon_btn_w + icon_spacing) + icon_padding;
int icon_y = *y + row * (icon_btn_w + row_spacing);
ui_draw_icon_link(icon_x, icon_y, icon_size, icons[i], urls[i]);
}
*y += settings_link_icons_height(content_w) - flint_px(8);
}
static void
settings_draw_version_centered(int x, int w, int *y)
{
char version_text[32];
int font = flint_ui_font_small();
int text_w;
snprintf(version_text, sizeof(version_text), "v%s", INBE_VERSION_STRING);
text_w = flint_text_measure(version_text, font);
flint_text_draw(version_text, x + (w - text_w) / 2, *y, font,
flint_darken(flint_theme_get_text(), 40));
*y += flint_px(22);
}
void
settings_data_draw(InbeApp *app, int x, int w, int *y)
settings_data_draw_actions(InbeApp *app, int x, int w, int *y)
{
InbeSyncAccount account;
int data_button_h = flint_px(36);
int hover_account = 0;
int hover_import = 0;
int hover_export = 0;
int hover_delete = 0;
@@ -548,18 +505,8 @@ settings_data_draw(InbeApp *app, int x, int w, int *y)
settings_sync_account_set_save_dialog(settings_start_sync_key_export_dialog);
settings_sync_account_set_import_dialog(settings_start_sync_key_import_dialog);
if(app != NULL && app->settings_data_view == SETTINGS_DATA_VIEW_SYNC_ACCOUNT) {
settings_sync_account_draw_config(app, x, w, y);
return;
}
*y += flint_px(SETTINGS_DATA_TOP_PADDING);
if(ui_draw_generic_button(x, *y, w, data_button_h,
locale_get("sync_configure_account_button"),
UI_BUTTON_STYLE_PRIMARY, 0, &hover_account))
settings_open_sync_account_config(app);
*y += data_button_h + flint_px(12);
if(ui_draw_generic_button(x, *y, w, data_button_h,
locale_get("import_data_button"),
UI_BUTTON_STYLE_PRIMARY, 0, &hover_import))
@@ -580,9 +527,6 @@ settings_data_draw(InbeApp *app, int x, int w, int *y)
*y += data_button_h + flint_px(12);
}
settings_screen_draw_status_reserved(x, y, flint_px(42));
settings_draw_link_icons(app, x, w, y);
*y += flint_px(8);
settings_draw_version_centered(x, w, y);
}
#if ANDROID_BUILD
+3 -2
View File
@@ -4,8 +4,9 @@
#include "app_fwd.h"
int settings_data_content_height(int content_w);
int settings_data_is_configuring(const InbeApp *app);
void settings_data_draw(InbeApp *app, int x, int w, int *y);
void settings_data_draw_actions(InbeApp *app, int x, int w, int *y);
void settings_data_draw_sync_status(int x, int w, int *y);
void settings_data_open_sync_account_config(InbeApp *app);
int settings_data_draw_pending_file_dialog(InbeApp *app);
int settings_data_draw_modals(InbeApp *app);
void settings_data_handle_android_import(InbeApp *app);
+6 -20
View File
@@ -3,6 +3,7 @@
#include "app.h"
#include "app_settings.h"
#include "flint_locale.h"
#include "settings_about.h"
#include "settings_data.h"
#include "settings_device.h"
#include "settings_session.h"
@@ -127,9 +128,8 @@ settings_tab_content_height(InbeApp *app, int tab, int content_w)
return settings_session_content_height(content_w);
if(tab == SETTINGS_TAB_DEVICE)
return settings_device_content_height(content_w);
if(settings_data_is_configuring(app))
return flint_px(430);
return settings_data_content_height(content_w);
(void)app;
return settings_about_content_height(content_w);
}
typedef struct SettingsScrollPageContext {
@@ -162,7 +162,7 @@ settings_screen_draw(InbeApp *app)
locale_get("settings_section_session"),
locale_get("settings_tab_device"),
locale_get("settings_section_appearance"),
locale_get("settings_tab_data"),
locale_get("settings_tab_about"),
};
SettingsDeviceState device_state = {0};
@@ -176,19 +176,7 @@ settings_screen_draw(InbeApp *app)
if(settings_data_draw_pending_file_dialog(app))
return 1;
detail_header_h = settings_data_is_configuring(app) ? flint_px(58) : 0;
if(detail_header_h > 0) {
FlintUIHeader header = ui_draw_title_header(detail_header_h,
locale_get("sync_configure_account_button"),
app->icons[UI_ICON_TYPE_RETURN],
(Texture2D){0});
if(header.left_clicked) {
app->settings_data_view = 0;
app->settings_scroll = 0;
app->sync_server_url_focused = 0;
settings_screen_clear_status();
}
}
detail_header_h = 0;
selector_h = detail_header_h > 0 ? 0 : ui_tab_bar_height();
tab_content_start_y = detail_header_h + selector_h;
@@ -233,7 +221,6 @@ settings_screen_draw(InbeApp *app)
if(selected_tab != app->settings_tab) {
app->settings_tab = selected_tab;
app->settings_scroll = 0;
app->settings_data_view = 0;
if(app->modal.type == UIModalThemePicker) {
app_close_modal(app);
}
@@ -260,7 +247,7 @@ settings_screen_draw(InbeApp *app)
else if(app->settings_tab == SETTINGS_TAB_DEVICE)
settings_device_draw(app, page.content_x, page.content_w, &y, &device_state);
else
settings_data_draw(app, page.content_x, page.content_w, &y);
settings_about_draw(app, page.content_x, page.content_w, &y);
ui_scroll_page_end(page);
}
@@ -270,7 +257,6 @@ settings_screen_draw(InbeApp *app)
if(ui_draw_dropdown_menu(302) && selected_tab != app->settings_tab) {
app->settings_tab = selected_tab;
app->settings_scroll = 0;
app->settings_data_view = 0;
if(app->modal.type == UIModalThemePicker) {
app_close_modal(app);
}
+20 -39
View File
@@ -76,7 +76,7 @@ settings_backup_filename(char *out, size_t out_size)
{
if(out == NULL || out_size == 0)
return;
snprintf(out, out_size, "inbe-sync.key");
snprintf(out, out_size, "account.key");
}
static int
@@ -241,21 +241,21 @@ settings_sync_server_connected(InbeApp *app)
}
static const char *
settings_sync_result_key(InbeSyncClientResult result)
settings_sync_result_key(FlintLyraSyncResult result)
{
switch(result) {
case INBE_SYNC_CLIENT_OK:
case FLINT_LYRA_SYNC_OK:
return "sync_connected";
case INBE_SYNC_CLIENT_INVALID_URL:
case FLINT_LYRA_SYNC_INVALID_URL:
return "sync_server_url_invalid";
case INBE_SYNC_CLIENT_NO_ACCOUNT:
case FLINT_LYRA_SYNC_NO_ACCOUNT:
return "sync_no_account";
case INBE_SYNC_CLIENT_AUTH_FAILED:
case FLINT_LYRA_SYNC_AUTH_FAILED:
return "sync_auth_failed";
case INBE_SYNC_CLIENT_PAYLOAD_FAILED:
case INBE_SYNC_CLIENT_CHALLENGE_FAILED:
case INBE_SYNC_CLIENT_SIGN_FAILED:
case INBE_SYNC_CLIENT_REQUEST_FAILED:
case FLINT_LYRA_SYNC_PAYLOAD_FAILED:
case FLINT_LYRA_SYNC_CHALLENGE_FAILED:
case FLINT_LYRA_SYNC_SIGN_FAILED:
case FLINT_LYRA_SYNC_REQUEST_FAILED:
default:
return "sync_failed";
}
@@ -264,7 +264,7 @@ settings_sync_result_key(InbeSyncClientResult result)
static void
settings_sync_run_connect(InbeApp *app)
{
InbeSyncClientResult result;
FlintLyraSyncResult result;
char url[sizeof(app->sync_server_url)];
if(app == NULL)
@@ -275,10 +275,13 @@ settings_sync_run_connect(InbeApp *app)
}
storage_set_setting_text(INBE_SYNC_SERVER_URL_KEY, url);
result = sync_client_sync(url);
if(result == INBE_SYNC_CLIENT_OK) {
if(result == FLINT_LYRA_SYNC_OK) {
if(storage_sync_review_clear_if_no_visible_diff()) {
app_reload_after_import(app, 0);
settings_screen_set_status_success(locale_get(settings_sync_result_key(result)), NULL);
} else if(storage_sync_review_apply_remote_if_local_empty()) {
app_reload_after_import(app, 0);
settings_screen_set_status_success(locale_get(settings_sync_result_key(result)), NULL);
} else if(storage_sync_review_pending()) {
app_open_modal(app, UIModalSyncReview);
settings_screen_set_status_error("Sync needs review");
@@ -304,7 +307,7 @@ void
settings_sync_account_clear_remote_confirmed(InbeApp *app)
{
InbeSyncAccount account;
InbeSyncClientResult result;
FlintLyraSyncResult result;
char url[sizeof(app->sync_server_url)];
if(app == NULL)
@@ -316,7 +319,7 @@ settings_sync_account_clear_remote_confirmed(InbeApp *app)
if(settings_sync_server_normalize(app, url, sizeof(url))) {
result = sync_client_delete_account(url);
if(result != INBE_SYNC_CLIENT_OK)
if(result != FLINT_LYRA_SYNC_OK)
TraceLog(LOG_WARNING, "SYNC: remote account delete failed: %d", result);
} else {
TraceLog(LOG_WARNING, "SYNC: remote account delete skipped due to invalid URL");
@@ -354,13 +357,6 @@ settings_sync_account_draw(InbeApp *app, int x, int w, int *y)
flint_text_draw(locale_get("sync_account_title"), x, *y, font, flint_theme_get_text());
*y += flint_px(26);
if(!sync_account_available()) {
flint_text_draw(locale_get("sync_liboqs_unavailable"), x, *y, small_font,
flint_darken(flint_theme_get_text(), 35));
*y += flint_px(32);
return;
}
if(!has_account) {
if(ui_draw_generic_button(x, *y, w, btn_h, locale_get("sync_create_account_button"),
UI_BUTTON_STYLE_PRIMARY, 0, &hover)) {
@@ -423,13 +419,6 @@ settings_sync_account_draw_config(InbeApp *app, int x, int w, int *y)
int commit = 0;
FlintUITextInputStyle input_style = settings_sync_text_style();
if(!sync_account_available()) {
flint_text_draw(locale_get("sync_liboqs_unavailable"), x, *y, small_font,
flint_darken(flint_theme_get_text(), 35));
*y += flint_px(32);
return;
}
if(!has_account) {
FlintUIButtonRowItem buttons[2] = {
{locale_get("sync_create_account_button"), UI_BUTTON_STYLE_PRIMARY, 0},
@@ -681,11 +670,11 @@ settings_sync_account_draw_alias_modal(InbeApp *app)
return 3;
if(clicked == 1 || (commit && settings_sync_alias_valid(app->sync_alias_input) && !unchanged_alias)) {
if(settings_sync_server_normalize(app, url, sizeof(url))) {
InbeSyncClientResult alias_result;
FlintLyraSyncResult alias_result;
TraceLog(LOG_INFO, "SYNC: saving alias @%s with %s",
app->sync_alias_input, url);
alias_result = sync_client_register_alias(url, app->sync_alias_input);
if(alias_result == INBE_SYNC_CLIENT_OK) {
if(alias_result == FLINT_LYRA_SYNC_OK) {
TraceLog(LOG_INFO, "SYNC: alias saved @%s", app->sync_alias_input);
result = 1;
} else {
@@ -711,7 +700,6 @@ settings_sync_account_draw_public_id_modal(InbeApp *app)
int btn_h = flint_px(36);
int gap = flint_px(10);
int y;
int hover = 0;
int result = 0;
(void)app;
@@ -719,7 +707,7 @@ settings_sync_account_draw_public_id_modal(InbeApp *app)
if(!sync_account_load(&account))
return 1;
frame = ui_draw_modal_frame(flint_px(356), flint_px(274),
frame = ui_draw_modal_frame(flint_px(356), flint_px(218),
locale_get("sync_public_id_full_title"),
(Texture2D){0}, (Texture2D){0});
y = frame.content_y;
@@ -754,12 +742,5 @@ settings_sync_account_draw_public_id_modal(InbeApp *app)
}
}
if(ui_draw_generic_button(frame.content_x, frame.y + frame.h - btn_h - flint_px(18),
frame.content_w, btn_h,
locale_get("sync_alias_button"), UI_BUTTON_STYLE_SECONDARY,
0, &hover)) {
app_close_modal(app);
settings_sync_open_alias_modal(app, 0);
}
return result;
}
+37 -5
View File
@@ -80,7 +80,8 @@ settings_theme_draw(InbeApp *app, int x, int w, int *y, SettingsThemeState *stat
(float)(circle_size * 2),
(float)(circle_size * 2)
};
int is_hovered = CheckCollisionPointRec(GetMousePosition(), circle_bounds);
Vector2 mouse_world = GetScreenToWorld2D(GetMousePosition(), app->camera);
int is_hovered = CheckCollisionPointRec(mouse_world, circle_bounds);
// Draw circle with hover effect
int draw_size = is_hovered ? circle_size + flint_px(4) : circle_size;
@@ -90,7 +91,7 @@ settings_theme_draw(InbeApp *app, int x, int w, int *y, SettingsThemeState *stat
// Check for click to open modal (skip if modal is active or just closed)
if(is_hovered && !app->modal.active &&
!ui_input_captures_click(GetMousePosition()) &&
!ui_input_captures_click(mouse_world) &&
app->inbe.frame - app->modal_open_frame > 1) {
ui_mark_clickable();
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
@@ -143,6 +144,10 @@ settings_screen_draw_theme_picker_modal(InbeApp *app)
int modal_h = flint_px(360);
const char *title = locale_get("theme_picker_title");
FlintUIPanelFrame frame;
FlintUIScrollArea scroll_area;
FlintUIScrollView scroll_view;
int picker_h;
int draw_w;
frame = ui_draw_modal_frame(modal_w, modal_h, title,
(Texture2D){0},
@@ -153,13 +158,40 @@ settings_screen_draw_theme_picker_modal(InbeApp *app)
return;
}
// Draw theme picker in modal content area
if(ui_draw_theme_picker(frame.content_x, frame.content_y,
frame.content_w, app->dark_mode, &app->theme_id)) {
draw_w = frame.content_w;
picker_h = ui_theme_picker_height(draw_w);
scroll_area = (FlintUIScrollArea){
.bounds = {
(float)frame.content_x,
(float)frame.content_y,
(float)frame.content_w,
(float)frame.content_h
},
.content_height = picker_h,
.content_x = frame.content_x,
.content_width = frame.content_w,
.scroll_offset = &app->theme_state.theme_picker_scroll,
.wheel_step = flint_px(42),
.scrollbar_x = frame.content_x + frame.content_w - flint_px(8)
};
for(int i = 0; i < 3; i++) {
FlintUIScrollView measured = ui_scroll_container_measure(scroll_area);
if(measured.content_w == draw_w)
break;
draw_w = measured.content_w;
scroll_area.content_height = ui_theme_picker_height(draw_w);
}
picker_h = ui_theme_picker_height(draw_w);
scroll_area.content_height = picker_h;
scroll_view = ui_scroll_container_begin(scroll_area);
if(ui_draw_theme_picker(scroll_view.content_x, scroll_view.content_y,
scroll_view.content_w, app->dark_mode, &app->theme_id)) {
app->theme_id = clampi(app->theme_id, 0, FLINT_THEME_COUNT - 1);
app_refresh_theme(app);
app->settings_dirty = 1;
save_settings(app);
app_close_modal(app);
}
ui_scroll_container_end(scroll_area, scroll_view);
}
Loaded 100 of 121 files, more files were not shown because too many files have changed in this diff. Show more