Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
157788fa5c | ||
|
|
e89f63e382 | ||
|
|
1105b51c24 |
No files matched your search
@@ -1,4 +1,21 @@
|
||||
# Changelog
|
||||
## [1.7.3] - 2026-06-29
|
||||
### 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.
|
||||
|
||||
@@ -277,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 \
|
||||
@@ -377,10 +391,10 @@ $(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 $(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)
|
||||
|
||||
@@ -1,115 +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.
|
||||
|
||||
## Sync model
|
||||
|
||||
Inbe is offline-first. User-owned app data moves through the storage sync chain; social data is server-authorized. Friends, requests, and leaderboard snapshots are cached locally for fast/offline UI, but Lyra owns the authoritative social state and refreshes those caches through authenticated sync.
|
||||
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: 103 KiB |
@@ -35,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 63
|
||||
versionName "1.7.0"
|
||||
versionCode 66
|
||||
versionName "1.7.3"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
+109
-7
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Historie
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Profil
|
||||
---
|
||||
[tab_habits]
|
||||
Návyky
|
||||
@@ -32,16 +32,103 @@ Pet
|
||||
Data
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Nastavit data
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Navyky
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sezeni
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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í
|
||||
@@ -287,10 +374,10 @@ Vzhled
|
||||
Jazyk
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
O aplikaci
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Klidny pruvodce pro dychani, navyky a synchronizaci.
|
||||
---
|
||||
[theme_label]
|
||||
Motiv
|
||||
@@ -776,6 +863,9 @@ Upravit návyk
|
||||
[habit_name_label]
|
||||
Název
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Podtržení
|
||||
---
|
||||
@@ -874,6 +964,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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Verlauf
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Profil
|
||||
---
|
||||
[tab_habits]
|
||||
Gewohnheiten
|
||||
@@ -29,19 +29,106 @@ Anleitung
|
||||
Pet
|
||||
---
|
||||
[profile_data_title]
|
||||
Data
|
||||
Daten
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Daten konfigurieren
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Gewohnheiten
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sitzungen
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -287,10 +374,10 @@ Darstellung
|
||||
Sprache
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
Info
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Ein ruhiger Begleiter fuer Atemuebungen, Gewohnheiten und Synchronisierung.
|
||||
---
|
||||
[theme_label]
|
||||
Thema
|
||||
@@ -776,6 +863,9 @@ Gewohnheit bearbeiten
|
||||
[habit_name_label]
|
||||
Bezeichnung
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Unterstreichung
|
||||
---
|
||||
@@ -874,6 +964,18 @@ 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
|
||||
---
|
||||
|
||||
+102
@@ -43,6 +43,93 @@ 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_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
|
||||
---
|
||||
@@ -818,6 +905,9 @@ Edit Habit
|
||||
[habit_name_label]
|
||||
Name
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Underline
|
||||
---
|
||||
@@ -916,6 +1006,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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Historial
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Perfil
|
||||
---
|
||||
[tab_habits]
|
||||
Hábitos
|
||||
@@ -29,19 +29,106 @@ Manual
|
||||
Pet
|
||||
---
|
||||
[profile_data_title]
|
||||
Data
|
||||
Datos
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Configurar datos
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Habitos
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sesiones
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -287,10 +374,10 @@ Apariencia
|
||||
Idioma
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
Acerca de
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Un companero tranquilo para respiracion, habitos y sincronizacion.
|
||||
---
|
||||
[theme_label]
|
||||
Tema
|
||||
@@ -776,6 +863,9 @@ Editar hábito
|
||||
[habit_name_label]
|
||||
Nombre
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Subrayado
|
||||
---
|
||||
@@ -874,6 +964,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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Historique
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Profil
|
||||
---
|
||||
[tab_habits]
|
||||
Habitudes
|
||||
@@ -29,19 +29,106 @@ Tutoriel
|
||||
Pet
|
||||
---
|
||||
[profile_data_title]
|
||||
Data
|
||||
Donnees
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Configurer les donnees
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Habitudes
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Seances
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -290,10 +377,10 @@ Apparence
|
||||
Langue
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
A propos
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Un compagnon discret pour la respiration, les habitudes et la synchronisation.
|
||||
---
|
||||
[theme_label]
|
||||
Thème
|
||||
@@ -818,6 +905,9 @@ Modifier l'habitude
|
||||
[habit_name_label]
|
||||
Nom
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Soulignement
|
||||
---
|
||||
@@ -916,6 +1006,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
|
||||
---
|
||||
|
||||
+109
-7
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Riwayat
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Profil
|
||||
---
|
||||
[tab_habits]
|
||||
Kebiasaan
|
||||
@@ -32,16 +32,103 @@ Pet
|
||||
Data
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Atur data
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Kebiasaan
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sesi
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -287,10 +374,10 @@ Tampilan
|
||||
Bahasa
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
Tentang
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Pendamping tenang untuk pernapasan, kebiasaan, dan sinkronisasi.
|
||||
---
|
||||
[theme_label]
|
||||
Tema
|
||||
@@ -776,6 +863,9 @@ Edit kebiasaan
|
||||
[habit_name_label]
|
||||
Nama
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Garis bawah
|
||||
---
|
||||
@@ -874,6 +964,18 @@ 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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Cronologia
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Profilo
|
||||
---
|
||||
[tab_habits]
|
||||
Abitudini
|
||||
@@ -29,19 +29,106 @@ Manuale
|
||||
Pet
|
||||
---
|
||||
[profile_data_title]
|
||||
Data
|
||||
Dati
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Configura dati
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Abitudini
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sessioni
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -287,10 +374,10 @@ Aspetto
|
||||
Lingua
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
Informazioni
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Un compagno discreto per respirazione, abitudini e sincronizzazione.
|
||||
---
|
||||
[theme_label]
|
||||
Tema
|
||||
@@ -776,6 +863,9 @@ Modifica abitudine
|
||||
[habit_name_label]
|
||||
Nome
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Sottolineatura
|
||||
---
|
||||
@@ -874,6 +964,18 @@ 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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@
|
||||
履歴
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
プロフィール
|
||||
---
|
||||
[tab_habits]
|
||||
習慣
|
||||
@@ -29,19 +29,106 @@ Profile
|
||||
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]
|
||||
フレンド
|
||||
---
|
||||
[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_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]
|
||||
設定
|
||||
@@ -287,10 +374,10 @@ OK
|
||||
言語
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
アプリについて
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
呼吸、習慣、同期のための静かなパートナーです。
|
||||
---
|
||||
[theme_label]
|
||||
テーマ
|
||||
@@ -776,6 +863,9 @@ https:// または localhost:8080 のようなループバックを使用して
|
||||
[habit_name_label]
|
||||
名前
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
下線
|
||||
---
|
||||
@@ -874,6 +964,18 @@ https:// または localhost:8080 のようなループバックを使用して
|
||||
[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]
|
||||
ナビゲーション
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
기록
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
프로필
|
||||
---
|
||||
[tab_habits]
|
||||
습관
|
||||
@@ -29,19 +29,106 @@ Profile
|
||||
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]
|
||||
친구
|
||||
---
|
||||
[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_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]
|
||||
설정
|
||||
@@ -287,10 +374,10 @@ Finish
|
||||
언어
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
정보
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
호흡, 습관, 동기화를 위한 조용한 동반자입니다.
|
||||
---
|
||||
[theme_label]
|
||||
테마
|
||||
@@ -775,6 +862,9 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
[habit_name_label]
|
||||
이름
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
밑줄
|
||||
---
|
||||
@@ -873,6 +963,18 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
[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]
|
||||
탐색
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
Histórico
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Perfil
|
||||
---
|
||||
[tab_habits]
|
||||
Hábitos
|
||||
@@ -29,19 +29,106 @@ Manual
|
||||
Pet
|
||||
---
|
||||
[profile_data_title]
|
||||
Data
|
||||
Dados
|
||||
---
|
||||
[profile_data_button]
|
||||
Configure Data
|
||||
Configurar dados
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habits
|
||||
Habitos
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessions
|
||||
Sessoes
|
||||
---
|
||||
[profile_storage_label]
|
||||
Storage
|
||||
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_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
|
||||
@@ -287,10 +374,10 @@ Aparência
|
||||
Idioma
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
Sobre
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Um companheiro tranquilo para respiracao, habitos e sincronizacao.
|
||||
---
|
||||
[theme_label]
|
||||
Tema
|
||||
@@ -776,6 +863,9 @@ Editar hábito
|
||||
[habit_name_label]
|
||||
Nome
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Sublinhado
|
||||
---
|
||||
@@ -874,6 +964,18 @@ 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
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@ Inner Breeze
|
||||
История
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
Профиль
|
||||
---
|
||||
[tab_habits]
|
||||
Привычки
|
||||
@@ -29,19 +29,106 @@ Profile
|
||||
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]
|
||||
Друзья
|
||||
---
|
||||
[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_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]
|
||||
Настройки
|
||||
@@ -290,10 +377,10 @@ OK
|
||||
Язык
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
О приложении
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
Спокойный помощник для дыхания, привычек и синхронизации.
|
||||
---
|
||||
[theme_label]
|
||||
Тема
|
||||
@@ -776,6 +863,9 @@ liboqs не собран для этой платформы.
|
||||
[habit_name_label]
|
||||
Название
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
Подчеркивание
|
||||
---
|
||||
@@ -874,6 +964,18 @@ liboqs не собран для этой платформы.
|
||||
[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]
|
||||
Навигация
|
||||
---
|
||||
|
||||
+110
-8
@@ -5,7 +5,7 @@
|
||||
历史
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
个人资料
|
||||
---
|
||||
[tab_habits]
|
||||
习惯
|
||||
@@ -29,19 +29,106 @@ Profile
|
||||
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]
|
||||
好友
|
||||
---
|
||||
[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_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]
|
||||
设置
|
||||
@@ -287,10 +374,10 @@ Finish
|
||||
语言
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
关于
|
||||
---
|
||||
[about_text]
|
||||
A quiet breathing companion for practice, habits, and sync.
|
||||
用于呼吸、习惯和同步的安静伙伴。
|
||||
---
|
||||
[theme_label]
|
||||
主题
|
||||
@@ -774,6 +861,9 @@ liboqs 未为此目标构建。
|
||||
[habit_name_label]
|
||||
名称
|
||||
---
|
||||
[habit_description_label]
|
||||
Description
|
||||
---
|
||||
[habit_underline_label]
|
||||
下划线
|
||||
---
|
||||
@@ -872,6 +962,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]
|
||||
导航
|
||||
---
|
||||
|
||||
+38
-26
@@ -143,10 +143,10 @@ sync_thread_detach(SyncThread thread)
|
||||
#endif
|
||||
|
||||
static int g_sync_finished = 0;
|
||||
static int g_sync_finished_result = INBE_SYNC_CLIENT_OK;
|
||||
static int g_sync_finished_result = FLINT_LYRA_SYNC_OK;
|
||||
static int g_sync_finished_changed = 0;
|
||||
static int g_social_finished = 0;
|
||||
static int g_social_finished_result = INBE_SYNC_CLIENT_OK;
|
||||
static int g_social_finished_result = FLINT_LYRA_SYNC_OK;
|
||||
static char g_social_friend_requests_json[8192];
|
||||
static char g_social_friends_json[8192];
|
||||
static char g_social_leaderboard_json[8192];
|
||||
@@ -164,12 +164,12 @@ static sync_thread_return
|
||||
app_sync_worker(void *userdata)
|
||||
{
|
||||
InbeSyncWorkerArgs *args = userdata;
|
||||
InbeSyncClientResult result = INBE_SYNC_CLIENT_INVALID_URL;
|
||||
FlintLyraSyncResult result = FLINT_LYRA_SYNC_INVALID_URL;
|
||||
int changed = 0;
|
||||
|
||||
if(args != NULL) {
|
||||
result = sync_client_sync(args->url);
|
||||
changed = result == INBE_SYNC_CLIENT_OK && storage_last_sync_changed();
|
||||
changed = result == FLINT_LYRA_SYNC_OK && storage_last_sync_changed();
|
||||
free(args);
|
||||
}
|
||||
|
||||
@@ -186,9 +186,9 @@ static sync_thread_return
|
||||
app_social_worker(void *userdata)
|
||||
{
|
||||
InbeSocialWorkerArgs *args = userdata;
|
||||
InbeSyncClientResult result = INBE_SYNC_CLIENT_INVALID_URL;
|
||||
InbeSyncClientResult friends_result = INBE_SYNC_CLIENT_REQUEST_FAILED;
|
||||
InbeSyncClientResult leaderboard_result = INBE_SYNC_CLIENT_REQUEST_FAILED;
|
||||
FlintLyraSyncResult result = FLINT_LYRA_SYNC_INVALID_URL;
|
||||
FlintLyraSyncResult friends_result = FLINT_LYRA_SYNC_REQUEST_FAILED;
|
||||
FlintLyraSyncResult leaderboard_result = FLINT_LYRA_SYNC_REQUEST_FAILED;
|
||||
char requests_json[8192] = "{\"incoming\":[],\"outgoing\":[]}";
|
||||
char friends_json[8192] = "{\"friends\":[]}";
|
||||
char leaderboard_json[8192] = "{\"rows\":[]}";
|
||||
@@ -196,29 +196,29 @@ app_social_worker(void *userdata)
|
||||
if(args != NULL) {
|
||||
if(strcmp(args->action, "send") == 0) {
|
||||
result = sync_client_send_friend_request(args->url, args->action_value);
|
||||
if(result != INBE_SYNC_CLIENT_OK)
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
goto done;
|
||||
} else if(strcmp(args->action, "accept") == 0) {
|
||||
result = sync_client_accept_friend_request(args->url, args->action_value);
|
||||
if(result != INBE_SYNC_CLIENT_OK)
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
goto done;
|
||||
} else if(strcmp(args->action, "decline") == 0) {
|
||||
result = sync_client_decline_friend_request(args->url, args->action_value);
|
||||
if(result != INBE_SYNC_CLIENT_OK)
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
goto done;
|
||||
}
|
||||
result = sync_client_get_friend_requests(args->url, requests_json,
|
||||
sizeof(requests_json));
|
||||
if(result == INBE_SYNC_CLIENT_OK) {
|
||||
if(result == FLINT_LYRA_SYNC_OK) {
|
||||
friends_result = sync_client_get_friends(args->url, friends_json,
|
||||
sizeof(friends_json));
|
||||
leaderboard_result =
|
||||
sync_client_get_friend_stats(args->url, "inbe", args->practice,
|
||||
args->metric, leaderboard_json,
|
||||
sizeof(leaderboard_json));
|
||||
if(friends_result != INBE_SYNC_CLIENT_OK)
|
||||
if(friends_result != FLINT_LYRA_SYNC_OK)
|
||||
result = friends_result;
|
||||
else if(leaderboard_result != INBE_SYNC_CLIENT_OK)
|
||||
else if(leaderboard_result != FLINT_LYRA_SYNC_OK)
|
||||
result = leaderboard_result;
|
||||
}
|
||||
}
|
||||
@@ -257,14 +257,14 @@ app_collect_finished_sync(void)
|
||||
|
||||
if(!finished)
|
||||
return;
|
||||
if(result == INBE_SYNC_CLIENT_OK) {
|
||||
if(result == FLINT_LYRA_SYNC_OK) {
|
||||
TraceLog(LOG_INFO, "SYNC: background sync complete changed=%d", changed);
|
||||
g_social_refresh_pending = 1;
|
||||
if(changed)
|
||||
g_sync_refresh_pending = 1;
|
||||
} else {
|
||||
TraceLog(LOG_WARNING, "SYNC: background sync failed result=%d name=%s",
|
||||
result, sync_client_result_name(result));
|
||||
result, flint_lyra_sync_result_name(result));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ app_sync_events_worker(void *userdata)
|
||||
if(args == NULL)
|
||||
return sync_thread_done;
|
||||
for(;;) {
|
||||
InbeSyncClientResult result;
|
||||
FlintLyraSyncResult result;
|
||||
sync_lock();
|
||||
if(g_sync_running) {
|
||||
sync_unlock();
|
||||
@@ -287,10 +287,10 @@ app_sync_events_worker(void *userdata)
|
||||
|
||||
result = sync_client_wait_for_remote_event(args->url);
|
||||
sync_lock();
|
||||
if(result == INBE_SYNC_CLIENT_OK)
|
||||
if(result == FLINT_LYRA_SYNC_OK)
|
||||
g_remote_sync_due = 1;
|
||||
sync_unlock();
|
||||
if(result != INBE_SYNC_CLIENT_OK)
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
sync_sleep(2);
|
||||
}
|
||||
return sync_thread_done;
|
||||
@@ -346,7 +346,7 @@ static double g_sync_events_retry_at = 0.0;
|
||||
static void
|
||||
app_collect_finished_sync(void)
|
||||
{
|
||||
InbeSyncClientResult result;
|
||||
FlintLyraSyncResult result;
|
||||
int changed = 0;
|
||||
|
||||
if(sync_client_web_poll_remote_event())
|
||||
@@ -356,14 +356,14 @@ app_collect_finished_sync(void)
|
||||
if(!sync_client_web_sync_poll(&result, &changed))
|
||||
return;
|
||||
g_sync_running = 0;
|
||||
if(result == INBE_SYNC_CLIENT_OK) {
|
||||
if(result == FLINT_LYRA_SYNC_OK) {
|
||||
TraceLog(LOG_INFO, "SYNC: background sync complete changed=%d", changed);
|
||||
g_social_refresh_pending = 1;
|
||||
if(changed)
|
||||
g_sync_refresh_pending = 1;
|
||||
} else {
|
||||
TraceLog(LOG_WARNING, "SYNC: background sync failed result=%d name=%s",
|
||||
result, sync_client_result_name(result));
|
||||
result, flint_lyra_sync_result_name(result));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,6 +398,11 @@ app_background_sync_safe(const InbeApp *app)
|
||||
return 0;
|
||||
if(app->modal.active)
|
||||
return 0;
|
||||
if(app->habit_edit.active ||
|
||||
app->sync_server_url_focused ||
|
||||
app->sync_alias_focused ||
|
||||
app->profile_friend_input_focused)
|
||||
return 0;
|
||||
if(app->inbe.screen == InbeScreenPracticeSession ||
|
||||
app->inbe.screen == InbeScreenMeditation ||
|
||||
app->inbe.screen == InbeScreenSunSalutation)
|
||||
@@ -603,9 +608,9 @@ app_collect_finished_social_refresh(InbeApp *app)
|
||||
|
||||
if(!finished)
|
||||
return;
|
||||
if(result != INBE_SYNC_CLIENT_OK) {
|
||||
if(result != FLINT_LYRA_SYNC_OK) {
|
||||
TraceLog(LOG_WARNING, "SYNC: social refresh failed result=%d name=%s",
|
||||
result, sync_client_result_name(result));
|
||||
result, flint_lyra_sync_result_name(result));
|
||||
return;
|
||||
}
|
||||
storage_set_social_cache_json("friends.requests", requests_json);
|
||||
@@ -770,7 +775,7 @@ app_pump_sync(InbeApp *app)
|
||||
return;
|
||||
app_collect_finished_sync();
|
||||
app_collect_finished_social_refresh(app);
|
||||
if(storage_sync_review_pending() && !app->modal.active) {
|
||||
if(storage_sync_review_pending() && app_background_sync_safe(app)) {
|
||||
if(storage_sync_review_clear_if_no_visible_diff()) {
|
||||
app_reload_after_import(app, 0);
|
||||
} else {
|
||||
@@ -1752,6 +1757,7 @@ updateapp(InbeApp *app)
|
||||
int frame_screen = app->inbe.screen;
|
||||
int first_run_guide_active = 0;
|
||||
int habits_guide_active = 0;
|
||||
int profile_guide_active = 0;
|
||||
int practice_fullscreen_modal = 0;
|
||||
|
||||
#if !ANDROID_BUILD && !defined(PLATFORM_WEB)
|
||||
@@ -1766,23 +1772,28 @@ updateapp(InbeApp *app)
|
||||
app->practice_coming_soon_ticks--;
|
||||
practice_screen_prepare_first_run_guide(app);
|
||||
habits_screen_prepare_first_run_guide(app);
|
||||
profile_screen_prepare_first_run_guide(app);
|
||||
first_run_guide_active = practice_screen_first_run_guide_active(app);
|
||||
habits_guide_active = habits_screen_first_run_guide_active(app);
|
||||
profile_guide_active = profile_screen_first_run_guide_active(app);
|
||||
practice_fullscreen_modal =
|
||||
app->modal.active &&
|
||||
(app->modal.type == UIModalPracticeManual ||
|
||||
app->modal.type == UIModalPracticeConfig ||
|
||||
app->modal.type == UIModalEditProgressiveStartSpeed);
|
||||
if(app->modal.active || first_run_guide_active || habits_guide_active) {
|
||||
if(app->modal.active || first_run_guide_active || habits_guide_active ||
|
||||
profile_guide_active) {
|
||||
ui_push_input_capture((Rectangle){0, 0, (float)view_width, (float)view_height}, 0);
|
||||
}
|
||||
|
||||
if(IsKeyPressed(KEY_BACK)) {
|
||||
if(first_run_guide_active || habits_guide_active) {
|
||||
if(first_run_guide_active || habits_guide_active || profile_guide_active) {
|
||||
app->tutorial_step = 0;
|
||||
practice_screen_prepare_first_run_guide(app);
|
||||
app->habits_guide_step = 0;
|
||||
habits_screen_prepare_first_run_guide(app);
|
||||
app->profile_guide_step = 0;
|
||||
profile_screen_prepare_first_run_guide(app);
|
||||
} else if(app->modal.active) {
|
||||
app_close_modal(app);
|
||||
} else {
|
||||
@@ -1899,6 +1910,7 @@ finish_frame:
|
||||
app_draw_bottom_nav(app);
|
||||
practice_screen_draw_first_run_guide(app);
|
||||
habits_screen_draw_first_run_guide(app);
|
||||
profile_screen_draw_first_run_guide(app);
|
||||
draw_global_modal(app);
|
||||
app_flush_deferred_settings(app);
|
||||
app_observe_direct_screen_change(app, frame_screen);
|
||||
|
||||
@@ -52,6 +52,8 @@ enum {
|
||||
PROFILE_VIEW_MAIN = 0,
|
||||
PROFILE_VIEW_DATA,
|
||||
PROFILE_VIEW_SYNC_ACCOUNT,
|
||||
PROFILE_VIEW_HABITS,
|
||||
PROFILE_VIEW_PRACTICES,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -225,8 +227,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;
|
||||
@@ -305,7 +310,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;
|
||||
|
||||
@@ -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},
|
||||
@@ -258,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
|
||||
@@ -321,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
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#define INBE_VERSION_MAJOR 1
|
||||
#define INBE_VERSION_MINOR 7
|
||||
#define INBE_VERSION_PATCH 0
|
||||
#define INBE_VERSION_STRING "1.7.0"
|
||||
#define INBE_VERSION_PATCH 3
|
||||
#define INBE_VERSION_STRING "1.7.3"
|
||||
|
||||
#endif
|
||||
+60
-23
@@ -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);
|
||||
}
|
||||
@@ -183,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 {
|
||||
@@ -195,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;
|
||||
@@ -213,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
|
||||
@@ -239,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),
|
||||
@@ -253,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
|
||||
};
|
||||
@@ -302,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++)
|
||||
@@ -438,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,
|
||||
|
||||
+68
-15
@@ -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)
|
||||
{
|
||||
@@ -808,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;
|
||||
@@ -831,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,
|
||||
@@ -861,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);
|
||||
@@ -875,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) {
|
||||
@@ -994,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) {
|
||||
@@ -1045,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);
|
||||
@@ -1137,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);
|
||||
|
||||
@@ -1708,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);
|
||||
|
||||
@@ -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;
|
||||
@@ -123,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,
|
||||
|
||||
@@ -13,6 +13,57 @@ enum {
|
||||
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)
|
||||
{
|
||||
@@ -43,7 +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);
|
||||
if(!practice_is_visible(app, app->exercise_type))
|
||||
app->exercise_type = practice_first_visible(app);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -88,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},
|
||||
@@ -102,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
|
||||
@@ -131,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){
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
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);
|
||||
|
||||
+295
-46
@@ -4,6 +4,7 @@
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
#include "practice_screen.h"
|
||||
#include "settings/settings_data.h"
|
||||
#include "settings/settings_screen.h"
|
||||
#include "settings/settings_sync_account.h"
|
||||
@@ -18,10 +19,12 @@
|
||||
#include <time.h>
|
||||
|
||||
extern int view_height;
|
||||
extern int view_width;
|
||||
|
||||
#define INBE_SYNC_SERVER_URL_KEY "sync_server_url"
|
||||
|
||||
enum {
|
||||
PROFILE_GUIDE_STEPS = 3,
|
||||
PROFILE_LEADERBOARD_STREAK = 0,
|
||||
PROFILE_LEADERBOARD_AVG_HOLD,
|
||||
PROFILE_LEADERBOARD_METRIC_COUNT
|
||||
@@ -42,13 +45,17 @@ static int
|
||||
profile_main_content_height(int content_w)
|
||||
{
|
||||
(void)content_w;
|
||||
return flint_px(620);
|
||||
return flint_px(700);
|
||||
}
|
||||
|
||||
static int
|
||||
profile_data_content_height(int content_w)
|
||||
{
|
||||
return settings_data_content_height(content_w) + flint_px(104);
|
||||
int height = settings_data_content_height(content_w) + flint_px(104);
|
||||
|
||||
if(sync_account_load(&(InbeSyncAccount){0}))
|
||||
height += flint_px(86);
|
||||
return height;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -58,6 +65,20 @@ profile_sync_content_height(int content_w)
|
||||
return flint_px(430);
|
||||
}
|
||||
|
||||
static int
|
||||
profile_habits_content_height(int content_w)
|
||||
{
|
||||
(void)content_w;
|
||||
return flint_px(90) + flint_px(48) * INBE_HABIT_MAX;
|
||||
}
|
||||
|
||||
static int
|
||||
profile_practices_content_height(int content_w)
|
||||
{
|
||||
(void)content_w;
|
||||
return flint_px(92) + flint_px(46) * EXERCISE_COUNT;
|
||||
}
|
||||
|
||||
static int
|
||||
profile_content_height(int content_w, void *user_data)
|
||||
{
|
||||
@@ -67,6 +88,10 @@ profile_content_height(int content_w, void *user_data)
|
||||
return profile_data_content_height(content_w);
|
||||
if(app != NULL && app->profile_view == PROFILE_VIEW_SYNC_ACCOUNT)
|
||||
return profile_sync_content_height(content_w);
|
||||
if(app != NULL && app->profile_view == PROFILE_VIEW_HABITS)
|
||||
return profile_habits_content_height(content_w);
|
||||
if(app != NULL && app->profile_view == PROFILE_VIEW_PRACTICES)
|
||||
return profile_practices_content_height(content_w);
|
||||
if(app != NULL && app->profile_tab == PROFILE_TAB_FRIENDS)
|
||||
return flint_px(740);
|
||||
if(app != NULL && app->profile_tab == PROFILE_TAB_LEADERBOARD)
|
||||
@@ -165,8 +190,10 @@ static const char *
|
||||
profile_leaderboard_metric_label(int practice, int metric)
|
||||
{
|
||||
if(metric != PROFILE_LEADERBOARD_AVG_HOLD)
|
||||
return "Streak";
|
||||
return practice == EXERCISE_MEDITATION ? "AVG time" : "Avg hold";
|
||||
return locale_get("profile_metric_streak");
|
||||
return practice == EXERCISE_MEDITATION
|
||||
? locale_get("profile_metric_avg_time")
|
||||
: locale_get("profile_metric_avg_hold");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -281,14 +308,16 @@ profile_draw_json_people(const char *json, const char *array_key,
|
||||
snprintf(key_pattern, sizeof(key_pattern), "\"%s\"", array_key);
|
||||
p = strstr(json != NULL ? json : "", key_pattern);
|
||||
if(p == NULL) {
|
||||
flint_text_draw("None", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_none_label"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
return;
|
||||
}
|
||||
p = strchr(p, '[');
|
||||
end = p != NULL ? strchr(p, ']') : NULL;
|
||||
if(p == NULL || end == NULL) {
|
||||
flint_text_draw("None", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_none_label"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
return;
|
||||
}
|
||||
@@ -330,17 +359,20 @@ profile_draw_json_people(const char *json, const char *array_key,
|
||||
if(with_actions) {
|
||||
int btn_w = (w - flint_px(8)) / 2;
|
||||
if(ui_draw_generic_button(x, *y + flint_px(22), btn_w, flint_px(30),
|
||||
"Accept", UI_BUTTON_STYLE_PRIMARY, 0, &hover_accept) &&
|
||||
locale_get("profile_friend_accept_button"),
|
||||
UI_BUTTON_STYLE_PRIMARY, 0, &hover_accept) &&
|
||||
profile_sync_url(url, sizeof(url))) {
|
||||
app_request_friend_accept(app, id);
|
||||
settings_screen_set_status_success("Updating", NULL);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
if(ui_draw_generic_button(x + btn_w + flint_px(8), *y + flint_px(22), btn_w,
|
||||
flint_px(30), "Decline", UI_BUTTON_STYLE_SECONDARY,
|
||||
flint_px(30),
|
||||
locale_get("profile_friend_decline_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY,
|
||||
0, &hover_decline) &&
|
||||
profile_sync_url(url, sizeof(url))) {
|
||||
app_request_friend_decline(app, id);
|
||||
settings_screen_set_status_success("Updating", NULL);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
}
|
||||
*y += row_h;
|
||||
@@ -348,7 +380,8 @@ profile_draw_json_people(const char *json, const char *array_key,
|
||||
p++;
|
||||
}
|
||||
if(rows == 0) {
|
||||
flint_text_draw("None", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_none_label"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
}
|
||||
}
|
||||
@@ -390,17 +423,130 @@ profile_tab_title(int tab)
|
||||
{
|
||||
switch(tab) {
|
||||
case PROFILE_TAB_FRIENDS:
|
||||
return "Friends";
|
||||
return locale_get("profile_friends_title");
|
||||
case PROFILE_TAB_LEADERBOARD:
|
||||
return "Leaderboard";
|
||||
return locale_get("profile_leaderboard_title");
|
||||
case PROFILE_TAB_DATA:
|
||||
return locale_get("profile_data_title");
|
||||
case PROFILE_TAB_OVERVIEW:
|
||||
default:
|
||||
return "Profile";
|
||||
return locale_get("tab_profile");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
profile_overview_column(int *x, int *w)
|
||||
{
|
||||
flint_centered_column(flint_px(CONTENT_MAX_W), flint_page_side_padding(), x, w);
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
profile_guide_account_anchor(void)
|
||||
{
|
||||
int x;
|
||||
int w;
|
||||
|
||||
profile_overview_column(&x, &w);
|
||||
return (Rectangle){(float)(x - flint_px(6)), (float)flint_px(8),
|
||||
(float)(w + flint_px(12)), (float)flint_px(70)};
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
profile_guide_data_anchor(void)
|
||||
{
|
||||
int x;
|
||||
int w;
|
||||
int y = flint_px(82);
|
||||
|
||||
profile_overview_column(&x, &w);
|
||||
return (Rectangle){(float)(x - flint_px(6)), (float)(y - flint_px(6)),
|
||||
(float)(w + flint_px(12)), (float)flint_px(190)};
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
profile_guide_social_anchor(InbeApp *app)
|
||||
{
|
||||
int x;
|
||||
int w;
|
||||
int y = flint_px(278);
|
||||
|
||||
(void)app;
|
||||
profile_overview_column(&x, &w);
|
||||
return (Rectangle){(float)(x - flint_px(6)), (float)(y - flint_px(6)),
|
||||
(float)(w + flint_px(12)), (float)flint_px(102)};
|
||||
}
|
||||
|
||||
static void
|
||||
profile_screen_finish_first_run_guide(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
app->profile_guide_seen = 1;
|
||||
app->profile_guide_step = 0;
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
int
|
||||
profile_screen_first_run_guide_active(const InbeApp *app)
|
||||
{
|
||||
return app != NULL && !app->profile_guide_seen && !app->modal.active &&
|
||||
app->inbe.screen == InbeScreenProfile;
|
||||
}
|
||||
|
||||
void
|
||||
profile_screen_prepare_first_run_guide(InbeApp *app)
|
||||
{
|
||||
if(!profile_screen_first_run_guide_active(app))
|
||||
return;
|
||||
app->profile_guide_step = clampi(app->profile_guide_step, 0, PROFILE_GUIDE_STEPS - 1);
|
||||
app->profile_view = PROFILE_VIEW_MAIN;
|
||||
app->profile_tab = PROFILE_TAB_OVERVIEW;
|
||||
app->profile_scroll = 0;
|
||||
}
|
||||
|
||||
void
|
||||
profile_screen_draw_first_run_guide(InbeApp *app)
|
||||
{
|
||||
FlintUIGuideStep steps[PROFILE_GUIDE_STEPS];
|
||||
FlintUIGuideResult result;
|
||||
|
||||
if(!profile_screen_first_run_guide_active(app))
|
||||
return;
|
||||
|
||||
steps[0] = (FlintUIGuideStep){
|
||||
.anchor = profile_guide_account_anchor(),
|
||||
.text = locale_get("profile_guide_account")
|
||||
};
|
||||
steps[1] = (FlintUIGuideStep){
|
||||
.anchor = profile_guide_data_anchor(),
|
||||
.text = locale_get("profile_guide_data")
|
||||
};
|
||||
steps[2] = (FlintUIGuideStep){
|
||||
.anchor = profile_guide_social_anchor(app),
|
||||
.text = locale_get(sync_account_load(&(InbeSyncAccount){0})
|
||||
? "profile_guide_social"
|
||||
: "profile_guide_social_no_account")
|
||||
};
|
||||
|
||||
result = flint_ui_draw_guide_overlay((FlintUIGuideOverlay){
|
||||
.steps = steps,
|
||||
.count = PROFILE_GUIDE_STEPS,
|
||||
.step = &app->profile_guide_step,
|
||||
.view_width = view_width,
|
||||
.view_height = view_height,
|
||||
.reserved_top = 0,
|
||||
.reserved_bottom = ui_bottom_nav_height(),
|
||||
.max_width = flint_px(300),
|
||||
.paragraph_font = flint_ui_font_small(),
|
||||
.close_icon = app->icons[UI_ICON_TYPE_X],
|
||||
.back_icon = app->icons[UI_ICON_TYPE_BACKWARD],
|
||||
.next_icon = app->icons[UI_ICON_TYPE_FORWARD],
|
||||
.done_icon = app->icons[UI_ICON_TYPE_CHECK]
|
||||
});
|
||||
if(result.closed || result.finished)
|
||||
profile_screen_finish_first_run_guide(app);
|
||||
}
|
||||
|
||||
static int
|
||||
profile_json_array_count(const char *json, const char *array_key)
|
||||
{
|
||||
@@ -466,6 +612,8 @@ profile_draw_overview(InbeApp *app, int x, int w, int *y)
|
||||
int btn_h = flint_px(34);
|
||||
int hover_account = 0;
|
||||
int hover_data = 0;
|
||||
int hover_habits = 0;
|
||||
int hover_practices = 0;
|
||||
int hover_friends = 0;
|
||||
int hover_leaderboard = 0;
|
||||
int half_w = (w - flint_px(8)) / 2;
|
||||
@@ -490,21 +638,24 @@ profile_draw_overview(InbeApp *app, int x, int w, int *y)
|
||||
snprintf(account_text, sizeof(account_text), "%.12s...", account.public_id);
|
||||
}
|
||||
} else {
|
||||
snprintf(account_text, sizeof(account_text), "No account");
|
||||
snprintf(account_text, sizeof(account_text), "%s", locale_get("profile_no_account"));
|
||||
}
|
||||
|
||||
flint_text_draw("Account", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_account_section"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(18);
|
||||
flint_text_draw(account_text, x, *y, font, flint_theme_get_text());
|
||||
if(ui_draw_generic_button(x + w - flint_px(132), *y - flint_px(8), flint_px(132),
|
||||
btn_h, "Configure", UI_BUTTON_STYLE_SECONDARY, 0,
|
||||
btn_h, locale_get("profile_configure_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0,
|
||||
&hover_account))
|
||||
settings_data_open_sync_account_config(app);
|
||||
*y += flint_px(38);
|
||||
profile_draw_divider(x, w, *y);
|
||||
*y += flint_px(18);
|
||||
|
||||
flint_text_draw("Data", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_data_section"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
profile_draw_summary_columns(x, w, y);
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, locale_get("profile_data_button"),
|
||||
@@ -513,35 +664,43 @@ profile_draw_overview(InbeApp *app, int x, int w, int *y)
|
||||
app->profile_scroll = 0;
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
*y += btn_h + flint_px(8);
|
||||
if(ui_draw_generic_button(x, *y, half_w, btn_h, locale_get("profile_my_habits_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover_habits)) {
|
||||
app->profile_view = PROFILE_VIEW_HABITS;
|
||||
app->profile_scroll = 0;
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
if(ui_draw_generic_button(x + half_w + flint_px(8), *y, half_w, btn_h,
|
||||
locale_get("profile_my_practices_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover_practices)) {
|
||||
app->profile_view = PROFILE_VIEW_PRACTICES;
|
||||
app->profile_scroll = 0;
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
*y += btn_h + flint_px(20);
|
||||
profile_draw_divider(x, w, *y);
|
||||
*y += flint_px(18);
|
||||
|
||||
flint_text_draw("Sync", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(22);
|
||||
settings_data_draw_sync_status(x, w, y);
|
||||
*y += flint_px(8);
|
||||
profile_draw_divider(x, w, *y);
|
||||
*y += flint_px(18);
|
||||
|
||||
snprintf(friend_text, sizeof(friend_text), "%d friends",
|
||||
snprintf(friend_text, sizeof(friend_text), locale_get("profile_friends_count_format"),
|
||||
profile_json_array_count(app->profile_friends_json, "friends"));
|
||||
snprintf(pending_text, sizeof(pending_text), "%d pending",
|
||||
snprintf(pending_text, sizeof(pending_text), locale_get("profile_pending_count_format"),
|
||||
profile_json_array_count(app->profile_friend_requests_json, "incoming"));
|
||||
flint_text_draw("Social", x, *y, small, flint_darken(flint_theme_get_text(), 35));
|
||||
flint_text_draw(locale_get("profile_social_section"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(20);
|
||||
flint_text_draw(friend_text, x, *y, font, flint_theme_get_text());
|
||||
flint_text_draw(pending_text, x + w - flint_text_measure(pending_text, font), *y,
|
||||
font, flint_theme_get_text());
|
||||
*y += flint_px(34);
|
||||
if(ui_draw_generic_button(x, *y, half_w, btn_h, "Friends",
|
||||
UI_BUTTON_STYLE_PRIMARY, 0, &hover_friends)) {
|
||||
if(ui_draw_generic_button(x, *y, half_w, btn_h, locale_get("profile_friends_title"),
|
||||
UI_BUTTON_STYLE_PRIMARY, !has_account, &hover_friends)) {
|
||||
app->profile_tab = PROFILE_TAB_FRIENDS;
|
||||
app->profile_scroll = 0;
|
||||
}
|
||||
if(ui_draw_generic_button(x + half_w + flint_px(8), *y, half_w, btn_h,
|
||||
"Leaderboard", UI_BUTTON_STYLE_PRIMARY, 0,
|
||||
&hover_leaderboard)) {
|
||||
locale_get("profile_leaderboard_title"), UI_BUTTON_STYLE_PRIMARY,
|
||||
!has_account, &hover_leaderboard)) {
|
||||
app->profile_tab = PROFILE_TAB_LEADERBOARD;
|
||||
app->profile_scroll = 0;
|
||||
}
|
||||
@@ -555,7 +714,7 @@ profile_refresh_friends(InbeApp *app)
|
||||
return;
|
||||
profile_load_friends_cache(app);
|
||||
app_request_social_refresh(app);
|
||||
settings_screen_set_status_success("Updating", NULL);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -572,7 +731,8 @@ profile_draw_friends(InbeApp *app, int x, int w, int *y)
|
||||
profile_load_friends_cache(app);
|
||||
|
||||
*y += flint_px(16);
|
||||
flint_text_draw("Friends", x, *y, font, flint_theme_get_text());
|
||||
flint_text_draw(locale_get("profile_friends_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(30);
|
||||
(void)flint_ui_text_field((FlintUITextField){
|
||||
.bounds = {x, *y, w, flint_px(38)},
|
||||
@@ -588,12 +748,14 @@ profile_draw_friends(InbeApp *app, int x, int w, int *y)
|
||||
.commit_pressed = &commit
|
||||
});
|
||||
*y += flint_px(46);
|
||||
if((ui_draw_generic_button(x, *y, w, btn_h, "Add friend", UI_BUTTON_STYLE_PRIMARY,
|
||||
if((ui_draw_generic_button(x, *y, w, btn_h,
|
||||
locale_get("profile_add_friend_button"),
|
||||
UI_BUTTON_STYLE_PRIMARY,
|
||||
app->profile_friend_input[0] == '\0', &hover_add) || commit) &&
|
||||
app->profile_friend_input[0] != '\0') {
|
||||
if(profile_sync_url(url, sizeof(url))) {
|
||||
app_request_friend_send(app, app->profile_friend_input);
|
||||
settings_screen_set_status_success("Updating", NULL);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
profile_load_friends_cache(app);
|
||||
app->profile_friend_input[0] = '\0';
|
||||
app->profile_friend_input_cursor = 0;
|
||||
@@ -602,21 +764,25 @@ profile_draw_friends(InbeApp *app, int x, int w, int *y)
|
||||
}
|
||||
}
|
||||
*y += btn_h + flint_px(10);
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, "Refresh", UI_BUTTON_STYLE_SECONDARY,
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, locale_get("profile_refresh_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY,
|
||||
0, &hover_refresh)) {
|
||||
profile_refresh_friends(app);
|
||||
}
|
||||
*y += btn_h + flint_px(22);
|
||||
|
||||
flint_text_draw("Incoming", x, *y, font, flint_theme_get_text());
|
||||
flint_text_draw(locale_get("profile_incoming_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(28);
|
||||
profile_draw_json_people(app->profile_friend_requests_json, "incoming", x, w, y, 1, app);
|
||||
*y += flint_px(16);
|
||||
flint_text_draw("Friends", x, *y, font, flint_theme_get_text());
|
||||
flint_text_draw(locale_get("profile_friends_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(28);
|
||||
profile_draw_json_people(app->profile_friends_json, "friends", x, w, y, 0, app);
|
||||
*y += flint_px(16);
|
||||
flint_text_draw("Outgoing", x, *y, font, flint_theme_get_text());
|
||||
flint_text_draw(locale_get("profile_outgoing_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(28);
|
||||
profile_draw_json_people(app->profile_friend_requests_json, "outgoing", x, w, y, 0, app);
|
||||
}
|
||||
@@ -823,7 +989,7 @@ profile_draw_leaderboard_rows(InbeApp *app, const char *json, int x, int w, int
|
||||
}
|
||||
|
||||
if(rows == 0) {
|
||||
flint_text_draw("No leaderboard data", x, *y, small,
|
||||
flint_text_draw(locale_get("profile_no_leaderboard_data"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
}
|
||||
@@ -836,7 +1002,7 @@ profile_refresh_leaderboard(InbeApp *app)
|
||||
return;
|
||||
profile_load_leaderboard_cache(app);
|
||||
app_request_social_refresh(app);
|
||||
settings_screen_set_status_success("Updating", NULL);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -905,7 +1071,7 @@ profile_draw_leaderboard(InbeApp *app, int x, int w, int *y)
|
||||
PROFILE_LEADERBOARD_AVG_HOLD);
|
||||
|
||||
*y += flint_px(16);
|
||||
flint_text_draw("Practice", x, *y, flint_ui_font_small(),
|
||||
flint_text_draw(locale_get("profile_practice_label"), x, *y, flint_ui_font_small(),
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(22);
|
||||
before_practice = app->profile_leaderboard_practice;
|
||||
@@ -944,10 +1110,79 @@ profile_draw_data(InbeApp *app, int x, int w, int *y)
|
||||
flint_text_draw(locale_get("profile_data_title"), x, *y, font, flint_theme_get_text());
|
||||
*y += flint_px(28);
|
||||
profile_draw_data_summary(x, w, y);
|
||||
settings_data_draw_sync_status(x, w, y);
|
||||
*y += flint_px(10);
|
||||
settings_data_draw_actions(app, x, w, y);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_habits(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
int font = flint_ui_font();
|
||||
int small = flint_ui_font_small();
|
||||
int btn_h = flint_px(32);
|
||||
int btn_w = flint_px(74);
|
||||
int gap = flint_px(8);
|
||||
|
||||
*y += flint_px(16);
|
||||
flint_text_draw(locale_get("profile_my_habits_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(34);
|
||||
|
||||
for(int i = 0; i < app->habits.count; i++) {
|
||||
int row_y = *y;
|
||||
int up_hover = 0;
|
||||
int down_hover = 0;
|
||||
|
||||
flint_text_draw(app->habits.items[i].name, x, row_y + flint_px(7),
|
||||
font, flint_theme_get_text());
|
||||
if(ui_draw_generic_button(x + w - btn_w * 2 - gap, row_y, btn_w, btn_h,
|
||||
locale_get("move_up_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, i == 0, &up_hover)) {
|
||||
if(habits_move(&app->habits, i, i - 1))
|
||||
app_auto_sync(app);
|
||||
return;
|
||||
}
|
||||
if(ui_draw_generic_button(x + w - btn_w, row_y, btn_w, btn_h,
|
||||
locale_get("move_down_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY,
|
||||
i == app->habits.count - 1, &down_hover)) {
|
||||
if(habits_move(&app->habits, i, i + 1))
|
||||
app_auto_sync(app);
|
||||
return;
|
||||
}
|
||||
*y += flint_px(46);
|
||||
profile_draw_divider(x, w, *y - flint_px(6));
|
||||
}
|
||||
|
||||
if(app->habits.count <= 0)
|
||||
flint_text_draw(locale_get("habit_empty_title"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_practices(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
int font = flint_ui_font();
|
||||
|
||||
(void)w;
|
||||
*y += flint_px(16);
|
||||
flint_text_draw(locale_get("profile_my_practices_title"), x, *y, font,
|
||||
flint_theme_get_text());
|
||||
*y += flint_px(34);
|
||||
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
int enabled = practice_is_visible(app, i);
|
||||
if(ui_draw_checkbox_row((FlintUICheckboxRow){
|
||||
.label = profile_practice_label(i),
|
||||
.value = &enabled
|
||||
}, x, *y)) {
|
||||
practice_set_visible(app, i, enabled);
|
||||
}
|
||||
*y += ui_checkbox_row_height((FlintUICheckboxRow){0});
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
profile_screen_draw(InbeApp *app)
|
||||
{
|
||||
@@ -972,11 +1207,21 @@ profile_screen_draw(InbeApp *app)
|
||||
|
||||
if(app->profile_tab < 0 || app->profile_tab >= PROFILE_TAB_COUNT)
|
||||
app->profile_tab = PROFILE_TAB_OVERVIEW;
|
||||
if((app->profile_tab == PROFILE_TAB_FRIENDS ||
|
||||
app->profile_tab == PROFILE_TAB_LEADERBOARD) &&
|
||||
!sync_account_load(&(InbeSyncAccount){0})) {
|
||||
app->profile_tab = PROFILE_TAB_OVERVIEW;
|
||||
app->profile_scroll = 0;
|
||||
}
|
||||
|
||||
if(app->profile_view != PROFILE_VIEW_MAIN) {
|
||||
const char *title = app->profile_view == PROFILE_VIEW_SYNC_ACCOUNT
|
||||
? locale_get("sync_configure_account_button")
|
||||
: locale_get("profile_data_title");
|
||||
const char *title = locale_get("profile_data_title");
|
||||
if(app->profile_view == PROFILE_VIEW_SYNC_ACCOUNT)
|
||||
title = locale_get("sync_configure_account_button");
|
||||
else if(app->profile_view == PROFILE_VIEW_HABITS)
|
||||
title = locale_get("profile_my_habits_title");
|
||||
else if(app->profile_view == PROFILE_VIEW_PRACTICES)
|
||||
title = locale_get("profile_my_practices_title");
|
||||
FlintUIHeader header = ui_draw_title_header(header_h, title,
|
||||
app->icons[UI_ICON_TYPE_RETURN],
|
||||
(Texture2D){0});
|
||||
@@ -1016,6 +1261,10 @@ profile_screen_draw(InbeApp *app)
|
||||
settings_sync_account_draw_config(app, page.content_x, page.content_w, &y);
|
||||
else if(app->profile_view == PROFILE_VIEW_DATA)
|
||||
profile_draw_data(app, page.content_x, page.content_w, &y);
|
||||
else if(app->profile_view == PROFILE_VIEW_HABITS)
|
||||
profile_draw_habits(app, page.content_x, page.content_w, &y);
|
||||
else if(app->profile_view == PROFILE_VIEW_PRACTICES)
|
||||
profile_draw_practices(app, page.content_x, page.content_w, &y);
|
||||
else if(app->profile_tab == PROFILE_TAB_FRIENDS)
|
||||
profile_draw_friends(app, page.content_x, page.content_w, &y);
|
||||
else if(app->profile_tab == PROFILE_TAB_LEADERBOARD)
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
|
||||
int profile_screen_draw(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
|
||||
@@ -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,7 +275,7 @@ 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);
|
||||
@@ -307,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)
|
||||
@@ -319,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");
|
||||
@@ -670,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 {
|
||||
|
||||
+7
-2
@@ -217,6 +217,7 @@ schema_create(void)
|
||||
" id TEXT PRIMARY KEY,"
|
||||
" user_id TEXT NOT NULL,"
|
||||
" name TEXT NOT NULL,"
|
||||
" description TEXT NOT NULL DEFAULT '',"
|
||||
" color_r INTEGER NOT NULL,"
|
||||
" color_g INTEGER NOT NULL,"
|
||||
" color_b INTEGER NOT NULL,"
|
||||
@@ -391,6 +392,7 @@ migrate_schema(void)
|
||||
" id TEXT PRIMARY KEY,"
|
||||
" user_id TEXT NOT NULL,"
|
||||
" name TEXT NOT NULL,"
|
||||
" description TEXT NOT NULL DEFAULT '',"
|
||||
" color_r INTEGER NOT NULL,"
|
||||
" color_g INTEGER NOT NULL,"
|
||||
" color_b INTEGER NOT NULL,"
|
||||
@@ -400,13 +402,16 @@ migrate_schema(void)
|
||||
" deleted_at INTEGER NOT NULL DEFAULT 0,"
|
||||
" updated_at INTEGER NOT NULL DEFAULT 0"
|
||||
");"
|
||||
"INSERT INTO habits(id,user_id,name,color_r,color_g,color_b,sync_mode,sync_activity,sort_order,deleted_at,updated_at)"
|
||||
" SELECT id,user_id,name,color_r,color_g,color_b,sync_mode,sync_activity,sort_order,deleted_at,0"
|
||||
"INSERT INTO habits(id,user_id,name,description,color_r,color_g,color_b,sync_mode,sync_activity,sort_order,deleted_at,updated_at)"
|
||||
" SELECT id,user_id,name,'',color_r,color_g,color_b,sync_mode,sync_activity,sort_order,deleted_at,0"
|
||||
" FROM habits_with_sync_topic;"
|
||||
"DROP TABLE habits_with_sync_topic;"
|
||||
"COMMIT;"))
|
||||
return 0;
|
||||
}
|
||||
if(!table_has_column("habits", "description") &&
|
||||
!exec_sql("ALTER TABLE habits ADD COLUMN description TEXT NOT NULL DEFAULT ''"))
|
||||
return 0;
|
||||
if(!table_has_column("habits", "counter_enabled") &&
|
||||
!exec_sql("ALTER TABLE habits ADD COLUMN counter_enabled INTEGER NOT NULL DEFAULT 0"))
|
||||
return 0;
|
||||
|
||||
@@ -102,7 +102,8 @@ static const char *const importable_setting_keys[] = {
|
||||
"meditation_music_track",
|
||||
"play_in_background",
|
||||
"language",
|
||||
"practice_category_tab"
|
||||
"practice_category_tab",
|
||||
"practice_visible_mask"
|
||||
};
|
||||
|
||||
static int
|
||||
|
||||
+31
-17
@@ -2646,7 +2646,7 @@ storage_habits_load(void *habits_ptr)
|
||||
memset(habits, 0, sizeof(*habits));
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT "
|
||||
"id,name,color_r,color_g,color_b,sync_mode,sync_activity,counter_"
|
||||
"id,name,description,color_r,color_g,color_b,sync_mode,sync_activity,counter_"
|
||||
"enabled "
|
||||
"FROM habits WHERE deleted_at=0 ORDER BY sort_order,id LIMIT 10",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
@@ -2657,12 +2657,14 @@ storage_habits_load(void *habits_ptr)
|
||||
snprintf(habits->loaded_ids[index], sizeof(habits->loaded_ids[index]), "%s", habit->id);
|
||||
snprintf(habit->name, sizeof(habit->name), "%s",
|
||||
(const char *)sqlite3_column_text(stmt, 1));
|
||||
habit->color = (Color){(unsigned char)sqlite3_column_int(stmt, 2),
|
||||
(unsigned char)sqlite3_column_int(stmt, 3),
|
||||
(unsigned char)sqlite3_column_int(stmt, 4), 255};
|
||||
habit->sync_mode = sqlite3_column_int(stmt, 5);
|
||||
habit->sync_activity = sqlite3_column_int(stmt, 6);
|
||||
habit->counter_enabled = sqlite3_column_int(stmt, 7) != 0;
|
||||
snprintf(habit->description, sizeof(habit->description), "%s",
|
||||
(const char *)sqlite3_column_text(stmt, 2));
|
||||
habit->color = (Color){(unsigned char)sqlite3_column_int(stmt, 3),
|
||||
(unsigned char)sqlite3_column_int(stmt, 4),
|
||||
(unsigned char)sqlite3_column_int(stmt, 5), 255};
|
||||
habit->sync_mode = sqlite3_column_int(stmt, 6);
|
||||
habit->sync_activity = sqlite3_column_int(stmt, 7);
|
||||
habit->counter_enabled = sqlite3_column_int(stmt, 8) != 0;
|
||||
index++;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
@@ -2731,12 +2733,13 @@ storage_habits_save(const void *habits_ptr)
|
||||
const InbeHabit *habit = &habits->items[i];
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT INTO "
|
||||
"habits(id,user_id,name,color_r,color_g,color_b,sync_mode,sync_"
|
||||
"habits(id,user_id,name,description,color_r,color_g,color_b,sync_mode,sync_"
|
||||
"activity,counter_enabled,sort_order,deleted_at,updated_at) "
|
||||
"VALUES(?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,0,?11) "
|
||||
"VALUES(?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,0,?12) "
|
||||
"ON CONFLICT(id) DO UPDATE SET "
|
||||
"user_id=excluded.user_id,"
|
||||
"name=excluded.name,"
|
||||
"description=excluded.description,"
|
||||
"color_r=excluded.color_r,"
|
||||
"color_g=excluded.color_g,"
|
||||
"color_b=excluded.color_b,"
|
||||
@@ -2761,18 +2764,29 @@ storage_habits_save(const void *habits_ptr)
|
||||
bind_text(stmt, 1, habit->id);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
bind_text(stmt, 3, habit->name);
|
||||
sqlite3_bind_int(stmt, 4, habit->color.r);
|
||||
sqlite3_bind_int(stmt, 5, habit->color.g);
|
||||
sqlite3_bind_int(stmt, 6, habit->color.b);
|
||||
sqlite3_bind_int(stmt, 7, habit->sync_mode);
|
||||
sqlite3_bind_int(stmt, 8, habit->sync_activity);
|
||||
sqlite3_bind_int(stmt, 9, habit->counter_enabled ? 1 : 0);
|
||||
sqlite3_bind_int(stmt, 10, i);
|
||||
sqlite3_bind_int64(stmt, 11, changed_at);
|
||||
bind_text(stmt, 4, habit->description);
|
||||
sqlite3_bind_int(stmt, 5, habit->color.r);
|
||||
sqlite3_bind_int(stmt, 6, habit->color.g);
|
||||
sqlite3_bind_int(stmt, 7, habit->color.b);
|
||||
sqlite3_bind_int(stmt, 8, habit->sync_mode);
|
||||
sqlite3_bind_int(stmt, 9, habit->sync_activity);
|
||||
sqlite3_bind_int(stmt, 10, habit->counter_enabled ? 1 : 0);
|
||||
sqlite3_bind_int(stmt, 11, i);
|
||||
sqlite3_bind_int64(stmt, 12, changed_at);
|
||||
if(sqlite3_step(stmt) == SQLITE_DONE && sqlite3_changes(g_storage.db) > 0)
|
||||
storage_enqueue_sync_habit(habit->id);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE habits SET description=?2 "
|
||||
"WHERE id=?1 AND description<>?2",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, habit->id);
|
||||
bind_text(stmt, 2, habit->description);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db, "INSERT OR IGNORE INTO sync_seen_habits(id) VALUES(?1)",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, habit->id);
|
||||
|
||||
+176
-621
File diff suppressed because it is too large.
Load diff
+14
-24
@@ -1,42 +1,32 @@
|
||||
#ifndef INBE_SYNC_CLIENT_H
|
||||
#define INBE_SYNC_CLIENT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "flint_lyra_sync.h"
|
||||
|
||||
typedef enum InbeSyncClientResult {
|
||||
INBE_SYNC_CLIENT_OK = 0,
|
||||
INBE_SYNC_CLIENT_INVALID_URL,
|
||||
INBE_SYNC_CLIENT_NO_ACCOUNT,
|
||||
INBE_SYNC_CLIENT_PAYLOAD_FAILED,
|
||||
INBE_SYNC_CLIENT_CHALLENGE_FAILED,
|
||||
INBE_SYNC_CLIENT_SIGN_FAILED,
|
||||
INBE_SYNC_CLIENT_REQUEST_FAILED,
|
||||
INBE_SYNC_CLIENT_AUTH_FAILED
|
||||
} InbeSyncClientResult;
|
||||
#include <stddef.h>
|
||||
|
||||
int sync_client_url_valid(const char *url);
|
||||
int sync_client_normalize_url(const char *input, char *out, size_t out_size);
|
||||
int sync_client_normalize_friend_target(const char *target, char *out, size_t out_size);
|
||||
InbeSyncClientResult sync_client_sync(const char *base_url);
|
||||
InbeSyncClientResult sync_client_register_alias(const char *base_url, const char *alias);
|
||||
InbeSyncClientResult sync_client_send_friend_request(const char *base_url, const char *target);
|
||||
InbeSyncClientResult sync_client_get_friend_requests(const char *base_url, char *out, size_t out_size);
|
||||
InbeSyncClientResult sync_client_get_friends(const char *base_url, char *out, size_t out_size);
|
||||
InbeSyncClientResult sync_client_accept_friend_request(const char *base_url, const char *request_id);
|
||||
InbeSyncClientResult sync_client_decline_friend_request(const char *base_url, const char *request_id);
|
||||
InbeSyncClientResult sync_client_remove_friend(const char *base_url, const char *friend_user_id);
|
||||
InbeSyncClientResult sync_client_get_friend_stats(const char *base_url, const char *app,
|
||||
FlintLyraSyncResult sync_client_sync(const char *base_url);
|
||||
FlintLyraSyncResult sync_client_register_alias(const char *base_url, const char *alias);
|
||||
FlintLyraSyncResult sync_client_send_friend_request(const char *base_url, const char *target);
|
||||
FlintLyraSyncResult sync_client_get_friend_requests(const char *base_url, char *out, size_t out_size);
|
||||
FlintLyraSyncResult sync_client_get_friends(const char *base_url, char *out, size_t out_size);
|
||||
FlintLyraSyncResult sync_client_accept_friend_request(const char *base_url, const char *request_id);
|
||||
FlintLyraSyncResult sync_client_decline_friend_request(const char *base_url, const char *request_id);
|
||||
FlintLyraSyncResult sync_client_remove_friend(const char *base_url, const char *friend_user_id);
|
||||
FlintLyraSyncResult sync_client_get_friend_stats(const char *base_url, const char *app,
|
||||
const char *practice, const char *metric,
|
||||
char *out, size_t out_size);
|
||||
InbeSyncClientResult sync_client_wait_for_remote_event(const char *base_url);
|
||||
InbeSyncClientResult sync_client_delete_account(const char *base_url);
|
||||
const char *sync_client_result_name(InbeSyncClientResult result);
|
||||
FlintLyraSyncResult sync_client_wait_for_remote_event(const char *base_url);
|
||||
FlintLyraSyncResult sync_client_delete_account(const char *base_url);
|
||||
void sync_client_clear_auth_token(void);
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
int sync_client_web_start_remote_events(const char *base_url);
|
||||
int sync_client_web_poll_remote_event(void);
|
||||
int sync_client_web_sync_start(const char *base_url);
|
||||
int sync_client_web_sync_poll(InbeSyncClientResult *result, int *changed);
|
||||
int sync_client_web_sync_poll(FlintLyraSyncResult *result, int *changed);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+1
-1
Submodule vendor/flint updated: 4758b0f03b...2504f6f089.
+4
-4
@@ -3,8 +3,8 @@
|
||||
IDI_APP_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,7,0,0
|
||||
PRODUCTVERSION 1,7,0,0
|
||||
FILEVERSION 1,7,3,0
|
||||
PRODUCTVERSION 1,7,3,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -21,11 +21,11 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "waozi"
|
||||
VALUE "FileDescription", "Inner Breeze"
|
||||
VALUE "FileVersion", "1.7.0"
|
||||
VALUE "FileVersion", "1.7.3"
|
||||
VALUE "InternalName", "inbe"
|
||||
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "1.7.0"
|
||||
VALUE "ProductVersion", "1.7.3"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in new issue
Block a user