Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83c4f180b4 | ||
|
|
a1914a1415 | ||
|
|
e9f95d8c89 | ||
|
|
40a660249c | ||
|
|
14a270c7b6 | ||
|
|
d39ea8fd4d | ||
|
|
88818aea09 | ||
|
|
3aec019348 | ||
|
|
8e01c0fa7d | ||
|
|
5e98458257 | ||
|
|
1209e29078 | ||
|
|
a3743c9b37 | ||
|
|
fe96b6c61e | ||
|
|
eabbff2972 |
No files matched your search
@@ -571,7 +571,7 @@ jobs:
|
||||
butler push "$linux_appimage" waozi/inbe:linux --userversion "$VERSION"
|
||||
|
||||
publish-google-play:
|
||||
name: Publish Google Play Alpha
|
||||
name: Publish Google Play Production
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-android
|
||||
@@ -595,15 +595,52 @@ jobs:
|
||||
name: release-android
|
||||
path: build/release/android
|
||||
|
||||
- name: Publish AAB to Closed Testing Alpha
|
||||
- name: Publish AAB to Play Games on PC Production
|
||||
uses: r0adkll/upload-google-play@v1
|
||||
with:
|
||||
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_JSON_KEY }}
|
||||
packageName: xyz.waozi.inbe
|
||||
releaseFiles: build/release/android/*.aab
|
||||
tracks: alpha
|
||||
tracks: google_play_games_pc:production
|
||||
status: completed
|
||||
|
||||
publish-amazon:
|
||||
name: Publish Amazon Appstore
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-android
|
||||
- release
|
||||
if: needs.release.outputs.tag_pushed == 'true'
|
||||
env:
|
||||
AMAZON_CLIENT_ID: ${{ secrets.AMAZON_CLIENT_ID }}
|
||||
AMAZON_CLIENT_SECRET: ${{ secrets.AMAZON_CLIENT_SECRET }}
|
||||
AMAZON_APP_ID: ${{ secrets.AMAZON_APP_ID }}
|
||||
|
||||
steps:
|
||||
- name: Check Amazon Appstore Secrets
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for name in AMAZON_CLIENT_ID AMAZON_CLIENT_SECRET AMAZON_APP_ID; do
|
||||
if [ -z "${!name:-}" ]; then
|
||||
echo "$name secret is required to publish Amazon Appstore"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Download Android Release Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-android
|
||||
path: build/release/android
|
||||
|
||||
- name: Upload APK to Amazon Appstore
|
||||
uses: galonga/[email protected]
|
||||
with:
|
||||
clientId: ${{ env.AMAZON_CLIENT_ID }}
|
||||
clientSecret: ${{ env.AMAZON_CLIENT_SECRET }}
|
||||
appId: ${{ env.AMAZON_APP_ID }}
|
||||
releaseFile: build/release/android/inbe-${{ needs.release.outputs.version }}.apk
|
||||
|
||||
publish-chrome-web-store:
|
||||
name: Publish Chrome Web Store
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# Changelog
|
||||
## [1.7.8] - 2026-07-01
|
||||
### Changed
|
||||
- Redesign the Practice home screen around carousel-style practice cards with explicit start, manual, configure, and music actions.
|
||||
- Move meditation music configuration into a shared practice music panel with per-practice enablement and track selection.
|
||||
|
||||
## [1.7.7] - 2026-07-01
|
||||
### Changed
|
||||
- Move habit tracking overview out of Profile and into the Habits tab with direct day toggles, reorder controls, and local view persistence.
|
||||
- Rework Settings into an overview page with section title bars and shared return/title bar UI.
|
||||
|
||||
## [1.7.6] - 2026-06-30
|
||||
### Added
|
||||
- habit overview
|
||||
|
||||
## [1.7.5] - 2026-06-29
|
||||
### Fixed
|
||||
- Fix Android 15 relaunch freeze.
|
||||
- Code cleanup
|
||||
|
||||
## [1.7.4] - 2026-06-29
|
||||
### Fixed
|
||||
- Clean up practice stats, friend removal, sync review, and Android inset handling.
|
||||
|
||||
## [1.7.3] - 2026-06-29
|
||||
### Fixed
|
||||
- bottom inset in practice
|
||||
|
||||
### Changed
|
||||
- Improve habit management
|
||||
|
||||
|
||||
@@ -166,12 +166,14 @@ SYNC_ACCOUNT_TEST := $(TEST_BIN_DIR)/sync_account_test
|
||||
SYNC_REVIEW_TEST := $(TEST_BIN_DIR)/sync_review_test
|
||||
FONT_LOCALE_TEST := $(TEST_BIN_DIR)/font_locale_test
|
||||
GUIDE_OVERLAY_TEST := $(TEST_BIN_DIR)/guide_overlay_test
|
||||
TESTS := $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(SYNC_REVIEW_TEST) $(FONT_LOCALE_TEST) $(GUIDE_OVERLAY_TEST)
|
||||
APP_BOTTOM_NAV_TEST := $(TEST_BIN_DIR)/app_bottom_nav_test
|
||||
TESTS := $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(SYNC_REVIEW_TEST) $(FONT_LOCALE_TEST) $(GUIDE_OVERLAY_TEST) $(APP_BOTTOM_NAV_TEST)
|
||||
FLINT_RUNTIME_ASSET_CFLAGS := $(FLINT_CURL_CFLAGS)
|
||||
FLINT_RUNTIME_ASSET_LDLIBS := $(FLINT_CURL_LDLIBS)
|
||||
|
||||
APP_SRCS := \
|
||||
src/main.c \
|
||||
src/app/app_sync.c \
|
||||
src/core/breath_engine.c \
|
||||
src/app/app.c \
|
||||
src/app/app_nav.c \
|
||||
@@ -193,12 +195,14 @@ APP_SRCS := \
|
||||
src/screens/habits/edit.c \
|
||||
src/screens/habits/session.c \
|
||||
src/screens/profile_screen.c \
|
||||
src/screens/profile_social.c \
|
||||
src/screens/pet_screen.c \
|
||||
src/practices/meditation/meditation_music.c \
|
||||
src/storage/data.c \
|
||||
src/storage/db.c \
|
||||
src/storage/import.c \
|
||||
src/storage/storage.c \
|
||||
src/storage/storage_sessions.c \
|
||||
src/storage/sync_review.c \
|
||||
src/storage/sync_account.c \
|
||||
src/storage/sync_client.c \
|
||||
@@ -208,6 +212,7 @@ APP_SRCS := \
|
||||
src/screens/language_screen.c \
|
||||
src/screens/manual_screen.c \
|
||||
src/screens/settings/settings_screen.c \
|
||||
src/screens/settings/settings_ui.c \
|
||||
src/screens/settings/settings_device.c \
|
||||
src/screens/settings/settings_session.c \
|
||||
src/screens/settings/settings_theme.c \
|
||||
@@ -379,11 +384,11 @@ test: $(TESTS)
|
||||
fi; \
|
||||
exit "$$status"
|
||||
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/screens/habits_screen.h src/screens/habits/habits.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c tests/test_locale_stub.c src/storage/storage.c src/storage/storage_sessions.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/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/screens/habits_screen.h src/screens/habits/habits.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party -I$(RAYLIB_DIR) $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/storage_import_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/storage_import_test.c tests/test_locale_stub.c src/storage/storage.c src/storage/storage_sessions.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
|
||||
@@ -397,18 +402,18 @@ $(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sy
|
||||
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)
|
||||
$(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/storage_sessions.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(LIBOQS_A) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DFLINT_HAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(FLINT_INCLUDE) $(LIBOQS_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/sync_account_test.c src/storage/sync_account.c $(FLINT_DIR)/src/flint_lyra_account.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/sync_account_test.c src/storage/sync_account.c $(FLINT_DIR)/src/flint_lyra_account.c src/storage/storage.c src/storage/storage_sessions.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
$(LIBOQS_A) -Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(SYNC_REVIEW_TEST): tests/sync_review_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(SYNC_REVIEW_TEST): tests/sync_review_test.c src/storage/storage.c src/storage/storage_sessions.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/sync_review_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/sync_review_test.c src/storage/storage.c src/storage/storage_sessions.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(FONT_LOCALE_TEST): tests/font_locale_test.c $(FONT_OUTPUTS) | $(TEST_BIN_DIR)
|
||||
@@ -422,6 +427,12 @@ $(GUIDE_OVERLAY_TEST): tests/guide_overlay_test.c vendor/flint/src/ui/guide.c ve
|
||||
-o $@ \
|
||||
tests/guide_overlay_test.c
|
||||
|
||||
$(APP_BOTTOM_NAV_TEST): tests/app_bottom_nav_test.c src/app/app_nav.c src/app/app_nav.h src/app/app.h vendor/flint/include/flint_ui.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings $(FLINT_INCLUDE) -I$(RAYLIB_DIR) \
|
||||
-o $@ \
|
||||
tests/app_bottom_nav_test.c
|
||||
|
||||
$(BUILD_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR) $(CLICK_BIN_DIR) $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR) $(CHROME_WEB_STORE_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
@@ -592,6 +603,7 @@ $(WIN64_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
|
||||
-DCMAKE_C_COMPILER=$(WIN64_CC_PATH) \
|
||||
-DCMAKE_AR=$(WIN64_AR_PATH) \
|
||||
-DCMAKE_RANLIB=$(WIN64_RANLIB_PATH) \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$(WIN64_THREAD_LDFLAGS)" \
|
||||
-DCMAKE_BUILD_TYPE=$(FLINT_LIBOQS_BUILD_TYPE) \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DOQS_BUILD_ONLY_LIB=ON \
|
||||
@@ -640,6 +652,7 @@ $(WIN32_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
|
||||
-DCMAKE_C_COMPILER=$(WIN32_CC_PATH) \
|
||||
-DCMAKE_AR=$(WIN32_AR_PATH) \
|
||||
-DCMAKE_RANLIB=$(WIN32_RANLIB_PATH) \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$(WIN32_THREAD_LDFLAGS)" \
|
||||
-DCMAKE_BUILD_TYPE=$(FLINT_LIBOQS_BUILD_TYPE) \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DOQS_BUILD_ONLY_LIB=ON \
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 97 KiB |
@@ -35,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 66
|
||||
versionName "1.7.3"
|
||||
versionCode 70
|
||||
versionName "1.7.8"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
android:name="xyz.waozi.inbe.MainActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|uiMode"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
|
||||
android:windowLayoutInDisplayCutoutMode="never">
|
||||
<meta-data
|
||||
|
||||
@@ -110,6 +110,7 @@ target_include_directories(raylib PUBLIC
|
||||
add_library(main SHARED
|
||||
"${SRC_DIR}/main.c"
|
||||
"${SRC_DIR}/core/breath_engine.c"
|
||||
"${SRC_DIR}/app/app_sync.c"
|
||||
"${SRC_DIR}/app/app.c"
|
||||
"${SRC_DIR}/app/app_nav.c"
|
||||
"${SRC_DIR}/app/app_settings.c"
|
||||
@@ -130,12 +131,14 @@ add_library(main SHARED
|
||||
"${SRC_DIR}/screens/habits/edit.c"
|
||||
"${SRC_DIR}/screens/habits/session.c"
|
||||
"${SRC_DIR}/screens/profile_screen.c"
|
||||
"${SRC_DIR}/screens/profile_social.c"
|
||||
"${SRC_DIR}/screens/pet_screen.c"
|
||||
"${SRC_DIR}/practices/meditation/meditation_music.c"
|
||||
"${SRC_DIR}/storage/data.c"
|
||||
"${SRC_DIR}/storage/db.c"
|
||||
"${SRC_DIR}/storage/import.c"
|
||||
"${SRC_DIR}/storage/storage.c"
|
||||
"${SRC_DIR}/storage/storage_sessions.c"
|
||||
"${SRC_DIR}/storage/sync_review.c"
|
||||
"${SRC_DIR}/storage/sync_account.c"
|
||||
"${SRC_DIR}/storage/sync_client.c"
|
||||
@@ -149,6 +152,7 @@ add_library(main SHARED
|
||||
"${SRC_DIR}/screens/language_screen.c"
|
||||
"${SRC_DIR}/screens/manual_screen.c"
|
||||
"${SRC_DIR}/screens/settings/settings_screen.c"
|
||||
"${SRC_DIR}/screens/settings/settings_ui.c"
|
||||
"${SRC_DIR}/screens/settings/settings_device.c"
|
||||
"${SRC_DIR}/screens/settings/settings_session.c"
|
||||
"${SRC_DIR}/screens/settings/settings_theme.c"
|
||||
@@ -207,6 +211,7 @@ target_link_options(main PRIVATE
|
||||
-Wl,--gc-sections
|
||||
-Wl,--strip-all
|
||||
-Wl,-z,max-page-size=16384
|
||||
-Wl,-z,common-page-size=16384
|
||||
-Wl,--wrap=fopen
|
||||
)
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -24,6 +23,7 @@ import android.view.WindowInsets;
|
||||
import android.view.WindowInsetsController;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.core.view.WindowCompat;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
@@ -47,7 +47,6 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
// [status_bar, nav_bar, cutouts] mirrored in native.
|
||||
private final int[] cachedInsets = new int[6];
|
||||
private boolean insetsInitialized = false;
|
||||
private boolean activityPaused = false;
|
||||
private boolean windowFocused = true;
|
||||
private boolean backgroundExecutionActive = false;
|
||||
@@ -447,7 +446,6 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
// Notify native code that activity is ready for wake lock
|
||||
nativeWakeLockReady();
|
||||
requestNotificationPermissionIfNeeded();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -464,11 +462,20 @@ public class MainActivity extends NativeActivity {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
getWindow().setDecorFitsSystemWindows(false);
|
||||
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
WindowManager.LayoutParams attrs = getWindow().getAttributes();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
attrs.layoutInDisplayCutoutMode =
|
||||
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||
} else {
|
||||
attrs.layoutInDisplayCutoutMode =
|
||||
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
||||
}
|
||||
getWindow().setAttributes(attrs);
|
||||
}
|
||||
getWindow().setNavigationBarColor(Color.BLACK);
|
||||
getWindow().setStatusBarColor(Color.BLACK);
|
||||
|
||||
int flags = getWindow().getDecorView().getSystemUiVisibility();
|
||||
flags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
|
||||
flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
|
||||
@@ -488,7 +495,8 @@ public class MainActivity extends NativeActivity {
|
||||
controller.show(WindowInsets.Type.navigationBars());
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q &&
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||
getWindow().setNavigationBarContrastEnforced(false);
|
||||
}
|
||||
}
|
||||
@@ -600,7 +608,6 @@ public class MainActivity extends NativeActivity {
|
||||
cachedInsets[5] = cBottom;
|
||||
}
|
||||
|
||||
insetsInitialized = true;
|
||||
nativeSetInsets(statusBar, navBar, cLeft, cTop, cRight, cBottom);
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -664,6 +671,15 @@ public class MainActivity extends NativeActivity {
|
||||
syncLifecycleState("onResume");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
configureSystemBars();
|
||||
requestInsetRefresh();
|
||||
syncLifecycleState("onNewIntent");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
plugins {
|
||||
id 'com.android.application' version '8.4.2' apply false
|
||||
id 'com.android.application' version '8.5.1' apply false
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Fixed
|
||||
---
|
||||
- bottom inset in practice
|
||||
@@ -0,0 +1,3 @@
|
||||
Fixed
|
||||
---
|
||||
- Android lanuch bug
|
||||
@@ -0,0 +1,3 @@
|
||||
Added
|
||||
---
|
||||
- habit overview
|
||||
@@ -0,0 +1,4 @@
|
||||
Changed
|
||||
---
|
||||
- Move habit tracking overview out of Profile and into the Habits tab with direct day toggles, reorder controls, and local view persistence.
|
||||
- Rework Settings into an overview page with section title bars and shared return/title bar UI.
|
||||
@@ -0,0 +1,4 @@
|
||||
Changed
|
||||
---
|
||||
- Redesign the Practice home screen around carousel-style practice cards with explicit start, manual, configure, and music actions.
|
||||
- Move meditation music configuration into a shared practice music panel with per-practice enablement and track selection.
|
||||
@@ -75,6 +75,32 @@
|
||||
sdk = androidComposition.androidsdk;
|
||||
ndkPath = "${sdk}/libexec/android-sdk/ndk-bundle";
|
||||
|
||||
emulatorRuntimeLibraryPath = pkgs.lib.makeLibraryPath (with pkgs; [
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
libbsd
|
||||
libice
|
||||
libmd
|
||||
libpng
|
||||
libsm
|
||||
libuuid
|
||||
libx11
|
||||
libxau
|
||||
libxcb
|
||||
libxdmcp
|
||||
libxkbcommon
|
||||
xcb-util-cursor
|
||||
libXext
|
||||
libXi
|
||||
libxkbfile
|
||||
nspr
|
||||
nss
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
]);
|
||||
|
||||
pkgConfigPath = pkgs.lib.makeSearchPath "lib/pkgconfig" [
|
||||
sdl2Pkgs.SDL2.dev
|
||||
pkgs.curl.dev
|
||||
@@ -180,9 +206,9 @@ EOF
|
||||
|
||||
export MCFGTHREADS="${mcfgthreads}"
|
||||
export WIN32_MCFGTHREADS="${mcfgthreads32}"
|
||||
export CPATH="$MCFGTHREADS/include:$CPATH"
|
||||
export LIBRARY_PATH="$MCFGTHREADS/lib:$LIBRARY_PATH"
|
||||
export LDFLAGS="-L$MCFGTHREADS/lib $LDFLAGS"
|
||||
export CPATH="$MCFGTHREADS/include:$WIN32_MCFGTHREADS/include:$CPATH"
|
||||
export LIBRARY_PATH="$MCFGTHREADS/lib:$WIN32_MCFGTHREADS/lib:$LIBRARY_PATH"
|
||||
export LDFLAGS="-L$MCFGTHREADS/lib -L$WIN32_MCFGTHREADS/lib $LDFLAGS"
|
||||
'';
|
||||
in
|
||||
(pkgs.buildFHSEnv {
|
||||
@@ -212,6 +238,27 @@ EOF
|
||||
libgbm
|
||||
libglvnd
|
||||
libglvnd.dev
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
libbsd
|
||||
libmd
|
||||
libice
|
||||
libsm
|
||||
libxcb
|
||||
libxau
|
||||
libxdmcp
|
||||
libxkbcommon
|
||||
xcb-util-cursor
|
||||
libXi
|
||||
libXext
|
||||
libxkbfile
|
||||
nspr
|
||||
nss
|
||||
libpng
|
||||
libuuid
|
||||
libx11
|
||||
alsa-lib
|
||||
appimagetool
|
||||
libpulseaudio
|
||||
@@ -255,6 +302,7 @@ EOF
|
||||
export ANDROID_HOME="${sdk}/libexec/android-sdk"
|
||||
export ANDROID_SDK_ROOT="${sdk}/libexec/android-sdk"
|
||||
export ANDROID_NDK_ROOT="${ndkPath}"
|
||||
export ANDROID_EMULATOR_LD_LIBRARY_PATH="$ANDROID_HOME/emulator/lib64:$ANDROID_HOME/emulator/lib64/qt/lib:${emulatorRuntimeLibraryPath}"
|
||||
export CCACHE_DIR="$PWD/.ccache"
|
||||
export CCACHE_BASEDIR="$PWD"
|
||||
export CCACHE_COMPRESS=1
|
||||
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Historie
|
||||
---
|
||||
[tab_profile]
|
||||
Profil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Návyky
|
||||
[tab_practice]
|
||||
Cvičení
|
||||
---
|
||||
[habit_add_button]
|
||||
Přidat návyk
|
||||
---
|
||||
[habit_done_button]
|
||||
Hotovo
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Označit
|
||||
---
|
||||
[tab_manual]
|
||||
Návod
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Prijmout
|
||||
[profile_friend_decline_button]
|
||||
Odmitnout
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Odebrat pritele?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s bude odebran. Pro obnoveni poslete novou zadost.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Aktualizace
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Nastavit
|
||||
[profile_data_section]
|
||||
Data
|
||||
---
|
||||
[profile_sync_section]
|
||||
Synchronizace
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d pratel
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Socialni
|
||||
[profile_add_friend_button]
|
||||
Pridat pritele
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Obnovit
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Prichozi
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Zadna data zebricku
|
||||
[profile_practice_label]
|
||||
Cviceni
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Moje cvičení
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Moje cvičení
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Nastavení
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiky
|
||||
---
|
||||
[play_button]
|
||||
SPUSTIT
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditace
|
||||
[meditation_manual_intro_text]
|
||||
Jednoduchá meditační praxe pro dech, klid a uvědomění.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Vyberte hudbu, pokud chcete. Gong oznaci zacatek a konec.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditační hudba
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Hudba na pozadí
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Meditační hudba
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Přehrávat hudbu na pozadí
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Náhodná stopa
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Skladba
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Stáhnout hudbu
|
||||
---
|
||||
@@ -286,9 +247,6 @@ DÝCHAT
|
||||
[results_title]
|
||||
VÝSLEDKY
|
||||
---
|
||||
[home_button]
|
||||
DOMŮ
|
||||
---
|
||||
[exit_session_title]
|
||||
Ukončit sezení?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Ukončit
|
||||
[round_times_title]
|
||||
Časy kol
|
||||
---
|
||||
[results_rounds]
|
||||
%d kol
|
||||
---
|
||||
[results_best]
|
||||
nejlépe %ds
|
||||
---
|
||||
[results_avg]
|
||||
průměr %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Kolo %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
ZAČÍNÁ ZA %2d
|
||||
---
|
||||
[session_round_label]
|
||||
KOLO %d
|
||||
---
|
||||
[settings_title]
|
||||
Nastavení
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Dýchání
|
||||
[settings_section_session]
|
||||
Sezení
|
||||
---
|
||||
[settings_tab_app]
|
||||
Aplikace
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Motiv
|
||||
---
|
||||
[settings_tab_device]
|
||||
Zařízení
|
||||
---
|
||||
[settings_section_sound]
|
||||
Zvuk
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Vzhled
|
||||
---
|
||||
[settings_section_language]
|
||||
Jazyk
|
||||
---
|
||||
[settings_tab_about]
|
||||
O aplikaci
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Dvojí klepnutí pro nádech
|
||||
[double_tap_to_breathe_hint]
|
||||
Dvakrát klepněte na obrazovku pro nádech
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sezení
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sezení
|
||||
---
|
||||
[no_sessions]
|
||||
Žádná sezení
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Vyberte jazyk
|
||||
[next_button]
|
||||
Další
|
||||
---
|
||||
[coming_soon_label]
|
||||
Brzy...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Celkem sezení: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Velikost dat: %s
|
||||
---
|
||||
[storage_label]
|
||||
Úložiště: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Exportovat data
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Import selhal
|
||||
[imported_data]
|
||||
Data importována
|
||||
---
|
||||
[imported_sessions]
|
||||
Importováno %d sezení
|
||||
---
|
||||
[import_invalid_file]
|
||||
Neplatný exportní soubor
|
||||
---
|
||||
@@ -538,9 +445,6 @@ Export zrušen
|
||||
[delete_cancelled]
|
||||
Mazání zrušeno
|
||||
---
|
||||
[deleted_sessions]
|
||||
Smazáno %lld sezení
|
||||
---
|
||||
[toggle_off]
|
||||
VYP
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Klávesnice na obrazovce
|
||||
[tutorial_title]
|
||||
Návod
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Metoda
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Krok 2: Výdech a zádrž
|
||||
[tutorial_step3_title]
|
||||
Krok 3: Nádech a zádrž
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Postupná rychlost
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Toto dechové cvičení vychází z Wim Hofovy metody.
|
||||
|
||||
@@ -602,11 +500,6 @@ Třicetkrát se nadechněte a vydechněte.
|
||||
|
||||
Najděte rytmus, který vám připadá přirozený: stabilní a rychlý, ale stále s plným dechem.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Postupná rychlost usnadňuje vstup do prvního kola.
|
||||
|
||||
Když je zapnutá, první kolo začne rychlostí 1 pro prvních 5 nádechů a potom se postupně zvýší na vámi vybranou rychlost.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Po 30 deších vydechněte a zadržte dech tak dlouho, jak můžete.
|
||||
|
||||
@@ -617,45 +510,9 @@ Plně se nadechněte a zadržte dech na 15 sekund.
|
||||
|
||||
Vydechněte a začne další kolo.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
PŘESKOČIT
|
||||
---
|
||||
[tutorial_back_button]
|
||||
ZPĚT
|
||||
---
|
||||
[tutorial_next_button]
|
||||
DALŠÍ
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
DOKONČIT
|
||||
---
|
||||
[tutorial_start_button]
|
||||
ZAČÍT TEĎ
|
||||
---
|
||||
[share_sheet_title]
|
||||
Export dat sezení
|
||||
---
|
||||
[export_metadata_header]
|
||||
Export dat Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Verze: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Datum exportu: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Počet sezení: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Smazat?
|
||||
---
|
||||
[delete_session_message]
|
||||
Smazat toto sezení? Tuto akci nelze vrátit.
|
||||
---
|
||||
[delete_round_message]
|
||||
Smazat toto kolo? Tuto akci nelze vrátit.
|
||||
---
|
||||
[delete_button]
|
||||
Smazat
|
||||
---
|
||||
@@ -668,42 +525,6 @@ Hudba od Elijah_K.
|
||||
[theme_system]
|
||||
Systém
|
||||
---
|
||||
[theme_sky]
|
||||
Obloha
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceán
|
||||
---
|
||||
[theme_forest]
|
||||
Les
|
||||
---
|
||||
[theme_sunset]
|
||||
Soumrak
|
||||
---
|
||||
[theme_lavender]
|
||||
Levandule
|
||||
---
|
||||
[theme_cherry]
|
||||
Třešeň
|
||||
---
|
||||
[theme_dawn]
|
||||
Úsvit
|
||||
---
|
||||
[theme_sage]
|
||||
Šalvěj
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépie
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Máta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientace
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Na šířku
|
||||
[orientation_sensor]
|
||||
Senzor
|
||||
---
|
||||
[back_button]
|
||||
Zpět
|
||||
---
|
||||
[close_button]
|
||||
Zavřít
|
||||
---
|
||||
@@ -755,9 +573,6 @@ Klíč účtu se nepodařilo importovat
|
||||
[sync_private_key_import_cancelled]
|
||||
Import klíče účtu zrušen
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs není pro tento cíl sestaveno.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Veřejné ID
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Použijte https:// nebo loopback jako localhost:8080
|
||||
[sync_server_saved]
|
||||
Synchronizační server uložen
|
||||
---
|
||||
[sync_connected]
|
||||
Vzdálená synchronizace dokončena
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Vzdálená synchronizace selhala
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
Vzdálená synchronizace není na této platformě dostupná
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Před připojením vytvořte účet
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Vzdálený server odmítl tento účet
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Uložte tento soukromý klíč někam, kde jej máte pod kontrolou. Kdokoli s ním může převzít tento účet.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Smazat tento návyk? Tuto akci nelze vrátit zpět.
|
||||
[habit_delete_button]
|
||||
Smazat návyk
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Přidat nový návyk
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Načíst další
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Celková zádrž
|
||||
[habit_stats_best_streak]
|
||||
Nejlepší série
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d den
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d dní
|
||||
---[reset_button]
|
||||
Obnovit
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Zde si vyberte praxi.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Pred zahajenim praxe si prectete navod, abyste porozumeli celemu cviceni.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Upravte konfiguraci praxe podle svych potreb.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Zde vyberte navyky nebo vytvorte novy.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Navyk muze obsahovat data sezeni z vasich praktik.
|
||||
---
|
||||
[habits_guide_views]
|
||||
Zvolte Tyden nebo Kalendar pro kontrolu navyku.
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
Zde zobrazite statistiky navyku.
|
||||
---
|
||||
[profile_guide_account]
|
||||
Zde nastavite synchronizacni ucet.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Odtud otevete pratele a zebricek.
|
||||
[profile_guide_social_no_account]
|
||||
Vytvorte synchronizacni ucet pro odemceni pratel a zebricku.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigace
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Rozbalovací
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Karty
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Přechod
|
||||
---
|
||||
[transition_none]
|
||||
Žádný
|
||||
---
|
||||
[transition_fade]
|
||||
Prolnutí
|
||||
---
|
||||
[theme_picker_title]
|
||||
Vybrat motiv
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Cvičení
|
||||
---
|
||||
[practice_music_title]
|
||||
Hudba na pozadí
|
||||
---
|
||||
[practice_start_button]
|
||||
Spustit cvičení
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manuál
|
||||
---
|
||||
[practice_configure_button]
|
||||
Nastavit cvičení
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Používat hudbu pro cvičení
|
||||
---
|
||||
[practice_guide_music]
|
||||
Vyber hudbu pro každé cvičení.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Šipkami vyber cvičení.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Spusť vybrané cvičení.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Otevři návod nebo nastavení.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d návyků hotovo
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Nový návyk
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Změnit pořadí návyků
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Smíšené cvičení
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Návyk %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditace
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Dýchací a meditační sezení.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Pozdrav slunci
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Cvičení pozdravu slunci.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamifikace se připravuje...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Pouze náhled. Tato karta ještě není implementována.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Dnešní počet návyků.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Klepni na čtverce pro označení dnů.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Týdenní a kalendářní zobrazení ukazují tento návyk.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistiky ukazují propojený pokrok.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Upravit mění název, barvu a propojení.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Data pocházejí z dokončených cvičení.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sezení
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sezení
|
||||
---
|
||||
[results_rounds]
|
||||
%d kol
|
||||
---
|
||||
[results_best]
|
||||
nejlépe %ds
|
||||
---
|
||||
[results_avg]
|
||||
průměr %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Kolo %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
ZAČÍNÁ ZA %2d
|
||||
---
|
||||
[session_round_label]
|
||||
KOLO %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Start: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Nadech: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
Smazáno %lld sezení
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d den
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d dní
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Verlauf
|
||||
---
|
||||
[tab_profile]
|
||||
Profil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Gewohnheiten
|
||||
[tab_practice]
|
||||
Praxis
|
||||
---
|
||||
[habit_add_button]
|
||||
Gewohnheit hinzufügen
|
||||
---
|
||||
[habit_done_button]
|
||||
Erledigt
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Markieren
|
||||
---
|
||||
[tab_manual]
|
||||
Anleitung
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Annehmen
|
||||
[profile_friend_decline_button]
|
||||
Ablehnen
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Freund entfernen?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s wird entfernt. Sende eine neue Anfrage zum Wiederverbinden.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Aktualisieren
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Konfigurieren
|
||||
[profile_data_section]
|
||||
Daten
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sync
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d Freunde
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Sozial
|
||||
[profile_add_friend_button]
|
||||
Freund hinzufuegen
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Aktualisieren
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Eingehend
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Keine Bestenlistendaten
|
||||
[profile_practice_label]
|
||||
Praxis
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Meine Praktiken
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Meine Praktiken
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Einstellungen
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiken
|
||||
---
|
||||
[play_button]
|
||||
START
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditation
|
||||
[meditation_manual_intro_text]
|
||||
Eine einfache Meditationspraxis für Atem, Ruhe und Achtsamkeit.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Wahlen Sie Musik, wenn Sie mochten. Ein Gong markiert Anfang und Ende.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditationsmusik
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Hintergrundmusik
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Meditationsmusik
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Hintergrundmusik abspielen
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Zufälliger Titel
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Titel
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Musik herunterladen
|
||||
---
|
||||
@@ -286,9 +247,6 @@ ATEM
|
||||
[results_title]
|
||||
ERGEBNISSE
|
||||
---
|
||||
[home_button]
|
||||
START
|
||||
---
|
||||
[exit_session_title]
|
||||
Sitzung beenden?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Beenden
|
||||
[round_times_title]
|
||||
Rundenzeiten
|
||||
---
|
||||
[results_rounds]
|
||||
%d Runden
|
||||
---
|
||||
[results_best]
|
||||
beste %ds
|
||||
---
|
||||
[results_avg]
|
||||
durchschn. %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Runde %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
START IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RUNDE %d
|
||||
---
|
||||
[settings_title]
|
||||
Einstellungen
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Atmung
|
||||
[settings_section_session]
|
||||
Sitzung
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Design
|
||||
---
|
||||
[settings_tab_device]
|
||||
Gerät
|
||||
---
|
||||
[settings_section_sound]
|
||||
Ton
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Darstellung
|
||||
---
|
||||
[settings_section_language]
|
||||
Sprache
|
||||
---
|
||||
[settings_tab_about]
|
||||
Info
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Doppeltippen zum Atmen
|
||||
[double_tap_to_breathe_hint]
|
||||
Doppeltippe auf den Bildschirm, um zu atmen
|
||||
---
|
||||
[session_count_singular]
|
||||
%d Sitzung
|
||||
---
|
||||
[session_count_plural]
|
||||
%d Sitzungen
|
||||
---
|
||||
[no_sessions]
|
||||
Keine Sitzungen
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Sprache wählen
|
||||
[next_button]
|
||||
Weiter
|
||||
---
|
||||
[coming_soon_label]
|
||||
Demnächst...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Gesamtsitzungen: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Datengröße: %s
|
||||
---
|
||||
[storage_label]
|
||||
Speicher: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Daten exportieren
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Import fehlgeschlagen
|
||||
[imported_data]
|
||||
Daten importiert
|
||||
---
|
||||
[imported_sessions]
|
||||
%d Sitzungen importiert
|
||||
---
|
||||
[import_invalid_file]
|
||||
Ungültige Exportdatei
|
||||
---
|
||||
@@ -538,9 +445,6 @@ Keine Daten zum Löschen
|
||||
[delete_cancelled]
|
||||
Löschen abgebrochen
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld Sitzungen gelöscht
|
||||
---
|
||||
[toggle_off]
|
||||
AUS
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Bildschirmtastatur
|
||||
[tutorial_title]
|
||||
Anleitung
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Methode
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Schritt 2: Ausatmen & Halten
|
||||
[tutorial_step3_title]
|
||||
Schritt 3: Einatmen & Halten
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Progressive Geschwindigkeit
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Diese Atemübung basiert auf der Wim Hof-Methode.
|
||||
|
||||
@@ -602,11 +500,6 @@ Atme 30 Mal ein und aus.
|
||||
|
||||
Finde einen Rhythmus, der sich natürlich anfühlt: gleichmäßig und schnell, aber weiterhin vollständig.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Progressive Geschwindigkeit macht den Einstieg in die erste Runde leichter.
|
||||
|
||||
Wenn sie aktiviert ist, beginnt die erste Runde bei Geschwindigkeit 1 für die ersten 5 Atemzüge und steigt dann schrittweise auf Ihre gewählte Geschwindigkeit.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Atme nach 30 Atemzügen aus und halte so lange du kannst.
|
||||
|
||||
@@ -617,45 +510,9 @@ Atme vollständig ein und halte 15 Sekunden.
|
||||
|
||||
Atme aus, dann beginnt die nächste Runde.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
ÜBERSPRINGEN
|
||||
---
|
||||
[tutorial_back_button]
|
||||
ZURÜCK
|
||||
---
|
||||
[tutorial_next_button]
|
||||
WEITER
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
BEENDEN
|
||||
---
|
||||
[tutorial_start_button]
|
||||
JETZT STARTEN
|
||||
---
|
||||
[share_sheet_title]
|
||||
Sitzungsdaten exportieren
|
||||
---
|
||||
[export_metadata_header]
|
||||
Inner Breeze Datenexport
|
||||
---
|
||||
[export_metadata_version]
|
||||
Version: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Exportdatum: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Sitzungsanzahl: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Löschen?
|
||||
---
|
||||
[delete_session_message]
|
||||
Diese Sitzung löschen? Das kann nicht rückgängig gemacht werden.
|
||||
---
|
||||
[delete_round_message]
|
||||
Diese Runde löschen? Das kann nicht rückgängig gemacht werden.
|
||||
---
|
||||
[delete_button]
|
||||
Löschen
|
||||
---
|
||||
@@ -668,42 +525,6 @@ Musik von Elijah_K.
|
||||
[theme_system]
|
||||
System
|
||||
---
|
||||
[theme_sky]
|
||||
Himmel
|
||||
---
|
||||
[theme_ocean]
|
||||
Ozean
|
||||
---
|
||||
[theme_forest]
|
||||
Wald
|
||||
---
|
||||
[theme_sunset]
|
||||
Abendrot
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavendel
|
||||
---
|
||||
[theme_cherry]
|
||||
Kirsche
|
||||
---
|
||||
[theme_dawn]
|
||||
Morgenrot
|
||||
---
|
||||
[theme_sage]
|
||||
Salbei
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Minze
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Ausrichtung
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Querformat
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Zurück
|
||||
---
|
||||
[close_button]
|
||||
Schließen
|
||||
---
|
||||
@@ -755,9 +573,6 @@ Kontoschlüssel konnte nicht importiert werden
|
||||
[sync_private_key_import_cancelled]
|
||||
Import des Kontoschlüssels abgebrochen
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs ist für dieses Ziel nicht gebaut.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Öffentliche ID
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Nutze https:// oder Loopback wie localhost:8080
|
||||
[sync_server_saved]
|
||||
Sync-Server gespeichert
|
||||
---
|
||||
[sync_connected]
|
||||
Remote-Sync abgeschlossen
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Remote-Sync fehlgeschlagen
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
Remote-Sync ist auf dieser Plattform nicht verfügbar
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Erstelle ein Konto, bevor du dich verbindest
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote hat dieses Konto abgelehnt
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Speichere diesen privaten Schlüssel an einem Ort, den du kontrollierst. Jeder mit diesem Schlüssel kann dieses Konto übernehmen.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Diese Gewohnheit löschen? Das kann nicht rückgängig gemacht werden.
|
||||
[habit_delete_button]
|
||||
Gewohnheit löschen
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Neue Gewohnheit hinzufügen
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Mehr laden
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Gesamte Atemhaltezeit
|
||||
[habit_stats_best_streak]
|
||||
Beste Serie
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d Tag
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d Tage
|
||||
---[reset_button]
|
||||
Zurücksetzen
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Wahle hier deine Praxis aus.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Lies das Tutorial, bevor du eine Praxis startest, damit du die ganze Uebung verstehst.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Passe die Konfiguration der Praxis an deine Anforderungen an.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Wahle hier Gewohnheiten aus oder erstelle eine neue.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Eine Gewohnheit kann Sitzungsdaten deiner Praktiken enthalten.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Oeffne Freunde und Bestenliste von hier.
|
||||
[profile_guide_social_no_account]
|
||||
Erstelle ein Sync-Konto, um Freunde und Bestenliste freizuschalten.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigation
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Liste
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Reiter
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Übergang
|
||||
---
|
||||
[transition_none]
|
||||
Keine
|
||||
---
|
||||
[transition_fade]
|
||||
Blende
|
||||
---
|
||||
[theme_picker_title]
|
||||
Thema wählen
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Praxis
|
||||
---
|
||||
[practice_music_title]
|
||||
Hintergrundmusik
|
||||
---
|
||||
[practice_start_button]
|
||||
Praxis starten
|
||||
---
|
||||
[practice_manual_button]
|
||||
Anleitung
|
||||
---
|
||||
[practice_configure_button]
|
||||
Praxis konfigurieren
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Musik für Praktiken verwenden
|
||||
---
|
||||
[practice_guide_music]
|
||||
Wähle Musik für jede Übung.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Wähle mit den Pfeilen eine Übung.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Starte die ausgewählte Übung.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Öffne Anleitung oder Einstellungen.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d Gewohnheiten erledigt
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Neue Gewohnheit
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Gewohnheiten sortieren
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Gemischte Übung
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Gewohnheit %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditation
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Atem- und Meditationssitzungen.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Sonnengruß
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sonnengruß-Übungssitzungen.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamification in Arbeit...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Nur Vorschau. Dieser Tab ist noch nicht implementiert.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Heutige Gewohnheiten gesamt.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Tippe Kästchen an, um Tage zu markieren.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Wochen- und Kalenderansicht zeigen diese Gewohnheit.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistik zeigt verknüpften Fortschritt.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Bearbeiten ändert Name, Farbe und Links.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Sitzungsdaten kommen aus abgeschlossenen Übungen.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d Sitzung
|
||||
---
|
||||
[session_count_plural]
|
||||
%d Sitzungen
|
||||
---
|
||||
[results_rounds]
|
||||
%d Runden
|
||||
---
|
||||
[results_best]
|
||||
beste %ds
|
||||
---
|
||||
[results_avg]
|
||||
durchschn. %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Runde %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
START IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RUNDE %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Start: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Einatmen: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld Sitzungen gelöscht
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d Tag
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d Tage
|
||||
---
|
||||
+132
-244
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
History
|
||||
---
|
||||
[tab_profile]
|
||||
Profile
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Habits
|
||||
[tab_practice]
|
||||
Practice
|
||||
---
|
||||
[habit_add_button]
|
||||
Add Habit
|
||||
---
|
||||
[habit_done_button]
|
||||
Done
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Mark Done
|
||||
---
|
||||
[tab_manual]
|
||||
Tutorial
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Accept
|
||||
[profile_friend_decline_button]
|
||||
Decline
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Remove friend?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s will be removed. Send a new request to reconnect.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Updating
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Configure
|
||||
[profile_data_section]
|
||||
Data
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sync
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d friends
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Social
|
||||
[profile_add_friend_button]
|
||||
Add friend
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Refresh
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Incoming
|
||||
---
|
||||
@@ -112,9 +97,6 @@ No leaderboard data
|
||||
[profile_practice_label]
|
||||
Practice
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
---
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Settings
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistics
|
||||
---
|
||||
[play_button]
|
||||
PLAY
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditation
|
||||
[meditation_manual_intro_text]
|
||||
Settle into a quiet seat and let this session be simple: arrive, breathe, and begin.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Choose music if you want it. A gong marks the beginning and end.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Meditation Music
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Background Music
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Meditation music
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Play background music
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Random track
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Track
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Download music
|
||||
---
|
||||
@@ -289,9 +250,6 @@ BREATH
|
||||
[results_title]
|
||||
RESULTS
|
||||
---
|
||||
[home_button]
|
||||
HOME
|
||||
---
|
||||
[exit_session_title]
|
||||
Exit Session?
|
||||
---
|
||||
@@ -331,24 +289,6 @@ Exit
|
||||
[round_times_title]
|
||||
Round times
|
||||
---
|
||||
[results_rounds]
|
||||
%d rounds
|
||||
---
|
||||
[results_best]
|
||||
best %ds
|
||||
---
|
||||
[results_avg]
|
||||
avg %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Round %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
STARTING IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
ROUND %d
|
||||
---
|
||||
[settings_title]
|
||||
Settings
|
||||
---
|
||||
@@ -361,24 +301,12 @@ Breathing
|
||||
[settings_section_session]
|
||||
Session
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Theme
|
||||
---
|
||||
[settings_tab_device]
|
||||
Device
|
||||
---
|
||||
[settings_section_sound]
|
||||
Sound
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Appearance
|
||||
---
|
||||
[settings_section_language]
|
||||
Language
|
||||
---
|
||||
[settings_tab_about]
|
||||
About
|
||||
---
|
||||
@@ -394,42 +322,6 @@ Theme mode
|
||||
[theme_system]
|
||||
System
|
||||
---
|
||||
[theme_sky]
|
||||
Sky
|
||||
---
|
||||
[theme_ocean]
|
||||
Ocean
|
||||
---
|
||||
[theme_forest]
|
||||
Forest
|
||||
---
|
||||
[theme_sunset]
|
||||
Sunset
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavender
|
||||
---
|
||||
[theme_cherry]
|
||||
Cherry
|
||||
---
|
||||
[theme_dawn]
|
||||
Dawn
|
||||
---
|
||||
[theme_sage]
|
||||
Sage
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Mint
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
@@ -490,12 +382,6 @@ Double tap to breathe
|
||||
[double_tap_to_breathe_hint]
|
||||
Double tap screen to breathe
|
||||
---
|
||||
[session_count_singular]
|
||||
%d session
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessions
|
||||
---
|
||||
[no_sessions]
|
||||
No sessions
|
||||
---
|
||||
@@ -529,18 +415,6 @@ Choose Language
|
||||
[next_button]
|
||||
Next
|
||||
---
|
||||
[coming_soon_label]
|
||||
Coming soon...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Total Sessions: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Data Size: %s
|
||||
---
|
||||
[storage_label]
|
||||
Storage: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Export Data
|
||||
---
|
||||
@@ -565,9 +439,6 @@ Import failed
|
||||
[imported_data]
|
||||
Imported data
|
||||
---
|
||||
[imported_sessions]
|
||||
Imported %d sessions
|
||||
---
|
||||
[import_invalid_file]
|
||||
Invalid export file
|
||||
---
|
||||
@@ -598,9 +469,6 @@ No data to delete
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
---
|
||||
[toggle_off]
|
||||
OFF
|
||||
---
|
||||
@@ -619,9 +487,6 @@ On-screen keyboard
|
||||
[tutorial_title]
|
||||
Tutorial
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Method
|
||||
---
|
||||
@@ -634,9 +499,6 @@ Step 2: Exhale & Hold
|
||||
[tutorial_step3_title]
|
||||
Step 3: Inhale & Hold
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Progressive Speed
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
This breathing practice is based on the Wim Hof Method.
|
||||
|
||||
@@ -662,11 +524,6 @@ Breathe in and out 30 times.
|
||||
|
||||
Find a rhythm that feels natural to you: steady and quick, while still breathing fully.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Progressive speed makes the first round easier to enter.
|
||||
|
||||
When it is on, the first round starts slower, then gradually increases to your selected speed.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
After 30 breaths, exhale and hold as long as you can.
|
||||
|
||||
@@ -677,54 +534,15 @@ Inhale fully and hold for 15 seconds.
|
||||
|
||||
Exhale, and the next round will begin.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SKIP
|
||||
---
|
||||
[tutorial_back_button]
|
||||
BACK
|
||||
---
|
||||
[tutorial_next_button]
|
||||
NEXT
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
FINISH
|
||||
---
|
||||
[tutorial_start_button]
|
||||
START NOW
|
||||
---
|
||||
[share_sheet_title]
|
||||
Export Session Data
|
||||
---
|
||||
[export_metadata_header]
|
||||
Inner Breeze Data Export
|
||||
---
|
||||
[export_metadata_version]
|
||||
Version: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Export Date: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Session Count: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Delete?
|
||||
---
|
||||
[delete_session_message]
|
||||
Delete this session? This cannot be undone.
|
||||
---
|
||||
[delete_round_message]
|
||||
Delete this round? This cannot be undone.
|
||||
---
|
||||
[delete_button]
|
||||
Delete
|
||||
---
|
||||
[clear_button]
|
||||
Clear
|
||||
---
|
||||
[back_button]
|
||||
Back
|
||||
---
|
||||
[close_button]
|
||||
Close
|
||||
---
|
||||
@@ -758,9 +576,6 @@ Could not import account key
|
||||
[sync_private_key_import_cancelled]
|
||||
Account key import cancelled
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs is not built for this target.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Public ID
|
||||
---
|
||||
@@ -803,9 +618,6 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Alias unavailable or remote failed
|
||||
---
|
||||
@@ -827,21 +639,24 @@ Use https:// or loopback like localhost:8080
|
||||
[sync_server_saved]
|
||||
Sync server saved
|
||||
---
|
||||
[sync_connected]
|
||||
Remote sync complete
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Remote sync failed
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
Remote sync is not available on this platform
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Create an account before connecting
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote rejected this account
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Save this private key somewhere you control. Anyone with it can claim this account.
|
||||
---
|
||||
@@ -935,9 +750,6 @@ Delete this habit? This cannot be undone.
|
||||
[habit_delete_button]
|
||||
Delete Habit
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Add new habit
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Load more
|
||||
---
|
||||
@@ -977,35 +789,6 @@ Total hold
|
||||
[habit_stats_best_streak]
|
||||
Best streak
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d day
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d days
|
||||
---[reset_button]
|
||||
Reset
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Choose your practice here.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Use this manual icon to open the tutorial before starting.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Use this wrench icon to adjust the practice configuration.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Select habits here or create a new one.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
A habit can include session data from your practices.
|
||||
---
|
||||
[habits_guide_views]
|
||||
Choose Weekly or Calendar to review your habit.
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
View habit statistics here.
|
||||
---
|
||||
[profile_guide_account]
|
||||
Configure your sync account here.
|
||||
---
|
||||
@@ -1018,15 +801,6 @@ Open friends and leaderboard from here.
|
||||
[profile_guide_social_no_account]
|
||||
Create a sync account to unlock friends and leaderboard.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigation
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Tabs
|
||||
---
|
||||
[transition_label]
|
||||
Transition
|
||||
---
|
||||
@@ -1039,6 +813,111 @@ Fade
|
||||
[theme_picker_title]
|
||||
Choose Theme
|
||||
---
|
||||
[practice_title]
|
||||
Practice
|
||||
---
|
||||
[practice_music_title]
|
||||
Background music
|
||||
---
|
||||
[practice_start_button]
|
||||
Start Practice
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manual
|
||||
---
|
||||
[practice_configure_button]
|
||||
Configure Practice
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Use music for practices
|
||||
---
|
||||
[practice_guide_music]
|
||||
Choose music for each practice.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Use arrows to choose a practice.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Start the selected practice.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Open the manual or settings.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d habits done
|
||||
---
|
||||
[habit_new_button]
|
||||
+ New Habit
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Reorder habits
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Mixed practice
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Habit %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditation
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Breathing and meditation sessions.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Sun Salutation
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sun Salutation practice sessions.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamification in progress...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Preview only. This tab is not implemented yet.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Today habit total.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Tap squares to mark days done.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Weekly and calendar views show this habit.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistics shows linked practice progress.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Edit changes the habit name, color, and links.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Session data comes from completed practices.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d session
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessions
|
||||
---
|
||||
[results_rounds]
|
||||
%d rounds
|
||||
---
|
||||
[results_best]
|
||||
best %ds
|
||||
---
|
||||
[results_avg]
|
||||
avg %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Round %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
STARTING IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
ROUND %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Starting: %ds
|
||||
---
|
||||
@@ -1054,3 +933,12 @@ Breath in: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
Deleted %lld sessions
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d day
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d days
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Historial
|
||||
---
|
||||
[tab_profile]
|
||||
Perfil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Hábitos
|
||||
[tab_practice]
|
||||
Práctica
|
||||
---
|
||||
[habit_add_button]
|
||||
Añadir hábito
|
||||
---
|
||||
[habit_done_button]
|
||||
Hecho
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Marcar
|
||||
---
|
||||
[tab_manual]
|
||||
Manual
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Aceptar
|
||||
[profile_friend_decline_button]
|
||||
Rechazar
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
¿Eliminar amigo?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
Se eliminara a %s. Envia una nueva solicitud para reconectar.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Actualizando
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Configurar
|
||||
[profile_data_section]
|
||||
Datos
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sincronizacion
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d amigos
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Social
|
||||
[profile_add_friend_button]
|
||||
Anadir amigo
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Actualizar
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Entrantes
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Sin datos de clasificacion
|
||||
[profile_practice_label]
|
||||
Practica
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Mis prácticas
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Mis prácticas
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Configuración
|
||||
---
|
||||
[tab_statistics]
|
||||
Estadísticas
|
||||
---
|
||||
[play_button]
|
||||
REPRODUCIR
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditación
|
||||
[meditation_manual_intro_text]
|
||||
Una práctica de meditación simple para respirar, calmarte y estar presente.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Elige musica si quieres. Un gong marca el inicio y el final.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Música de meditación
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Música de fondo
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Música de meditación
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Reproducir música de fondo
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Pista aleatoria
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Pista
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Descargar música
|
||||
---
|
||||
@@ -286,9 +247,6 @@ RESPIRACIÓN
|
||||
[results_title]
|
||||
RESULTADOS
|
||||
---
|
||||
[home_button]
|
||||
INICIO
|
||||
---
|
||||
[exit_session_title]
|
||||
¿Salir de la sesión?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Salir
|
||||
[round_times_title]
|
||||
Tiempos de ronda
|
||||
---
|
||||
[results_rounds]
|
||||
%d rondas
|
||||
---
|
||||
[results_best]
|
||||
mejor %ds
|
||||
---
|
||||
[results_avg]
|
||||
promedio %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Ronda %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
COMENZANDO EN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RONDA %d
|
||||
---
|
||||
[settings_title]
|
||||
Configuración
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Respiración
|
||||
[settings_section_session]
|
||||
Sesión
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Tema
|
||||
---
|
||||
[settings_tab_device]
|
||||
Dispositivo
|
||||
---
|
||||
[settings_section_sound]
|
||||
Sonido
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Apariencia
|
||||
---
|
||||
[settings_section_language]
|
||||
Idioma
|
||||
---
|
||||
[settings_tab_about]
|
||||
Acerca de
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Doble toque para respirar
|
||||
[double_tap_to_breathe_hint]
|
||||
Toca dos veces la pantalla para respirar
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sesión
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sesiones
|
||||
---
|
||||
[no_sessions]
|
||||
Sin sesiones
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Elegir idioma
|
||||
[next_button]
|
||||
Más
|
||||
---
|
||||
[coming_soon_label]
|
||||
Próximamente...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Sesiones totales: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Tamaño de datos: %s
|
||||
---
|
||||
[storage_label]
|
||||
Almacenamiento: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Exportar datos
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Error al importar
|
||||
[imported_data]
|
||||
Datos importados
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sesiones importadas
|
||||
---
|
||||
[import_invalid_file]
|
||||
Archivo de exportación no válido
|
||||
---
|
||||
@@ -538,9 +445,6 @@ No hay datos para eliminar
|
||||
[delete_cancelled]
|
||||
Eliminación cancelada
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sesiones eliminadas
|
||||
---
|
||||
[toggle_off]
|
||||
APAGADO
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Teclado en pantalla
|
||||
[tutorial_title]
|
||||
Tutorial
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Método
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Paso 2: Exhalar y Retener
|
||||
[tutorial_step3_title]
|
||||
Paso 3: Inhalar y Retener
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Velocidad progresiva
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Esta práctica de respiración se basa en el Método Wim Hof.
|
||||
|
||||
@@ -602,11 +500,6 @@ Inhala y exhala 30 veces.
|
||||
|
||||
Encuentra un ritmo que se sienta natural: estable y rápido, pero respirando completamente.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La velocidad progresiva hace que la primera ronda sea más fácil de empezar.
|
||||
|
||||
Cuando está activada, la primera ronda comienza en velocidad 1 durante las primeras 5 respiraciones y luego aumenta gradualmente hasta la velocidad elegida.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Después de 30 respiraciones, exhala y mantén todo lo que puedas.
|
||||
|
||||
@@ -617,45 +510,9 @@ Inhala completamente y mantén durante 15 segundos.
|
||||
|
||||
Exhala y comenzará la siguiente ronda.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
OMITIR
|
||||
---
|
||||
[tutorial_back_button]
|
||||
ATRÁS
|
||||
---
|
||||
[tutorial_next_button]
|
||||
MÁS
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
FINALIZAR
|
||||
---
|
||||
[tutorial_start_button]
|
||||
EMPEZAR AHORA
|
||||
---
|
||||
[share_sheet_title]
|
||||
Exportar datos de sesión
|
||||
---
|
||||
[export_metadata_header]
|
||||
Exportación de datos de Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Versión: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Fecha de exportación: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Recuento de sesiones: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
¿Eliminar?
|
||||
---
|
||||
[delete_session_message]
|
||||
¿Eliminar esta sesión? No se puede deshacer.
|
||||
---
|
||||
[delete_round_message]
|
||||
¿Eliminar esta ronda? No se puede deshacer.
|
||||
---
|
||||
[delete_button]
|
||||
Eliminar
|
||||
---
|
||||
@@ -668,42 +525,6 @@ Música de Elijah_K.
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Cielo
|
||||
---
|
||||
[theme_ocean]
|
||||
Océano
|
||||
---
|
||||
[theme_forest]
|
||||
Bosque
|
||||
---
|
||||
[theme_sunset]
|
||||
Atardecer
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Cereza
|
||||
---
|
||||
[theme_dawn]
|
||||
Amanecer
|
||||
---
|
||||
[theme_sage]
|
||||
Salvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientación
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Horizontal
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Atrás
|
||||
---
|
||||
[close_button]
|
||||
Cerrar
|
||||
---
|
||||
@@ -755,9 +573,6 @@ No se pudo importar la clave de cuenta
|
||||
[sync_private_key_import_cancelled]
|
||||
Importación de clave cancelada
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs no está compilado para este destino.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID público
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Usa https:// o loopback como localhost:8080
|
||||
[sync_server_saved]
|
||||
Servidor de sincronización guardado
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronización remota completa
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Falló la sincronización remota
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
La sincronización remota no está disponible en esta plataforma
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Crea una cuenta antes de conectar
|
||||
---
|
||||
[sync_auth_failed]
|
||||
El servidor remoto rechazó esta cuenta
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Guarda esta clave privada en un lugar que controles. Cualquiera con ella puede reclamar esta cuenta.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Múltiples conteos
|
||||
[habit_delete_button]
|
||||
Eliminar hábito
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Agregar nuevo hábito
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Cargar más
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Retención total
|
||||
[habit_stats_best_streak]
|
||||
Mejor racha
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d día
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d días
|
||||
---[reset_button]
|
||||
Restablecer
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Elige tu practica aqui.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Lee el tutorial antes de iniciar una practica para entender todo el ejercicio.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Cambia la configuracion de la practica segun tus necesidades.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Selecciona habitos aqui o crea uno nuevo.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Un habito puede incluir datos de sesiones de tus practicas.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ 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
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Desplegable
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Pestañas
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Transición
|
||||
---
|
||||
[transition_none]
|
||||
Ninguna
|
||||
---
|
||||
[transition_fade]
|
||||
Fundido
|
||||
---
|
||||
[theme_picker_title]
|
||||
Elegir tema
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Práctica
|
||||
---
|
||||
[practice_music_title]
|
||||
Música de fondo
|
||||
---
|
||||
[practice_start_button]
|
||||
Iniciar práctica
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manual
|
||||
---
|
||||
[practice_configure_button]
|
||||
Configurar práctica
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Usar música en prácticas
|
||||
---
|
||||
[practice_guide_music]
|
||||
Elige música para cada práctica.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Usa las flechas para elegir una práctica.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Inicia la práctica seleccionada.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Abre el manual o los ajustes.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d hábitos completados
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Nuevo hábito
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Reordenar hábitos
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Práctica mixta
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Hábito %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditación
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Sesiones de respiración y meditación.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Saludo al sol
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sesiones de práctica de saludo al sol.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamificación en curso...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Solo vista previa. Esta pestaña aún no está implementada.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Total de hábitos de hoy.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Toca cuadros para marcar días.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Las vistas semanal y calendario muestran este hábito.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Estadísticas muestra el progreso vinculado.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Editar cambia nombre, color y vínculos.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Los datos vienen de prácticas completadas.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sesión
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sesiones
|
||||
---
|
||||
[results_rounds]
|
||||
%d rondas
|
||||
---
|
||||
[results_best]
|
||||
mejor %ds
|
||||
---
|
||||
[results_avg]
|
||||
promedio %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Ronda %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
COMENZANDO EN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RONDA %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Inicio: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Inhala: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sesiones eliminadas
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d día
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d días
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Historique
|
||||
---
|
||||
[tab_profile]
|
||||
Profil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Habitudes
|
||||
[tab_practice]
|
||||
Pratique
|
||||
---
|
||||
[habit_add_button]
|
||||
Ajouter une habitude
|
||||
---
|
||||
[habit_done_button]
|
||||
Fait
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Marquer
|
||||
---
|
||||
[tab_manual]
|
||||
Tutoriel
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Accepter
|
||||
[profile_friend_decline_button]
|
||||
Refuser
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Supprimer l'ami ?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s sera supprime. Envoyez une nouvelle demande pour vous reconnecter.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Mise a jour
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Configurer
|
||||
[profile_data_section]
|
||||
Donnees
|
||||
---
|
||||
[profile_sync_section]
|
||||
Synchronisation
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d amis
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Social
|
||||
[profile_add_friend_button]
|
||||
Ajouter un ami
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Actualiser
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Recues
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Aucune donnee de classement
|
||||
[profile_practice_label]
|
||||
Pratique
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Mes pratiques
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Mes pratiques
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Réglages
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiques
|
||||
---
|
||||
[play_button]
|
||||
DÉMARRER
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Méditation
|
||||
[meditation_manual_intro_text]
|
||||
Une pratique de méditation simple pour respirer, se calmer et être présent.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Choisissez de la musique si vous le souhaitez. Un gong marque le debut et la fin.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musique de méditation
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Musique de fond
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Musique de méditation
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Jouer la musique de fond
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Piste aléatoire
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Piste
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Télécharger la musique
|
||||
---
|
||||
@@ -286,9 +247,6 @@ RESPIRER
|
||||
[results_title]
|
||||
RÉSULTATS
|
||||
---
|
||||
[home_button]
|
||||
ACCUEIL
|
||||
---
|
||||
[exit_session_title]
|
||||
Quitter la séance ?
|
||||
---
|
||||
@@ -328,24 +286,6 @@ Quitter
|
||||
[round_times_title]
|
||||
Temps des cycles
|
||||
---
|
||||
[results_rounds]
|
||||
%d cycles
|
||||
---
|
||||
[results_best]
|
||||
meilleur %ds
|
||||
---
|
||||
[results_avg]
|
||||
moy. %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Cycle %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
DÉBUT DANS %2d
|
||||
---
|
||||
[session_round_label]
|
||||
CYCLE %d
|
||||
---
|
||||
[settings_title]
|
||||
Réglages
|
||||
---
|
||||
@@ -358,24 +298,12 @@ Respiration
|
||||
[settings_section_session]
|
||||
Séance
|
||||
---
|
||||
[settings_tab_app]
|
||||
Appli
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Thème
|
||||
---
|
||||
[settings_tab_device]
|
||||
Appareil
|
||||
---
|
||||
[settings_section_sound]
|
||||
Son
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Apparence
|
||||
---
|
||||
[settings_section_language]
|
||||
Langue
|
||||
---
|
||||
[settings_tab_about]
|
||||
A propos
|
||||
---
|
||||
@@ -433,12 +361,6 @@ Double toucher pour respirer
|
||||
[double_tap_to_breathe_hint]
|
||||
Touchez deux fois l'écran pour respirer
|
||||
---
|
||||
[session_count_singular]
|
||||
%d session
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessions
|
||||
---
|
||||
[no_sessions]
|
||||
Aucune session
|
||||
---
|
||||
@@ -472,18 +394,6 @@ Choisir la langue
|
||||
[next_button]
|
||||
Suivant
|
||||
---
|
||||
[coming_soon_label]
|
||||
Bientôt...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Séances totales : %d
|
||||
---
|
||||
[data_size_label]
|
||||
Taille des données : %s
|
||||
---
|
||||
[storage_label]
|
||||
Stockage : %s
|
||||
---
|
||||
[export_data_button]
|
||||
Exporter les données
|
||||
---
|
||||
@@ -508,9 +418,6 @@ Importer les données
|
||||
[imported_data]
|
||||
Données importées
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sessions importées
|
||||
---
|
||||
[import_invalid_file]
|
||||
Fichier d'export invalide
|
||||
---
|
||||
@@ -541,9 +448,6 @@ Aucune donnée à supprimer
|
||||
[delete_cancelled]
|
||||
Suppression annulée
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld séances supprimées
|
||||
---
|
||||
[toggle_off]
|
||||
DÉSACTIVÉ
|
||||
---
|
||||
@@ -562,9 +466,6 @@ Clavier à l'écran
|
||||
[tutorial_title]
|
||||
Tutoriel
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Méthode
|
||||
---
|
||||
@@ -577,9 +478,6 @@ Méthode
|
||||
[tutorial_step3_title]
|
||||
Étape 3 : Inspirer et retenir
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Vitesse progressive
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Cette pratique respiratoire est basée sur la méthode Wim Hof.
|
||||
|
||||
@@ -605,11 +503,6 @@ Inspirez et expirez 30 fois.
|
||||
|
||||
Trouvez un rythme naturel : régulier et rapide, tout en respirant pleinement.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La vitesse progressive rend le premier cycle plus facile à commencer.
|
||||
|
||||
Quand elle est activée, le premier cycle commence à la vitesse 1 pendant les 5 premières respirations, puis augmente progressivement jusqu'à la vitesse choisie.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Après 30 respirations, expirez et retenez aussi longtemps que possible.
|
||||
|
||||
@@ -620,45 +513,9 @@ Inspirez pleinement et retenez 15 secondes.
|
||||
|
||||
Expirez, puis la série suivante commencera.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
PASSER
|
||||
---
|
||||
[tutorial_back_button]
|
||||
RETOUR
|
||||
---
|
||||
[tutorial_next_button]
|
||||
SUIVANT
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
TERMINER
|
||||
---
|
||||
[tutorial_start_button]
|
||||
COMMENCER
|
||||
---
|
||||
[share_sheet_title]
|
||||
Exporter les données de séance
|
||||
---
|
||||
[export_metadata_header]
|
||||
Export des données Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Version : %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Date d'export : %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Nombre de séances : %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Supprimer ?
|
||||
---
|
||||
[delete_session_message]
|
||||
Supprimer cette séance ? Cette action est irréversible.
|
||||
---
|
||||
[delete_round_message]
|
||||
Supprimer ce cycle ? Cette action est irréversible.
|
||||
---
|
||||
[delete_button]
|
||||
Supprimer
|
||||
---
|
||||
@@ -671,42 +528,6 @@ Musique par Elijah_K.
|
||||
[theme_system]
|
||||
Système
|
||||
---
|
||||
[theme_sky]
|
||||
Ciel
|
||||
---
|
||||
[theme_ocean]
|
||||
Océan
|
||||
---
|
||||
[theme_forest]
|
||||
Forêt
|
||||
---
|
||||
[theme_sunset]
|
||||
Crépuscule
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavande
|
||||
---
|
||||
[theme_cherry]
|
||||
Cerise
|
||||
---
|
||||
[theme_dawn]
|
||||
Aube
|
||||
---
|
||||
[theme_sage]
|
||||
Sauge
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menthe
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
@@ -722,9 +543,6 @@ Paysage
|
||||
[orientation_sensor]
|
||||
Capteur
|
||||
---
|
||||
[back_button]
|
||||
Retour
|
||||
---
|
||||
[close_button]
|
||||
Fermer
|
||||
---
|
||||
@@ -758,9 +576,6 @@ Impossible d’importer la clé du compte
|
||||
[sync_private_key_import_cancelled]
|
||||
Importation de la clé annulée
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs n’est pas compilé pour cette cible.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID public
|
||||
---
|
||||
@@ -803,9 +618,6 @@ Enregistrer l’alias
|
||||
[sync_alias_saved]
|
||||
Alias enregistré
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias enregistré
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Alias indisponible ou échec distant
|
||||
---
|
||||
@@ -827,21 +639,24 @@ Utilisez https:// ou une boucle locale comme localhost:8080
|
||||
[sync_server_saved]
|
||||
Serveur de synchronisation enregistré
|
||||
---
|
||||
[sync_connected]
|
||||
Synchronisation distante terminée
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Échec de la synchronisation distante
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
La synchronisation distante n’est pas disponible sur cette plateforme
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Créez un compte avant de vous connecter
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Le serveur distant a rejeté ce compte
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Enregistrez cette clé privée dans un endroit que vous contrôlez. Toute personne qui la possède peut revendiquer ce compte.
|
||||
---
|
||||
@@ -935,9 +750,6 @@ Supprimer cette habitude ? Cette action est irréversible.
|
||||
[habit_delete_button]
|
||||
Supprimer l'habitude
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Ajouter une nouvelle habitude
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Charger plus
|
||||
---
|
||||
@@ -977,35 +789,6 @@ Rétention totale
|
||||
[habit_stats_best_streak]
|
||||
Meilleure série
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d jour
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d jours
|
||||
---[reset_button]
|
||||
Réinitialiser
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Choisissez votre pratique ici.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Lisez le tutoriel avant de commencer une pratique afin de comprendre tout l'exercice.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Modifiez la configuration de la pratique selon vos besoins.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Selectionnez vos habitudes ici ou creez-en une nouvelle.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Une habitude peut inclure les donnees de session de vos pratiques.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -1018,25 +801,124 @@ 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
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Déroulante
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Onglets
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Effet
|
||||
---
|
||||
[transition_none]
|
||||
Aucune
|
||||
---
|
||||
[transition_fade]
|
||||
Fondu
|
||||
---
|
||||
[theme_picker_title]
|
||||
Choisir un thème
|
||||
---
|
||||
[practice_title]
|
||||
Pratique
|
||||
---
|
||||
[practice_music_title]
|
||||
Musique d’arrière-plan
|
||||
---
|
||||
[practice_start_button]
|
||||
Démarrer la pratique
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manuel
|
||||
---
|
||||
[practice_configure_button]
|
||||
Configurer la pratique
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Utiliser la musique pour les pratiques
|
||||
---
|
||||
[practice_guide_music]
|
||||
Choisis la musique pour chaque pratique.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Utilise les flèches pour choisir une pratique.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Lance la pratique sélectionnée.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Ouvre le manuel ou les réglages.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d habitudes faites
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Nouvelle habitude
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Réordonner les habitudes
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Pratique mixte
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Habitude %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Méditation
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Séances de respiration et de méditation.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Salutation au soleil
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Séances de salutation au soleil.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamification en cours...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Aperçu uniquement. Cet onglet n'est pas encore implémenté.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Total des habitudes du jour.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Touche les cases pour marquer les jours.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Les vues semaine et calendrier montrent cette habitude.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistiques montre le progrès lié.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Modifier change le nom, la couleur et les liens.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Les données viennent des pratiques terminées.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d session
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessions
|
||||
---
|
||||
[results_rounds]
|
||||
%d cycles
|
||||
---
|
||||
[results_best]
|
||||
meilleur %ds
|
||||
---
|
||||
[results_avg]
|
||||
moy. %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Cycle %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
DÉBUT DANS %2d
|
||||
---
|
||||
[session_round_label]
|
||||
CYCLE %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Demarrage : %ds
|
||||
---
|
||||
@@ -1052,3 +934,12 @@ Inspirez : %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld séances supprimées
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d jour
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d jours
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Riwayat
|
||||
---
|
||||
[tab_profile]
|
||||
Profil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Kebiasaan
|
||||
[tab_practice]
|
||||
Latihan
|
||||
---
|
||||
[habit_add_button]
|
||||
Tambah Kebiasaan
|
||||
---
|
||||
[habit_done_button]
|
||||
Selesai
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Tandai
|
||||
---
|
||||
[tab_manual]
|
||||
Manual
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Terima
|
||||
[profile_friend_decline_button]
|
||||
Tolak
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Hapus teman?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s akan dihapus. Kirim permintaan baru untuk terhubung lagi.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Memperbarui
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Atur
|
||||
[profile_data_section]
|
||||
Data
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sinkronisasi
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d teman
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Sosial
|
||||
[profile_add_friend_button]
|
||||
Tambah teman
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Segarkan
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Masuk
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Tidak ada data papan peringkat
|
||||
[profile_practice_label]
|
||||
Latihan
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Praktik saya
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Praktik saya
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Pengaturan
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistik
|
||||
---
|
||||
[play_button]
|
||||
MULAI
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditasi
|
||||
[meditation_manual_intro_text]
|
||||
Latihan meditasi sederhana untuk napas, tenang, dan sadar.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Pilih musik jika Anda mau. Gong menandai awal dan akhir.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musik meditasi
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Musik latar
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Musik meditasi
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Putar musik latar
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Trek acak
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Trek
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Unduh musik
|
||||
---
|
||||
@@ -286,9 +247,6 @@ NAFAS
|
||||
[results_title]
|
||||
HASIL
|
||||
---
|
||||
[home_button]
|
||||
BERANDA
|
||||
---
|
||||
[exit_session_title]
|
||||
Keluar Sesi?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Keluar
|
||||
[round_times_title]
|
||||
Waktu ronde
|
||||
---
|
||||
[results_rounds]
|
||||
%d ronde
|
||||
---
|
||||
[results_best]
|
||||
terbaik %ds
|
||||
---
|
||||
[results_avg]
|
||||
rata %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Ronde %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
MULAI DALAM %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RONDE %d
|
||||
---
|
||||
[settings_title]
|
||||
Pengaturan
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Pernapasan
|
||||
[settings_section_session]
|
||||
Sesi
|
||||
---
|
||||
[settings_tab_app]
|
||||
Aplikasi
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Tema
|
||||
---
|
||||
[settings_tab_device]
|
||||
Perangkat
|
||||
---
|
||||
[settings_section_sound]
|
||||
Suara
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Tampilan
|
||||
---
|
||||
[settings_section_language]
|
||||
Bahasa
|
||||
---
|
||||
[settings_tab_about]
|
||||
Tentang
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Ketuk dua kali untuk bernapas
|
||||
[double_tap_to_breathe_hint]
|
||||
Ketuk layar dua kali untuk bernapas
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sesi
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sesi
|
||||
---
|
||||
[no_sessions]
|
||||
Tidak ada sesi
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Pilih Bahasa
|
||||
[next_button]
|
||||
Lanjut
|
||||
---
|
||||
[coming_soon_label]
|
||||
Segera hadir...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Total Sesi: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Ukuran Data: %s
|
||||
---
|
||||
[storage_label]
|
||||
Penyimpanan: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Ekspor Data
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Impor gagal
|
||||
[imported_data]
|
||||
Data diimpor
|
||||
---
|
||||
[imported_sessions]
|
||||
Mengimpor %d sesi
|
||||
---
|
||||
[import_invalid_file]
|
||||
File ekspor tidak valid
|
||||
---
|
||||
@@ -538,9 +445,6 @@ Tidak ada data untuk dihapus
|
||||
[delete_cancelled]
|
||||
Penghapusan dibatalkan
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sesi dihapus
|
||||
---
|
||||
[toggle_off]
|
||||
MATI
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Keyboard di layar
|
||||
[tutorial_title]
|
||||
Tutorial
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Metode
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Langkah 2: Buang & Tahan
|
||||
[tutorial_step3_title]
|
||||
Langkah 3: Tarik & Tahan
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Kecepatan Progresif
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Latihan pernapasan ini didasarkan pada Metode Wim Hof.
|
||||
|
||||
@@ -602,11 +500,6 @@ Tarik dan hembuskan napas 30 kali.
|
||||
|
||||
Temukan ritme yang terasa alami: stabil dan cepat, tetapi tetap bernapas penuh.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Kecepatan progresif membuat ronde pertama lebih mudah dimulai.
|
||||
|
||||
Saat aktif, ronde pertama dimulai pada kecepatan 1 untuk 5 nafas pertama, lalu bertambah hingga kecepatan yang dipilih.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Setelah 30 napas, hembuskan dan tahan selama mungkin.
|
||||
|
||||
@@ -617,45 +510,9 @@ Tarik napas penuh dan tahan selama 15 detik.
|
||||
|
||||
Hembuskan, lalu ronde berikutnya akan mulai.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
LEWATI
|
||||
---
|
||||
[tutorial_back_button]
|
||||
KEMBALI
|
||||
---
|
||||
[tutorial_next_button]
|
||||
LANJUT
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
SELESAI
|
||||
---
|
||||
[tutorial_start_button]
|
||||
MULAI SEKARANG
|
||||
---
|
||||
[share_sheet_title]
|
||||
Ekspor Data Sesi
|
||||
---
|
||||
[export_metadata_header]
|
||||
Ekspor Data Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Versi: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Tanggal Ekspor: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Jumlah Sesi: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Hapus?
|
||||
---
|
||||
[delete_session_message]
|
||||
Hapus sesi ini? Tidak dapat dibatalkan.
|
||||
---
|
||||
[delete_round_message]
|
||||
Hapus ronde ini? Tidak dapat dibatalkan.
|
||||
---
|
||||
[delete_button]
|
||||
Hapus
|
||||
---
|
||||
@@ -668,42 +525,6 @@ Musik oleh Elijah_K.
|
||||
[theme_system]
|
||||
Sistem
|
||||
---
|
||||
[theme_sky]
|
||||
Langit
|
||||
---
|
||||
[theme_ocean]
|
||||
Samudra
|
||||
---
|
||||
[theme_forest]
|
||||
Hutan
|
||||
---
|
||||
[theme_sunset]
|
||||
Senja
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavender
|
||||
---
|
||||
[theme_cherry]
|
||||
Ceri
|
||||
---
|
||||
[theme_dawn]
|
||||
Fajar
|
||||
---
|
||||
[theme_sage]
|
||||
Sage
|
||||
---
|
||||
[theme_sepia]
|
||||
Sepia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Mint
|
||||
---
|
||||
[theme_cobalt]
|
||||
Kobalt
|
||||
---
|
||||
[orientation_label]
|
||||
Orientasi
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Lanskap
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Kembali
|
||||
---
|
||||
[close_button]
|
||||
Tutup
|
||||
---
|
||||
@@ -755,9 +573,6 @@ Tidak dapat mengimpor kunci akun
|
||||
[sync_private_key_import_cancelled]
|
||||
Impor kunci akun dibatalkan
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs tidak dibangun untuk target ini.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID publik
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Gunakan https:// atau loopback seperti localhost:8080
|
||||
[sync_server_saved]
|
||||
Server sinkronisasi disimpan
|
||||
---
|
||||
[sync_connected]
|
||||
Sinkronisasi remote selesai
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Sinkronisasi remote gagal
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
Sinkronisasi remote tidak tersedia di platform ini
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Buat akun sebelum menghubungkan
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Remote menolak akun ini
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Simpan kunci pribadi ini di tempat yang Anda kendalikan. Siapa pun yang memilikinya dapat mengambil akun ini.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Hapus kebiasaan ini? Tindakan ini tidak dapat dibatalkan.
|
||||
[habit_delete_button]
|
||||
Hapus kebiasaan
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Tambah kebiasaan baru
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Muat lagi
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Total tahan
|
||||
[habit_stats_best_streak]
|
||||
Rangkaian terbaik
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d hari
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d hari
|
||||
---[reset_button]
|
||||
Reset
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Pilih praktik Anda di sini.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Baca tutorial sebelum memulai praktik agar Anda memahami seluruh latihan.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Ubah konfigurasi praktik agar sesuai dengan kebutuhan Anda.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Pilih kebiasaan di sini atau buat yang baru.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Kebiasaan dapat menyertakan data sesi dari praktik Anda.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Buka teman dan papan peringkat dari sini.
|
||||
[profile_guide_social_no_account]
|
||||
Buat akun sinkronisasi untuk membuka teman dan papan peringkat.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigasi
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Menu
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Tab
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Transisi
|
||||
---
|
||||
[transition_none]
|
||||
Tidak ada
|
||||
---
|
||||
[transition_fade]
|
||||
Pudar
|
||||
---
|
||||
[theme_picker_title]
|
||||
Pilih Tema
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Latihan
|
||||
---
|
||||
[practice_music_title]
|
||||
Musik latar
|
||||
---
|
||||
[practice_start_button]
|
||||
Mulai latihan
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manual
|
||||
---
|
||||
[practice_configure_button]
|
||||
Konfigurasi latihan
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Gunakan musik untuk latihan
|
||||
---
|
||||
[practice_guide_music]
|
||||
Pilih musik untuk tiap latihan.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Gunakan panah untuk memilih latihan.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Mulai latihan yang dipilih.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Buka panduan atau pengaturan.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d kebiasaan selesai
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Kebiasaan Baru
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Urutkan kebiasaan
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Latihan campuran
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Kebiasaan %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditasi
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Sesi pernapasan dan meditasi.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Salam Matahari
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sesi latihan Salam Matahari.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamifikasi sedang dibuat...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Pratinjau saja. Tab ini belum diterapkan.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Total kebiasaan hari ini.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Ketuk kotak untuk menandai hari.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Tampilan mingguan dan kalender menunjukkan kebiasaan ini.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistik menunjukkan progres terkait.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Edit mengubah nama, warna, dan tautan.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Data sesi berasal dari latihan selesai.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sesi
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sesi
|
||||
---
|
||||
[results_rounds]
|
||||
%d ronde
|
||||
---
|
||||
[results_best]
|
||||
terbaik %ds
|
||||
---
|
||||
[results_avg]
|
||||
rata %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Ronde %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
MULAI DALAM %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RONDE %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Mulai: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Tarik napas: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sesi dihapus
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d hari
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d hari
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Cronologia
|
||||
---
|
||||
[tab_profile]
|
||||
Profilo
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Abitudini
|
||||
[tab_practice]
|
||||
Pratica
|
||||
---
|
||||
[habit_add_button]
|
||||
Aggiungi Abitudine
|
||||
---
|
||||
[habit_done_button]
|
||||
Fatto
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Segna Come Fatto
|
||||
---
|
||||
[tab_manual]
|
||||
Manuale
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Accetta
|
||||
[profile_friend_decline_button]
|
||||
Rifiuta
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Rimuovere amico?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s sara rimosso. Invia una nuova richiesta per riconnetterti.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Aggiornamento
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Configura
|
||||
[profile_data_section]
|
||||
Dati
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sincronizzazione
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d amici
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Social
|
||||
[profile_add_friend_button]
|
||||
Aggiungi amico
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Aggiorna
|
||||
---
|
||||
[profile_incoming_title]
|
||||
In arrivo
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Nessun dato classifica
|
||||
[profile_practice_label]
|
||||
Pratica
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Le mie pratiche
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Le mie pratiche
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Impostazioni
|
||||
---
|
||||
[tab_statistics]
|
||||
Statistiche
|
||||
---
|
||||
[play_button]
|
||||
AVVIA
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditazione
|
||||
[meditation_manual_intro_text]
|
||||
Una pratica di meditazione semplice per respiro, calma e presenza.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Scegli la musica se vuoi. Un gong segna l inizio e la fine.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Musica Meditazione
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Musica di Sfondo
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Musica di meditazione
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Riproduci musica di sfondo
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Traccia casuale
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Traccia
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Scarica musica
|
||||
---
|
||||
@@ -286,9 +247,6 @@ RESPIRO
|
||||
[results_title]
|
||||
RISULTATI
|
||||
---
|
||||
[home_button]
|
||||
Home
|
||||
---
|
||||
[exit_session_title]
|
||||
Esci dalla Sessione?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Esci
|
||||
[round_times_title]
|
||||
Tempi round
|
||||
---
|
||||
[results_rounds]
|
||||
%d round
|
||||
---
|
||||
[results_best]
|
||||
migliore %ds
|
||||
---
|
||||
[results_avg]
|
||||
media %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Round
|
||||
---
|
||||
[starting_in]
|
||||
INIZIA IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
Round
|
||||
---
|
||||
[settings_title]
|
||||
Impostazioni
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Respirazione
|
||||
[settings_section_session]
|
||||
Sessione
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Tema
|
||||
---
|
||||
[settings_tab_device]
|
||||
Dispositivo
|
||||
---
|
||||
[settings_section_sound]
|
||||
Suono
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Aspetto
|
||||
---
|
||||
[settings_section_language]
|
||||
Lingua
|
||||
---
|
||||
[settings_tab_about]
|
||||
Informazioni
|
||||
---
|
||||
@@ -388,42 +316,6 @@ Modalità tema
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Cielo
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceano
|
||||
---
|
||||
[theme_forest]
|
||||
Foresta
|
||||
---
|
||||
[theme_sunset]
|
||||
Tramonto
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Ciliegia
|
||||
---
|
||||
[theme_dawn]
|
||||
Alba
|
||||
---
|
||||
[theme_sage]
|
||||
Salvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Seppia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientamento
|
||||
---
|
||||
@@ -484,12 +376,6 @@ Doppio tap per respirare
|
||||
[double_tap_to_breathe_hint]
|
||||
Tocca due volte lo schermo per respirare
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sessione
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessioni
|
||||
---
|
||||
[no_sessions]
|
||||
Nessuna sessione
|
||||
---
|
||||
@@ -523,18 +409,6 @@ Scegli Lingua
|
||||
[next_button]
|
||||
Avanti
|
||||
---
|
||||
[coming_soon_label]
|
||||
Prossimamente...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Sessioni Totali: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Dimensione Dati: %s
|
||||
---
|
||||
[storage_label]
|
||||
Spazio: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Esporta Dati
|
||||
---
|
||||
@@ -559,9 +433,6 @@ Importazione fallita
|
||||
[imported_data]
|
||||
Dati importati
|
||||
---
|
||||
[imported_sessions]
|
||||
Importate %d sessioni
|
||||
---
|
||||
[import_invalid_file]
|
||||
File di esportazione non valido
|
||||
---
|
||||
@@ -592,9 +463,6 @@ Nessun dato da eliminare
|
||||
[delete_cancelled]
|
||||
Eliminazione annullata
|
||||
---
|
||||
[deleted_sessions]
|
||||
Eliminate %lld sessioni
|
||||
---
|
||||
[toggle_off]
|
||||
SPENTO
|
||||
---
|
||||
@@ -613,9 +481,6 @@ Tastiera su schermo
|
||||
[tutorial_title]
|
||||
Tutorial
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Metodo
|
||||
---
|
||||
@@ -628,9 +493,6 @@ Passo 2: Espira e Trattieni
|
||||
[tutorial_step3_title]
|
||||
Passo 3: Inspira e Trattieni
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Velocità Progressiva
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Questa pratica respiratoria si basa sul Metodo Wim Hof.
|
||||
|
||||
@@ -656,11 +518,6 @@ Inspira ed espira 30 volte.
|
||||
|
||||
Trova un ritmo naturale: stabile e rapido, continuando a respirare a fondo.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
La velocità progressiva rende il primo round più facile da affrontare.
|
||||
|
||||
Quando è attiva, il primo round inizia più lentamente, poi aumenta gradualmente fino alla velocità selezionata.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Dopo 30 respiri, espira e trattieni il più a lungo possibile.
|
||||
|
||||
@@ -671,45 +528,9 @@ Inspira completamente e trattieni per 15 secondi.
|
||||
|
||||
Espira e inizierà il round successivo.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
SALTA
|
||||
---
|
||||
[tutorial_back_button]
|
||||
INDIETRO
|
||||
---
|
||||
[tutorial_next_button]
|
||||
AVANTI
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
FINE
|
||||
---
|
||||
[tutorial_start_button]
|
||||
INIZIA ORA
|
||||
---
|
||||
[share_sheet_title]
|
||||
Esporta Dati Sessione
|
||||
---
|
||||
[export_metadata_header]
|
||||
Esportazione Dati Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Versione: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Data Esportazione: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Numero Sessioni: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Eliminare?
|
||||
---
|
||||
[delete_session_message]
|
||||
Eliminare questa sessione? Questa azione non può essere annullata.
|
||||
---
|
||||
[delete_round_message]
|
||||
Eliminare questo round? Questa azione non può essere annullata.
|
||||
---
|
||||
[delete_button]
|
||||
Elimina
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Cancella
|
||||
[meditation_music_attribution]
|
||||
Musica di Elijah_K.
|
||||
---
|
||||
[back_button]
|
||||
Indietro
|
||||
---
|
||||
[close_button]
|
||||
Chiudi
|
||||
---
|
||||
@@ -755,9 +573,6 @@ Impossibile importare la chiave account
|
||||
[sync_private_key_import_cancelled]
|
||||
Importazione chiave account annullata
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs non è compilato per questo target.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID pubblico
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Usa https:// o loopback come localhost:8080
|
||||
[sync_server_saved]
|
||||
Server di sincronizzazione salvato
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronizzazione remota completata
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Sincronizzazione remota fallita
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
La sincronizzazione remota non è disponibile su questa piattaforma
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Crea un account prima di connetterti
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Il remoto ha rifiutato questo account
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Salva questa chiave privata in un luogo che controlli. Chiunque la possieda può rivendicare questo account.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Eliminare questa abitudine? L'azione non può essere annullata.
|
||||
[habit_delete_button]
|
||||
Elimina abitudine
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Aggiungi nuova abitudine
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Carica altro
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Apnea totale
|
||||
[habit_stats_best_streak]
|
||||
Migliore serie
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d giorno
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d giorni
|
||||
---[reset_button]
|
||||
Ripristina
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Scegli qui la tua pratica.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Leggi il tutorial prima di iniziare una pratica per capire l'esercizio completo.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Modifica la configurazione della pratica in base alle tue esigenze.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Seleziona qui le abitudini o creane una nuova.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Un'abitudine puo includere i dati delle sessioni delle tue pratiche.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Apri amici e classifica da qui.
|
||||
[profile_guide_social_no_account]
|
||||
Crea un account di sincronizzazione per sbloccare amici e classifica.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigazione
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Menu
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Schede
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Transizione
|
||||
---
|
||||
[transition_none]
|
||||
Nessuna
|
||||
---
|
||||
[transition_fade]
|
||||
Dissolvenza
|
||||
---
|
||||
[theme_picker_title]
|
||||
Scegli tema
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Pratica
|
||||
---
|
||||
[practice_music_title]
|
||||
Musica di sottofondo
|
||||
---
|
||||
[practice_start_button]
|
||||
Avvia pratica
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manuale
|
||||
---
|
||||
[practice_configure_button]
|
||||
Configura pratica
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Usa musica per le pratiche
|
||||
---
|
||||
[practice_guide_music]
|
||||
Scegli la musica per ogni pratica.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Usa le frecce per scegliere una pratica.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Avvia la pratica selezionata.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Apri il manuale o le impostazioni.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d abitudini completate
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Nuova abitudine
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Riordina abitudini
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Pratica mista
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Abitudine %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditazione
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Sessioni di respirazione e meditazione.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Saluto al sole
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sessioni di saluto al sole.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamification in corso...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Solo anteprima. Questa scheda non è ancora implementata.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Totale abitudini di oggi.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Tocca i quadrati per segnare i giorni.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Le viste settimana e calendario mostrano questa abitudine.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Statistiche mostra il progresso collegato.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Modifica cambia nome, colore e collegamenti.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
I dati arrivano dalle pratiche completate.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sessione
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessioni
|
||||
---
|
||||
[results_rounds]
|
||||
%d round
|
||||
---
|
||||
[results_best]
|
||||
migliore %ds
|
||||
---
|
||||
[results_avg]
|
||||
media %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Round
|
||||
---
|
||||
[starting_in]
|
||||
INIZIA IN %2d
|
||||
---
|
||||
[session_round_label]
|
||||
Round
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Avvio: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Inspira: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
Eliminate %lld sessioni
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d giorno
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d giorni
|
||||
---
|
||||
+137
-244
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
インナーブリーズ
|
||||
---
|
||||
[tab_history]
|
||||
履歴
|
||||
---
|
||||
[tab_profile]
|
||||
プロフィール
|
||||
---
|
||||
@@ -13,18 +10,6 @@
|
||||
[tab_practice]
|
||||
練習
|
||||
---
|
||||
[habit_add_button]
|
||||
習慣を追加
|
||||
---
|
||||
[habit_done_button]
|
||||
完了
|
||||
---
|
||||
[habit_not_done_button]
|
||||
記録
|
||||
---
|
||||
[tab_manual]
|
||||
チュートリアル
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Pet
|
||||
[profile_friend_decline_button]
|
||||
拒否
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
フレンドを削除?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s を削除します。再接続には新しいリクエストが必要です。
|
||||
---
|
||||
[profile_updating_status]
|
||||
更新中
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Pet
|
||||
[profile_data_section]
|
||||
データ
|
||||
---
|
||||
[profile_sync_section]
|
||||
同期
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d人のフレンド
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Pet
|
||||
[profile_add_friend_button]
|
||||
フレンドを追加
|
||||
---
|
||||
[profile_refresh_button]
|
||||
更新
|
||||
---
|
||||
[profile_incoming_title]
|
||||
受信
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Pet
|
||||
[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
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
設定
|
||||
---
|
||||
[tab_statistics]
|
||||
統計
|
||||
---
|
||||
[play_button]
|
||||
開始
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Sun Salutation
|
||||
[meditation_manual_intro_text]
|
||||
呼吸、落ち着き、気づきのためのシンプルな瞑想練習です。
|
||||
---
|
||||
[meditation_manual_text]
|
||||
必要なら音楽を選んでください。ゴングが始まりと終わりを知らせます。
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
瞑想音楽
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
背景音楽
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
メディテーション音楽
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
背景音楽を再生
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
ランダムな曲
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
曲
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
音楽をダウンロード
|
||||
---
|
||||
@@ -286,9 +247,6 @@ Finish
|
||||
[results_title]
|
||||
結果
|
||||
---
|
||||
[home_button]
|
||||
ホーム
|
||||
---
|
||||
[exit_session_title]
|
||||
セッションを終了しますか?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ OK
|
||||
[round_times_title]
|
||||
ラウンド時間
|
||||
---
|
||||
[results_rounds]
|
||||
%d ラウンド
|
||||
---
|
||||
[results_best]
|
||||
最速 %ds
|
||||
---
|
||||
[results_avg]
|
||||
平均 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
ラウンド %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
開始まで %2d
|
||||
---
|
||||
[session_round_label]
|
||||
ラウンド %d
|
||||
---
|
||||
[settings_title]
|
||||
設定
|
||||
---
|
||||
@@ -355,24 +295,12 @@ OK
|
||||
[settings_section_session]
|
||||
セッション
|
||||
---
|
||||
[settings_tab_app]
|
||||
アプリ
|
||||
---
|
||||
[settings_tab_theme]
|
||||
テーマ
|
||||
---
|
||||
[settings_tab_device]
|
||||
デバイス
|
||||
---
|
||||
[settings_section_sound]
|
||||
サウンド
|
||||
---
|
||||
[settings_section_appearance]
|
||||
外観
|
||||
---
|
||||
[settings_section_language]
|
||||
言語
|
||||
---
|
||||
[settings_tab_about]
|
||||
アプリについて
|
||||
---
|
||||
@@ -430,12 +358,6 @@ OK
|
||||
[double_tap_to_breathe_hint]
|
||||
画面をダブルタップして呼吸
|
||||
---
|
||||
[session_count_singular]
|
||||
%dセッション
|
||||
---
|
||||
[session_count_plural]
|
||||
%dセッション
|
||||
---
|
||||
[no_sessions]
|
||||
セッションなし
|
||||
---
|
||||
@@ -469,18 +391,6 @@ OK
|
||||
[next_button]
|
||||
次へ
|
||||
---
|
||||
[coming_soon_label]
|
||||
近日公開...
|
||||
---
|
||||
[total_sessions_label]
|
||||
総セッション数:%d
|
||||
---
|
||||
[data_size_label]
|
||||
データサイズ:%s
|
||||
---
|
||||
[storage_label]
|
||||
保存先:%s
|
||||
---
|
||||
[export_data_button]
|
||||
データを書き出す
|
||||
---
|
||||
@@ -505,9 +415,6 @@ OK
|
||||
[imported_data]
|
||||
データをインポートしました
|
||||
---
|
||||
[imported_sessions]
|
||||
%dセッションをインポートしました
|
||||
---
|
||||
[import_invalid_file]
|
||||
無効なエクスポートファイル
|
||||
---
|
||||
@@ -538,9 +445,6 @@ OK
|
||||
[delete_cancelled]
|
||||
削除をキャンセルしました
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld 件のセッションを削除しました
|
||||
---
|
||||
[toggle_off]
|
||||
オフ
|
||||
---
|
||||
@@ -559,9 +463,6 @@ OK
|
||||
[tutorial_title]
|
||||
チュートリアル
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
方法
|
||||
---
|
||||
@@ -574,9 +475,6 @@ OK
|
||||
[tutorial_step3_title]
|
||||
ステップ 3: 吸って止める
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
段階的速度
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
この呼吸法は Wim Hof Method を
|
||||
ベースにしています。
|
||||
@@ -604,9 +502,6 @@ OK
|
||||
|
||||
自然に感じるリズムを見つけてください。安定して速く、ただししっかり呼吸します。
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
段階的速度は、最初のラウンドに入りやすくします。
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
30回呼吸したら、吐いて、できるだけ長く息を止めます。
|
||||
|
||||
@@ -617,45 +512,9 @@ OK
|
||||
|
||||
吐くと次のラウンドが始まります。
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
スキップ
|
||||
---
|
||||
[tutorial_back_button]
|
||||
戻る
|
||||
---
|
||||
[tutorial_next_button]
|
||||
次へ
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
完了
|
||||
---
|
||||
[tutorial_start_button]
|
||||
今すぐ開始
|
||||
---
|
||||
[share_sheet_title]
|
||||
セッションデータを書き出す
|
||||
---
|
||||
[export_metadata_header]
|
||||
Inner Breeze データ書き出し
|
||||
---
|
||||
[export_metadata_version]
|
||||
バージョン: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
書き出し日: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
セッション数: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
削除しますか?
|
||||
---
|
||||
[delete_session_message]
|
||||
このセッションを削除しますか?元に戻せません。
|
||||
---
|
||||
[delete_round_message]
|
||||
このラウンドを削除しますか?元に戻せません。
|
||||
---
|
||||
[delete_button]
|
||||
削除
|
||||
---
|
||||
@@ -668,42 +527,6 @@ Inner Breeze データ書き出し
|
||||
[theme_system]
|
||||
システム
|
||||
---
|
||||
[theme_sky]
|
||||
空
|
||||
---
|
||||
[theme_ocean]
|
||||
海
|
||||
---
|
||||
[theme_forest]
|
||||
森
|
||||
---
|
||||
[theme_sunset]
|
||||
夕焼け
|
||||
---
|
||||
[theme_lavender]
|
||||
ラベンダー
|
||||
---
|
||||
[theme_cherry]
|
||||
チェリー
|
||||
---
|
||||
[theme_dawn]
|
||||
夜明け
|
||||
---
|
||||
[theme_sage]
|
||||
セージ
|
||||
---
|
||||
[theme_sepia]
|
||||
セピア
|
||||
---
|
||||
[theme_mono]
|
||||
モノ
|
||||
---
|
||||
[theme_mint]
|
||||
ミント
|
||||
---
|
||||
[theme_cobalt]
|
||||
コバルト
|
||||
---
|
||||
[orientation_label]
|
||||
向き
|
||||
---
|
||||
@@ -719,9 +542,6 @@ Inner Breeze データ書き出し
|
||||
[orientation_sensor]
|
||||
センサー
|
||||
---
|
||||
[back_button]
|
||||
戻る
|
||||
---
|
||||
[close_button]
|
||||
閉じる
|
||||
---
|
||||
@@ -755,9 +575,6 @@ Inner Breeze データ書き出し
|
||||
[sync_private_key_import_cancelled]
|
||||
アカウントキーのインポートをキャンセルしました
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs はこの対象向けにビルドされていません。
|
||||
---
|
||||
[sync_public_id_label]
|
||||
公開ID
|
||||
---
|
||||
@@ -785,21 +602,24 @@ https:// または localhost:8080 のようなループバックを使用して
|
||||
[sync_server_saved]
|
||||
同期サーバーを保存しました
|
||||
---
|
||||
[sync_connected]
|
||||
リモート同期が完了しました
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
リモート同期に失敗しました
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
このプラットフォームではリモート同期を利用できません
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
接続する前にアカウントを作成してください
|
||||
---
|
||||
[sync_auth_failed]
|
||||
リモートがこのアカウントを拒否しました
|
||||
---
|
||||
[sync_backup_warning]
|
||||
この秘密キーは自分で管理できる場所に保存してください。これを持つ人は誰でもこのアカウントを取得できます。
|
||||
---
|
||||
@@ -893,9 +713,6 @@ Description
|
||||
[habit_delete_button]
|
||||
習慣を削除
|
||||
---
|
||||
[habit_add_new_option]
|
||||
新しい習慣を追加
|
||||
---
|
||||
[habit_load_more_button]
|
||||
さらに読み込む
|
||||
---
|
||||
@@ -935,35 +752,6 @@ Description
|
||||
[habit_stats_best_streak]
|
||||
最長連続記録
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d日
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d日
|
||||
---[reset_button]
|
||||
リセット
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
ここで練習を選びます。
|
||||
---
|
||||
[practice_guide_manual]
|
||||
練習を始める前にチュートリアルを読んで、エクササイズ全体を理解してください。
|
||||
---
|
||||
[practice_guide_config]
|
||||
自分に合うように練習の設定を変更できます。
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
ここで習慣を選ぶか、新しく作成できます。
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
習慣には練習セッションのデータを含められます。
|
||||
---
|
||||
[habits_guide_views]
|
||||
週間またはカレンダー表示で習慣を確認できます。
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
ここで習慣の統計を確認できます。
|
||||
---
|
||||
[profile_guide_account]
|
||||
ここで同期アカウントを設定します。
|
||||
---
|
||||
@@ -976,22 +764,16 @@ Manage data, habit order, and visible practices here.
|
||||
[profile_guide_social_no_account]
|
||||
フレンドとランキングを使うには同期アカウントを作成してください。
|
||||
---
|
||||
[nav_mode_label]
|
||||
ナビゲーション
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
ドロップダウン
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
タブ
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
切り替え
|
||||
---
|
||||
[transition_none]
|
||||
なし
|
||||
---
|
||||
[transition_fade]
|
||||
フェード
|
||||
---
|
||||
[theme_picker_title]
|
||||
テーマ選択
|
||||
[skip_button]
|
||||
@@ -1018,9 +800,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +815,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
プラクティス
|
||||
---
|
||||
[practice_music_title]
|
||||
バックグラウンド音楽
|
||||
---
|
||||
[practice_start_button]
|
||||
プラクティスを開始
|
||||
---
|
||||
[practice_manual_button]
|
||||
マニュアル
|
||||
---
|
||||
[practice_configure_button]
|
||||
プラクティスを設定
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
音楽を使うプラクティス
|
||||
---
|
||||
[practice_guide_music]
|
||||
練習ごとに音楽を選びます。
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
矢印で練習を選びます。
|
||||
---
|
||||
[practice_guide_start]
|
||||
選んだ練習を開始します。
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
マニュアルまたは設定を開きます。
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d 件の習慣が完了
|
||||
---
|
||||
[habit_new_button]
|
||||
+ 新しい習慣
|
||||
---
|
||||
[habit_reorder_title]
|
||||
習慣を並べ替え
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
混合練習
|
||||
---
|
||||
[habit_default_name_format]
|
||||
習慣 %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
瞑想
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
呼吸と瞑想のセッション。
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
太陽礼拝
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
太陽礼拝の練習セッション。
|
||||
---
|
||||
[pet_gamification_title]
|
||||
ゲーミフィケーションを準備中...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
プレビューのみです。このタブはまだ実装されていません。
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
今日の習慣合計です。
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
四角をタップして日を記録します。
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
週表示とカレンダー表示でこの習慣を確認します。
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
統計で関連する進捗を確認します。
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
編集で名前、色、リンクを変更します。
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
セッションデータは完了した練習から作られます。
|
||||
---
|
||||
[session_count_singular]
|
||||
%dセッション
|
||||
---
|
||||
[session_count_plural]
|
||||
%dセッション
|
||||
---
|
||||
[results_rounds]
|
||||
%d ラウンド
|
||||
---
|
||||
[results_best]
|
||||
最速 %ds
|
||||
---
|
||||
[results_avg]
|
||||
平均 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
ラウンド %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
開始まで %2d
|
||||
---
|
||||
[session_round_label]
|
||||
ラウンド %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
開始: %d秒
|
||||
---
|
||||
@@ -1051,4 +936,12 @@ Alias saved
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld 件のセッションを削除しました
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d日
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d日
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
기록
|
||||
---
|
||||
[tab_profile]
|
||||
프로필
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Inner Breeze
|
||||
[tab_practice]
|
||||
연습
|
||||
---
|
||||
[habit_add_button]
|
||||
습관 추가
|
||||
---
|
||||
[habit_done_button]
|
||||
완료
|
||||
---
|
||||
[habit_not_done_button]
|
||||
완료로 표시
|
||||
---
|
||||
[tab_manual]
|
||||
튜토리얼
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Pet
|
||||
[profile_friend_decline_button]
|
||||
거절
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
친구 삭제?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s 님이 삭제됩니다. 다시 연결하려면 새 요청을 보내세요.
|
||||
---
|
||||
[profile_updating_status]
|
||||
업데이트 중
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Pet
|
||||
[profile_data_section]
|
||||
데이터
|
||||
---
|
||||
[profile_sync_section]
|
||||
동기화
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
친구 %d명
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Pet
|
||||
[profile_add_friend_button]
|
||||
친구 추가
|
||||
---
|
||||
[profile_refresh_button]
|
||||
새로 고침
|
||||
---
|
||||
[profile_incoming_title]
|
||||
받은 요청
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Pet
|
||||
[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
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
설정
|
||||
---
|
||||
[tab_statistics]
|
||||
통계
|
||||
---
|
||||
[play_button]
|
||||
시작
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Sun Salutation
|
||||
[meditation_manual_intro_text]
|
||||
호흡, 안정, 알아차림을 위한 간단한 명상 연습입니다.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
원하면 음악을 선택하세요. 징 소리가 시작과 끝을 알립니다.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
명상 음악
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
배경 음악
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
명상 음악
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
배경 음악 재생
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
랜덤 트랙
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
트랙
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
음악 다운로드
|
||||
---
|
||||
@@ -286,9 +247,6 @@ Finish
|
||||
[results_title]
|
||||
결과
|
||||
---
|
||||
[home_button]
|
||||
홈
|
||||
---
|
||||
[exit_session_title]
|
||||
세션을 종료하시겠습니까?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Finish
|
||||
[round_times_title]
|
||||
라운드 시간
|
||||
---
|
||||
[results_rounds]
|
||||
%d 라운드
|
||||
---
|
||||
[results_best]
|
||||
최고 %ds
|
||||
---
|
||||
[results_avg]
|
||||
평균 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
%d 라운드 %ds
|
||||
---
|
||||
[starting_in]
|
||||
%2d초 후 시작
|
||||
---
|
||||
[session_round_label]
|
||||
%d 라운드
|
||||
---
|
||||
[settings_title]
|
||||
설정
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Finish
|
||||
[settings_section_session]
|
||||
세션
|
||||
---
|
||||
[settings_tab_app]
|
||||
앱
|
||||
---
|
||||
[settings_tab_theme]
|
||||
테마
|
||||
---
|
||||
[settings_tab_device]
|
||||
기기
|
||||
---
|
||||
[settings_section_sound]
|
||||
사운드
|
||||
---
|
||||
[settings_section_appearance]
|
||||
외관
|
||||
---
|
||||
[settings_section_language]
|
||||
언어
|
||||
---
|
||||
[settings_tab_about]
|
||||
정보
|
||||
---
|
||||
@@ -388,42 +316,6 @@ Finish
|
||||
[theme_system]
|
||||
시스템
|
||||
---
|
||||
[theme_sky]
|
||||
하늘
|
||||
---
|
||||
[theme_ocean]
|
||||
바다
|
||||
---
|
||||
[theme_forest]
|
||||
숲
|
||||
---
|
||||
[theme_sunset]
|
||||
일몰
|
||||
---
|
||||
[theme_lavender]
|
||||
라벤더
|
||||
---
|
||||
[theme_cherry]
|
||||
체리
|
||||
---
|
||||
[theme_dawn]
|
||||
새벽
|
||||
---
|
||||
[theme_sage]
|
||||
세이지
|
||||
---
|
||||
[theme_sepia]
|
||||
세피아
|
||||
---
|
||||
[theme_mono]
|
||||
모노
|
||||
---
|
||||
[theme_mint]
|
||||
민트
|
||||
---
|
||||
[theme_cobalt]
|
||||
코발트
|
||||
---
|
||||
[orientation_label]
|
||||
화면 방향
|
||||
---
|
||||
@@ -484,12 +376,6 @@ Finish
|
||||
[double_tap_to_breathe_hint]
|
||||
화면을 두 번 탭해 호흡
|
||||
---
|
||||
[session_count_singular]
|
||||
%d개 세션
|
||||
---
|
||||
[session_count_plural]
|
||||
%d개 세션
|
||||
---
|
||||
[no_sessions]
|
||||
세션 없음
|
||||
---
|
||||
@@ -523,18 +409,6 @@ Finish
|
||||
[next_button]
|
||||
다음
|
||||
---
|
||||
[coming_soon_label]
|
||||
출시 예정
|
||||
---
|
||||
[total_sessions_label]
|
||||
총 세션: %d
|
||||
---
|
||||
[data_size_label]
|
||||
데이터 크기: %s
|
||||
---
|
||||
[storage_label]
|
||||
저장소: %s
|
||||
---
|
||||
[export_data_button]
|
||||
데이터 내보내기
|
||||
---
|
||||
@@ -559,9 +433,6 @@ Finish
|
||||
[imported_data]
|
||||
데이터를 가져왔습니다
|
||||
---
|
||||
[imported_sessions]
|
||||
%d개 세션을 가져왔습니다
|
||||
---
|
||||
[import_invalid_file]
|
||||
잘못된 내보내기 파일
|
||||
---
|
||||
@@ -592,9 +463,6 @@ Finish
|
||||
[delete_cancelled]
|
||||
삭제 취소됨
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld개 세션 삭제됨
|
||||
---
|
||||
[toggle_off]
|
||||
꺼짐
|
||||
---
|
||||
@@ -613,9 +481,6 @@ Finish
|
||||
[tutorial_title]
|
||||
튜토리얼
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
방법
|
||||
---
|
||||
@@ -628,9 +493,6 @@ Finish
|
||||
[tutorial_step3_title]
|
||||
3단계: 들이마시고 참기
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
점진적 속도
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
이 호흡법은 윔 호프 메서드를 기반으로 합니다.
|
||||
|
||||
@@ -655,11 +517,6 @@ Finish
|
||||
|
||||
자연스럽게 느껴지는 리듬을 찾으세요. 안정적이고 빠르되, 충분히 호흡하세요.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
점진적 속도는 첫 라운드를 쉽게 시작할 수 있게 해줍니다.
|
||||
|
||||
켜면 첫 라운드가 느리게 시작된 후 점차 선택한 속도까지 증가합니다.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
30번 호흡한 뒤 내쉬고 가능한 한 오래 멈춥니다.
|
||||
|
||||
@@ -670,45 +527,9 @@ Finish
|
||||
|
||||
내쉬면 다음 라운드가 시작됩니다.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
건너뛰기
|
||||
---
|
||||
[tutorial_back_button]
|
||||
뒤로
|
||||
---
|
||||
[tutorial_next_button]
|
||||
다음
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
완료
|
||||
---
|
||||
[tutorial_start_button]
|
||||
지금 시작
|
||||
---
|
||||
[share_sheet_title]
|
||||
세션 데이터 내보내기
|
||||
---
|
||||
[export_metadata_header]
|
||||
Inner Breeze 데이터 내보내기
|
||||
---
|
||||
[export_metadata_version]
|
||||
버전: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
내보내기 날짜: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
세션 수: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
삭제하시겠습니까?
|
||||
---
|
||||
[delete_session_message]
|
||||
이 세션을 삭제하시겠습니까? 되돌릴 수 없습니다.
|
||||
---
|
||||
[delete_round_message]
|
||||
이 라운드를 삭제하시겠습니까? 되돌릴 수 없습니다.
|
||||
---
|
||||
[delete_button]
|
||||
삭제
|
||||
---
|
||||
@@ -718,9 +539,6 @@ Inner Breeze 데이터 내보내기
|
||||
[meditation_music_attribution]
|
||||
음악: Elijah_K.
|
||||
---
|
||||
[back_button]
|
||||
뒤로
|
||||
---
|
||||
[close_button]
|
||||
닫기
|
||||
---
|
||||
@@ -754,9 +572,6 @@ Inner Breeze 데이터 내보내기
|
||||
[sync_private_key_import_cancelled]
|
||||
계정 키 가져오기가 취소됨
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs가 이 대상용으로 빌드되지 않았습니다.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
공개 ID
|
||||
---
|
||||
@@ -784,21 +599,24 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
[sync_server_saved]
|
||||
동기화 서버 저장됨
|
||||
---
|
||||
[sync_connected]
|
||||
원격 동기화 완료
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
원격 동기화 실패
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
이 플랫폼에서는 원격 동기화를 사용할 수 없습니다
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
연결하기 전에 계정을 만드세요
|
||||
---
|
||||
[sync_auth_failed]
|
||||
원격에서 이 계정을 거부했습니다
|
||||
---
|
||||
[sync_backup_warning]
|
||||
이 개인 키를 직접 관리하는 곳에 저장하세요. 이 키를 가진 사람은 누구나 이 계정을 가져갈 수 있습니다.
|
||||
---
|
||||
@@ -892,9 +710,6 @@ Description
|
||||
[habit_delete_button]
|
||||
습관 삭제
|
||||
---
|
||||
[habit_add_new_option]
|
||||
새 습관 추가
|
||||
---
|
||||
[habit_load_more_button]
|
||||
더 불러오기
|
||||
---
|
||||
@@ -934,35 +749,6 @@ Description
|
||||
[habit_stats_best_streak]
|
||||
최고 연속 기록
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d일
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d일
|
||||
---[reset_button]
|
||||
초기화
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
여기에서 연습을 선택하세요.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
연습을 시작하기 전에 튜토리얼을 읽고 전체 운동을 이해하세요.
|
||||
---
|
||||
[practice_guide_config]
|
||||
필요에 맞게 연습 설정을 변경하세요.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
여기에서 습관을 선택하거나 새로 만들 수 있습니다.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
습관에는 연습 세션 데이터를 포함할 수 있습니다.
|
||||
---
|
||||
[habits_guide_views]
|
||||
주간 또는 달력 보기로 습관을 확인하세요.
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
여기에서 습관 통계를 확인하세요.
|
||||
---
|
||||
[profile_guide_account]
|
||||
여기에서 동기화 계정을 설정하세요.
|
||||
---
|
||||
@@ -975,22 +761,16 @@ Manage data, habit order, and visible practices here.
|
||||
[profile_guide_social_no_account]
|
||||
친구와 순위표를 사용하려면 동기화 계정을 만드세요.
|
||||
---
|
||||
[nav_mode_label]
|
||||
탐색
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
드롭다운
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
탭
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
전환
|
||||
---
|
||||
[transition_none]
|
||||
없음
|
||||
---
|
||||
[transition_fade]
|
||||
페이드
|
||||
---
|
||||
[theme_picker_title]
|
||||
테마 선택
|
||||
[skip_button]
|
||||
@@ -1017,9 +797,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1035,6 +812,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
연습
|
||||
---
|
||||
[practice_music_title]
|
||||
배경 음악
|
||||
---
|
||||
[practice_start_button]
|
||||
연습 시작
|
||||
---
|
||||
[practice_manual_button]
|
||||
설명서
|
||||
---
|
||||
[practice_configure_button]
|
||||
연습 설정
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
연습에 음악 사용
|
||||
---
|
||||
[practice_guide_music]
|
||||
연습마다 음악을 선택합니다.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
화살표로 연습을 선택합니다.
|
||||
---
|
||||
[practice_guide_start]
|
||||
선택한 연습을 시작합니다.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
안내서 또는 설정을 엽니다.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d개 습관 완료
|
||||
---
|
||||
[habit_new_button]
|
||||
+ 새 습관
|
||||
---
|
||||
[habit_reorder_title]
|
||||
습관 순서 변경
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
혼합 연습
|
||||
---
|
||||
[habit_default_name_format]
|
||||
습관 %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
명상
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
호흡과 명상 세션.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
태양 경배
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
태양 경배 연습 세션.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
게임화 준비 중...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
미리보기 전용입니다. 이 탭은 아직 구현되지 않았습니다.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
오늘의 습관 합계입니다.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
칸을 눌러 완료한 날을 표시합니다.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
주간 보기와 달력 보기에 이 습관이 표시됩니다.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
통계에서 연결된 진행 상황을 봅니다.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
편집에서 이름, 색상, 연결을 바꿉니다.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
세션 데이터는 완료한 연습에서 옵니다.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d개 세션
|
||||
---
|
||||
[session_count_plural]
|
||||
%d개 세션
|
||||
---
|
||||
[results_rounds]
|
||||
%d 라운드
|
||||
---
|
||||
[results_best]
|
||||
최고 %ds
|
||||
---
|
||||
[results_avg]
|
||||
평균 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
%d 라운드 %ds
|
||||
---
|
||||
[starting_in]
|
||||
%2d초 후 시작
|
||||
---
|
||||
[session_round_label]
|
||||
%d 라운드
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
시작: %d초
|
||||
---
|
||||
@@ -1050,4 +933,12 @@ Alias saved
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld개 세션 삭제됨
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d일
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d일
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
Histórico
|
||||
---
|
||||
[tab_profile]
|
||||
Perfil
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Hábitos
|
||||
[tab_practice]
|
||||
Prática
|
||||
---
|
||||
[habit_add_button]
|
||||
Adicionar hábito
|
||||
---
|
||||
[habit_done_button]
|
||||
Feito
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Marcar
|
||||
---
|
||||
[tab_manual]
|
||||
Manual
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Aceitar
|
||||
[profile_friend_decline_button]
|
||||
Recusar
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Remover amigo?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s sera removido. Envie uma nova solicitacao para reconectar.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Atualizando
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Configurar
|
||||
[profile_data_section]
|
||||
Dados
|
||||
---
|
||||
[profile_sync_section]
|
||||
Sincronizacao
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d amigos
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Social
|
||||
[profile_add_friend_button]
|
||||
Adicionar amigo
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Atualizar
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Recebidos
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Sem dados de classificacao
|
||||
[profile_practice_label]
|
||||
Pratica
|
||||
---
|
||||
[profile_my_habits_button]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_button]
|
||||
My practices
|
||||
Minhas práticas
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
My habits
|
||||
---
|
||||
[profile_my_practices_title]
|
||||
My practices
|
||||
Minhas práticas
|
||||
---
|
||||
[move_up_button]
|
||||
Up
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Configurações
|
||||
---
|
||||
[tab_statistics]
|
||||
Estatísticas
|
||||
---
|
||||
[play_button]
|
||||
INICIAR
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Meditação
|
||||
[meditation_manual_intro_text]
|
||||
Uma prática de meditação simples para respirar, acalmar e estar presente.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Escolha musica se quiser. Um gongo marca o inicio e o fim.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Música de meditação
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Música de fundo
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Música de meditação
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Tocar música de fundo
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Faixa aleatória
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Faixa
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Baixar música
|
||||
---
|
||||
@@ -286,9 +247,6 @@ RESPIRAR
|
||||
[results_title]
|
||||
RESULTADOS
|
||||
---
|
||||
[home_button]
|
||||
INÍCIO
|
||||
---
|
||||
[exit_session_title]
|
||||
Sair da sessão?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Sair
|
||||
[round_times_title]
|
||||
Tempos das rodadas
|
||||
---
|
||||
[results_rounds]
|
||||
%d rodadas
|
||||
---
|
||||
[results_best]
|
||||
melhor %ds
|
||||
---
|
||||
[results_avg]
|
||||
média %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Rodada %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
COMEÇA EM %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RODADA %d
|
||||
---
|
||||
[settings_title]
|
||||
Configurações
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Respiração
|
||||
[settings_section_session]
|
||||
Sessão
|
||||
---
|
||||
[settings_tab_app]
|
||||
App
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Tema
|
||||
---
|
||||
[settings_tab_device]
|
||||
Dispositivo
|
||||
---
|
||||
[settings_section_sound]
|
||||
Som
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Aparência
|
||||
---
|
||||
[settings_section_language]
|
||||
Idioma
|
||||
---
|
||||
[settings_tab_about]
|
||||
Sobre
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Toque duplo para respirar
|
||||
[double_tap_to_breathe_hint]
|
||||
Toque duas vezes na tela para respirar
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sessão
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessões
|
||||
---
|
||||
[no_sessions]
|
||||
Sem sessões
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Escolher idioma
|
||||
[next_button]
|
||||
Mais
|
||||
---
|
||||
[coming_soon_label]
|
||||
Em breve...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Sessões totais: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Tamanho dos dados: %s
|
||||
---
|
||||
[storage_label]
|
||||
Armazenamento: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Exportar dados
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Falha ao importar
|
||||
[imported_data]
|
||||
Dados importados
|
||||
---
|
||||
[imported_sessions]
|
||||
%d sessões importadas
|
||||
---
|
||||
[import_invalid_file]
|
||||
Arquivo de exportação inválido
|
||||
---
|
||||
@@ -538,9 +445,6 @@ Não há dados para excluir
|
||||
[delete_cancelled]
|
||||
Exclusão cancelada
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sessões excluídas
|
||||
---
|
||||
[toggle_off]
|
||||
DESLIGADO
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Teclado na tela
|
||||
[tutorial_title]
|
||||
Tutorial
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Método
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Passo 2: Expirar e segurar
|
||||
[tutorial_step3_title]
|
||||
Passo 3: Inspirar e segurar
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Velocidade progressiva
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Esta prática de respiração é baseada no Método Wim Hof.
|
||||
|
||||
@@ -602,11 +500,6 @@ Inspire e expire 30 vezes.
|
||||
|
||||
Encontre um ritmo natural: constante e rápido, mas ainda respirando profundamente.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
A velocidade progressiva torna a primeira rodada mais fácil de começar.
|
||||
|
||||
Quando ativada, a primeira rodada começa na velocidade 1 nas primeiras 5 respirações e depois aumenta gradualmente até a velocidade escolhida.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
Depois de 30 respirações, expire e segure o máximo que puder.
|
||||
|
||||
@@ -617,45 +510,9 @@ Inspire completamente e segure por 15 segundos.
|
||||
|
||||
Expire e a próxima rodada começará.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
PULAR
|
||||
---
|
||||
[tutorial_back_button]
|
||||
VOLTAR
|
||||
---
|
||||
[tutorial_next_button]
|
||||
MAIS
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
CONCLUIR
|
||||
---
|
||||
[tutorial_start_button]
|
||||
COMEÇAR AGORA
|
||||
---
|
||||
[share_sheet_title]
|
||||
Exportar dados da sessão
|
||||
---
|
||||
[export_metadata_header]
|
||||
Exportação de dados do Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Versão: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Data de exportação: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Total de sessões: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Excluir?
|
||||
---
|
||||
[delete_session_message]
|
||||
Excluir esta sessão? Isso não pode ser desfeito.
|
||||
---
|
||||
[delete_round_message]
|
||||
Excluir esta rodada? Isso não pode ser desfeito.
|
||||
---
|
||||
[delete_button]
|
||||
Excluir
|
||||
---
|
||||
@@ -668,42 +525,6 @@ Música por Elijah_K.
|
||||
[theme_system]
|
||||
Sistema
|
||||
---
|
||||
[theme_sky]
|
||||
Céu
|
||||
---
|
||||
[theme_ocean]
|
||||
Oceano
|
||||
---
|
||||
[theme_forest]
|
||||
Floresta
|
||||
---
|
||||
[theme_sunset]
|
||||
Poente
|
||||
---
|
||||
[theme_lavender]
|
||||
Lavanda
|
||||
---
|
||||
[theme_cherry]
|
||||
Cereja
|
||||
---
|
||||
[theme_dawn]
|
||||
Amanhecer
|
||||
---
|
||||
[theme_sage]
|
||||
Sálvia
|
||||
---
|
||||
[theme_sepia]
|
||||
Sépia
|
||||
---
|
||||
[theme_mono]
|
||||
Mono
|
||||
---
|
||||
[theme_mint]
|
||||
Menta
|
||||
---
|
||||
[theme_cobalt]
|
||||
Cobalto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientação
|
||||
---
|
||||
@@ -719,9 +540,6 @@ Paisagem
|
||||
[orientation_sensor]
|
||||
Sensor
|
||||
---
|
||||
[back_button]
|
||||
Voltar
|
||||
---
|
||||
[close_button]
|
||||
Fechar
|
||||
---
|
||||
@@ -755,9 +573,6 @@ Não foi possível importar a chave da conta
|
||||
[sync_private_key_import_cancelled]
|
||||
Importação da chave cancelada
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs não foi compilado para este alvo.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
ID público
|
||||
---
|
||||
@@ -785,21 +600,24 @@ Use https:// ou loopback como localhost:8080
|
||||
[sync_server_saved]
|
||||
Servidor de sincronização salvo
|
||||
---
|
||||
[sync_connected]
|
||||
Sincronização remota concluída
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Falha na sincronização remota
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
A sincronização remota não está disponível nesta plataforma
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Crie uma conta antes de conectar
|
||||
---
|
||||
[sync_auth_failed]
|
||||
O remoto rejeitou esta conta
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Salve esta chave privada em um local que você controla. Qualquer pessoa com ela pode reivindicar esta conta.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Excluir este hábito? Esta ação não pode ser desfeita.
|
||||
[habit_delete_button]
|
||||
Excluir hábito
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Adicionar novo hábito
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Carregar mais
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Retenção total
|
||||
[habit_stats_best_streak]
|
||||
Melhor sequência
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d dia
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d dias
|
||||
---[reset_button]
|
||||
Redefinir
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Escolha a sua pratica aqui.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Leia o tutorial antes de iniciar uma pratica para entender o exercicio completo.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Altere a configuracao da pratica de acordo com as suas necessidades.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Selecione habitos aqui ou crie um novo.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Um habito pode incluir dados de sessao das suas praticas.
|
||||
---
|
||||
[habits_guide_views]
|
||||
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.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Abra amigos e classificacao aqui.
|
||||
[profile_guide_social_no_account]
|
||||
Crie uma conta de sincronizacao para liberar amigos e classificacao.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navegação
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Menu
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Abas
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Transição
|
||||
---
|
||||
[transition_none]
|
||||
Nenhuma
|
||||
---
|
||||
[transition_fade]
|
||||
Desvanecer
|
||||
---
|
||||
[theme_picker_title]
|
||||
Escolher tema
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Prática
|
||||
---
|
||||
[practice_music_title]
|
||||
Música de fundo
|
||||
---
|
||||
[practice_start_button]
|
||||
Iniciar prática
|
||||
---
|
||||
[practice_manual_button]
|
||||
Manual
|
||||
---
|
||||
[practice_configure_button]
|
||||
Configurar prática
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Usar música nas práticas
|
||||
---
|
||||
[practice_guide_music]
|
||||
Escolha música para cada prática.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Use as setas para escolher uma prática.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Inicie a prática selecionada.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Abra o manual ou as configurações.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d hábitos concluídos
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Novo hábito
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Reordenar hábitos
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Prática mista
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Hábito %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Meditação
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Sessões de respiração e meditação.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Saudação ao sol
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Sessões de saudação ao sol.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Gamificação em andamento...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Apenas prévia. Esta aba ainda não foi implementada.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Total de hábitos de hoje.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Toque nos quadrados para marcar dias.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
As vistas semana e calendário mostram este hábito.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Estatísticas mostra progresso vinculado.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Editar muda nome, cor e vínculos.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Os dados vêm de práticas concluídas.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d sessão
|
||||
---
|
||||
[session_count_plural]
|
||||
%d sessões
|
||||
---
|
||||
[results_rounds]
|
||||
%d rodadas
|
||||
---
|
||||
[results_best]
|
||||
melhor %ds
|
||||
---
|
||||
[results_avg]
|
||||
média %ds
|
||||
---
|
||||
[round_result_label]
|
||||
Rodada %d %ds
|
||||
---
|
||||
[starting_in]
|
||||
COMEÇA EM %2d
|
||||
---
|
||||
[session_round_label]
|
||||
RODADA %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Inicio: %ds
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Inspire: %ds
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
%lld sessões excluídas
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d dia
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d dias
|
||||
---
|
||||
+137
-246
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
Inner Breeze
|
||||
---
|
||||
[tab_history]
|
||||
История
|
||||
---
|
||||
[tab_profile]
|
||||
Профиль
|
||||
---
|
||||
@@ -13,18 +10,6 @@ Inner Breeze
|
||||
[tab_practice]
|
||||
Практика
|
||||
---
|
||||
[habit_add_button]
|
||||
Добавить привычку
|
||||
---
|
||||
[habit_done_button]
|
||||
Готово
|
||||
---
|
||||
[habit_not_done_button]
|
||||
Отметить
|
||||
---
|
||||
[tab_manual]
|
||||
Обучение
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Pet
|
||||
[profile_friend_decline_button]
|
||||
Отклонить
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
Удалить друга?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s будет удален. Для связи отправьте новый запрос.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Обновление
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Pet
|
||||
[profile_data_section]
|
||||
Данные
|
||||
---
|
||||
[profile_sync_section]
|
||||
Синхронизация
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d друзей
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Pet
|
||||
[profile_add_friend_button]
|
||||
Добавить друга
|
||||
---
|
||||
[profile_refresh_button]
|
||||
Обновить
|
||||
---
|
||||
[profile_incoming_title]
|
||||
Входящие
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Pet
|
||||
[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
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
Настройки
|
||||
---
|
||||
[tab_statistics]
|
||||
Статистика
|
||||
---
|
||||
[play_button]
|
||||
СТАРТ
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Sun Salutation
|
||||
[meditation_manual_intro_text]
|
||||
Сядьте спокойно и сделайте эту сессию простой: остановитесь, подышите и начните.
|
||||
---
|
||||
[meditation_manual_text]
|
||||
Включите музыку, если хотите. Гонг отмечает начало и конец.
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
Музыка для медитации
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
Фоновая музыка
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
Музыка для медитации
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
Воспроизводить фоновую музыку
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
Случайный трек
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
Трек
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
Скачать музыку
|
||||
---
|
||||
@@ -289,9 +250,6 @@ Finish
|
||||
[results_title]
|
||||
ИТОГИ
|
||||
---
|
||||
[home_button]
|
||||
ДОМОЙ
|
||||
---
|
||||
[exit_session_title]
|
||||
Выйти из сессии?
|
||||
---
|
||||
@@ -328,24 +286,6 @@ OK
|
||||
[round_times_title]
|
||||
Время раундов
|
||||
---
|
||||
[results_rounds]
|
||||
%d раундов
|
||||
---
|
||||
[results_best]
|
||||
лучшее %dс
|
||||
---
|
||||
[results_avg]
|
||||
среднее %dс
|
||||
---
|
||||
[round_result_label]
|
||||
Раунд %d %dс
|
||||
---
|
||||
[starting_in]
|
||||
НАЧАЛО ЧЕРЕЗ %2d
|
||||
---
|
||||
[session_round_label]
|
||||
РАУНД %d
|
||||
---
|
||||
[settings_title]
|
||||
Настройки
|
||||
---
|
||||
@@ -358,24 +298,12 @@ OK
|
||||
[settings_section_session]
|
||||
Сессия
|
||||
---
|
||||
[settings_tab_app]
|
||||
Приложение
|
||||
---
|
||||
[settings_tab_theme]
|
||||
Тема
|
||||
---
|
||||
[settings_tab_device]
|
||||
Устройство
|
||||
---
|
||||
[settings_section_sound]
|
||||
Звук
|
||||
---
|
||||
[settings_section_appearance]
|
||||
Внешний вид
|
||||
---
|
||||
[settings_section_language]
|
||||
Язык
|
||||
---
|
||||
[settings_tab_about]
|
||||
О приложении
|
||||
---
|
||||
@@ -391,42 +319,6 @@ OK
|
||||
[theme_system]
|
||||
Системная
|
||||
---
|
||||
[theme_sky]
|
||||
Небо
|
||||
---
|
||||
[theme_ocean]
|
||||
Океан
|
||||
---
|
||||
[theme_forest]
|
||||
Лес
|
||||
---
|
||||
[theme_sunset]
|
||||
Закат
|
||||
---
|
||||
[theme_lavender]
|
||||
Лаванда
|
||||
---
|
||||
[theme_cherry]
|
||||
Вишня
|
||||
---
|
||||
[theme_dawn]
|
||||
Рассвет
|
||||
---
|
||||
[theme_sage]
|
||||
Шалфей
|
||||
---
|
||||
[theme_sepia]
|
||||
Сепия
|
||||
---
|
||||
[theme_mono]
|
||||
Моно
|
||||
---
|
||||
[theme_mint]
|
||||
Мята
|
||||
---
|
||||
[theme_cobalt]
|
||||
Кобальт
|
||||
---
|
||||
[orientation_label]
|
||||
Ориентация
|
||||
---
|
||||
@@ -487,12 +379,6 @@ OK
|
||||
[double_tap_to_breathe_hint]
|
||||
Коснитесь экрана дважды, чтобы вдохнуть
|
||||
---
|
||||
[session_count_singular]
|
||||
%d сессия
|
||||
---
|
||||
[session_count_plural]
|
||||
%d сессий
|
||||
---
|
||||
[no_sessions]
|
||||
Нет сессий
|
||||
---
|
||||
@@ -526,18 +412,6 @@ OK
|
||||
[next_button]
|
||||
Далее
|
||||
---
|
||||
[coming_soon_label]
|
||||
Скоро...
|
||||
---
|
||||
[total_sessions_label]
|
||||
Всего сессий: %d
|
||||
---
|
||||
[data_size_label]
|
||||
Размер данных: %s
|
||||
---
|
||||
[storage_label]
|
||||
Хранилище: %s
|
||||
---
|
||||
[export_data_button]
|
||||
Экспорт данных
|
||||
---
|
||||
@@ -562,9 +436,6 @@ OK
|
||||
[imported_data]
|
||||
Данные импортированы
|
||||
---
|
||||
[imported_sessions]
|
||||
Импортировано сессий: %d
|
||||
---
|
||||
[import_invalid_file]
|
||||
Недопустимый файл экспорта
|
||||
---
|
||||
@@ -595,9 +466,6 @@ OK
|
||||
[delete_cancelled]
|
||||
Удаление отменено
|
||||
---
|
||||
[deleted_sessions]
|
||||
Удалено сессий: %lld
|
||||
---
|
||||
[toggle_off]
|
||||
ВЫКЛ
|
||||
---
|
||||
@@ -616,9 +484,6 @@ OK
|
||||
[tutorial_title]
|
||||
Обучение
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
Метод
|
||||
---
|
||||
@@ -631,9 +496,6 @@ OK
|
||||
[tutorial_step3_title]
|
||||
Шаг 3: вдох и задержка
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
Постепенная скорость
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
Эта дыхательная практика основана на методе Вима Хофа.
|
||||
|
||||
@@ -659,11 +521,6 @@ OK
|
||||
|
||||
Найдите ритм, который ощущается естественно: ровный и быстрый, но с полным дыханием.
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
Постепенная скорость помогает легче войти в первый раунд.
|
||||
|
||||
Когда она включена, первый раунд начинается медленнее, а затем постепенно ускоряется до выбранной скорости.
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
После 30 вдохов выдохните и задержите дыхание так долго, как сможете.
|
||||
|
||||
@@ -674,54 +531,15 @@ OK
|
||||
|
||||
Выдохните, и начнется следующий раунд.
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
ПРОПУСТИТЬ
|
||||
---
|
||||
[tutorial_back_button]
|
||||
НАЗАД
|
||||
---
|
||||
[tutorial_next_button]
|
||||
ДАЛЕЕ
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
ГОТОВО
|
||||
---
|
||||
[tutorial_start_button]
|
||||
НАЧАТЬ
|
||||
---
|
||||
[share_sheet_title]
|
||||
Экспорт данных сессии
|
||||
---
|
||||
[export_metadata_header]
|
||||
Экспорт данных Inner Breeze
|
||||
---
|
||||
[export_metadata_version]
|
||||
Версия: %s
|
||||
---
|
||||
[export_metadata_date]
|
||||
Дата экспорта: %s
|
||||
---
|
||||
[export_metadata_count]
|
||||
Количество сессий: %d
|
||||
---
|
||||
[delete_history_title]
|
||||
Удалить?
|
||||
---
|
||||
[delete_session_message]
|
||||
Удалить эту сессию? Это нельзя отменить.
|
||||
---
|
||||
[delete_round_message]
|
||||
Удалить этот раунд? Это нельзя отменить.
|
||||
---
|
||||
[delete_button]
|
||||
Удалить
|
||||
---
|
||||
[clear_button]
|
||||
Очистить
|
||||
---
|
||||
[back_button]
|
||||
Назад
|
||||
---
|
||||
[close_button]
|
||||
Закрыть
|
||||
---
|
||||
@@ -755,9 +573,6 @@ OK
|
||||
[sync_private_key_import_cancelled]
|
||||
Импорт ключа аккаунта отменен
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs не собран для этой платформы.
|
||||
---
|
||||
[sync_public_id_label]
|
||||
Публичный ID
|
||||
---
|
||||
@@ -785,21 +600,24 @@ liboqs не собран для этой платформы.
|
||||
[sync_server_saved]
|
||||
Сервер синхронизации сохранен
|
||||
---
|
||||
[sync_connected]
|
||||
Удаленная синхронизация завершена
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
Удаленная синхронизация не удалась
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
Удаленная синхронизация недоступна на этой платформе
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
Создайте аккаунт перед подключением
|
||||
---
|
||||
[sync_auth_failed]
|
||||
Сервер отклонил этот аккаунт
|
||||
---
|
||||
[sync_backup_warning]
|
||||
Сохраните этот приватный ключ там, где только вы им управляете. Любой, у кого он есть, сможет получить доступ к аккаунту.
|
||||
---
|
||||
@@ -893,9 +711,6 @@ Description
|
||||
[habit_delete_button]
|
||||
Удалить привычку
|
||||
---
|
||||
[habit_add_new_option]
|
||||
Добавить новую привычку
|
||||
---
|
||||
[habit_load_more_button]
|
||||
Загрузить еще
|
||||
---
|
||||
@@ -935,35 +750,6 @@ Description
|
||||
[habit_stats_best_streak]
|
||||
Лучшая серия
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d день
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d дней
|
||||
---[reset_button]
|
||||
Сбросить
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
Выберите практику здесь.
|
||||
---
|
||||
[practice_guide_manual]
|
||||
Прочитайте руководство перед началом практики, чтобы понять упражнение полностью.
|
||||
---
|
||||
[practice_guide_config]
|
||||
Измените настройки практики под свои требования.
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
Здесь можно выбрать привычку или создать новую.
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
Привычка может включать данные сеансов ваших практик.
|
||||
---
|
||||
[habits_guide_views]
|
||||
Выберите неделю или календарь, чтобы просмотреть привычку.
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
Здесь можно посмотреть статистику привычек.
|
||||
---
|
||||
[profile_guide_account]
|
||||
Настройте аккаунт синхронизации здесь.
|
||||
---
|
||||
@@ -976,22 +762,16 @@ Manage data, habit order, and visible practices here.
|
||||
[profile_guide_social_no_account]
|
||||
Создайте аккаунт синхронизации, чтобы открыть друзей и рейтинг.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Навигация
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Выпадающий
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Вкладки
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
Переход
|
||||
---
|
||||
[transition_none]
|
||||
Нет
|
||||
---
|
||||
[transition_fade]
|
||||
Плавно
|
||||
---
|
||||
[theme_picker_title]
|
||||
Выбор темы
|
||||
[skip_button]
|
||||
@@ -1018,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1036,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
Практика
|
||||
---
|
||||
[practice_music_title]
|
||||
Фоновая музыка
|
||||
---
|
||||
[practice_start_button]
|
||||
Начать практику
|
||||
---
|
||||
[practice_manual_button]
|
||||
Инструкция
|
||||
---
|
||||
[practice_configure_button]
|
||||
Настроить практику
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
Использовать музыку для практик
|
||||
---
|
||||
[practice_guide_music]
|
||||
Выберите музыку для каждой практики.
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
Используйте стрелки для выбора практики.
|
||||
---
|
||||
[practice_guide_start]
|
||||
Начните выбранную практику.
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
Откройте руководство или настройки.
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d привычек выполнено
|
||||
---
|
||||
[habit_new_button]
|
||||
+ Новая привычка
|
||||
---
|
||||
[habit_reorder_title]
|
||||
Изменить порядок привычек
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
Смешанная практика
|
||||
---
|
||||
[habit_default_name_format]
|
||||
Привычка %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
Медитация
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
Сеансы дыхания и медитации.
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
Приветствие солнцу
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
Сеансы практики приветствия солнцу.
|
||||
---
|
||||
[pet_gamification_title]
|
||||
Геймификация в разработке...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
Только предпросмотр. Эта вкладка еще не реализована.
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
Итог привычек за сегодня.
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
Нажимайте квадраты, чтобы отмечать дни.
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
Неделя и календарь показывают эту привычку.
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
Статистика показывает связанный прогресс.
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
Редактирование меняет имя, цвет и связи.
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
Данные сеансов берутся из завершённых практик.
|
||||
---
|
||||
[session_count_singular]
|
||||
%d сессия
|
||||
---
|
||||
[session_count_plural]
|
||||
%d сессий
|
||||
---
|
||||
[results_rounds]
|
||||
%d раундов
|
||||
---
|
||||
[results_best]
|
||||
лучшее %dс
|
||||
---
|
||||
[results_avg]
|
||||
среднее %dс
|
||||
---
|
||||
[round_result_label]
|
||||
Раунд %d %dс
|
||||
---
|
||||
[starting_in]
|
||||
НАЧАЛО ЧЕРЕЗ %2d
|
||||
---
|
||||
[session_round_label]
|
||||
РАУНД %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Старт: %dс
|
||||
---
|
||||
@@ -1051,4 +934,12 @@ Alias saved
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
Удалено сессий: %lld
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d день
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d дней
|
||||
---
|
||||
+137
-244
@@ -1,9 +1,6 @@
|
||||
[app_title]
|
||||
内息清风
|
||||
---
|
||||
[tab_history]
|
||||
历史
|
||||
---
|
||||
[tab_profile]
|
||||
个人资料
|
||||
---
|
||||
@@ -13,18 +10,6 @@
|
||||
[tab_practice]
|
||||
练习
|
||||
---
|
||||
[habit_add_button]
|
||||
添加习惯
|
||||
---
|
||||
[habit_done_button]
|
||||
完成
|
||||
---
|
||||
[habit_not_done_button]
|
||||
标记
|
||||
---
|
||||
[tab_manual]
|
||||
教程
|
||||
---
|
||||
[tab_pet]
|
||||
Pet
|
||||
---
|
||||
@@ -67,6 +52,12 @@ Pet
|
||||
[profile_friend_decline_button]
|
||||
拒绝
|
||||
---
|
||||
[profile_friend_remove_title]
|
||||
删除好友?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
将删除 %s。重新连接需发送新请求。
|
||||
---
|
||||
[profile_updating_status]
|
||||
正在更新
|
||||
---
|
||||
@@ -82,9 +73,6 @@ Pet
|
||||
[profile_data_section]
|
||||
数据
|
||||
---
|
||||
[profile_sync_section]
|
||||
同步
|
||||
---
|
||||
[profile_friends_count_format]
|
||||
%d 位好友
|
||||
---
|
||||
@@ -97,9 +85,6 @@ Pet
|
||||
[profile_add_friend_button]
|
||||
添加好友
|
||||
---
|
||||
[profile_refresh_button]
|
||||
刷新
|
||||
---
|
||||
[profile_incoming_title]
|
||||
收到
|
||||
---
|
||||
@@ -112,17 +97,14 @@ Pet
|
||||
[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
|
||||
@@ -133,9 +115,6 @@ Down
|
||||
[tab_settings]
|
||||
设置
|
||||
---
|
||||
[tab_statistics]
|
||||
统计
|
||||
---
|
||||
[play_button]
|
||||
开始
|
||||
---
|
||||
@@ -211,27 +190,9 @@ Sun Salutation
|
||||
[meditation_manual_intro_text]
|
||||
一个用于呼吸、平静与觉察的简单冥想练习。
|
||||
---
|
||||
[meditation_manual_text]
|
||||
如果需要,可以选择音乐。锣声会提示开始和结束。
|
||||
---
|
||||
[meditation_music_settings_title]
|
||||
冥想音乐
|
||||
---
|
||||
[meditation_music_section_title]
|
||||
背景音乐
|
||||
---
|
||||
[meditation_music_master_toggle]
|
||||
冥想音乐
|
||||
---
|
||||
[meditation_music_enabled_label]
|
||||
播放背景音乐
|
||||
---
|
||||
[meditation_music_shuffle_label]
|
||||
随机曲目
|
||||
---
|
||||
[meditation_music_track_label]
|
||||
曲目
|
||||
---
|
||||
[meditation_music_download_button]
|
||||
下载音乐
|
||||
---
|
||||
@@ -286,9 +247,6 @@ Finish
|
||||
[results_title]
|
||||
结果
|
||||
---
|
||||
[home_button]
|
||||
主页
|
||||
---
|
||||
[exit_session_title]
|
||||
退出本次练习?
|
||||
---
|
||||
@@ -325,24 +283,6 @@ Finish
|
||||
[round_times_title]
|
||||
轮次时间
|
||||
---
|
||||
[results_rounds]
|
||||
%d 轮
|
||||
---
|
||||
[results_best]
|
||||
最佳 %ds
|
||||
---
|
||||
[results_avg]
|
||||
平均 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
第%d轮 %ds
|
||||
---
|
||||
[starting_in]
|
||||
即将开始 %2d
|
||||
---
|
||||
[session_round_label]
|
||||
第%d轮
|
||||
---
|
||||
[settings_title]
|
||||
设置
|
||||
---
|
||||
@@ -355,24 +295,12 @@ Finish
|
||||
[settings_section_session]
|
||||
练习
|
||||
---
|
||||
[settings_tab_app]
|
||||
应用
|
||||
---
|
||||
[settings_tab_theme]
|
||||
主题
|
||||
---
|
||||
[settings_tab_device]
|
||||
设备
|
||||
---
|
||||
[settings_section_sound]
|
||||
音效
|
||||
---
|
||||
[settings_section_appearance]
|
||||
外观
|
||||
---
|
||||
[settings_section_language]
|
||||
语言
|
||||
---
|
||||
[settings_tab_about]
|
||||
关于
|
||||
---
|
||||
@@ -430,12 +358,6 @@ Finish
|
||||
[double_tap_to_breathe_hint]
|
||||
双击屏幕开始呼吸
|
||||
---
|
||||
[session_count_singular]
|
||||
%d次会话
|
||||
---
|
||||
[session_count_plural]
|
||||
%d次会话
|
||||
---
|
||||
[no_sessions]
|
||||
没有会话
|
||||
---
|
||||
@@ -469,18 +391,6 @@ Finish
|
||||
[next_button]
|
||||
下一步
|
||||
---
|
||||
[coming_soon_label]
|
||||
即将推出...
|
||||
---
|
||||
[total_sessions_label]
|
||||
总练习次数:%d
|
||||
---
|
||||
[data_size_label]
|
||||
数据大小:%s
|
||||
---
|
||||
[storage_label]
|
||||
存储:%s
|
||||
---
|
||||
[export_data_button]
|
||||
导出数据
|
||||
---
|
||||
@@ -505,9 +415,6 @@ Finish
|
||||
[imported_data]
|
||||
数据已导入
|
||||
---
|
||||
[imported_sessions]
|
||||
已导入 %d 个会话
|
||||
---
|
||||
[import_invalid_file]
|
||||
无效的导出文件
|
||||
---
|
||||
@@ -538,9 +445,6 @@ Finish
|
||||
[delete_cancelled]
|
||||
删除已取消
|
||||
---
|
||||
[deleted_sessions]
|
||||
已删除 %lld 个会话
|
||||
---
|
||||
[toggle_off]
|
||||
关
|
||||
---
|
||||
@@ -559,9 +463,6 @@ Finish
|
||||
[tutorial_title]
|
||||
教程
|
||||
---
|
||||
[tutorial_page_label]
|
||||
%d/%d
|
||||
---
|
||||
[tutorial_method_title]
|
||||
方法
|
||||
---
|
||||
@@ -574,9 +475,6 @@ Finish
|
||||
[tutorial_step3_title]
|
||||
第 3 步:吸气与屏息
|
||||
---
|
||||
[tutorial_progressive_speed_title]
|
||||
递进速度
|
||||
---
|
||||
[tutorial_step_intro]
|
||||
这项呼吸练习基于 Wim Hof Method。
|
||||
|
||||
@@ -602,9 +500,6 @@ Finish
|
||||
|
||||
找到自然的节奏:稳定且快速,同时保持充分呼吸。
|
||||
---
|
||||
[tutorial_step_progressive_speed]
|
||||
递进速度会让第一轮更容易进入。
|
||||
---
|
||||
[tutorial_step_exhale_hold]
|
||||
30 次呼吸后,呼气并尽可能长时间屏息。
|
||||
|
||||
@@ -615,45 +510,9 @@ Finish
|
||||
|
||||
呼气后,下一轮将开始。
|
||||
---
|
||||
[tutorial_skip_button]
|
||||
跳过
|
||||
---
|
||||
[tutorial_back_button]
|
||||
返回
|
||||
---
|
||||
[tutorial_next_button]
|
||||
下一步
|
||||
---
|
||||
[tutorial_finish_button]
|
||||
完成
|
||||
---
|
||||
[tutorial_start_button]
|
||||
立即开始
|
||||
---
|
||||
[share_sheet_title]
|
||||
导出练习数据
|
||||
---
|
||||
[export_metadata_header]
|
||||
Inner Breeze 数据导出
|
||||
---
|
||||
[export_metadata_version]
|
||||
版本:%s
|
||||
---
|
||||
[export_metadata_date]
|
||||
导出日期:%s
|
||||
---
|
||||
[export_metadata_count]
|
||||
练习次数:%d
|
||||
---
|
||||
[delete_history_title]
|
||||
删除?
|
||||
---
|
||||
[delete_session_message]
|
||||
删除这次练习?此操作无法撤销。
|
||||
---
|
||||
[delete_round_message]
|
||||
删除这一轮?此操作无法撤销。
|
||||
---
|
||||
[delete_button]
|
||||
删除
|
||||
---
|
||||
@@ -666,42 +525,6 @@ Inner Breeze 数据导出
|
||||
[theme_system]
|
||||
系统
|
||||
---
|
||||
[theme_sky]
|
||||
天空
|
||||
---
|
||||
[theme_ocean]
|
||||
海洋
|
||||
---
|
||||
[theme_forest]
|
||||
森林
|
||||
---
|
||||
[theme_sunset]
|
||||
日落
|
||||
---
|
||||
[theme_lavender]
|
||||
薰衣草
|
||||
---
|
||||
[theme_cherry]
|
||||
樱桃
|
||||
---
|
||||
[theme_dawn]
|
||||
黎明
|
||||
---
|
||||
[theme_sage]
|
||||
鼠尾草
|
||||
---
|
||||
[theme_sepia]
|
||||
棕褐
|
||||
---
|
||||
[theme_mono]
|
||||
单色
|
||||
---
|
||||
[theme_mint]
|
||||
薄荷
|
||||
---
|
||||
[theme_cobalt]
|
||||
钴蓝
|
||||
---
|
||||
[orientation_label]
|
||||
方向
|
||||
---
|
||||
@@ -717,9 +540,6 @@ Inner Breeze 数据导出
|
||||
[orientation_sensor]
|
||||
传感器
|
||||
---
|
||||
[back_button]
|
||||
返回
|
||||
---
|
||||
[close_button]
|
||||
关闭
|
||||
---
|
||||
@@ -753,9 +573,6 @@ Inner Breeze 数据导出
|
||||
[sync_private_key_import_cancelled]
|
||||
账户密钥导入已取消
|
||||
---
|
||||
[sync_liboqs_unavailable]
|
||||
liboqs 未为此目标构建。
|
||||
---
|
||||
[sync_public_id_label]
|
||||
公开 ID
|
||||
---
|
||||
@@ -783,21 +600,24 @@ liboqs 未为此目标构建。
|
||||
[sync_server_saved]
|
||||
同步服务器已保存
|
||||
---
|
||||
[sync_connected]
|
||||
远程同步完成
|
||||
[sync_review_needed]
|
||||
Sync needs review
|
||||
---
|
||||
[sync_failed]
|
||||
远程同步失败
|
||||
[sync_review_message]
|
||||
Review data differences.
|
||||
---
|
||||
[sync_unavailable]
|
||||
此平台不支持远程同步
|
||||
[sync_review_using_remote]
|
||||
Using remote data
|
||||
---
|
||||
[sync_review_keeping_local]
|
||||
Keeping local data
|
||||
---
|
||||
[sync_review_failed]
|
||||
Sync review failed
|
||||
---
|
||||
[sync_no_account]
|
||||
连接前请先创建账户
|
||||
---
|
||||
[sync_auth_failed]
|
||||
远程服务器拒绝了此账户
|
||||
---
|
||||
[sync_backup_warning]
|
||||
请将此私钥保存到你可控制的位置。任何拥有它的人都可以认领此账户。
|
||||
---
|
||||
@@ -891,9 +711,6 @@ Description
|
||||
[habit_delete_button]
|
||||
删除习惯
|
||||
---
|
||||
[habit_add_new_option]
|
||||
添加新习惯
|
||||
---
|
||||
[habit_load_more_button]
|
||||
加载更多
|
||||
---
|
||||
@@ -933,35 +750,6 @@ Wim Hof 屏息轮次
|
||||
[habit_stats_best_streak]
|
||||
最佳连续记录
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d天
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d天
|
||||
---[reset_button]
|
||||
重置
|
||||
---
|
||||
[practice_guide_dropdown]
|
||||
在这里选择你的练习。
|
||||
---
|
||||
[practice_guide_manual]
|
||||
开始练习前请先阅读教程,了解完整的练习流程。
|
||||
---
|
||||
[practice_guide_config]
|
||||
根据你的需要调整练习配置。
|
||||
---
|
||||
[habits_guide_dropdown]
|
||||
在这里选择习惯或创建新习惯。
|
||||
---
|
||||
[habits_guide_practice_list]
|
||||
习惯可以包含你的练习会话数据。
|
||||
---
|
||||
[habits_guide_views]
|
||||
选择每周或日历视图来查看习惯。
|
||||
---
|
||||
[habits_guide_statistics]
|
||||
在这里查看习惯统计。
|
||||
---
|
||||
[profile_guide_account]
|
||||
在这里配置同步账户。
|
||||
---
|
||||
@@ -974,22 +762,16 @@ Manage data, habit order, and visible practices here.
|
||||
[profile_guide_social_no_account]
|
||||
创建同步账户以解锁好友和排行榜。
|
||||
---
|
||||
[nav_mode_label]
|
||||
导航
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
下拉
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
标签页
|
||||
---
|
||||
|
||||
[transition_label]
|
||||
过渡
|
||||
---
|
||||
[transition_none]
|
||||
无
|
||||
---
|
||||
[transition_fade]
|
||||
淡入淡出
|
||||
---
|
||||
[theme_picker_title]
|
||||
选择主题
|
||||
[skip_button]
|
||||
@@ -1016,9 +798,6 @@ Pick a short alias for this account on the current sync server.
|
||||
[sync_alias_register_button]
|
||||
Register Alias
|
||||
---
|
||||
[sync_alias_registered]
|
||||
Alias registered.
|
||||
---
|
||||
[sync_alias_failed]
|
||||
Could not register alias.
|
||||
---
|
||||
@@ -1034,6 +813,112 @@ Save Alias
|
||||
[sync_alias_saved]
|
||||
Alias saved
|
||||
---
|
||||
---
|
||||
[practice_title]
|
||||
练习
|
||||
---
|
||||
[practice_music_title]
|
||||
背景音乐
|
||||
---
|
||||
[practice_start_button]
|
||||
开始练习
|
||||
---
|
||||
[practice_manual_button]
|
||||
手册
|
||||
---
|
||||
[practice_configure_button]
|
||||
配置练习
|
||||
---
|
||||
[practice_music_practice_list_title]
|
||||
为练习使用音乐
|
||||
---
|
||||
[practice_guide_music]
|
||||
为每个练习选择音乐。
|
||||
---
|
||||
[practice_guide_carousel]
|
||||
用箭头选择练习。
|
||||
---
|
||||
[practice_guide_start]
|
||||
开始所选练习。
|
||||
---
|
||||
[practice_guide_manual_config]
|
||||
打开指南或设置。
|
||||
---
|
||||
[habits_done_count_label]
|
||||
%d / %d 个习惯已完成
|
||||
---
|
||||
[habit_new_button]
|
||||
+ 新习惯
|
||||
---
|
||||
[habit_reorder_title]
|
||||
重新排序习惯
|
||||
---
|
||||
[habit_mixed_practice_label]
|
||||
混合练习
|
||||
---
|
||||
[habit_default_name_format]
|
||||
习惯 %d
|
||||
---
|
||||
[habit_default_meditation_name]
|
||||
冥想
|
||||
---
|
||||
[habit_default_meditation_description]
|
||||
呼吸和冥想课程。
|
||||
---
|
||||
[habit_default_sun_salutation_name]
|
||||
拜日式
|
||||
---
|
||||
[habit_default_sun_salutation_description]
|
||||
拜日式练习课程。
|
||||
---
|
||||
[pet_gamification_title]
|
||||
游戏化开发中...
|
||||
---
|
||||
[pet_gamification_subtitle]
|
||||
仅为预览。此标签页尚未实现。
|
||||
---
|
||||
[habits_guide_overview_progress]
|
||||
今天的习惯总数。
|
||||
---
|
||||
[habits_guide_overview_grid]
|
||||
点击方块标记完成日期。
|
||||
---
|
||||
[habits_guide_meditation_views]
|
||||
周视图和日历视图显示此习惯。
|
||||
---
|
||||
[habits_guide_meditation_statistics]
|
||||
统计显示关联进度。
|
||||
---
|
||||
[habits_guide_meditation_edit]
|
||||
编辑可更改名称、颜色和关联。
|
||||
---
|
||||
[habits_guide_meditation_session_data]
|
||||
会话数据来自已完成的练习。
|
||||
---
|
||||
[session_count_singular]
|
||||
%d次会话
|
||||
---
|
||||
[session_count_plural]
|
||||
%d次会话
|
||||
---
|
||||
[results_rounds]
|
||||
%d 轮
|
||||
---
|
||||
[results_best]
|
||||
最佳 %ds
|
||||
---
|
||||
[results_avg]
|
||||
平均 %ds
|
||||
---
|
||||
[round_result_label]
|
||||
第%d轮 %ds
|
||||
---
|
||||
[starting_in]
|
||||
即将开始 %2d
|
||||
---
|
||||
[session_round_label]
|
||||
第%d轮
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
开始: %d秒
|
||||
---
|
||||
@@ -1049,4 +934,12 @@ Alias saved
|
||||
[notification_results]
|
||||
Results
|
||||
---
|
||||
[deleted_sessions]
|
||||
已删除 %lld 个会话
|
||||
---
|
||||
[habit_stats_day_singular]
|
||||
%d天
|
||||
---
|
||||
[habit_stats_day_plural]
|
||||
%d天
|
||||
---
|
||||
@@ -4,7 +4,7 @@ set -e
|
||||
|
||||
AVD_NAME="${1:-inbe-test}"
|
||||
|
||||
echo "📱 Creating AVD: $AVD_NAME (Pixel 8 Pro - Android 14, punch-hole test profile)"
|
||||
echo "📱 Creating AVD: $AVD_NAME (Pixel 8 Pro - Android 15, punch-hole test profile)"
|
||||
|
||||
# Check for Android SDK location
|
||||
if [ -z "$ANDROID_SDK_ROOT" ] && [ -z "$ANDROID_HOME" ]; then
|
||||
@@ -31,7 +31,7 @@ done
|
||||
mkdir -p "$ANDROID_SDK_ROOT/system-images"
|
||||
mkdir -p "$ANDROID_SDK_ROOT/avd"
|
||||
|
||||
ANDROID_API="${ANDROID_API:-34}"
|
||||
ANDROID_API="${ANDROID_API:-35}"
|
||||
SYSTEM_IMAGE_TYPE=""
|
||||
ABI_TYPE=""
|
||||
SOURCE_DIR=""
|
||||
@@ -175,7 +175,7 @@ EOF
|
||||
|
||||
echo "✅ Done!"
|
||||
echo " Device: Pixel 8 Pro"
|
||||
echo " Android: 14 (API $ANDROID_API)"
|
||||
echo " Android: 15 (API $ANDROID_API)"
|
||||
echo " ABI: $ABI_DISPLAY"
|
||||
echo " Cutout: punch-hole overlay enabled by scripts/emulator.sh after boot"
|
||||
echo ""
|
||||
|
||||
+12
-2
@@ -45,6 +45,9 @@ if [ ! -x "$EMULATOR_CMD" ]; then
|
||||
EMULATOR_CMD="$(command -v emulator)"
|
||||
fi
|
||||
|
||||
EMULATOR_DIR="$(cd "$(dirname "$EMULATOR_CMD")" && pwd)"
|
||||
EMULATOR_LD_LIBRARY_PATH="${ANDROID_EMULATOR_LD_LIBRARY_PATH:-$EMULATOR_DIR/lib64:$EMULATOR_DIR/lib64/qt/lib}"
|
||||
|
||||
# Check if emulator is already running
|
||||
if "$ADB_CMD" devices | grep -q '^emulator-[0-9][0-9]*[[:space:]]*device'; then
|
||||
echo "✅ Emulator already running"
|
||||
@@ -52,14 +55,21 @@ if "$ADB_CMD" devices | grep -q '^emulator-[0-9][0-9]*[[:space:]]*device'; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "🚀 Launching Pixel 8 Pro emulator (Android 14 API 34)..."
|
||||
if LD_LIBRARY_PATH="$EMULATOR_LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ldd "$EMULATOR_CMD" 2>/dev/null | grep -q "not found"; then
|
||||
echo "❌ Emulator runtime libraries are missing."
|
||||
echo " Re-enter the repo flake shell so the updated emulator LD_LIBRARY_PATH is active:"
|
||||
echo " nix develop --impure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "🚀 Launching Pixel 8 Pro emulator (Android 15 API 35)..."
|
||||
|
||||
# Set environment for emulator
|
||||
unset ANDROID_HOME
|
||||
export ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT"
|
||||
|
||||
# Launch emulator in background with KVM acceleration
|
||||
"$EMULATOR_CMD" @"$AVD_NAME" \
|
||||
LD_LIBRARY_PATH="$EMULATOR_LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" "$EMULATOR_CMD" @"$AVD_NAME" \
|
||||
-gpu host \
|
||||
-skin 1440x2960 \
|
||||
-no-snapshot-load \
|
||||
|
||||
+74
-801
File diff suppressed because it is too large.
Load diff
+9
-2
@@ -41,6 +41,7 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
SETTINGS_TAB_OVERVIEW = -1,
|
||||
SETTINGS_TAB_SESSION = 0,
|
||||
SETTINGS_TAB_DEVICE,
|
||||
SETTINGS_TAB_THEME,
|
||||
@@ -93,10 +94,12 @@ typedef enum {
|
||||
UIModalHabitCountingInfo,
|
||||
UIModalPracticeManual,
|
||||
UIModalPracticeConfig,
|
||||
UIModalPracticeMusic,
|
||||
UIModalThemePicker,
|
||||
UIModalSyncReview,
|
||||
UIModalSyncAlias,
|
||||
UIModalSyncPublicId,
|
||||
UIModalConfirmRemoveFriend,
|
||||
} UIModalType;
|
||||
|
||||
typedef struct {
|
||||
@@ -185,8 +188,9 @@ typedef struct MeditationPracticeState {
|
||||
int custom_minutes;
|
||||
int show_extend_controls;
|
||||
int music_enabled;
|
||||
int music_shuffle;
|
||||
int music_track;
|
||||
int music_practice_mask;
|
||||
int music_practice_tracks[EXERCISE_COUNT];
|
||||
int music_loaded;
|
||||
int music_playing;
|
||||
int music_test_playing;
|
||||
@@ -284,6 +288,8 @@ struct InbeApp {
|
||||
int profile_friend_input_focused;
|
||||
int profile_friends_loaded;
|
||||
char profile_friend_input[80];
|
||||
char profile_pending_friend_remove_id[80];
|
||||
char profile_pending_friend_remove_name[96];
|
||||
char profile_friends_json[8192];
|
||||
char profile_friend_requests_json[8192];
|
||||
char profile_leaderboard_json[8192];
|
||||
@@ -351,7 +357,7 @@ struct InbeApp {
|
||||
int session_paused;
|
||||
int backgrounded;
|
||||
int results_saved;
|
||||
int modal_open_frame;
|
||||
int modal_input_block_frame;
|
||||
char results_path[FS_PATH_MAX];
|
||||
int saved_pause_seconds;
|
||||
int volume_popup_active;
|
||||
@@ -373,6 +379,7 @@ void app_request_social_refresh(InbeApp *app);
|
||||
void app_request_friend_send(InbeApp *app, const char *target);
|
||||
void app_request_friend_accept(InbeApp *app, const char *request_id);
|
||||
void app_request_friend_decline(InbeApp *app, const char *request_id);
|
||||
void app_request_friend_remove(InbeApp *app, const char *friend_user_id);
|
||||
int app_should_use_tab_bar(const InbeApp *app);
|
||||
void app_play_sound(InbeApp *app, Sound sound, float scale);
|
||||
Texture2D app_load_asset_texture(const char *name);
|
||||
|
||||
+59
-9
@@ -30,6 +30,11 @@ app_open_main_tab(InbeApp *app, int main_tab, int persist)
|
||||
|
||||
if(app->practice_tab == PRACTICE_TAB_CONFIG)
|
||||
app_leave_practice_config(app);
|
||||
if(app->inbe.screen == InbeScreenHabits &&
|
||||
app->habits.screen_mode == HABITS_SCREEN_REORDER) {
|
||||
app->habits.screen_mode = HABITS_SCREEN_OVERVIEW;
|
||||
app->habits.scroll = 0;
|
||||
}
|
||||
|
||||
app->main_tab = clampi(main_tab, APP_MAIN_TAB_HABITS, APP_MAIN_TAB_PRACTICE);
|
||||
if(app->main_tab == APP_MAIN_TAB_PRACTICE)
|
||||
@@ -47,6 +52,12 @@ app_apply_nav_route(InbeApp *app, int route)
|
||||
if(app == NULL)
|
||||
return;
|
||||
|
||||
if(app->inbe.screen == InbeScreenHabits &&
|
||||
app->habits.screen_mode == HABITS_SCREEN_REORDER) {
|
||||
app->habits.screen_mode = HABITS_SCREEN_OVERVIEW;
|
||||
app->habits.scroll = 0;
|
||||
}
|
||||
|
||||
switch(route) {
|
||||
case APP_NAV_ROUTE_PROFILE:
|
||||
if(app->practice_tab == PRACTICE_TAB_CONFIG)
|
||||
@@ -62,16 +73,12 @@ app_apply_nav_route(InbeApp *app, int route)
|
||||
break;
|
||||
case APP_NAV_ROUTE_HABITS:
|
||||
app_open_main_tab(app, APP_MAIN_TAB_HABITS, 1);
|
||||
if(app->habits.tab == HABIT_TAB_STATISTICS || app->habits.tab == HABIT_TAB_EDIT)
|
||||
app->habits.tab = app->habits.view_mode == HABIT_VIEW_WEEKLY
|
||||
? HABIT_TAB_WEEKLY
|
||||
: HABIT_TAB_MONTHLY;
|
||||
break;
|
||||
case APP_NAV_ROUTE_SETTINGS:
|
||||
if(app->practice_tab == PRACTICE_TAB_CONFIG)
|
||||
app_leave_practice_config(app);
|
||||
reset_settings_preview(app);
|
||||
app->settings_tab = SETTINGS_TAB_SESSION;
|
||||
app->settings_tab = SETTINGS_TAB_OVERVIEW;
|
||||
app->settings_scroll = 0;
|
||||
app_switch_screen(app, InbeScreenSettings);
|
||||
break;
|
||||
@@ -90,9 +97,36 @@ app_content_bottom_reserved(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
if(app->inbe.screen == InbeScreenHabits &&
|
||||
app->habits.screen_mode == HABITS_SCREEN_REORDER)
|
||||
return 0;
|
||||
if(app_current_nav_route(app) == APP_NAV_ROUTE_NONE)
|
||||
return 0;
|
||||
return ui_bottom_nav_height() + app_android_bottom_nav_height();
|
||||
return ui_bottom_nav_height();
|
||||
}
|
||||
|
||||
int
|
||||
app_page_height(const InbeApp *app, int full_height)
|
||||
{
|
||||
int bottom_reserved;
|
||||
|
||||
if(full_height <= 0)
|
||||
return 0;
|
||||
bottom_reserved = app_fullscreen_bottom_reserved(app);
|
||||
if(bottom_reserved > 0 && bottom_reserved < full_height)
|
||||
return full_height - bottom_reserved;
|
||||
return full_height;
|
||||
}
|
||||
|
||||
static int
|
||||
app_has_fullscreen_overlay(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL || !app->modal.active)
|
||||
return 0;
|
||||
return app->modal.type == UIModalPracticeManual ||
|
||||
app->modal.type == UIModalPracticeConfig ||
|
||||
app->modal.type == UIModalPracticeMusic ||
|
||||
app->modal.type == UIModalEditProgressiveStartSpeed;
|
||||
}
|
||||
|
||||
static const char *
|
||||
@@ -172,9 +206,22 @@ app_should_draw_bottom_nav(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
if(app_has_fullscreen_overlay(app))
|
||||
return 0;
|
||||
if(app->inbe.screen == InbeScreenHabits &&
|
||||
app->habits.screen_mode == HABITS_SCREEN_REORDER)
|
||||
return 0;
|
||||
return app_current_nav_route(app) != APP_NAV_ROUTE_NONE;
|
||||
}
|
||||
|
||||
int
|
||||
app_fullscreen_bottom_reserved(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
return app_android_bottom_nav_height();
|
||||
}
|
||||
|
||||
void
|
||||
app_draw_bottom_nav(InbeApp *app)
|
||||
{
|
||||
@@ -189,8 +236,14 @@ app_draw_bottom_nav(InbeApp *app)
|
||||
FlintUIBottomNavItem items[BOTTOM_NAV_ROUTE_COUNT];
|
||||
FlintUIBottomNavResult result;
|
||||
|
||||
if(app_android_bottom_nav_height() > 0)
|
||||
DrawRectangle(0, view_height - app_android_bottom_nav_height(),
|
||||
view_width, app_android_bottom_nav_height(), BLACK);
|
||||
if(!app_should_draw_bottom_nav(app))
|
||||
return;
|
||||
if(app->modal_input_block_frame == app->inbe.frame &&
|
||||
IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
|
||||
return;
|
||||
for(int i = 0; i < BOTTOM_NAV_ROUTE_COUNT; i++) {
|
||||
int route = routes[i];
|
||||
items[i] = (FlintUIBottomNavItem){
|
||||
@@ -201,9 +254,6 @@ app_draw_bottom_nav(InbeApp *app)
|
||||
app->modal.active
|
||||
};
|
||||
}
|
||||
if(app_android_bottom_nav_height() > 0)
|
||||
DrawRectangle(0, view_height - app_android_bottom_nav_height(),
|
||||
view_width, app_android_bottom_nav_height(), BLACK);
|
||||
result = ui_draw_bottom_nav((FlintUIBottomNav){
|
||||
.view_width = view_width,
|
||||
.view_height = view_height,
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
#include "app_fwd.h"
|
||||
|
||||
int app_current_nav_route(const InbeApp *app);
|
||||
int app_page_height(const InbeApp *app, int full_height);
|
||||
int app_content_bottom_reserved(const InbeApp *app);
|
||||
int app_fullscreen_bottom_reserved(const InbeApp *app);
|
||||
void app_set_android_bottom_nav_height(int height);
|
||||
int app_android_bottom_nav_height(void);
|
||||
void app_draw_bottom_nav(InbeApp *app);
|
||||
|
||||
+28
-2
@@ -170,6 +170,11 @@ save_settings(InbeApp *app)
|
||||
{"navigation_mode", app->navigation_mode},
|
||||
{"transition_mode", app->transition_mode},
|
||||
{"main_tab", app->main_tab},
|
||||
{"habits_screen_mode", app->habits.screen_mode == HABITS_SCREEN_REORDER
|
||||
? HABITS_SCREEN_OVERVIEW
|
||||
: app->habits.screen_mode},
|
||||
{"habits_tab", app->habits.tab},
|
||||
{"habits_view_mode", app->habits.view_mode},
|
||||
{"fullscreen", app->fullscreen_enabled ? 1 : 0},
|
||||
{"on_screen_keyboard", app->on_screen_keyboard_enabled ? 1 : 0},
|
||||
{"progressive_speed", app->inbe.progressive_speed},
|
||||
@@ -187,8 +192,11 @@ save_settings(InbeApp *app)
|
||||
{"meditation_custom_minutes", app->meditation.custom_minutes},
|
||||
{"meditation_show_extend_controls", app->meditation.show_extend_controls ? 1 : 0},
|
||||
{"meditation_music_enabled", app->meditation.music_enabled ? 1 : 0},
|
||||
{"meditation_music_shuffle", app->meditation.music_shuffle ? 1 : 0},
|
||||
{"meditation_music_track", app->meditation.music_track},
|
||||
{"practice_music_mask", app->meditation.music_practice_mask},
|
||||
{"practice_music_track_wim_hof", app->meditation.music_practice_tracks[EXERCISE_WIM_HOF]},
|
||||
{"practice_music_track_meditation", app->meditation.music_practice_tracks[EXERCISE_MEDITATION]},
|
||||
{"practice_music_track_sun_salutation", app->meditation.music_practice_tracks[EXERCISE_SUN_SALUTATION]},
|
||||
{"play_in_background", app->inbe.play_in_background},
|
||||
{"practice_category_tab", app->practice_category_tab},
|
||||
};
|
||||
@@ -198,6 +206,11 @@ save_settings(InbeApp *app)
|
||||
storage_set_setting_text("language",
|
||||
(app->language_selected && app->language[0] != '\0') ?
|
||||
app->language : "");
|
||||
storage_set_setting_text("habits_selected_id",
|
||||
(app->habits.selected >= 0 &&
|
||||
app->habits.selected < app->habits.count)
|
||||
? app->habits.items[app->habits.selected].id
|
||||
: "");
|
||||
storage_settings_end_write();
|
||||
#if defined(PLATFORM_WEB)
|
||||
sync_web_storage();
|
||||
@@ -274,7 +287,6 @@ app_load_settings(InbeApp *app)
|
||||
{&app->show_session_volume_control, "show_session_volume_control", 0},
|
||||
{&app->meditation.show_extend_controls, "meditation_show_extend_controls", 1},
|
||||
{&app->meditation.music_enabled, "meditation_music_enabled", 1},
|
||||
{&app->meditation.music_shuffle, "meditation_music_shuffle", 0},
|
||||
};
|
||||
load_bool_settings(settings, sizeof(settings) / sizeof(settings[0]));
|
||||
}
|
||||
@@ -290,6 +302,12 @@ app_load_settings(InbeApp *app)
|
||||
APP_ORIENTATION_SYSTEM, APP_ORIENTATION_SENSOR},
|
||||
{&app->main_tab, "main_tab", APP_MAIN_TAB_PRACTICE,
|
||||
APP_MAIN_TAB_HABITS, APP_MAIN_TAB_PRACTICE},
|
||||
{&app->habits.screen_mode, "habits_screen_mode", HABITS_SCREEN_OVERVIEW,
|
||||
HABITS_SCREEN_OVERVIEW, HABITS_SCREEN_DETAIL},
|
||||
{&app->habits.tab, "habits_tab", HABIT_TAB_WEEKLY,
|
||||
HABIT_TAB_WEEKLY, HABIT_TAB_COUNT - 1},
|
||||
{&app->habits.view_mode, "habits_view_mode", HABIT_VIEW_WEEKLY,
|
||||
HABIT_VIEW_CALENDAR, HABIT_VIEW_WEEKLY},
|
||||
{&app->inbe.progressive_start_speed, "progressive_start_speed",
|
||||
DefaultProgressiveStartSpeed, SETTINGS_SPEED_MIN, SETTINGS_SPEED_MAX},
|
||||
{&app->inbe.breath_animation, "breath_animation", InbeBreathAnimationLinear,
|
||||
@@ -310,6 +328,14 @@ app_load_settings(InbeApp *app)
|
||||
1, 240},
|
||||
{&app->meditation.music_track, "meditation_music_track", 0,
|
||||
0, MEDITATION_MUSIC_TRACK_COUNT - 1},
|
||||
{&app->meditation.music_practice_mask, "practice_music_mask",
|
||||
1 << EXERCISE_MEDITATION, 0, (1 << EXERCISE_COUNT) - 1},
|
||||
{&app->meditation.music_practice_tracks[EXERCISE_WIM_HOF],
|
||||
"practice_music_track_wim_hof", 0, 0, MEDITATION_MUSIC_TRACK_COUNT - 1},
|
||||
{&app->meditation.music_practice_tracks[EXERCISE_MEDITATION],
|
||||
"practice_music_track_meditation", 0, 0, MEDITATION_MUSIC_TRACK_COUNT - 1},
|
||||
{&app->meditation.music_practice_tracks[EXERCISE_SUN_SALUTATION],
|
||||
"practice_music_track_sun_salutation", 0, 0, MEDITATION_MUSIC_TRACK_COUNT - 1},
|
||||
{&app->practice_category_tab, "practice_category_tab", PRACTICE_CATEGORY_MIND,
|
||||
0, PRACTICE_CATEGORY_COUNT - 1},
|
||||
{&app->transition_mode, "transition_mode", APP_TRANSITION_FADE,
|
||||
|
||||
@@ -0,0 +1,811 @@
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOGDI
|
||||
#define NOUSER
|
||||
#define MMNOSOUND
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "app_sync.h"
|
||||
|
||||
#include "profile_social.h"
|
||||
#include "storage.h"
|
||||
#include "sync_account.h"
|
||||
#include "sync_client.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
#include <emscripten.h>
|
||||
#elif !defined(_WIN32)
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#define INBE_SYNC_SERVER_URL_KEY "sync_server_url"
|
||||
#define INBE_SYNC_SERVER_URL_DEFAULT "https://api.waozi.xyz"
|
||||
#define INBE_SYNC_INPUT_QUIET_SECONDS 0.45
|
||||
|
||||
typedef struct InbeSyncCoordinator {
|
||||
double dirty_sync_at;
|
||||
double last_input_at;
|
||||
int sync_running;
|
||||
int data_refresh_pending;
|
||||
int social_refresh_pending;
|
||||
int social_refresh_running;
|
||||
int remote_sync_due;
|
||||
char social_action[16];
|
||||
char social_action_value[96];
|
||||
} InbeSyncCoordinator;
|
||||
|
||||
static InbeSyncCoordinator g_sync = {0};
|
||||
|
||||
#if !defined(PLATFORM_WEB)
|
||||
typedef struct InbeSyncWorkerArgs {
|
||||
char url[256];
|
||||
} InbeSyncWorkerArgs;
|
||||
|
||||
typedef struct InbeSocialWorkerArgs {
|
||||
char url[256];
|
||||
char practice[32];
|
||||
char metric[32];
|
||||
char leaderboard_key[96];
|
||||
char action[16];
|
||||
char action_value[96];
|
||||
} InbeSocialWorkerArgs;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define sync_thread_return DWORD WINAPI
|
||||
#define sync_thread_done 0
|
||||
#define sync_sleep(seconds) Sleep((DWORD)((seconds) * 1000))
|
||||
#define sync_lock() AcquireSRWLockExclusive(&g_sync_mutex)
|
||||
#define sync_unlock() ReleaseSRWLockExclusive(&g_sync_mutex)
|
||||
typedef HANDLE SyncThread;
|
||||
static SRWLOCK g_sync_mutex = SRWLOCK_INIT;
|
||||
static int
|
||||
sync_thread_start(SyncThread *thread, LPTHREAD_START_ROUTINE func, void *arg)
|
||||
{
|
||||
*thread = CreateThread(NULL, 0, func, arg, 0, NULL);
|
||||
return *thread != NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
sync_thread_detach(SyncThread thread)
|
||||
{
|
||||
CloseHandle(thread);
|
||||
}
|
||||
#else
|
||||
#define sync_thread_return void *
|
||||
#define sync_thread_done NULL
|
||||
#define sync_sleep(seconds) sleep(seconds)
|
||||
#define sync_lock() pthread_mutex_lock(&g_sync_mutex)
|
||||
#define sync_unlock() pthread_mutex_unlock(&g_sync_mutex)
|
||||
typedef pthread_t SyncThread;
|
||||
static pthread_mutex_t g_sync_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int
|
||||
sync_thread_start(SyncThread *thread, void *(*func)(void *), void *arg)
|
||||
{
|
||||
return pthread_create(thread, NULL, func, arg) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
sync_thread_detach(SyncThread thread)
|
||||
{
|
||||
pthread_detach(thread);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int g_sync_finished = 0;
|
||||
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 = 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];
|
||||
static char g_social_leaderboard_key[96];
|
||||
static int g_sync_events_running = 0;
|
||||
static char g_sync_events_url[256];
|
||||
#else
|
||||
static char g_sync_events_url[256];
|
||||
static double g_sync_events_retry_at = 0.0;
|
||||
#endif
|
||||
|
||||
static int app_sync_url(char *url, size_t url_size);
|
||||
static int app_background_sync_safe(const InbeApp *app);
|
||||
static int app_input_active(void);
|
||||
static int app_sync_now(InbeApp *app);
|
||||
static const char *app_modal_type_name(UIModalType type);
|
||||
static const char *app_social_practice_id(int practice);
|
||||
static const char *app_social_metric_id(int practice, int metric);
|
||||
static void app_social_leaderboard_key(char *out, size_t out_size,
|
||||
int practice, int metric);
|
||||
|
||||
static void
|
||||
app_queue_social_refresh(void)
|
||||
{
|
||||
g_sync.social_refresh_pending = 1;
|
||||
}
|
||||
|
||||
#if !defined(PLATFORM_WEB)
|
||||
static sync_thread_return
|
||||
app_sync_worker(void *userdata)
|
||||
{
|
||||
InbeSyncWorkerArgs *args = userdata;
|
||||
FlintLyraSyncResult result = FLINT_LYRA_SYNC_INVALID_URL;
|
||||
int changed = 0;
|
||||
|
||||
if(args != NULL) {
|
||||
result = sync_client_sync(args->url);
|
||||
changed = result == FLINT_LYRA_SYNC_OK && storage_last_sync_changed();
|
||||
free(args);
|
||||
}
|
||||
|
||||
sync_lock();
|
||||
g_sync_finished_result = result;
|
||||
g_sync_finished_changed = changed;
|
||||
g_sync_finished = 1;
|
||||
g_sync.sync_running = 0;
|
||||
sync_unlock();
|
||||
return sync_thread_done;
|
||||
}
|
||||
|
||||
static sync_thread_return
|
||||
app_social_worker(void *userdata)
|
||||
{
|
||||
InbeSocialWorkerArgs *args = userdata;
|
||||
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\":[]}";
|
||||
|
||||
if(args != NULL) {
|
||||
if(strcmp(args->action, "send") == 0) {
|
||||
result = sync_client_send_friend_request(args->url, args->action_value);
|
||||
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 != 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 != FLINT_LYRA_SYNC_OK)
|
||||
goto done;
|
||||
} else if(strcmp(args->action, "remove") == 0) {
|
||||
result = sync_client_remove_friend(args->url, args->action_value);
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
goto done;
|
||||
}
|
||||
|
||||
result = sync_client_get_friend_requests(args->url, requests_json,
|
||||
sizeof(requests_json));
|
||||
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 != FLINT_LYRA_SYNC_OK)
|
||||
result = friends_result;
|
||||
else if(leaderboard_result != FLINT_LYRA_SYNC_OK)
|
||||
result = leaderboard_result;
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
sync_lock();
|
||||
g_social_finished_result = result;
|
||||
snprintf(g_social_friend_requests_json, sizeof(g_social_friend_requests_json),
|
||||
"%s", requests_json);
|
||||
snprintf(g_social_friends_json, sizeof(g_social_friends_json), "%s",
|
||||
friends_json);
|
||||
snprintf(g_social_leaderboard_json, sizeof(g_social_leaderboard_json), "%s",
|
||||
leaderboard_json);
|
||||
snprintf(g_social_leaderboard_key, sizeof(g_social_leaderboard_key), "%s",
|
||||
args != NULL ? args->leaderboard_key : "");
|
||||
g_social_finished = 1;
|
||||
g_sync.social_refresh_running = 0;
|
||||
sync_unlock();
|
||||
free(args);
|
||||
return sync_thread_done;
|
||||
}
|
||||
|
||||
static sync_thread_return
|
||||
app_sync_events_worker(void *userdata)
|
||||
{
|
||||
InbeSyncWorkerArgs *args = userdata;
|
||||
|
||||
if(args == NULL)
|
||||
return sync_thread_done;
|
||||
for(;;) {
|
||||
FlintLyraSyncResult result;
|
||||
|
||||
sync_lock();
|
||||
if(g_sync.sync_running) {
|
||||
sync_unlock();
|
||||
sync_sleep(1);
|
||||
continue;
|
||||
}
|
||||
sync_unlock();
|
||||
|
||||
result = sync_client_wait_for_remote_event(args->url);
|
||||
sync_lock();
|
||||
if(result == FLINT_LYRA_SYNC_OK)
|
||||
g_sync.remote_sync_due = 1;
|
||||
sync_unlock();
|
||||
if(result != FLINT_LYRA_SYNC_OK)
|
||||
sync_sleep(2);
|
||||
}
|
||||
return sync_thread_done;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
app_collect_finished_sync(void)
|
||||
{
|
||||
#if !defined(PLATFORM_WEB)
|
||||
int finished;
|
||||
int result;
|
||||
int changed;
|
||||
|
||||
sync_lock();
|
||||
finished = g_sync_finished;
|
||||
result = g_sync_finished_result;
|
||||
changed = g_sync_finished_changed;
|
||||
g_sync_finished = 0;
|
||||
sync_unlock();
|
||||
|
||||
if(!finished)
|
||||
return;
|
||||
#else
|
||||
FlintLyraSyncResult result;
|
||||
int changed = 0;
|
||||
|
||||
if(sync_client_web_poll_remote_event())
|
||||
g_sync.remote_sync_due = 1;
|
||||
if(!g_sync.sync_running)
|
||||
return;
|
||||
if(!sync_client_web_sync_poll(&result, &changed))
|
||||
return;
|
||||
g_sync.sync_running = 0;
|
||||
#endif
|
||||
|
||||
if(result == FLINT_LYRA_SYNC_OK) {
|
||||
TraceLog(LOG_INFO, "SYNC: background sync complete changed=%d", changed);
|
||||
app_queue_social_refresh();
|
||||
if(changed)
|
||||
g_sync.data_refresh_pending = 1;
|
||||
} else {
|
||||
TraceLog(LOG_WARNING, "SYNC: background sync failed result=%d name=%s",
|
||||
result, flint_lyra_sync_result_name(result));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
app_ensure_sync_events(const char *url)
|
||||
{
|
||||
#if !defined(PLATFORM_WEB)
|
||||
SyncThread thread;
|
||||
InbeSyncWorkerArgs *args;
|
||||
|
||||
if(url == NULL || url[0] == '\0')
|
||||
return;
|
||||
sync_lock();
|
||||
if(g_sync_events_running && strcmp(g_sync_events_url, url) == 0) {
|
||||
sync_unlock();
|
||||
return;
|
||||
}
|
||||
if(g_sync_events_running) {
|
||||
sync_unlock();
|
||||
return;
|
||||
}
|
||||
g_sync_events_running = 1;
|
||||
g_sync.remote_sync_due = 1;
|
||||
snprintf(g_sync_events_url, sizeof(g_sync_events_url), "%s", url);
|
||||
sync_unlock();
|
||||
|
||||
args = malloc(sizeof(*args));
|
||||
if(args == NULL) {
|
||||
sync_lock();
|
||||
g_sync_events_running = 0;
|
||||
g_sync_events_url[0] = '\0';
|
||||
sync_unlock();
|
||||
return;
|
||||
}
|
||||
snprintf(args->url, sizeof(args->url), "%s", url);
|
||||
if(!sync_thread_start(&thread, app_sync_events_worker, args)) {
|
||||
free(args);
|
||||
sync_lock();
|
||||
g_sync_events_running = 0;
|
||||
g_sync_events_url[0] = '\0';
|
||||
sync_unlock();
|
||||
TraceLog(LOG_WARNING, "SYNC: failed to start websocket event thread");
|
||||
return;
|
||||
}
|
||||
sync_thread_detach(thread);
|
||||
TraceLog(LOG_INFO, "SYNC: websocket event listener started");
|
||||
#else
|
||||
double now;
|
||||
|
||||
if(url == NULL || url[0] == '\0')
|
||||
return;
|
||||
if(strcmp(g_sync_events_url, url) == 0) {
|
||||
sync_client_web_start_remote_events(url);
|
||||
return;
|
||||
}
|
||||
now = GetTime();
|
||||
if(now < g_sync_events_retry_at)
|
||||
return;
|
||||
if(!sync_client_web_start_remote_events(url)) {
|
||||
g_sync_events_retry_at = now + 2.0;
|
||||
return;
|
||||
}
|
||||
g_sync.remote_sync_due = 1;
|
||||
snprintf(g_sync_events_url, sizeof(g_sync_events_url), "%s", url);
|
||||
TraceLog(LOG_INFO, "SYNC: websocket event listener started");
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
app_background_sync_safe(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
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)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char *
|
||||
app_modal_type_name(UIModalType type)
|
||||
{
|
||||
switch(type) {
|
||||
case UIModalNone: return "none";
|
||||
case UIModalConfirmExitSession: return "confirm_exit_session";
|
||||
case UIModalMeditationSetup: return "meditation_setup";
|
||||
case UIModalConfirmDeleteData: return "confirm_delete_data";
|
||||
case UIModalConfirmDeleteHabit: return "confirm_delete_habit";
|
||||
case UIModalEditProgressiveStartSpeed: return "edit_progressive_start_speed";
|
||||
case UIModalMeditationNetworkError: return "meditation_network_error";
|
||||
case UIModalConfirmImportDataSettings: return "confirm_import_data_settings";
|
||||
case UIModalSyncAccountBackup: return "sync_account_backup";
|
||||
case UIModalConfirmDeleteSyncAccount: return "confirm_delete_sync_account";
|
||||
case UIModalHabitPracticeListInfo: return "habit_practice_list_info";
|
||||
case UIModalHabitCountingInfo: return "habit_counting_info";
|
||||
case UIModalPracticeManual: return "practice_manual";
|
||||
case UIModalPracticeConfig: return "practice_config";
|
||||
case UIModalPracticeMusic: return "practice_music";
|
||||
case UIModalThemePicker: return "theme_picker";
|
||||
case UIModalSyncReview: return "sync_review";
|
||||
case UIModalSyncAlias: return "sync_alias";
|
||||
case UIModalSyncPublicId: return "sync_public_id";
|
||||
case UIModalConfirmRemoveFriend: return "confirm_remove_friend";
|
||||
default: break;
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static int
|
||||
app_input_active(void)
|
||||
{
|
||||
return IsMouseButtonDown(MOUSE_BUTTON_LEFT) ||
|
||||
IsMouseButtonPressed(MOUSE_BUTTON_LEFT) ||
|
||||
IsMouseButtonReleased(MOUSE_BUTTON_LEFT) ||
|
||||
IsMouseButtonDown(MOUSE_BUTTON_RIGHT) ||
|
||||
IsMouseButtonPressed(MOUSE_BUTTON_RIGHT) ||
|
||||
IsMouseButtonReleased(MOUSE_BUTTON_RIGHT);
|
||||
}
|
||||
|
||||
static void
|
||||
app_apply_pending_sync_refresh(InbeApp *app)
|
||||
{
|
||||
if(!g_sync.data_refresh_pending || !app_background_sync_safe(app))
|
||||
return;
|
||||
g_sync.data_refresh_pending = 0;
|
||||
TraceLog(LOG_INFO, "SYNC: applying remote refresh");
|
||||
app_reload_after_import(app, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
app_sync_url(char *url, size_t url_size)
|
||||
{
|
||||
const char *saved_url;
|
||||
InbeSyncAccount account;
|
||||
|
||||
if(url == NULL || url_size == 0)
|
||||
return 0;
|
||||
url[0] = '\0';
|
||||
if(!sync_account_load(&account))
|
||||
return 0;
|
||||
saved_url = storage_get_setting_text(INBE_SYNC_SERVER_URL_KEY);
|
||||
if(!sync_client_normalize_url(saved_url != NULL && saved_url[0] != '\0'
|
||||
? saved_url
|
||||
: INBE_SYNC_SERVER_URL_DEFAULT,
|
||||
url, url_size))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char *
|
||||
app_social_practice_id(int practice)
|
||||
{
|
||||
switch(practice) {
|
||||
case EXERCISE_MEDITATION:
|
||||
return "meditation";
|
||||
case EXERCISE_SUN_SALUTATION:
|
||||
return "sun_salutation";
|
||||
case EXERCISE_WIM_HOF:
|
||||
default:
|
||||
return "whm";
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
app_social_metric_id(int practice, int metric)
|
||||
{
|
||||
if(metric != 1)
|
||||
return "streak";
|
||||
return practice == EXERCISE_MEDITATION ? "avg_time" : "avg_hold";
|
||||
}
|
||||
|
||||
static void
|
||||
app_social_leaderboard_key(char *out, size_t out_size, int practice, int metric)
|
||||
{
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
snprintf(out, out_size, "leaderboard.inbe.%s.%s",
|
||||
app_social_practice_id(practice),
|
||||
app_social_metric_id(practice, metric));
|
||||
}
|
||||
|
||||
static void
|
||||
app_apply_pending_social_refresh(InbeApp *app)
|
||||
{
|
||||
char url[256];
|
||||
char action[16] = "";
|
||||
char action_value[96] = "";
|
||||
|
||||
if(!g_sync.social_refresh_pending || !app_background_sync_safe(app))
|
||||
return;
|
||||
#if !defined(PLATFORM_WEB)
|
||||
{
|
||||
SyncThread thread;
|
||||
InbeSocialWorkerArgs *args;
|
||||
|
||||
sync_lock();
|
||||
if(g_sync.sync_running || g_sync.social_refresh_running) {
|
||||
sync_unlock();
|
||||
return;
|
||||
}
|
||||
snprintf(action, sizeof(action), "%s", g_sync.social_action);
|
||||
snprintf(action_value, sizeof(action_value), "%s", g_sync.social_action_value);
|
||||
g_sync.social_action[0] = '\0';
|
||||
g_sync.social_action_value[0] = '\0';
|
||||
g_sync.social_refresh_running = 1;
|
||||
sync_unlock();
|
||||
|
||||
if(!app_sync_url(url, sizeof(url))) {
|
||||
sync_lock();
|
||||
g_sync.social_refresh_running = 0;
|
||||
sync_unlock();
|
||||
g_sync.social_refresh_pending = 0;
|
||||
return;
|
||||
}
|
||||
args = malloc(sizeof(*args));
|
||||
if(args == NULL) {
|
||||
sync_lock();
|
||||
g_sync.social_refresh_running = 0;
|
||||
sync_unlock();
|
||||
return;
|
||||
}
|
||||
snprintf(args->url, sizeof(args->url), "%s", url);
|
||||
snprintf(args->practice, sizeof(args->practice), "%s",
|
||||
app_social_practice_id(app->profile_leaderboard_practice));
|
||||
snprintf(args->metric, sizeof(args->metric), "%s",
|
||||
app_social_metric_id(app->profile_leaderboard_practice,
|
||||
app->profile_leaderboard_metric));
|
||||
app_social_leaderboard_key(args->leaderboard_key,
|
||||
sizeof(args->leaderboard_key),
|
||||
app->profile_leaderboard_practice,
|
||||
app->profile_leaderboard_metric);
|
||||
snprintf(args->action, sizeof(args->action), "%s", action);
|
||||
snprintf(args->action_value, sizeof(args->action_value), "%s", action_value);
|
||||
TraceLog(LOG_INFO, "SYNC: starting background social refresh");
|
||||
if(!sync_thread_start(&thread, app_social_worker, args)) {
|
||||
free(args);
|
||||
sync_lock();
|
||||
g_sync.social_refresh_running = 0;
|
||||
sync_unlock();
|
||||
TraceLog(LOG_WARNING, "SYNC: failed to start social refresh thread");
|
||||
return;
|
||||
}
|
||||
sync_thread_detach(thread);
|
||||
}
|
||||
#else
|
||||
TraceLog(LOG_INFO, "SYNC: refreshing social cache");
|
||||
profile_social_refresh_cache(app);
|
||||
#endif
|
||||
g_sync.social_refresh_pending = 0;
|
||||
}
|
||||
|
||||
#if !defined(PLATFORM_WEB)
|
||||
static void
|
||||
app_collect_finished_social_refresh(InbeApp *app)
|
||||
{
|
||||
int finished;
|
||||
int result;
|
||||
char requests_json[8192];
|
||||
char friends_json[8192];
|
||||
char leaderboard_json[8192];
|
||||
char leaderboard_key[96];
|
||||
|
||||
sync_lock();
|
||||
finished = g_social_finished;
|
||||
result = g_social_finished_result;
|
||||
if(finished) {
|
||||
snprintf(requests_json, sizeof(requests_json), "%s",
|
||||
g_social_friend_requests_json);
|
||||
snprintf(friends_json, sizeof(friends_json), "%s", g_social_friends_json);
|
||||
snprintf(leaderboard_json, sizeof(leaderboard_json), "%s",
|
||||
g_social_leaderboard_json);
|
||||
snprintf(leaderboard_key, sizeof(leaderboard_key), "%s",
|
||||
g_social_leaderboard_key);
|
||||
g_social_finished = 0;
|
||||
}
|
||||
sync_unlock();
|
||||
|
||||
if(!finished)
|
||||
return;
|
||||
if(result != FLINT_LYRA_SYNC_OK) {
|
||||
TraceLog(LOG_WARNING, "SYNC: social refresh failed result=%d name=%s",
|
||||
result, flint_lyra_sync_result_name(result));
|
||||
return;
|
||||
}
|
||||
storage_set_social_cache_json("friends.requests", requests_json);
|
||||
storage_set_social_cache_json("friends.list", friends_json);
|
||||
if(leaderboard_key[0] != '\0')
|
||||
storage_set_social_cache_json(leaderboard_key, leaderboard_json);
|
||||
if(app != NULL) {
|
||||
snprintf(app->profile_friend_requests_json,
|
||||
sizeof(app->profile_friend_requests_json), "%s", requests_json);
|
||||
snprintf(app->profile_friends_json, sizeof(app->profile_friends_json),
|
||||
"%s", friends_json);
|
||||
if(leaderboard_key[0] != '\0') {
|
||||
char current_key[96];
|
||||
app_social_leaderboard_key(current_key, sizeof(current_key),
|
||||
app->profile_leaderboard_practice,
|
||||
app->profile_leaderboard_metric);
|
||||
if(strcmp(current_key, leaderboard_key) == 0)
|
||||
snprintf(app->profile_leaderboard_json,
|
||||
sizeof(app->profile_leaderboard_json), "%s",
|
||||
leaderboard_json);
|
||||
}
|
||||
app->profile_friends_loaded = 1;
|
||||
app->profile_leaderboard_loaded = 1;
|
||||
}
|
||||
TraceLog(LOG_INFO, "SYNC: social cache refreshed");
|
||||
}
|
||||
#else
|
||||
static void
|
||||
app_collect_finished_social_refresh(InbeApp *app)
|
||||
{
|
||||
(void)app;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
app_request_social_refresh(InbeApp *app)
|
||||
{
|
||||
(void)app;
|
||||
app_queue_social_refresh();
|
||||
}
|
||||
|
||||
static void
|
||||
app_request_social_action(const char *action, const char *value)
|
||||
{
|
||||
if(action == NULL || action[0] == '\0' || value == NULL || value[0] == '\0')
|
||||
return;
|
||||
#if !defined(PLATFORM_WEB)
|
||||
sync_lock();
|
||||
snprintf(g_sync.social_action, sizeof(g_sync.social_action), "%s", action);
|
||||
snprintf(g_sync.social_action_value, sizeof(g_sync.social_action_value), "%s", value);
|
||||
g_sync.social_refresh_pending = 1;
|
||||
sync_unlock();
|
||||
#else
|
||||
g_sync.social_refresh_pending = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
app_request_friend_send(InbeApp *app, const char *target)
|
||||
{
|
||||
(void)app;
|
||||
app_request_social_action("send", target);
|
||||
}
|
||||
|
||||
void
|
||||
app_request_friend_accept(InbeApp *app, const char *request_id)
|
||||
{
|
||||
(void)app;
|
||||
app_request_social_action("accept", request_id);
|
||||
}
|
||||
|
||||
void
|
||||
app_request_friend_decline(InbeApp *app, const char *request_id)
|
||||
{
|
||||
(void)app;
|
||||
app_request_social_action("decline", request_id);
|
||||
}
|
||||
|
||||
void
|
||||
app_request_friend_remove(InbeApp *app, const char *friend_user_id)
|
||||
{
|
||||
(void)app;
|
||||
app_request_social_action("remove", friend_user_id);
|
||||
}
|
||||
|
||||
static int
|
||||
app_sync_now(InbeApp *app)
|
||||
{
|
||||
char url[256];
|
||||
|
||||
if(app == NULL || !app_sync_url(url, sizeof(url)))
|
||||
return 0;
|
||||
#if !defined(PLATFORM_WEB)
|
||||
{
|
||||
SyncThread thread;
|
||||
InbeSyncWorkerArgs *args;
|
||||
|
||||
sync_lock();
|
||||
if(g_sync.sync_running) {
|
||||
sync_unlock();
|
||||
return 0;
|
||||
}
|
||||
g_sync.sync_running = 1;
|
||||
sync_unlock();
|
||||
|
||||
args = malloc(sizeof(*args));
|
||||
if(args == NULL) {
|
||||
sync_lock();
|
||||
g_sync.sync_running = 0;
|
||||
sync_unlock();
|
||||
return 0;
|
||||
}
|
||||
snprintf(args->url, sizeof(args->url), "%s", url);
|
||||
TraceLog(LOG_INFO, "SYNC: starting background sync");
|
||||
if(!sync_thread_start(&thread, app_sync_worker, args)) {
|
||||
free(args);
|
||||
sync_lock();
|
||||
g_sync.sync_running = 0;
|
||||
sync_unlock();
|
||||
TraceLog(LOG_WARNING, "SYNC: failed to start background sync thread");
|
||||
return 0;
|
||||
}
|
||||
sync_thread_detach(thread);
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
if(g_sync.sync_running)
|
||||
return 0;
|
||||
g_sync.sync_running = 1;
|
||||
TraceLog(LOG_INFO, "SYNC: starting background sync");
|
||||
if(!sync_client_web_sync_start(url)) {
|
||||
g_sync.sync_running = 0;
|
||||
TraceLog(LOG_WARNING, "SYNC: failed to start background sync");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
app_auto_sync(InbeApp *app)
|
||||
{
|
||||
double due;
|
||||
double now;
|
||||
char url[256];
|
||||
|
||||
if(app == NULL || !app_sync_url(url, sizeof(url)))
|
||||
return 0;
|
||||
now = GetTime();
|
||||
g_sync.last_input_at = now;
|
||||
due = now + INBE_SYNC_INPUT_QUIET_SECONDS;
|
||||
if(g_sync.dirty_sync_at <= 0.0 || due < g_sync.dirty_sync_at)
|
||||
g_sync.dirty_sync_at = due;
|
||||
TraceLog(LOG_INFO, "SYNC: queued local changes");
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
app_sync_pump(InbeApp *app)
|
||||
{
|
||||
double now;
|
||||
int should_sync = 0;
|
||||
int dirty_due = 0;
|
||||
int repair_due = 0;
|
||||
char url[256];
|
||||
InbeStorageSyncStatus sync_status;
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
app_collect_finished_sync();
|
||||
app_collect_finished_social_refresh(app);
|
||||
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 {
|
||||
app_open_modal(app, UIModalSyncReview);
|
||||
}
|
||||
}
|
||||
app_apply_pending_sync_refresh(app);
|
||||
app_apply_pending_social_refresh(app);
|
||||
if(!app_sync_url(url, sizeof(url)))
|
||||
return;
|
||||
app_ensure_sync_events(url);
|
||||
now = GetTime();
|
||||
if(app_input_active())
|
||||
g_sync.last_input_at = now;
|
||||
if(g_sync.dirty_sync_at > 0.0 && now >= g_sync.dirty_sync_at) {
|
||||
should_sync = 1;
|
||||
dirty_due = 1;
|
||||
}
|
||||
if(storage_sync_status(&sync_status) && sync_status.has_account && sync_status.repair_pending &&
|
||||
(g_sync.dirty_sync_at <= 0.0 || now >= g_sync.dirty_sync_at)) {
|
||||
should_sync = 1;
|
||||
repair_due = 1;
|
||||
}
|
||||
#if !defined(PLATFORM_WEB)
|
||||
sync_lock();
|
||||
#endif
|
||||
if(g_sync.remote_sync_due) {
|
||||
should_sync = 1;
|
||||
g_sync.remote_sync_due = 0;
|
||||
}
|
||||
#if !defined(PLATFORM_WEB)
|
||||
sync_unlock();
|
||||
#endif
|
||||
if(!should_sync)
|
||||
return;
|
||||
if(now < g_sync.last_input_at + INBE_SYNC_INPUT_QUIET_SECONDS) {
|
||||
if(g_sync.dirty_sync_at <= 0.0)
|
||||
g_sync.dirty_sync_at = g_sync.last_input_at + INBE_SYNC_INPUT_QUIET_SECONDS;
|
||||
return;
|
||||
}
|
||||
if(!app_background_sync_safe(app)) {
|
||||
TraceLog(LOG_INFO,
|
||||
"SYNC: delayed; modal=%d type=%s screen=%d pending_review=%d tutorial_seen=%d habits_guide_seen=%d",
|
||||
app->modal.active,
|
||||
app_modal_type_name(app->modal.type),
|
||||
app->inbe.screen,
|
||||
storage_sync_review_pending(),
|
||||
app->tutorial_seen,
|
||||
app->habits_guide_seen);
|
||||
if(g_sync.dirty_sync_at <= 0.0 || repair_due)
|
||||
g_sync.dirty_sync_at = now + 1.0;
|
||||
return;
|
||||
}
|
||||
if(app_sync_now(app)) {
|
||||
if(dirty_due || repair_due)
|
||||
g_sync.dirty_sync_at = 0.0;
|
||||
TraceLog(LOG_INFO, "SYNC: dispatched");
|
||||
} else if(dirty_due || repair_due) {
|
||||
g_sync.dirty_sync_at = now + INBE_SYNC_INPUT_QUIET_SECONDS;
|
||||
}
|
||||
app_apply_pending_sync_refresh(app);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef INBE_APP_SYNC_H
|
||||
#define INBE_APP_SYNC_H
|
||||
|
||||
#include "app.h"
|
||||
|
||||
void app_sync_pump(InbeApp *app);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,85 @@
|
||||
#ifndef INBE_TEXT_UTILS_H
|
||||
#define INBE_TEXT_UTILS_H
|
||||
|
||||
#include "flint_text.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static inline void
|
||||
inbe_text_fit_ellipsis(const char *text, char *out, size_t out_size, int max_w,
|
||||
int font)
|
||||
{
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
if(text == NULL)
|
||||
text = "";
|
||||
snprintf(out, out_size, "%s", text);
|
||||
if(max_w <= 0)
|
||||
return;
|
||||
while(out[0] != '\0' && flint_text_measure(out, font) > max_w) {
|
||||
size_t len = strlen(out);
|
||||
size_t cut = len;
|
||||
|
||||
if(len <= 3)
|
||||
break;
|
||||
if(len > 3 && strcmp(out + len - 3, "...") == 0)
|
||||
len -= 3;
|
||||
cut = len;
|
||||
do {
|
||||
cut--;
|
||||
} while(cut > 0 && (((unsigned char)out[cut] & 0xC0) == 0x80));
|
||||
out[cut] = '\0';
|
||||
if(cut + 3 < out_size)
|
||||
strncat(out, "...", out_size - strlen(out) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
inbe_text_fit_ellipsis_into(const char *text, char *out, size_t out_size, int max_w,
|
||||
int font)
|
||||
{
|
||||
if(text == NULL)
|
||||
text = "";
|
||||
if(max_w > 0 && flint_text_measure(text, font) <= max_w)
|
||||
return text;
|
||||
inbe_text_fit_ellipsis(text, out, out_size, max_w, font);
|
||||
return out;
|
||||
}
|
||||
|
||||
static inline void
|
||||
inbe_text_short_label(const char *text, int max_codepoints, int append_ellipsis,
|
||||
char *out, size_t out_size)
|
||||
{
|
||||
size_t len;
|
||||
size_t cut = 0;
|
||||
int chars = 0;
|
||||
int truncated = 0;
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
if(text == NULL)
|
||||
text = "";
|
||||
if(max_codepoints < 0)
|
||||
max_codepoints = 0;
|
||||
len = strlen(text);
|
||||
while(cut < len && chars < max_codepoints) {
|
||||
cut++;
|
||||
while(cut < len && (((unsigned char)text[cut] & 0xC0) == 0x80))
|
||||
cut++;
|
||||
chars++;
|
||||
}
|
||||
truncated = cut < len;
|
||||
if(cut >= out_size) {
|
||||
cut = out_size - 1;
|
||||
while(cut > 0 && (((unsigned char)text[cut] & 0xC0) == 0x80))
|
||||
cut--;
|
||||
}
|
||||
memcpy(out, text, cut);
|
||||
out[cut] = '\0';
|
||||
if(append_ellipsis && truncated && strlen(out) + 3 < out_size)
|
||||
strncat(out, "...", out_size - strlen(out) - 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#define INBE_VERSION_MAJOR 1
|
||||
#define INBE_VERSION_MINOR 7
|
||||
#define INBE_VERSION_PATCH 3
|
||||
#define INBE_VERSION_STRING "1.7.3"
|
||||
#define INBE_VERSION_PATCH 8
|
||||
#define INBE_VERSION_STRING "1.7.8"
|
||||
|
||||
#endif
|
||||
+1
-7
@@ -173,9 +173,6 @@ windows_close_logger(void)
|
||||
#endif
|
||||
|
||||
InbeApp* get_global_inbe_app(void) {
|
||||
if (g_inbe_app_ptr == NULL) {
|
||||
TraceLog(LOG_WARNING, "WARNING: get_global_inbe_app called with NULL pointer");
|
||||
}
|
||||
return g_inbe_app_ptr;
|
||||
}
|
||||
|
||||
@@ -305,10 +302,8 @@ frame(void)
|
||||
static AndroidViewport previous_viewport = {-1, -1, -1, -1, -1, -1, -1, -1};
|
||||
|
||||
android_insets_get(&insets);
|
||||
// Safety check: Don't render if insets haven't been initialized yet
|
||||
// This prevents rendering with incorrect positioning on app start/restart
|
||||
if (!android_insets_is_initialized()) {
|
||||
return; // Skip this frame, BeginDrawing() hasn't been called yet
|
||||
return;
|
||||
}
|
||||
app_set_android_bottom_nav_height(android_nonnegative(insets.nav_bar));
|
||||
|
||||
@@ -595,7 +590,6 @@ int main(int argc, char **argv) {
|
||||
android_insets_init();
|
||||
android_device_init();
|
||||
android_wakelock_init();
|
||||
android_timer_init();
|
||||
android_runtime_assets_init();
|
||||
if(!ChangeDirectory("/data/user/0/xyz.waozi.inbe/files"))
|
||||
TraceLog(LOG_WARNING, "INBE: failed to switch to Android files directory");
|
||||
|
||||
@@ -11,13 +11,10 @@
|
||||
|
||||
#include <raylib.h>
|
||||
#include <pthread.h>
|
||||
#include <android_native_app_glue.h>
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
|
||||
// External functions from main.c
|
||||
extern InbeApp* get_global_inbe_app(void);
|
||||
extern void set_global_inbe_app(InbeApp *app);
|
||||
extern void app_request_graphics_reload(InbeApp *app);
|
||||
|
||||
#define LOG_TAG "INBE_INSETS"
|
||||
@@ -26,21 +23,15 @@ extern void app_request_graphics_reload(InbeApp *app);
|
||||
#define JNI_VERSION_1_6 0x10060000
|
||||
#endif
|
||||
|
||||
extern struct android_app *GetAndroidApp(void);
|
||||
extern void android_wakelock_set_activity(JNIEnv *env, jobject activity);
|
||||
extern void android_wakelock_set_jvm(JavaVM *vm);
|
||||
extern void android_timer_activate(void);
|
||||
extern void android_timer_deactivate(void);
|
||||
|
||||
// Called from Java when activity is ready for wake lock
|
||||
static void android_wakelock_set_activity_impl(JNIEnv *env, jobject thiz) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Wake lock ready callback from Java");
|
||||
android_wakelock_set_activity(env, thiz);
|
||||
}
|
||||
|
||||
static JavaVM *g_jvm = NULL;
|
||||
static jobject g_activity = NULL;
|
||||
|
||||
static volatile struct {
|
||||
int status_bar;
|
||||
int nav_bar;
|
||||
@@ -52,7 +43,6 @@ static volatile struct {
|
||||
static pthread_mutex_t insets_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static volatile int insets_initialized = 0;
|
||||
|
||||
// JNI function - Java calls this to push inset values
|
||||
static void nativeSetInsets(JNIEnv *env, jobject thiz,
|
||||
jint status_bar, jint nav_bar,
|
||||
jint cutout_left, jint cutout_top, jint cutout_right, jint cutout_bottom)
|
||||
@@ -70,29 +60,14 @@ static void nativeSetInsets(JNIEnv *env, jobject thiz,
|
||||
current_insets.cutout_bottom = cutout_bottom;
|
||||
insets_initialized = 1;
|
||||
pthread_mutex_unlock(&insets_mutex);
|
||||
|
||||
// Memory barrier to ensure all threads see the updated values
|
||||
__sync_synchronize();
|
||||
}
|
||||
|
||||
// JNI function - Java calls this to check if play_in_background is enabled
|
||||
static jint nativeGetPlayInBackground(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeGetPlayInBackground: called");
|
||||
void *app = get_global_inbe_app();
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativeGetPlayInBackground: got app pointer %p", app);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (app != NULL) {
|
||||
InbeApp *inbe_app = (InbeApp*)app;
|
||||
jint result = get_play_in_background(&inbe_app->inbe);
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativeGetPlayInBackground: returning %d", result);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
return result;
|
||||
}
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeGetPlayInBackground: app is NULL, returning 0");
|
||||
return 0; // Default to disabled
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
return get_play_in_background(&((InbeApp*)app)->inbe);
|
||||
}
|
||||
|
||||
static void nativeSetBackgroundActive(JNIEnv *env, jobject thiz, jboolean active)
|
||||
@@ -107,71 +82,45 @@ static void nativeSetBackgroundActive(JNIEnv *env, jobject thiz, jboolean active
|
||||
}
|
||||
|
||||
if (active) {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeSetBackgroundActive: activating background timer");
|
||||
android_timer_activate();
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeSetBackgroundActive: deactivating background timer");
|
||||
android_timer_deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
// JNI function - Auto-pause session when app goes to background
|
||||
static jint nativePauseSession(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: called");
|
||||
void *app = get_global_inbe_app();
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativePauseSession: got app pointer %p", app);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (app != NULL) {
|
||||
InbeApp *inbe_app = (InbeApp*)app;
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativePauseSession: session_paused before = %d", inbe_app->session_paused);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (!inbe_app->session_paused) {
|
||||
inbe_app->session_paused = 1;
|
||||
inbe_app->backgrounded = 1;
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: set session_paused = 1");
|
||||
return 1;
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: Session already paused, skipping");
|
||||
}
|
||||
} else {
|
||||
InbeApp *inbe_app = get_global_inbe_app();
|
||||
if (inbe_app == NULL) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, "INBE_JNI", "nativePauseSession: app is NULL!");
|
||||
return 0;
|
||||
}
|
||||
if (inbe_app->session_paused)
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
inbe_app->session_paused = 1;
|
||||
inbe_app->backgrounded = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// JNI function - Auto-resume session when app returns to foreground
|
||||
static void nativeResumeSession(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: called");
|
||||
void *app = get_global_inbe_app();
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativeResumeSession: got app pointer %p", app);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (app != NULL) {
|
||||
InbeApp *inbe_app = (InbeApp*)app;
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "nativeResumeSession: session_paused before = %d", inbe_app->session_paused);
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (inbe_app->session_paused) {
|
||||
inbe_app->session_paused = 0;
|
||||
inbe_app->backgrounded = 0;
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: set session_paused = 0");
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: Session not paused, skipping");
|
||||
}
|
||||
} else {
|
||||
InbeApp *inbe_app = get_global_inbe_app();
|
||||
if (inbe_app == NULL) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, "INBE_JNI", "nativeResumeSession: app is NULL!");
|
||||
return;
|
||||
}
|
||||
if (!inbe_app->session_paused)
|
||||
return;
|
||||
|
||||
inbe_app->session_paused = 0;
|
||||
inbe_app->backgrounded = 0;
|
||||
}
|
||||
|
||||
static void nativeInvalidateGraphicsResources(JNIEnv *env, jobject thiz)
|
||||
@@ -184,7 +133,6 @@ static void nativeInvalidateGraphicsResources(JNIEnv *env, jobject thiz)
|
||||
app_request_graphics_reload(inbe_app);
|
||||
}
|
||||
|
||||
// JNI method table
|
||||
static const JNINativeMethod g_methods[] = {
|
||||
{"nativeSetInsets", "(IIIIII)V", (void*)nativeSetInsets},
|
||||
{"nativeWakeLockReady", "()V", (void*)android_wakelock_set_activity_impl},
|
||||
@@ -205,15 +153,11 @@ static const JNINativeMethod g_methods[] = {
|
||||
{"nativeInvalidateGraphicsResources", "()V", (void*)nativeInvalidateGraphicsResources},
|
||||
};
|
||||
|
||||
// JNI_OnLoad - Register native methods
|
||||
JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
JNIEnv *env = NULL;
|
||||
jint result;
|
||||
|
||||
g_jvm = vm;
|
||||
|
||||
// Also set JVM for wake lock module
|
||||
android_wakelock_set_jvm(vm);
|
||||
|
||||
result = (*vm)->GetEnv(vm, (void**)&env, JNI_VERSION_1_6);
|
||||
@@ -222,14 +166,12 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Find the MainActivity class
|
||||
jclass clazz = (*env)->FindClass(env, "xyz/waozi/inbe/MainActivity");
|
||||
if (clazz == NULL) {
|
||||
TraceLog(LOG_ERROR, "INBE: Failed to find MainActivity class");
|
||||
return JNI_ERR;
|
||||
}
|
||||
|
||||
// Register native methods
|
||||
result = (*env)->RegisterNatives(env, clazz, g_methods, sizeof(g_methods) / sizeof(g_methods[0]));
|
||||
if (result != JNI_OK) {
|
||||
TraceLog(LOG_ERROR, "INBE: Failed to register native methods");
|
||||
@@ -240,18 +182,15 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
}
|
||||
|
||||
void android_insets_init(void) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== android_insets_init ===");
|
||||
pthread_mutex_lock(&insets_mutex);
|
||||
memset((void *)¤t_insets, 0, sizeof(current_insets));
|
||||
insets_initialized = 0;
|
||||
pthread_mutex_unlock(&insets_mutex);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== android_insets_init DONE ===");
|
||||
}
|
||||
|
||||
void android_insets_get(AndroidInsets *out) {
|
||||
pthread_mutex_lock(&insets_mutex);
|
||||
|
||||
// Simply return the current values
|
||||
if (out) {
|
||||
out->status_bar = current_insets.status_bar;
|
||||
out->nav_bar = current_insets.nav_bar;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#define LOG_TAG "INBE_TIMER"
|
||||
#define TARGET_FPS 60
|
||||
#define FRAME_TIME_US (1000000 / TARGET_FPS) // ~16666 microseconds for 60fps
|
||||
#define FRAME_TIME_US (1000000 / TARGET_FPS)
|
||||
|
||||
static pthread_t timer_thread;
|
||||
static pthread_mutex_t timer_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -44,47 +44,37 @@ monotonic_elapsed_ms(struct timespec *last_tick)
|
||||
static void*
|
||||
timer_thread_func(void *arg) {
|
||||
(void)arg;
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer thread started");
|
||||
int frame_count = 0;
|
||||
struct timespec last_tick = {0};
|
||||
|
||||
while (1) {
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
|
||||
// Check if we should stop
|
||||
if (!timer_running) {
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer thread: stopping");
|
||||
break;
|
||||
}
|
||||
|
||||
// Check if we should run (active and have app pointer)
|
||||
int should_run = timer_active && g_app != NULL;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
|
||||
if (should_run) {
|
||||
// Log every 60 frames (1 second)
|
||||
if (frame_count % 60 == 0) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer: Running background practice step + sounds");
|
||||
}
|
||||
frame_count++;
|
||||
|
||||
// Update practice state and sounds with mutex protection
|
||||
pthread_mutex_lock(&inbe_state_mutex);
|
||||
InbeApp *app = (InbeApp*)g_app;
|
||||
practice_active_advance_elapsed(app, monotonic_elapsed_ms(&last_tick));
|
||||
pthread_mutex_unlock(&inbe_state_mutex);
|
||||
|
||||
// Sleep for exact frame time (60fps = ~16.666ms)
|
||||
usleep(FRAME_TIME_US);
|
||||
} else {
|
||||
// Not active, sleep a bit before checking again
|
||||
if (frame_count > 0) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer: Paused (inactive)");
|
||||
frame_count = 0;
|
||||
}
|
||||
last_tick = (struct timespec){0};
|
||||
usleep(50000); // 50ms
|
||||
usleep(50000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,17 +82,11 @@ timer_thread_func(void *arg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
android_timer_init(void) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== android_timer_init ===");
|
||||
}
|
||||
|
||||
void
|
||||
android_timer_set_app(void *app_ptr) {
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
g_app = app_ptr;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
TraceLog(LOG_INFO, "INBE: Timer app pointer set");
|
||||
}
|
||||
|
||||
pthread_mutex_t*
|
||||
@@ -115,24 +99,19 @@ android_timer_start(void) {
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
|
||||
if (timer_running) {
|
||||
timer_active = 1; // Activate timer (activity paused)
|
||||
timer_active = 1;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer activated (activity paused)");
|
||||
return;
|
||||
}
|
||||
|
||||
timer_running = 1;
|
||||
timer_active = 0; // Start inactive (activity active)
|
||||
timer_active = 0;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
|
||||
int result = pthread_create(&timer_thread, NULL, timer_thread_func, NULL);
|
||||
if (result != 0) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, "Failed to create timer thread");
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Timer thread created");
|
||||
}
|
||||
|
||||
TraceLog(LOG_INFO, "INBE: Background timer started");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -152,7 +131,6 @@ android_timer_stop(void) {
|
||||
pthread_detach(timer_thread);
|
||||
else
|
||||
pthread_join(timer_thread, NULL);
|
||||
TraceLog(LOG_INFO, "INBE: Background timer stopped");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -160,8 +138,6 @@ android_timer_activate(void) {
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
timer_active = 1;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "ACTIVATE: Timer active");
|
||||
TraceLog(LOG_INFO, "INBE: Background timer ACTIVATED - screen off");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -169,16 +145,4 @@ android_timer_deactivate(void) {
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
timer_active = 0;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "DEACTIVATE: Timer inactive");
|
||||
TraceLog(LOG_INFO, "INBE: Background timer DEACTIVATED - screen on");
|
||||
}
|
||||
|
||||
void*
|
||||
android_timer_get_app(void)
|
||||
{
|
||||
void *app;
|
||||
pthread_mutex_lock(&timer_mutex);
|
||||
app = g_app;
|
||||
pthread_mutex_unlock(&timer_mutex);
|
||||
return app;
|
||||
}
|
||||
@@ -4,25 +4,19 @@
|
||||
#include "platform.h"
|
||||
|
||||
#if ANDROID_BUILD
|
||||
#include <jni.h>
|
||||
#include <pthread.h>
|
||||
void android_timer_init(void);
|
||||
void android_timer_start(void);
|
||||
void android_timer_stop(void);
|
||||
void android_timer_set_app(void *app_ptr);
|
||||
void android_timer_activate(void);
|
||||
void android_timer_deactivate(void);
|
||||
void* android_timer_get_app(void);
|
||||
pthread_mutex_t* android_timer_get_mutex(void);
|
||||
#else
|
||||
// Stub functions for non-Android platforms
|
||||
static inline void android_timer_init(void) {}
|
||||
static inline void android_timer_start(void) {}
|
||||
static inline void android_timer_stop(void) {}
|
||||
static inline void android_timer_set_app(void *app_ptr) {(void)app_ptr;}
|
||||
static inline void android_timer_activate(void) {}
|
||||
static inline void android_timer_deactivate(void) {}
|
||||
static inline void* android_timer_get_app(void) { return NULL; }
|
||||
static inline void* android_timer_get_mutex(void) { return NULL; }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#include "android_wakelock.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <raylib.h>
|
||||
#include <pthread.h>
|
||||
#include <android/log.h>
|
||||
#include <android_native_app_glue.h>
|
||||
#include <jni.h>
|
||||
|
||||
#define LOG_TAG "INBE_WAKE"
|
||||
@@ -20,7 +17,6 @@ static jmethodID g_allow_screen_off_method = NULL;
|
||||
static pthread_mutex_t wakelock_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
void android_wakelock_init(void) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== android_wakelock_init ===");
|
||||
}
|
||||
|
||||
void android_wakelock_set_activity(JNIEnv *env, jobject activity) {
|
||||
@@ -42,7 +38,6 @@ void android_wakelock_set_activity(JNIEnv *env, jobject activity) {
|
||||
g_keep_screen_on_method = (*env)->GetMethodID(env, clazz, "keepScreenOn", "()V");
|
||||
g_allow_screen_off_method = (*env)->GetMethodID(env, clazz, "allowScreenOff", "()V");
|
||||
(*env)->DeleteLocalRef(env, clazz);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "Wake lock activity set successfully");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,15 +45,8 @@ void android_wakelock_set_activity(JNIEnv *env, jobject activity) {
|
||||
}
|
||||
|
||||
void android_wakelock_acquire(void) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== ACQUIRE START ===");
|
||||
|
||||
pthread_mutex_lock(&wakelock_mutex);
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "ACQUIRE: Checking if g_jvm and g_activity are set");
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "ACQUIRE: g_jvm=%p, g_activity=%p", g_jvm, g_activity);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, msg);
|
||||
|
||||
if (!g_jvm || !g_activity) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, "ACQUIRE: JNI not initialized - skipping wake lock");
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
@@ -73,11 +61,9 @@ void android_wakelock_acquire(void) {
|
||||
|
||||
if (env && g_acquire_method) {
|
||||
(*env)->CallVoidMethod(env, g_activity, g_acquire_method);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "ACQUIRE: SUCCESS");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
TraceLog(LOG_INFO, "INBE: Wake lock acquired");
|
||||
}
|
||||
|
||||
void android_wakelock_update_session_notification(const char *status_text) {
|
||||
@@ -109,15 +95,8 @@ void android_wakelock_update_session_notification(const char *status_text) {
|
||||
}
|
||||
|
||||
void android_wakelock_release(void) {
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "=== RELEASE START ===");
|
||||
|
||||
pthread_mutex_lock(&wakelock_mutex);
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "RELEASE: Checking if g_jvm and g_activity are set");
|
||||
char msg[128];
|
||||
snprintf(msg, sizeof(msg), "RELEASE: g_jvm=%p, g_activity=%p", g_jvm, g_activity);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, msg);
|
||||
|
||||
if (!g_jvm || !g_activity) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, "RELEASE: JNI not initialized - skipping wake lock");
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
@@ -132,11 +111,9 @@ void android_wakelock_release(void) {
|
||||
|
||||
if (env && g_release_method) {
|
||||
(*env)->CallVoidMethod(env, g_activity, g_release_method);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "RELEASE: SUCCESS");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
TraceLog(LOG_INFO, "INBE: Wake lock released");
|
||||
}
|
||||
|
||||
void android_keep_screen_on(void) {
|
||||
@@ -156,7 +133,6 @@ void android_keep_screen_on(void) {
|
||||
|
||||
if (env && g_keep_screen_on_method) {
|
||||
(*env)->CallVoidMethod(env, g_activity, g_keep_screen_on_method);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "KEEP_SCREEN_ON: SUCCESS");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
@@ -179,13 +155,11 @@ void android_allow_screen_off(void) {
|
||||
|
||||
if (env && g_allow_screen_off_method) {
|
||||
(*env)->CallVoidMethod(env, g_activity, g_allow_screen_off_method);
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "ALLOW_SCREEN_OFF: SUCCESS");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&wakelock_mutex);
|
||||
}
|
||||
|
||||
// Called from JNI to set the JVM reference
|
||||
void android_wakelock_set_jvm(JavaVM *vm) {
|
||||
g_jvm = vm;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "meditation_practice.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "meditation_music.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
@@ -31,7 +30,6 @@ meditation_config_content_height(InbeApp *app, int content_w)
|
||||
int integrated = app->inbe.screen == InbeScreenStart &&
|
||||
app->modal.type != UIModalPracticeConfig;
|
||||
return meditation_config_duration_height(content_w) +
|
||||
meditation_music_measure_settings(app, content_w, 1, 1) +
|
||||
(integrated ? app_content_bottom_reserved(app) : 0) + flint_px(24);
|
||||
}
|
||||
|
||||
@@ -152,15 +150,13 @@ meditation_config_screen_draw(InbeApp *app)
|
||||
{
|
||||
int integrated = app->inbe.screen == InbeScreenStart &&
|
||||
app->modal.type != UIModalPracticeConfig;
|
||||
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
|
||||
int title_h = integrated ? app_content_top_reserved(app) : flint_ui_title_bar_height();
|
||||
int scroll_y;
|
||||
int scroll_h;
|
||||
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
|
||||
|
||||
if(!integrated) {
|
||||
FlintUIHeader header = ui_draw_title_header(title_h, locale_get("practice_config_title"),
|
||||
(Texture2D){0}, app->icons[UI_ICON_TYPE_X]);
|
||||
if(header.right_clicked) {
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("practice_config_title"), title_h)) {
|
||||
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
|
||||
app_close_modal(app);
|
||||
} else {
|
||||
@@ -175,7 +171,8 @@ meditation_config_screen_draw(InbeApp *app)
|
||||
}
|
||||
|
||||
scroll_y = title_h + flint_px(16);
|
||||
scroll_h = view_height - scroll_y - bottom_reserved - flint_px(8);
|
||||
scroll_h = view_height - scroll_y - bottom_reserved -
|
||||
(integrated ? flint_px(8) : 0);
|
||||
if(scroll_h < 0)
|
||||
scroll_h = 0;
|
||||
|
||||
@@ -193,9 +190,6 @@ meditation_config_screen_draw(InbeApp *app)
|
||||
int y = page.content_y;
|
||||
|
||||
meditation_config_draw_duration(app, page.content_x, page.content_w, &y);
|
||||
meditation_music_draw_settings(app, page.content_x, page.content_w,
|
||||
&y, 1, 1);
|
||||
ui_scroll_page_end(page);
|
||||
}
|
||||
meditation_music_draw_dropdown_menu(app);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ meditation_manual_draw(InbeApp *app)
|
||||
{
|
||||
int integrated = app->inbe.screen == InbeScreenStart &&
|
||||
app->modal.type != UIModalPracticeManual;
|
||||
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
|
||||
int title_h = integrated ? app_content_top_reserved(app) : flint_ui_title_bar_height();
|
||||
int nav_h = MEDITATION_MANUAL_PAGES > 1 ? manual_screen_guide_nav_height() : 0;
|
||||
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
|
||||
int nav_y = view_height - bottom_reserved - nav_h;
|
||||
@@ -101,14 +101,9 @@ meditation_manual_draw(InbeApp *app)
|
||||
page = manual_screen_guide_update_page(app, MEDITATION_MANUAL_PAGES,
|
||||
meditation_manual_start,
|
||||
meditation_manual_close);
|
||||
if(!integrated) {
|
||||
FlintUIHeader header = ui_draw_title_header(title_h,
|
||||
locale_get("meditation_manual_title"),
|
||||
(Texture2D){0},
|
||||
app->icons[UI_ICON_TYPE_X]);
|
||||
if(header.right_clicked)
|
||||
meditation_manual_close(app, 0);
|
||||
}
|
||||
if(!integrated &&
|
||||
flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("meditation_manual_title"), title_h))
|
||||
meditation_manual_close(app, 0);
|
||||
|
||||
if(content_h < flint_px(120))
|
||||
content_h = flint_px(120);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "flint_runtime_assets.h"
|
||||
#include "flint_text.h"
|
||||
#include "flint_ui.h"
|
||||
#include "practices/practice_registry.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -44,6 +45,29 @@ static const char *g_track_options[MEDITATION_MUSIC_TRACK_COUNT] = {
|
||||
|
||||
static int load_track(InbeApp *app, int track);
|
||||
|
||||
static int
|
||||
music_practice_mask_all(void)
|
||||
{
|
||||
return (1 << EXERCISE_COUNT) - 1;
|
||||
}
|
||||
|
||||
static void
|
||||
sanitize_practice_music(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
|
||||
app->meditation.music_practice_mask &= music_practice_mask_all();
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
if(app->meditation.music_practice_tracks[i] < 0 ||
|
||||
app->meditation.music_practice_tracks[i] >= MEDITATION_MUSIC_TRACK_COUNT)
|
||||
app->meditation.music_practice_tracks[i] = 0;
|
||||
}
|
||||
if(app->meditation.music_track < 0 ||
|
||||
app->meditation.music_track >= MEDITATION_MUSIC_TRACK_COUNT)
|
||||
app->meditation.music_track = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
file_exists(const char *path)
|
||||
{
|
||||
@@ -528,17 +552,20 @@ void
|
||||
meditation_music_start_session(InbeApp *app)
|
||||
{
|
||||
int track;
|
||||
int practice;
|
||||
|
||||
if(app == NULL || !app->meditation.music_enabled)
|
||||
return;
|
||||
sanitize_practice_music(app);
|
||||
practice = practice_clamp_id(app->exercise_type);
|
||||
if((app->meditation.music_practice_mask & (1 << practice)) == 0)
|
||||
return;
|
||||
if(!meditation_music_available(app)) {
|
||||
set_status(app, missing_audio_message());
|
||||
return;
|
||||
}
|
||||
|
||||
track = app->meditation.music_track;
|
||||
if(app->meditation.music_shuffle)
|
||||
track = GetRandomValue(0, MEDITATION_MUSIC_TRACK_COUNT - 1);
|
||||
track = app->meditation.music_practice_tracks[practice];
|
||||
if(!load_track(app, track))
|
||||
return;
|
||||
PlayMusicStream(app->meditation.music);
|
||||
@@ -556,11 +583,11 @@ meditation_music_update(InbeApp *app)
|
||||
if(app == NULL)
|
||||
return;
|
||||
if(app->meditation.music_test_playing &&
|
||||
(app->exercise_type != EXERCISE_MEDITATION ||
|
||||
!((app->inbe.screen == InbeScreenStart &&
|
||||
app->practice_tab == PRACTICE_TAB_CONFIG) ||
|
||||
app->inbe.screen == InbeScreenPracticeConfig ||
|
||||
app->inbe.screen == InbeScreenManual))) {
|
||||
!((app->modal.active && app->modal.type == UIModalPracticeMusic) ||
|
||||
(app->inbe.screen == InbeScreenStart &&
|
||||
app->practice_tab == PRACTICE_TAB_CONFIG) ||
|
||||
app->inbe.screen == InbeScreenPracticeConfig ||
|
||||
app->inbe.screen == InbeScreenManual)) {
|
||||
meditation_music_stop(app);
|
||||
return;
|
||||
}
|
||||
@@ -622,9 +649,7 @@ meditation_music_draw_settings(InbeApp *app, int content_x, int content_w, int *
|
||||
if(app == NULL || y == NULL)
|
||||
return;
|
||||
|
||||
if(app->meditation.music_track < 0 ||
|
||||
app->meditation.music_track >= MEDITATION_MUSIC_TRACK_COUNT)
|
||||
app->meditation.music_track = 0;
|
||||
sanitize_practice_music(app);
|
||||
|
||||
// Master music enable/disable toggle
|
||||
flint_text_draw(locale_get("meditation_music_master_toggle"), content_x, *y, flint_ui_font(), flint_theme_get_text());
|
||||
@@ -638,25 +663,39 @@ meditation_music_draw_settings(InbeApp *app, int content_x, int content_w, int *
|
||||
|
||||
// Only show music options if music is enabled
|
||||
if(app->meditation.music_enabled) {
|
||||
flint_text_draw(locale_get("meditation_music_shuffle_label"), content_x, *y, flint_ui_font(), flint_theme_get_text());
|
||||
if(ui_draw_toggle_switch(content_x, *y + flint_px(26), toggle_w, toggle_h,
|
||||
&app->meditation.music_shuffle,
|
||||
locale_get("toggle_off"), locale_get("toggle_on"))) {
|
||||
app->settings_dirty = 1;
|
||||
meditation_music_unload(app);
|
||||
}
|
||||
*y += flint_px(76);
|
||||
|
||||
if(!app->meditation.music_shuffle) {
|
||||
flint_text_draw(locale_get("meditation_music_track_label"), content_x, *y, flint_ui_font(), flint_theme_get_text());
|
||||
if(ui_draw_dropdown_button(401, content_x, *y + flint_px(24), content_w, flint_px(36),
|
||||
g_track_options, MEDITATION_MUSIC_TRACK_COUNT,
|
||||
&app->meditation.music_track)) {
|
||||
ui_draw_section_label((FlintUISectionLabel){
|
||||
.label = locale_get("practice_music_practice_list_title"),
|
||||
.color = flint_darken(flint_theme_get_text(), 34)
|
||||
}, content_x, *y);
|
||||
*y += ui_section_label_height((FlintUISectionLabel){0});
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
int enabled = (app->meditation.music_practice_mask & (1 << i)) != 0;
|
||||
if(ui_draw_checkbox_row((FlintUICheckboxRow){
|
||||
.label = practice_label(i),
|
||||
.value = &enabled
|
||||
}, content_x, *y)) {
|
||||
if(enabled)
|
||||
app->meditation.music_practice_mask |= 1 << i;
|
||||
else
|
||||
app->meditation.music_practice_mask &= ~(1 << i);
|
||||
app->settings_dirty = 1;
|
||||
meditation_music_unload(app);
|
||||
}
|
||||
*y += flint_px(74);
|
||||
*y += ui_checkbox_row_height((FlintUICheckboxRow){0});
|
||||
if(enabled) {
|
||||
if(ui_draw_dropdown_button(451 + i, content_x, *y, content_w,
|
||||
flint_px(36), g_track_options,
|
||||
MEDITATION_MUSIC_TRACK_COUNT,
|
||||
&app->meditation.music_practice_tracks[i])) {
|
||||
app->settings_dirty = 1;
|
||||
app->meditation.music_track =
|
||||
app->meditation.music_practice_tracks[i];
|
||||
meditation_music_unload(app);
|
||||
}
|
||||
*y += flint_px(48);
|
||||
}
|
||||
}
|
||||
*y += flint_px(8);
|
||||
|
||||
installed = meditation_music_available(app);
|
||||
if(installed) {
|
||||
@@ -668,8 +707,12 @@ meditation_music_draw_settings(InbeApp *app, int content_x, int content_w, int *
|
||||
button_w = content_w;
|
||||
if(ui_draw_generic_button(content_x, *y, button_w, button_h,
|
||||
test_label,
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover))
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover)) {
|
||||
int practice = practice_clamp_id(app->exercise_type);
|
||||
app->meditation.music_track =
|
||||
app->meditation.music_practice_tracks[practice];
|
||||
meditation_music_test_track(app);
|
||||
}
|
||||
*y += button_h + flint_px(12);
|
||||
}
|
||||
|
||||
@@ -718,8 +761,14 @@ meditation_music_measure_settings(InbeApp *app, int content_w,
|
||||
|
||||
// Only measure music options if music is enabled
|
||||
if(app->meditation.music_enabled) {
|
||||
if(!app->meditation.music_shuffle)
|
||||
h += flint_px(74);
|
||||
h += ui_section_label_height((FlintUISectionLabel){0});
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
int enabled = (app->meditation.music_practice_mask & (1 << i)) != 0;
|
||||
h += ui_checkbox_row_height((FlintUICheckboxRow){0});
|
||||
if(enabled)
|
||||
h += flint_px(48);
|
||||
}
|
||||
h += flint_px(8);
|
||||
|
||||
installed = meditation_music_available(app);
|
||||
if(installed)
|
||||
@@ -748,10 +797,14 @@ meditation_music_draw_dropdown_menu(InbeApp *app)
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
|
||||
changed = ui_draw_dropdown_menu(401);
|
||||
if(changed) {
|
||||
app->settings_dirty = 1;
|
||||
meditation_music_unload(app);
|
||||
changed = 0;
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
if(ui_draw_dropdown_menu(451 + i)) {
|
||||
app->settings_dirty = 1;
|
||||
app->meditation.music_track = app->meditation.music_practice_tracks[i];
|
||||
meditation_music_unload(app);
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
@@ -341,11 +341,13 @@ meditation_draw_setup_modal(InbeApp *app)
|
||||
static void
|
||||
draw_meditation_sound_controls(InbeApp *app)
|
||||
{
|
||||
int title_h = flint_ui_title_bar_height();
|
||||
|
||||
if(app->show_session_volume_control) {
|
||||
if(ui_draw_icon_slider_popup((FlintUIIconSliderPopup){
|
||||
.id = 501,
|
||||
.x = view_width - flint_px(56),
|
||||
.y = flint_px(12),
|
||||
.y = (title_h - (flint_px(24) + flint_px(10) * 2)) / 2,
|
||||
.icon_size = flint_px(24),
|
||||
.icon_padding = flint_px(10),
|
||||
.icon = meditation_sound_icon_for_volume(app),
|
||||
@@ -411,13 +413,12 @@ void
|
||||
meditation_draw_screen(InbeApp *app, int center_x, int center_y)
|
||||
{
|
||||
char time_text[32];
|
||||
int return_hover = 0;
|
||||
int font = FLINT_TEXT_24;
|
||||
int max_w;
|
||||
int text_w;
|
||||
int title_h = flint_ui_title_bar_height();
|
||||
|
||||
if(ui_draw_icon_btn_padded(flint_px(12), flint_px(12), flint_px(24),
|
||||
flint_px(10), app->icons[UI_ICON_TYPE_RETURN], &return_hover)) {
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("meditation_title"), title_h)) {
|
||||
meditation_request_exit(app);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,12 +218,8 @@ sun_salutation_config_screen_draw(InbeApp *app)
|
||||
return;
|
||||
sun_salutation_normalize_settings(app);
|
||||
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
|
||||
FlintUIHeader header = ui_draw_title_header(ui_screen_header_height(),
|
||||
locale_get("practice_config_title"),
|
||||
(Texture2D){0},
|
||||
app->icons[UI_ICON_TYPE_X]);
|
||||
title_h = ui_screen_header_height();
|
||||
if(header.right_clicked) {
|
||||
title_h = flint_ui_title_bar_height();
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("practice_config_title"), title_h)) {
|
||||
app_close_modal(app);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
#include "practices/meditation/meditation_music.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -20,6 +21,7 @@ sun_salutation_exit_to_start(InbeApp *app)
|
||||
app->sun_salutation.repetition = 0;
|
||||
app->sun_salutation.step_ticks = 0;
|
||||
app->session_paused = 0;
|
||||
meditation_music_stop(app);
|
||||
app_close_modal(app);
|
||||
app_switch_screen(app, InbeScreenStart);
|
||||
}
|
||||
@@ -61,6 +63,7 @@ sun_salutation_practice_start(InbeApp *app)
|
||||
app->session_paused = 0;
|
||||
app_close_modal(app);
|
||||
app_switch_screen(app, InbeScreenSunSalutation);
|
||||
meditation_music_start_session(app);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -193,10 +196,9 @@ sun_salutation_draw_screen(InbeApp *app, int center_x, int center_y)
|
||||
int repetition;
|
||||
int repetitions;
|
||||
int pose_index;
|
||||
int title_font = flint_ui_font();
|
||||
int text_w;
|
||||
int return_hover = 0;
|
||||
int content_top = flint_px(72);
|
||||
int title_h = flint_ui_title_bar_height();
|
||||
int content_top = title_h + flint_px(42);
|
||||
const char *warning_text = locale_get("sun_salutation_work_in_progress");
|
||||
int warning_font = flint_ui_font_small();
|
||||
int warning_y;
|
||||
@@ -206,12 +208,6 @@ sun_salutation_draw_screen(InbeApp *app, int center_x, int center_y)
|
||||
if(app == NULL)
|
||||
return;
|
||||
|
||||
if(ui_draw_icon_btn_padded(flint_px(12), flint_px(12), flint_px(24),
|
||||
flint_px(10), app->icons[UI_ICON_TYPE_RETURN], &return_hover)) {
|
||||
sun_salutation_request_exit(app);
|
||||
return;
|
||||
}
|
||||
|
||||
if(app->modal.active && app->modal.type == UIModalConfirmExitSession) {
|
||||
int modal_result = ui_draw_modal(locale_get("exit_session_title"),
|
||||
locale_get("all_progress_lost_message"),
|
||||
@@ -252,15 +248,12 @@ sun_salutation_draw_screen(InbeApp *app, int center_x, int center_y)
|
||||
pose = app->sun_salutation.poses[pose_index];
|
||||
|
||||
step_label = sun_salutation_step_label(step);
|
||||
text_w = flint_text_measure(step_label, title_font);
|
||||
if(text_w > view_width - flint_px(64))
|
||||
title_font = flint_ui_font_small();
|
||||
text_w = flint_text_measure(step_label, title_font);
|
||||
flint_text_draw(step_label, center_x - text_w / 2,
|
||||
flint_ui_text_y(step_label, flint_px(12), flint_px(44), title_font),
|
||||
title_font, flint_theme_get_text());
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], step_label, title_h)) {
|
||||
sun_salutation_request_exit(app);
|
||||
return;
|
||||
}
|
||||
text_w = flint_text_measure(warning_text, warning_font);
|
||||
warning_y = flint_px(50);
|
||||
warning_y = title_h + flint_px(6);
|
||||
flint_text_draw(warning_text, center_x - text_w / 2,
|
||||
flint_ui_text_y(warning_text, warning_y, flint_px(28), warning_font),
|
||||
warning_font, flint_theme_get_text());
|
||||
|
||||
@@ -342,7 +342,7 @@ whm_config_screen_draw(InbeApp *app)
|
||||
{
|
||||
int integrated = app->inbe.screen == InbeScreenStart &&
|
||||
app->modal.type != UIModalPracticeConfig;
|
||||
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
|
||||
int title_h = integrated ? app_content_top_reserved(app) : flint_ui_title_bar_height();
|
||||
int config_tab_h = flint_px(40);
|
||||
int config_tab_gap = flint_px(14);
|
||||
int scroll_y;
|
||||
@@ -361,9 +361,7 @@ whm_config_screen_draw(InbeApp *app)
|
||||
app->practice_config_tab = 0;
|
||||
|
||||
if(!integrated) {
|
||||
FlintUIHeader header = ui_draw_title_header(title_h, locale_get("practice_config_title"),
|
||||
(Texture2D){0}, app->icons[UI_ICON_TYPE_X]);
|
||||
if(header.right_clicked) {
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("practice_config_title"), title_h)) {
|
||||
if(app->modal.active && app->modal.type == UIModalPracticeConfig) {
|
||||
app_close_modal(app);
|
||||
} else {
|
||||
@@ -383,7 +381,8 @@ whm_config_screen_draw(InbeApp *app)
|
||||
app->settings_scroll = 0;
|
||||
}
|
||||
scroll_y = title_h + config_tab_h + config_tab_gap;
|
||||
scroll_h = view_height - scroll_y - bottom_reserved - flint_px(8);
|
||||
scroll_h = view_height - scroll_y - bottom_reserved -
|
||||
(integrated ? flint_px(8) : 0);
|
||||
if(scroll_h < 0)
|
||||
scroll_h = 0;
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ whm_manual_draw(InbeApp *app)
|
||||
{
|
||||
int integrated = app->inbe.screen == InbeScreenStart &&
|
||||
app->modal.type != UIModalPracticeManual;
|
||||
int title_h = integrated ? app_content_top_reserved(app) : ui_screen_header_height();
|
||||
int title_h = integrated ? app_content_top_reserved(app) : flint_ui_title_bar_height();
|
||||
int nav_h = manual_screen_guide_nav_height();
|
||||
int bottom_reserved = integrated ? app_content_bottom_reserved(app) : 0;
|
||||
int nav_y = view_height - bottom_reserved - nav_h;
|
||||
@@ -199,13 +199,9 @@ whm_manual_draw(InbeApp *app)
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(!integrated) {
|
||||
FlintUIHeader header = ui_draw_title_header(title_h, title,
|
||||
(Texture2D){0},
|
||||
app->icons[UI_ICON_TYPE_X]);
|
||||
if(header.right_clicked)
|
||||
whm_manual_close(app, 0);
|
||||
}
|
||||
if(!integrated &&
|
||||
flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], title, title_h))
|
||||
whm_manual_close(app, 0);
|
||||
|
||||
{
|
||||
int top_padding = flint_px(16);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "flint_theme.h"
|
||||
#include "flint_dpi.h"
|
||||
#include "flint_ui.h"
|
||||
#include "practices/meditation/meditation_music.h"
|
||||
#include "practices/practice_registry.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -301,7 +302,7 @@ session_start(InbeApp *app)
|
||||
apply_settings(&app->inbe, speed, max_rounds, max_breaths, pause_seconds);
|
||||
app->saved_pause_seconds = app->inbe.pause_seconds;
|
||||
app->inbe.pause_seconds = 3;
|
||||
session_update_circle_bounds_for_view(&app->inbe, 0, flint_px(56) + 80);
|
||||
session_update_circle_bounds_for_view(&app->inbe, flint_ui_title_bar_height(), flint_px(56) + 80);
|
||||
app_switch_screen(app, InbeScreenSession);
|
||||
app->session_paused = 0;
|
||||
app->results_saved = 0;
|
||||
@@ -312,6 +313,7 @@ session_start(InbeApp *app)
|
||||
android_keep_screen_on();
|
||||
#endif
|
||||
TraceLog(LOG_INFO, "INBE: Starting session - play_in_background = %d", app->inbe.play_in_background);
|
||||
meditation_music_start_session(app);
|
||||
practice_background_start(app, PRACTICE_WHM);
|
||||
#if ANDROID_BUILD
|
||||
whm_last_notification_text[0] = '\0';
|
||||
@@ -423,9 +425,10 @@ finish_round(InbeApp *app)
|
||||
reset_round_start(&app->inbe);
|
||||
} else {
|
||||
if(session_ensure_results_saved(app)) {
|
||||
meditation_music_stop(app);
|
||||
#if ANDROID_BUILD
|
||||
android_allow_screen_off();
|
||||
android_timer_stop();
|
||||
stop_android_background_session(app);
|
||||
#endif
|
||||
app_switch_screen(app, InbeScreenResults);
|
||||
#if ANDROID_BUILD
|
||||
@@ -455,7 +458,7 @@ session_step_back(InbeApp *app)
|
||||
apply_settings(&app->inbe, speed, max_rounds, max_breaths, pause_seconds);
|
||||
app->saved_pause_seconds = pause_seconds;
|
||||
app->inbe.pause_seconds = 3;
|
||||
session_update_circle_bounds_for_view(&app->inbe, 0, flint_px(56) + 80);
|
||||
session_update_circle_bounds_for_view(&app->inbe, flint_ui_title_bar_height(), flint_px(56) + 80);
|
||||
app->inbe.screen = InbeScreenSession;
|
||||
app->session_paused = 0;
|
||||
app->results_saved = 0;
|
||||
@@ -640,7 +643,7 @@ session_draw_start_preview(InbeApp *app, int center_x, int center_y)
|
||||
int released = IsMouseButtonReleased(MOUSE_BUTTON_LEFT);
|
||||
const char *play_text = locale_get("play_button");
|
||||
const char *practice_text = practice_label(app->exercise_type);
|
||||
const char *warning_text = "Work in progress";
|
||||
const char *warning_text = locale_get("sun_salutation_work_in_progress");
|
||||
int font = FLINT_TEXT_16;
|
||||
int practice_font = flint_ui_font();
|
||||
int warning_font = flint_ui_font_small();
|
||||
@@ -743,27 +746,11 @@ draw_session_status(InbeApp *app, int center_x, int center_y)
|
||||
}
|
||||
|
||||
static void
|
||||
draw_session_round_label(InbeApp *app)
|
||||
session_round_label(InbeApp *app, char *text, size_t text_size)
|
||||
{
|
||||
char text[32];
|
||||
char max_text[32];
|
||||
int max_text_w;
|
||||
int top_bar_left;
|
||||
int top_bar_right;
|
||||
int text_x;
|
||||
int text_y;
|
||||
int font = FLINT_TEXT_16;
|
||||
|
||||
locale_format(max_text, sizeof(max_text), "session_round_label", MaxRounds);
|
||||
max_text_w = flint_text_measure(max_text, font);
|
||||
locale_format(text, sizeof(text), "session_round_label", app->inbe.round + 1);
|
||||
|
||||
top_bar_left = flint_px(12) + flint_px(24) + flint_px(10) * 2;
|
||||
top_bar_right = view_width - flint_px(56);
|
||||
text_x = top_bar_left + (top_bar_right - top_bar_left - max_text_w) / 2;
|
||||
text_y = flint_ui_text_y(text, flint_px(12), flint_px(24) + flint_px(10) * 2, font);
|
||||
|
||||
flint_text_draw(text, text_x, text_y, font, flint_theme_get_text());
|
||||
if(text == NULL || text_size == 0)
|
||||
return;
|
||||
locale_format(text, text_size, "session_round_label", app->inbe.round + 1);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -788,18 +775,20 @@ sound_icon_for_volume(InbeApp *app)
|
||||
static void
|
||||
stop_android_background_session(InbeApp *app)
|
||||
{
|
||||
meditation_music_stop(app);
|
||||
practice_active_background_stop(app);
|
||||
}
|
||||
|
||||
void
|
||||
session_update_screen(InbeApp *app, int center_x, int center_y, int *hover)
|
||||
{
|
||||
int return_hover = 0;
|
||||
int modal_result = 0;
|
||||
int breath_max_y = view_height - flint_px(44);
|
||||
int title_h = flint_ui_title_bar_height();
|
||||
char title[32];
|
||||
|
||||
if(ui_draw_icon_btn_padded(flint_px(12), flint_px(12), flint_px(24),
|
||||
flint_px(10), app->icons[UI_ICON_TYPE_RETURN], &return_hover)) {
|
||||
session_round_label(app, title, sizeof(title));
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], title, title_h)) {
|
||||
if(app->session_paused) {
|
||||
stop_android_background_session(app);
|
||||
app_init(app);
|
||||
@@ -812,7 +801,7 @@ session_update_screen(InbeApp *app, int center_x, int center_y, int *hover)
|
||||
if(ui_draw_icon_slider_popup((FlintUIIconSliderPopup){
|
||||
.id = 500,
|
||||
.x = view_width - flint_px(56),
|
||||
.y = flint_px(12),
|
||||
.y = (title_h - (flint_px(24) + flint_px(10) * 2)) / 2,
|
||||
.icon_size = flint_px(24),
|
||||
.icon_padding = flint_px(10),
|
||||
.icon = sound_icon_for_volume(app),
|
||||
@@ -900,7 +889,6 @@ session_update_screen(InbeApp *app, int center_x, int center_y, int *hover)
|
||||
}
|
||||
|
||||
draw_session_status(app, center_x, center_y);
|
||||
draw_session_round_label(app);
|
||||
|
||||
if(!app->session_paused && (
|
||||
#if defined(PLATFORM_WEB)
|
||||
|
||||
+24
-12
@@ -320,7 +320,7 @@ habit_edit_scroll_content_height(int content_w, void *user_data)
|
||||
.label = locale_get("habit_description_label"),
|
||||
.field_h = flint_px(40)
|
||||
});
|
||||
height += flint_px(32) + flint_px(34);
|
||||
height += flint_px(32) + flint_px(76);
|
||||
height += ui_section_label_height((FlintUISectionLabel){0});
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++)
|
||||
height += ui_checkbox_row_height((FlintUICheckboxRow){0});
|
||||
@@ -339,7 +339,7 @@ draw_habit_edit_screen(InbeApp *app)
|
||||
{
|
||||
const char *title;
|
||||
const char *activity_options[EXERCISE_COUNT];
|
||||
Color color_options[6];
|
||||
Color color_options[12];
|
||||
int top_h = flint_px(58);
|
||||
int bottom_reserved;
|
||||
int content_x;
|
||||
@@ -426,6 +426,9 @@ draw_habit_edit_screen(InbeApp *app)
|
||||
habits_delete(&app->habits, index);
|
||||
app_auto_sync(app);
|
||||
}
|
||||
app->habits.screen_mode = HABITS_SCREEN_OVERVIEW;
|
||||
app->habits.scroll = 0;
|
||||
save_settings(app);
|
||||
app_switch_screen(app, InbeScreenHabits);
|
||||
}
|
||||
return;
|
||||
@@ -486,21 +489,30 @@ draw_habit_edit_screen(InbeApp *app)
|
||||
flint_text_draw(locale_get("habit_underline_label"), content_x, y,
|
||||
label_font, flint_darken(flint_theme_get_text(), 34));
|
||||
y += flint_px(32);
|
||||
color_options[0] = (Color){94, 166, 232, 255};
|
||||
color_options[1] = (Color){99, 196, 165, 255};
|
||||
color_options[2] = (Color){210, 180, 72, 255};
|
||||
color_options[3] = (Color){224, 124, 104, 255};
|
||||
color_options[4] = (Color){180, 132, 220, 255};
|
||||
color_options[5] = (Color){216, 116, 164, 255};
|
||||
for(int i = 0; i < 6; i++) {
|
||||
int cx = content_x + flint_px(18) + i * flint_px(42);
|
||||
color_options[0] = (Color){224, 92, 92, 255};
|
||||
color_options[1] = (Color){224, 124, 104, 255};
|
||||
color_options[2] = (Color){232, 150, 74, 255};
|
||||
color_options[3] = (Color){210, 180, 72, 255};
|
||||
color_options[4] = (Color){160, 196, 82, 255};
|
||||
color_options[5] = (Color){99, 196, 165, 255};
|
||||
color_options[6] = (Color){74, 186, 198, 255};
|
||||
color_options[7] = (Color){94, 166, 232, 255};
|
||||
color_options[8] = (Color){116, 132, 224, 255};
|
||||
color_options[9] = (Color){180, 132, 220, 255};
|
||||
color_options[10] = (Color){216, 116, 164, 255};
|
||||
color_options[11] = (Color){198, 96, 118, 255};
|
||||
for(int i = 0; i < 12; i++) {
|
||||
int row = i / 6;
|
||||
int col = i % 6;
|
||||
int cx = content_x + flint_px(18) + col * flint_px(42);
|
||||
int cy = y + row * flint_px(42);
|
||||
int selected = app->habit_edit.color.r == color_options[i].r &&
|
||||
app->habit_edit.color.g == color_options[i].g &&
|
||||
app->habit_edit.color.b == color_options[i].b;
|
||||
if(habit_color_button(app, cx, y, color_options[i], selected))
|
||||
if(habit_color_button(app, cx, cy, color_options[i], selected))
|
||||
app->habit_edit.color = color_options[i];
|
||||
}
|
||||
y += flint_px(34);
|
||||
y += flint_px(76);
|
||||
|
||||
if(ui_draw_section_label((FlintUISectionLabel){
|
||||
.label = locale_get("habit_practice_list_title"),
|
||||
|
||||
@@ -162,7 +162,6 @@ draw_habit_session_edit_screen(InbeApp *app)
|
||||
int viewport_h;
|
||||
int max_w = flint_px(400);
|
||||
int y = top_h + flint_px(14);
|
||||
FlintUIHeader header;
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
@@ -186,9 +185,7 @@ draw_habit_session_edit_screen(InbeApp *app)
|
||||
if(viewport_h < flint_px(80))
|
||||
viewport_h = flint_px(80);
|
||||
|
||||
header = ui_draw_title_header(top_h, date_text,
|
||||
app->icons[UI_ICON_TYPE_RETURN], (Texture2D){0});
|
||||
if(header.left_clicked) {
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], date_text, top_h)) {
|
||||
habit_session_cancel_edit(app);
|
||||
app_switch_screen(app, InbeScreenHabits);
|
||||
return;
|
||||
|
||||
+661
-244
File diff suppressed because it is too large.
Load diff
@@ -27,6 +27,12 @@ enum {
|
||||
HABIT_VIEW_WEEKLY = 1
|
||||
};
|
||||
|
||||
enum {
|
||||
HABITS_SCREEN_OVERVIEW = 0,
|
||||
HABITS_SCREEN_DETAIL = 1,
|
||||
HABITS_SCREEN_REORDER = 2
|
||||
};
|
||||
|
||||
enum {
|
||||
HABIT_TAB_WEEKLY = 0,
|
||||
HABIT_TAB_MONTHLY,
|
||||
@@ -72,6 +78,7 @@ typedef struct InbeHabits {
|
||||
int focus_selected_tab;
|
||||
int month_offset;
|
||||
int selector_open;
|
||||
int screen_mode;
|
||||
int view_mode;
|
||||
int tab;
|
||||
int weekly_days;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "app.h"
|
||||
#include "flint_color.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_scaling.h"
|
||||
#include "flint_text.h"
|
||||
#include "flint_theme.h"
|
||||
@@ -23,8 +24,8 @@ pet_screen_ensure_assets(InbeApp *app)
|
||||
void
|
||||
pet_screen_draw(InbeApp *app)
|
||||
{
|
||||
const char *text = "Gamification in progress...";
|
||||
const char *subtext = "Preview only. This tab is not implemented yet.";
|
||||
const char *text = locale_get("pet_gamification_title");
|
||||
const char *subtext = locale_get("pet_gamification_subtitle");
|
||||
FlintUIParagraph paragraph;
|
||||
int reserved_bottom;
|
||||
int content_h;
|
||||
|
||||
+281
-78
@@ -1,7 +1,9 @@
|
||||
#include "practice_screen.h"
|
||||
#include "app.h"
|
||||
#include "screens/manual_screen.h"
|
||||
#include "practices/meditation/meditation_music.h"
|
||||
#include "practices/practice_registry.h"
|
||||
#include "sync_account.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
@@ -10,7 +12,7 @@ extern int view_width;
|
||||
extern int view_height;
|
||||
|
||||
enum {
|
||||
PRACTICE_GUIDE_STEPS = 3
|
||||
PRACTICE_GUIDE_STEPS = 4
|
||||
};
|
||||
|
||||
int
|
||||
@@ -82,6 +84,216 @@ practice_activity_for_tab(int tab, int index)
|
||||
return index;
|
||||
}
|
||||
|
||||
static Color
|
||||
practice_card_color_top(int exercise)
|
||||
{
|
||||
switch(practice_clamp_id(exercise)) {
|
||||
case EXERCISE_MEDITATION:
|
||||
return (Color){78, 126, 164, 255};
|
||||
case EXERCISE_SUN_SALUTATION:
|
||||
return (Color){213, 134, 72, 255};
|
||||
case EXERCISE_WIM_HOF:
|
||||
default:
|
||||
return (Color){72, 142, 128, 255};
|
||||
}
|
||||
}
|
||||
|
||||
static Color
|
||||
practice_card_color_bottom(int exercise)
|
||||
{
|
||||
switch(practice_clamp_id(exercise)) {
|
||||
case EXERCISE_MEDITATION:
|
||||
return (Color){52, 74, 122, 255};
|
||||
case EXERCISE_SUN_SALUTATION:
|
||||
return (Color){177, 87, 85, 255};
|
||||
case EXERCISE_WIM_HOF:
|
||||
default:
|
||||
return (Color){43, 93, 118, 255};
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
practice_next_visible(InbeApp *app, int dir)
|
||||
{
|
||||
int current;
|
||||
|
||||
if(app == NULL)
|
||||
return EXERCISE_WIM_HOF;
|
||||
current = practice_clamp_id(app->exercise_type);
|
||||
for(int step = 1; step <= EXERCISE_COUNT; step++) {
|
||||
int id = (current + dir * step + EXERCISE_COUNT * 2) % EXERCISE_COUNT;
|
||||
if(practice_is_visible(app, id))
|
||||
return id;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
static void
|
||||
practice_select_home_card(InbeApp *app, int exercise)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
if(app->practice_tab == PRACTICE_TAB_CONFIG)
|
||||
app_leave_practice_config(app);
|
||||
app->exercise_type = practice_clamp_id(exercise);
|
||||
app->practice_tab = PRACTICE_TAB_PLAY;
|
||||
app->manual_scroll = 0;
|
||||
app->settings_scroll = 0;
|
||||
app->tutorial_step = 0;
|
||||
app->practice_config_tab = 0;
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
static int
|
||||
practice_music_content_height(int content_w, void *user_data)
|
||||
{
|
||||
InbeApp *app = user_data;
|
||||
|
||||
return meditation_music_measure_settings(app, content_w, 1, 1) + flint_px(24);
|
||||
}
|
||||
|
||||
static void
|
||||
practice_screen_draw_music_modal(InbeApp *app)
|
||||
{
|
||||
int title_h = flint_ui_title_bar_height();
|
||||
int scroll_y = title_h + flint_px(16);
|
||||
int scroll_h = view_height - scroll_y - flint_px(8);
|
||||
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], locale_get("practice_music_title"), title_h))
|
||||
app_close_modal(app);
|
||||
|
||||
if(scroll_h < 0)
|
||||
scroll_h = 0;
|
||||
{
|
||||
FlintUIScrollPage page = ui_scroll_page_begin((FlintUIScrollPageSpec){
|
||||
.y = scroll_y,
|
||||
.height = scroll_h,
|
||||
.max_content_width = flint_px(CONTENT_MAX_W),
|
||||
.min_content_width = flint_px(320),
|
||||
.scroll_offset = &app->settings_scroll,
|
||||
.content_height = practice_music_content_height,
|
||||
.user_data = app
|
||||
});
|
||||
int y = page.content_y;
|
||||
|
||||
meditation_music_draw_settings(app, page.content_x, page.content_w,
|
||||
&y, 1, 1);
|
||||
ui_scroll_page_end(page);
|
||||
}
|
||||
meditation_music_draw_dropdown_menu(app);
|
||||
}
|
||||
|
||||
void
|
||||
practice_screen_draw_home(InbeApp *app)
|
||||
{
|
||||
const PracticeDefinition *practice;
|
||||
int top = app_content_top_reserved(app) + flint_px(14);
|
||||
int bottom_reserved = app_content_bottom_reserved(app);
|
||||
int content_w = view_width - flint_px(32);
|
||||
int max_w = flint_px(480);
|
||||
int x;
|
||||
int y;
|
||||
int card_w;
|
||||
int card_h;
|
||||
int gap = flint_px(12);
|
||||
int btn_h = flint_px(42);
|
||||
int hover = 0;
|
||||
int text_w;
|
||||
int arrow = flint_px(44);
|
||||
Rectangle card;
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
|
||||
practice_clamp_activity_to_tab(app);
|
||||
flint_ui_title_bar(locale_get("practice_title"), app_content_top_reserved(app));
|
||||
practice = practice_get(app->exercise_type);
|
||||
if(content_w > max_w)
|
||||
content_w = max_w;
|
||||
if(content_w < flint_px(260))
|
||||
content_w = view_width - flint_px(20);
|
||||
x = (view_width - content_w) / 2;
|
||||
y = top;
|
||||
|
||||
if(ui_draw_generic_button(x, y, content_w, btn_h, locale_get("practice_music_title"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover)) {
|
||||
app->settings_scroll = 0;
|
||||
app_open_modal(app, UIModalPracticeMusic);
|
||||
}
|
||||
y += btn_h + flint_px(18);
|
||||
|
||||
card_w = content_w;
|
||||
card_h = view_height - y - bottom_reserved - flint_px(176);
|
||||
if(card_h < flint_px(180))
|
||||
card_h = flint_px(180);
|
||||
if(card_h > flint_px(300))
|
||||
card_h = flint_px(300);
|
||||
card = (Rectangle){(float)x, (float)y, (float)card_w, (float)card_h};
|
||||
DrawRectangleGradientV(x, y, card_w, card_h,
|
||||
practice_card_color_top(app->exercise_type),
|
||||
practice_card_color_bottom(app->exercise_type));
|
||||
DrawRectangleLinesEx(card, flint_px(2), flint_lighten(flint_theme_get_bg(), 55));
|
||||
|
||||
text_w = flint_text_measure(practice->label_key != NULL ? practice_label(app->exercise_type) : "",
|
||||
flint_ui_font());
|
||||
flint_text_draw(practice_label(app->exercise_type),
|
||||
x + (card_w - text_w) / 2,
|
||||
y + card_h / 2 - flint_px(10),
|
||||
flint_ui_font(),
|
||||
WHITE);
|
||||
if(app->exercise_type == EXERCISE_SUN_SALUTATION) {
|
||||
const char *wip = locale_get("sun_salutation_work_in_progress");
|
||||
int wip_w = flint_text_measure(wip, flint_ui_font_small());
|
||||
flint_text_draw(wip, x + (card_w - wip_w) / 2,
|
||||
y + card_h / 2 + flint_px(18),
|
||||
flint_ui_font_small(), Fade(WHITE, 0.88f));
|
||||
}
|
||||
|
||||
if(practice_count() > 1) {
|
||||
int arrow_y = y + (card_h - arrow) / 2;
|
||||
int left_x = x + flint_px(10);
|
||||
int right_x = x + card_w - arrow - flint_px(10);
|
||||
if(ui_draw_overlay_button((FlintUIOverlayButton){
|
||||
.bounds = {(float)left_x, (float)arrow_y, (float)arrow, (float)arrow},
|
||||
.label = "<",
|
||||
.background = Fade(BLACK, 0.22f),
|
||||
.hover_background = Fade(WHITE, 0.32f),
|
||||
.border = Fade(WHITE, 0.42f),
|
||||
.hover_border = Fade(WHITE, 0.74f),
|
||||
.text = WHITE
|
||||
}))
|
||||
practice_select_home_card(app, practice_next_visible(app, -1));
|
||||
if(ui_draw_overlay_button((FlintUIOverlayButton){
|
||||
.bounds = {(float)right_x, (float)arrow_y, (float)arrow, (float)arrow},
|
||||
.label = ">",
|
||||
.background = Fade(BLACK, 0.22f),
|
||||
.hover_background = Fade(WHITE, 0.32f),
|
||||
.border = Fade(WHITE, 0.42f),
|
||||
.hover_border = Fade(WHITE, 0.74f),
|
||||
.text = WHITE
|
||||
}))
|
||||
practice_select_home_card(app, practice_next_visible(app, 1));
|
||||
}
|
||||
|
||||
y += card_h + flint_px(18);
|
||||
|
||||
if(ui_draw_generic_button(x, y, content_w, btn_h, locale_get("practice_start_button"),
|
||||
UI_BUTTON_STYLE_PRIMARY, 0, &hover)) {
|
||||
if(practice->start != NULL)
|
||||
practice->start(app);
|
||||
}
|
||||
y += btn_h + gap;
|
||||
if(practice->draw_manual != NULL &&
|
||||
ui_draw_generic_button(x, y, content_w, btn_h, locale_get("practice_manual_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover))
|
||||
practice_screen_open_tab(app, PRACTICE_TAB_MANUAL);
|
||||
y += btn_h + gap;
|
||||
if(practice->draw_config != NULL &&
|
||||
ui_draw_generic_button(x, y, content_w, btn_h, locale_get("practice_configure_button"),
|
||||
UI_BUTTON_STYLE_SECONDARY, 0, &hover))
|
||||
practice_screen_open_tab(app, PRACTICE_TAB_CONFIG);
|
||||
}
|
||||
|
||||
const char *
|
||||
practice_activity_label(int exercise)
|
||||
{
|
||||
@@ -177,13 +389,6 @@ practice_screen_draw_desktop_tab_bar(InbeApp *app, int y)
|
||||
return clicked >= 0 && clicked < tab_count ? values[clicked] : -1;
|
||||
}
|
||||
|
||||
static int
|
||||
practice_screen_selector_height(InbeApp *app)
|
||||
{
|
||||
(void)app;
|
||||
return ui_tab_bar_height();
|
||||
}
|
||||
|
||||
void
|
||||
practice_screen_draw_top_bar(InbeApp *app, int draw_menu)
|
||||
{
|
||||
@@ -306,10 +511,15 @@ practice_screen_draw_modal(InbeApp *app)
|
||||
return;
|
||||
if(app->modal.type != UIModalPracticeManual &&
|
||||
app->modal.type != UIModalPracticeConfig &&
|
||||
app->modal.type != UIModalPracticeMusic &&
|
||||
app->modal.type != UIModalEditProgressiveStartSpeed)
|
||||
return;
|
||||
|
||||
DrawRectangle(0, 0, view_width, view_height, flint_theme_get_bg());
|
||||
if(app->modal.type == UIModalPracticeMusic) {
|
||||
practice_screen_draw_music_modal(app);
|
||||
return;
|
||||
}
|
||||
if(app->modal.type == UIModalEditProgressiveStartSpeed) {
|
||||
const PracticeDefinition *practice = practice_get(app->exercise_type);
|
||||
if(practice->draw_config != NULL)
|
||||
@@ -328,75 +538,50 @@ practice_screen_draw_modal(InbeApp *app)
|
||||
}
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
practice_screen_dropdown_anchor(void)
|
||||
static void
|
||||
practice_home_layout(InbeApp *app, Rectangle *music, Rectangle *card, Rectangle *start,
|
||||
Rectangle *manual, Rectangle *config)
|
||||
{
|
||||
int side_padding = 0;
|
||||
int dropdown_h = flint_px(36);
|
||||
int dropdown_w = view_width - side_padding * 2;
|
||||
int top = app_content_top_reserved(app) + flint_px(14);
|
||||
int bottom_reserved = ui_bottom_nav_height();
|
||||
int content_w = view_width - flint_px(32);
|
||||
int max_w = flint_px(480);
|
||||
int x;
|
||||
int y;
|
||||
int card_h;
|
||||
int btn_h = flint_px(42);
|
||||
int gap = flint_px(12);
|
||||
|
||||
if(dropdown_w < flint_px(160))
|
||||
dropdown_w = view_width - side_padding * 2;
|
||||
if(dropdown_w < 1)
|
||||
dropdown_w = 1;
|
||||
if(content_w > max_w)
|
||||
content_w = max_w;
|
||||
if(content_w < flint_px(260))
|
||||
content_w = view_width - flint_px(20);
|
||||
x = (view_width - content_w) / 2;
|
||||
y = top;
|
||||
|
||||
return (Rectangle){
|
||||
(float)side_padding,
|
||||
(float)((ui_tab_bar_height() - dropdown_h) / 2),
|
||||
(float)dropdown_w,
|
||||
(float)dropdown_h
|
||||
};
|
||||
}
|
||||
if(music != NULL)
|
||||
*music = (Rectangle){(float)x, (float)y, (float)content_w, (float)btn_h};
|
||||
y += btn_h + flint_px(18);
|
||||
|
||||
static Rectangle
|
||||
practice_screen_floating_action_anchor(InbeApp *app, int tab)
|
||||
{
|
||||
int icon_size = flint_px(22);
|
||||
int icon_padding = flint_px(9);
|
||||
int size = icon_size + icon_padding * 2;
|
||||
int gap = flint_px(10);
|
||||
int margin = flint_px(14);
|
||||
int x = view_width - margin;
|
||||
int y = app_content_top_reserved(app) + flint_px(10);
|
||||
const PracticeDefinition *practice;
|
||||
card_h = view_height - y - bottom_reserved - flint_px(176);
|
||||
if(card_h < flint_px(180))
|
||||
card_h = flint_px(180);
|
||||
if(card_h > flint_px(300))
|
||||
card_h = flint_px(300);
|
||||
if(card != NULL)
|
||||
*card = (Rectangle){(float)x, (float)y, (float)content_w, (float)card_h};
|
||||
y += card_h + flint_px(18);
|
||||
|
||||
if(app == NULL)
|
||||
return (Rectangle){0};
|
||||
practice = practice_get(app->exercise_type);
|
||||
if(practice->draw_config != NULL) {
|
||||
x -= size;
|
||||
if(tab == PRACTICE_TAB_CONFIG)
|
||||
return (Rectangle){(float)x, (float)y, (float)size, (float)size};
|
||||
x -= gap;
|
||||
}
|
||||
if(practice->draw_manual != NULL) {
|
||||
x -= size;
|
||||
if(tab == PRACTICE_TAB_MANUAL)
|
||||
return (Rectangle){(float)x, (float)y, (float)size, (float)size};
|
||||
}
|
||||
if(start != NULL)
|
||||
*start = (Rectangle){(float)x, (float)y, (float)content_w, (float)btn_h};
|
||||
y += btn_h + gap;
|
||||
|
||||
return (Rectangle){(float)(view_width - margin - size), (float)y,
|
||||
(float)size, (float)size};
|
||||
}
|
||||
if(manual != NULL)
|
||||
*manual = (Rectangle){(float)x, (float)y, (float)content_w, (float)btn_h};
|
||||
y += btn_h + gap;
|
||||
|
||||
static Rectangle
|
||||
practice_screen_exercise_tabs_anchor(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return (Rectangle){0};
|
||||
|
||||
// Desktop mode: highlight all exercise tabs (top tab bar)
|
||||
if(app_should_use_tab_bar(app)) {
|
||||
return (Rectangle){
|
||||
0,
|
||||
0,
|
||||
(float)view_width,
|
||||
(float)ui_tab_bar_height()
|
||||
};
|
||||
}
|
||||
|
||||
// Mobile mode: highlight the dropdown
|
||||
return practice_screen_dropdown_anchor();
|
||||
if(config != NULL)
|
||||
*config = (Rectangle){(float)x, (float)y, (float)content_w, (float)btn_h};
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -412,9 +597,12 @@ practice_screen_finish_first_run_guide(InbeApp *app)
|
||||
int
|
||||
practice_screen_first_run_guide_active(const InbeApp *app)
|
||||
{
|
||||
InbeSyncAccount account;
|
||||
|
||||
return app != NULL && !app->tutorial_seen && !app->modal.active &&
|
||||
app->exercise_type != EXERCISE_SUN_SALUTATION &&
|
||||
app->inbe.screen == InbeScreenStart;
|
||||
app->inbe.screen == InbeScreenStart &&
|
||||
!sync_account_load(&account);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -431,21 +619,36 @@ practice_screen_draw_first_run_guide(InbeApp *app)
|
||||
{
|
||||
FlintUIGuideStep steps[PRACTICE_GUIDE_STEPS];
|
||||
FlintUIGuideResult result;
|
||||
Rectangle music;
|
||||
Rectangle card;
|
||||
Rectangle start;
|
||||
Rectangle manual;
|
||||
Rectangle config;
|
||||
|
||||
if(!practice_screen_first_run_guide_active(app))
|
||||
return;
|
||||
|
||||
practice_home_layout(app, &music, &card, &start, &manual, &config);
|
||||
steps[0] = (FlintUIGuideStep){
|
||||
practice_screen_exercise_tabs_anchor(app),
|
||||
locale_get("practice_guide_dropdown")
|
||||
music,
|
||||
locale_get("practice_guide_music")
|
||||
};
|
||||
steps[1] = (FlintUIGuideStep){
|
||||
practice_screen_floating_action_anchor(app, PRACTICE_TAB_MANUAL),
|
||||
locale_get("practice_guide_manual")
|
||||
card,
|
||||
locale_get("practice_guide_carousel")
|
||||
};
|
||||
steps[2] = (FlintUIGuideStep){
|
||||
practice_screen_floating_action_anchor(app, PRACTICE_TAB_CONFIG),
|
||||
locale_get("practice_guide_config")
|
||||
start,
|
||||
locale_get("practice_guide_start")
|
||||
};
|
||||
steps[3] = (FlintUIGuideStep){
|
||||
(Rectangle){
|
||||
manual.x,
|
||||
manual.y,
|
||||
manual.width,
|
||||
(config.y + config.height) - manual.y
|
||||
},
|
||||
locale_get("practice_guide_manual_config")
|
||||
};
|
||||
|
||||
result = flint_ui_draw_guide_overlay((FlintUIGuideOverlay){
|
||||
@@ -454,7 +657,7 @@ practice_screen_draw_first_run_guide(InbeApp *app)
|
||||
.step = &app->tutorial_step,
|
||||
.view_width = view_width,
|
||||
.view_height = view_height,
|
||||
.reserved_top = practice_screen_selector_height(app),
|
||||
.reserved_top = app_content_top_reserved(app),
|
||||
.reserved_bottom = ui_bottom_nav_height(),
|
||||
.max_width = flint_px(300),
|
||||
.close_icon = app->icons[UI_ICON_TYPE_X],
|
||||
|
||||
@@ -16,6 +16,7 @@ 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_home(InbeApp *app);
|
||||
void practice_screen_draw_top_bar(InbeApp *app, int draw_menu);
|
||||
void practice_screen_draw_floating_actions(InbeApp *app);
|
||||
void practice_screen_draw_modal(InbeApp *app);
|
||||
|
||||
+99
-768
File diff suppressed because it is too large.
Load diff
@@ -4,7 +4,7 @@
|
||||
#include "app_fwd.h"
|
||||
|
||||
int profile_screen_draw(InbeApp *app);
|
||||
void profile_screen_refresh_social_cache(InbeApp *app);
|
||||
void profile_screen_draw_remove_friend_modal(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);
|
||||
|
||||
@@ -0,0 +1,912 @@
|
||||
#include "profile_social.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
#include "settings/settings_screen.h"
|
||||
#include "storage.h"
|
||||
#include "sync_account.h"
|
||||
#include "sync_client.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define INBE_SYNC_SERVER_URL_KEY "sync_server_url"
|
||||
|
||||
enum {
|
||||
PROFILE_LEADERBOARD_STREAK = 0,
|
||||
PROFILE_LEADERBOARD_AVG_HOLD,
|
||||
PROFILE_LEADERBOARD_METRIC_COUNT
|
||||
};
|
||||
|
||||
static FlintUITextInputStyle
|
||||
profile_text_style(void)
|
||||
{
|
||||
return (FlintUITextInputStyle){
|
||||
.background = flint_darken(flint_theme_get_bg(), 6),
|
||||
.border = flint_darken(flint_theme_get_bg(), 34),
|
||||
.focus_border = flint_theme_get_button(),
|
||||
.text = flint_theme_get_text(),
|
||||
.cursor = flint_theme_get_text(),
|
||||
.radius = 0.0f,
|
||||
.padding_x = flint_px(10)
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
profile_friend_filter(int codepoint, void *user_data)
|
||||
{
|
||||
(void)user_data;
|
||||
return codepoint > 32 && codepoint < 127;
|
||||
}
|
||||
|
||||
static int
|
||||
profile_sync_url(char *out, size_t out_size)
|
||||
{
|
||||
const char *saved = storage_get_setting_text(INBE_SYNC_SERVER_URL_KEY);
|
||||
|
||||
if(saved == NULL || saved[0] == '\0')
|
||||
return 0;
|
||||
return sync_client_normalize_url(saved, out, out_size);
|
||||
}
|
||||
|
||||
static const char *
|
||||
profile_practice_id(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case EXERCISE_MEDITATION:
|
||||
return "meditation";
|
||||
case EXERCISE_SUN_SALUTATION:
|
||||
return "sun_salutation";
|
||||
case EXERCISE_WIM_HOF:
|
||||
default:
|
||||
return "whm";
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
profile_practice_label(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case EXERCISE_MEDITATION:
|
||||
return locale_get("exercise_meditation");
|
||||
case EXERCISE_SUN_SALUTATION:
|
||||
return locale_get("exercise_sun_salutation");
|
||||
case EXERCISE_WIM_HOF:
|
||||
default:
|
||||
return locale_get("exercise_wim_hof");
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
profile_leaderboard_metric_id_for_practice(int practice, int metric)
|
||||
{
|
||||
if(metric != PROFILE_LEADERBOARD_AVG_HOLD)
|
||||
return "streak";
|
||||
if(practice == EXERCISE_MEDITATION)
|
||||
return "avg_time";
|
||||
return "avg_hold";
|
||||
}
|
||||
|
||||
static int
|
||||
profile_leaderboard_metric_count(int practice)
|
||||
{
|
||||
return practice == EXERCISE_SUN_SALUTATION ? 1 : PROFILE_LEADERBOARD_METRIC_COUNT;
|
||||
}
|
||||
|
||||
static void
|
||||
profile_format_leaderboard_time(long seconds, char *out, size_t out_size)
|
||||
{
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
if(seconds < 0)
|
||||
seconds = 0;
|
||||
snprintf(out, out_size, "%ld:%02ld", seconds / 3600, (seconds % 3600) / 60);
|
||||
}
|
||||
|
||||
static const char *
|
||||
profile_leaderboard_metric_label(int practice, int metric)
|
||||
{
|
||||
if(metric != PROFILE_LEADERBOARD_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
|
||||
profile_leaderboard_cache_key(char *out, size_t out_size, int practice, int metric)
|
||||
{
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
snprintf(out, out_size, "leaderboard.inbe.%s.%s",
|
||||
profile_practice_id(practice),
|
||||
profile_leaderboard_metric_id_for_practice(practice, metric));
|
||||
}
|
||||
|
||||
void
|
||||
profile_social_load_friends_cache(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
if(!storage_get_social_cache_json("friends.requests",
|
||||
app->profile_friend_requests_json,
|
||||
sizeof(app->profile_friend_requests_json)))
|
||||
snprintf(app->profile_friend_requests_json,
|
||||
sizeof(app->profile_friend_requests_json),
|
||||
"{\"incoming\":[],\"outgoing\":[]}");
|
||||
if(!storage_get_social_cache_json("friends.list", app->profile_friends_json,
|
||||
sizeof(app->profile_friends_json)))
|
||||
snprintf(app->profile_friends_json, sizeof(app->profile_friends_json),
|
||||
"{\"friends\":[]}");
|
||||
app->profile_friends_loaded = 1;
|
||||
}
|
||||
|
||||
void
|
||||
profile_social_load_leaderboard_cache(InbeApp *app)
|
||||
{
|
||||
char key[96];
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
profile_leaderboard_cache_key(key, sizeof(key),
|
||||
app->profile_leaderboard_practice,
|
||||
app->profile_leaderboard_metric);
|
||||
if(!storage_get_social_cache_json(key, app->profile_leaderboard_json,
|
||||
sizeof(app->profile_leaderboard_json)))
|
||||
snprintf(app->profile_leaderboard_json, sizeof(app->profile_leaderboard_json),
|
||||
"{\"rows\":[]}");
|
||||
app->profile_leaderboard_loaded = 1;
|
||||
}
|
||||
|
||||
static const char *
|
||||
profile_json_string_value(const char *object, const char *key, char *out, size_t out_size)
|
||||
{
|
||||
char pattern[48];
|
||||
const char *p;
|
||||
char *w;
|
||||
size_t left;
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return NULL;
|
||||
out[0] = '\0';
|
||||
snprintf(pattern, sizeof(pattern), "\"%s\"", key);
|
||||
p = strstr(object, pattern);
|
||||
if(p == NULL)
|
||||
return NULL;
|
||||
p = strchr(p + strlen(pattern), ':');
|
||||
if(p == NULL)
|
||||
return NULL;
|
||||
p++;
|
||||
while(*p == ' ' || *p == '\t' || *p == '\n' || *p == '\r')
|
||||
p++;
|
||||
if(*p++ != '"')
|
||||
return NULL;
|
||||
w = out;
|
||||
left = out_size - 1;
|
||||
while(*p != '\0' && *p != '"' && left > 0) {
|
||||
if(*p == '\\' && p[1] != '\0')
|
||||
p++;
|
||||
*w++ = *p++;
|
||||
left--;
|
||||
}
|
||||
*w = '\0';
|
||||
return *p == '"' ? p + 1 : NULL;
|
||||
}
|
||||
|
||||
static double
|
||||
profile_json_number_value(const char *object, const char *key)
|
||||
{
|
||||
char pattern[48];
|
||||
const char *p;
|
||||
|
||||
snprintf(pattern, sizeof(pattern), "\"%s\"", key);
|
||||
p = strstr(object, pattern);
|
||||
if(p == NULL)
|
||||
return 0.0;
|
||||
p = strchr(p + strlen(pattern), ':');
|
||||
if(p == NULL)
|
||||
return 0.0;
|
||||
return atof(p + 1);
|
||||
}
|
||||
|
||||
static int
|
||||
profile_json_array_count(const char *json, const char *array_key)
|
||||
{
|
||||
char key_pattern[48];
|
||||
const char *p;
|
||||
const char *end;
|
||||
int count = 0;
|
||||
|
||||
snprintf(key_pattern, sizeof(key_pattern), "\"%s\"", array_key);
|
||||
p = strstr(json != NULL ? json : "", key_pattern);
|
||||
if(p == NULL)
|
||||
return 0;
|
||||
p = strchr(p, '[');
|
||||
end = p != NULL ? strchr(p, ']') : NULL;
|
||||
if(p == NULL || end == NULL)
|
||||
return 0;
|
||||
while((p = strchr(p, '{')) != NULL && p < end) {
|
||||
count++;
|
||||
p++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int
|
||||
profile_social_friends_count(InbeApp *app)
|
||||
{
|
||||
if(app != NULL && !app->profile_friends_loaded)
|
||||
profile_social_load_friends_cache(app);
|
||||
return profile_json_array_count(app != NULL ? app->profile_friends_json : "",
|
||||
"friends");
|
||||
}
|
||||
|
||||
int
|
||||
profile_social_pending_count(InbeApp *app)
|
||||
{
|
||||
if(app != NULL && !app->profile_friends_loaded)
|
||||
profile_social_load_friends_cache(app);
|
||||
return profile_json_array_count(app != NULL ? app->profile_friend_requests_json : "",
|
||||
"incoming");
|
||||
}
|
||||
|
||||
static void
|
||||
profile_public_id_short(char *out, size_t out_size, const char *user_id)
|
||||
{
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
if(user_id == NULL || user_id[0] == '\0')
|
||||
snprintf(out, out_size, "----");
|
||||
else
|
||||
snprintf(out, out_size, "%.*s", 4, user_id);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_display_name(char *out, size_t out_size, const char *alias,
|
||||
const char *user_id)
|
||||
{
|
||||
char short_id[8];
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
if(alias != NULL && alias[0] != '\0') {
|
||||
snprintf(out, out_size, "@%s", alias);
|
||||
} else if(user_id != NULL && user_id[0] != '\0') {
|
||||
profile_public_id_short(short_id, sizeof(short_id), user_id);
|
||||
snprintf(out, out_size, "%s...", short_id);
|
||||
} else {
|
||||
snprintf(out, out_size, "----...");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
profile_prompt_remove_friend(InbeApp *app, const char *friend_user_id,
|
||||
const char *friend_name)
|
||||
{
|
||||
if(app == NULL || friend_user_id == NULL || friend_user_id[0] == '\0')
|
||||
return;
|
||||
snprintf(app->profile_pending_friend_remove_id,
|
||||
sizeof(app->profile_pending_friend_remove_id), "%s", friend_user_id);
|
||||
snprintf(app->profile_pending_friend_remove_name,
|
||||
sizeof(app->profile_pending_friend_remove_name), "%s",
|
||||
friend_name != NULL && friend_name[0] != '\0' ? friend_name : friend_user_id);
|
||||
app_open_modal(app, UIModalConfirmRemoveFriend);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_json_people(const char *json, const char *array_key,
|
||||
int x, int w, int *y, int with_actions, InbeApp *app)
|
||||
{
|
||||
char key_pattern[48];
|
||||
const char *p;
|
||||
const char *end;
|
||||
int rows = 0;
|
||||
int font = flint_ui_font();
|
||||
int small = flint_ui_font_small();
|
||||
int with_remove = !with_actions && strcmp(array_key, "friends") == 0;
|
||||
int with_cancel = !with_actions && strcmp(array_key, "outgoing") == 0;
|
||||
|
||||
snprintf(key_pattern, sizeof(key_pattern), "\"%s\"", array_key);
|
||||
p = strstr(json != NULL ? json : "", key_pattern);
|
||||
if(p == NULL) {
|
||||
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(locale_get("profile_none_label"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
return;
|
||||
}
|
||||
while((p = strchr(p, '{')) != NULL && p < end && rows < 8) {
|
||||
char id[80];
|
||||
char alias[48];
|
||||
char display_id[80];
|
||||
char title[96];
|
||||
int row_h = with_actions ? flint_px(42) : flint_px(30);
|
||||
int hover_accept = 0;
|
||||
int hover_decline = 0;
|
||||
int hover_remove = 0;
|
||||
int hover_cancel = 0;
|
||||
char url[256];
|
||||
|
||||
id[0] = '\0';
|
||||
alias[0] = '\0';
|
||||
display_id[0] = '\0';
|
||||
if(profile_json_string_value(p, "id", id, sizeof(id)) == NULL &&
|
||||
profile_json_string_value(p, "user_id_hash", id, sizeof(id)) == NULL)
|
||||
break;
|
||||
if(strcmp(array_key, "incoming") == 0) {
|
||||
profile_json_string_value(p, "requester_alias", alias, sizeof(alias));
|
||||
profile_json_string_value(p, "requester_user_id_hash", display_id,
|
||||
sizeof(display_id));
|
||||
} else if(strcmp(array_key, "outgoing") == 0) {
|
||||
profile_json_string_value(p, "target_alias", alias, sizeof(alias));
|
||||
profile_json_string_value(p, "target_user_id_hash", display_id,
|
||||
sizeof(display_id));
|
||||
} else {
|
||||
profile_json_string_value(p, "alias", alias, sizeof(alias));
|
||||
profile_json_string_value(p, "user_id_hash", display_id, sizeof(display_id));
|
||||
}
|
||||
if(alias[0] == '\0')
|
||||
profile_json_string_value(p, "alias", alias, sizeof(alias));
|
||||
if(display_id[0] == '\0')
|
||||
snprintf(display_id, sizeof(display_id), "%s", id);
|
||||
profile_display_name(title, sizeof(title), alias, display_id);
|
||||
flint_text_draw(title, x, *y, font, flint_theme_get_text());
|
||||
if(with_remove) {
|
||||
int icon_size = flint_px(18);
|
||||
int icon_padding = flint_px(6);
|
||||
int button_w = icon_size + icon_padding * 2;
|
||||
if(ui_draw_icon_btn_padded(x + w - button_w, *y - flint_px(6),
|
||||
icon_size, icon_padding,
|
||||
app->icons[UI_ICON_TYPE_TRASH],
|
||||
&hover_remove)) {
|
||||
profile_prompt_remove_friend(app, display_id, title);
|
||||
}
|
||||
} else if(with_cancel) {
|
||||
int icon_size = flint_px(18);
|
||||
int icon_padding = flint_px(6);
|
||||
int button_w = icon_size + icon_padding * 2;
|
||||
if(ui_draw_icon_btn_padded(x + w - button_w, *y - flint_px(6),
|
||||
icon_size, icon_padding,
|
||||
app->icons[UI_ICON_TYPE_TRASH],
|
||||
&hover_cancel) &&
|
||||
profile_sync_url(url, sizeof(url))) {
|
||||
app_request_friend_decline(app, id);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"),
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
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),
|
||||
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(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),
|
||||
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(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
}
|
||||
*y += row_h;
|
||||
rows++;
|
||||
p++;
|
||||
}
|
||||
if(rows == 0) {
|
||||
flint_text_draw(locale_get("profile_none_label"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
profile_screen_draw_remove_friend_modal(InbeApp *app)
|
||||
{
|
||||
char message[384];
|
||||
int modal_result;
|
||||
|
||||
if(app == NULL || !app->modal.active ||
|
||||
app->modal.type != UIModalConfirmRemoveFriend)
|
||||
return;
|
||||
|
||||
snprintf(message, sizeof(message),
|
||||
locale_get("profile_friend_remove_message"),
|
||||
app->profile_pending_friend_remove_name[0] != '\0'
|
||||
? app->profile_pending_friend_remove_name
|
||||
: "this friend");
|
||||
modal_result = ui_draw_modal(locale_get("profile_friend_remove_title"), message,
|
||||
locale_get("cancel_button"),
|
||||
locale_get("delete_button"));
|
||||
if(modal_result == 1) {
|
||||
app->profile_pending_friend_remove_id[0] = '\0';
|
||||
app->profile_pending_friend_remove_name[0] = '\0';
|
||||
app_close_modal(app);
|
||||
} else if(modal_result == 2) {
|
||||
char url[256];
|
||||
|
||||
if(profile_sync_url(url, sizeof(url))) {
|
||||
app_request_friend_remove(app, app->profile_pending_friend_remove_id);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"),
|
||||
NULL);
|
||||
} else {
|
||||
settings_screen_set_status_error(locale_get("sync_server_url_invalid"));
|
||||
}
|
||||
app->profile_pending_friend_remove_id[0] = '\0';
|
||||
app->profile_pending_friend_remove_name[0] = '\0';
|
||||
app_close_modal(app);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
profile_social_draw_friends(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
int font = flint_ui_font();
|
||||
int btn_h = flint_px(34);
|
||||
int hover_add = 0;
|
||||
int commit = 0;
|
||||
char url[256];
|
||||
int incoming_count;
|
||||
int outgoing_count;
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
if(!app->profile_friends_loaded)
|
||||
profile_social_load_friends_cache(app);
|
||||
incoming_count = profile_json_array_count(app->profile_friend_requests_json, "incoming");
|
||||
outgoing_count = profile_json_array_count(app->profile_friend_requests_json, "outgoing");
|
||||
|
||||
*y += flint_px(16);
|
||||
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)},
|
||||
.text = app->profile_friend_input,
|
||||
.text_size = sizeof(app->profile_friend_input),
|
||||
.cursor_position = &app->profile_friend_input_cursor,
|
||||
.focused = &app->profile_friend_input_focused,
|
||||
.max_codepoints = 79,
|
||||
.font = flint_ui_font(),
|
||||
.focus_id = 810,
|
||||
.style = profile_text_style(),
|
||||
.filter = profile_friend_filter,
|
||||
.commit_pressed = &commit
|
||||
});
|
||||
*y += flint_px(46);
|
||||
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(locale_get("profile_updating_status"), NULL);
|
||||
profile_social_load_friends_cache(app);
|
||||
app->profile_friend_input[0] = '\0';
|
||||
app->profile_friend_input_cursor = 0;
|
||||
} else {
|
||||
settings_screen_set_status_error(locale_get("sync_server_url_invalid"));
|
||||
}
|
||||
}
|
||||
*y += btn_h + flint_px(22);
|
||||
|
||||
if(incoming_count > 0) {
|
||||
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(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);
|
||||
if(outgoing_count > 0) {
|
||||
*y += flint_px(16);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
profile_social_friends_content_height(InbeApp *app, int content_w)
|
||||
{
|
||||
int h = flint_px(16) + flint_px(30) + flint_px(46) +
|
||||
flint_px(34) + flint_px(22);
|
||||
int incoming_count;
|
||||
int outgoing_count;
|
||||
int friends_count;
|
||||
|
||||
(void)content_w;
|
||||
if(app == NULL)
|
||||
return h;
|
||||
incoming_count = profile_json_array_count(app->profile_friend_requests_json, "incoming");
|
||||
outgoing_count = profile_json_array_count(app->profile_friend_requests_json, "outgoing");
|
||||
friends_count = profile_json_array_count(app->profile_friends_json, "friends");
|
||||
if(incoming_count > 0)
|
||||
h += flint_px(28) +
|
||||
(incoming_count > 8 ? 8 : incoming_count) * flint_px(42) +
|
||||
flint_px(16);
|
||||
h += flint_px(28) +
|
||||
(friends_count > 0 ? (friends_count > 8 ? 8 : friends_count) * flint_px(30)
|
||||
: flint_px(24));
|
||||
if(outgoing_count > 0)
|
||||
h += flint_px(16) + flint_px(28) +
|
||||
(outgoing_count > 8 ? 8 : outgoing_count) * flint_px(30);
|
||||
return h + flint_px(16);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_leaderboard_value(int x, int w, int y, const char *value, int font)
|
||||
{
|
||||
int rank_w = flint_text_measure(value, font);
|
||||
flint_text_draw(value, x + w - rank_w, y, font, flint_theme_get_text());
|
||||
}
|
||||
|
||||
static int
|
||||
profile_today_index(void)
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
struct tm *tm_value = localtime(&now);
|
||||
|
||||
if(tm_value == NULL)
|
||||
return 0;
|
||||
return (tm_value->tm_year + 1900) * 10000 +
|
||||
(tm_value->tm_mon + 1) * 100 + tm_value->tm_mday;
|
||||
}
|
||||
|
||||
static double
|
||||
profile_local_leaderboard_value(InbeApp *app, char *out, size_t out_size)
|
||||
{
|
||||
int streak = 0;
|
||||
long avg = 0;
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return 0.0;
|
||||
out[0] = '\0';
|
||||
if(app == NULL)
|
||||
return 0.0;
|
||||
storage_profile_activity_stats(app->profile_leaderboard_practice,
|
||||
profile_today_index(), &streak, &avg);
|
||||
if(app->profile_leaderboard_metric != PROFILE_LEADERBOARD_AVG_HOLD) {
|
||||
snprintf(out, out_size, "%ld", (long)streak);
|
||||
return (double)streak;
|
||||
} else if(app->profile_leaderboard_practice == EXERCISE_MEDITATION) {
|
||||
profile_format_leaderboard_time(avg, out, out_size);
|
||||
return (double)avg;
|
||||
} else {
|
||||
snprintf(out, out_size, "%ld", avg);
|
||||
return (double)avg;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct ProfileLeaderboardDrawRow {
|
||||
char user_id[80];
|
||||
char alias[48];
|
||||
char value[48];
|
||||
double sort_value;
|
||||
} ProfileLeaderboardDrawRow;
|
||||
|
||||
static int
|
||||
profile_leaderboard_row_seen(const ProfileLeaderboardDrawRow *rows, int count,
|
||||
const char *user_id)
|
||||
{
|
||||
if(user_id == NULL || user_id[0] == '\0')
|
||||
return 1;
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(strcmp(rows[i].user_id, user_id) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
profile_leaderboard_row_compare(const void *left_ptr, const void *right_ptr)
|
||||
{
|
||||
const ProfileLeaderboardDrawRow *left = left_ptr;
|
||||
const ProfileLeaderboardDrawRow *right = right_ptr;
|
||||
const char *left_name = left->alias[0] != '\0' ? left->alias : left->user_id;
|
||||
const char *right_name = right->alias[0] != '\0' ? right->alias : right->user_id;
|
||||
|
||||
if(left->sort_value < right->sort_value)
|
||||
return 1;
|
||||
if(left->sort_value > right->sort_value)
|
||||
return -1;
|
||||
return strcmp(left_name, right_name);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_leaderboard_rows(InbeApp *app, const char *json, int x, int w, int *y)
|
||||
{
|
||||
const char *p = strstr(json != NULL ? json : "", "\"rows\"");
|
||||
int rows = 0;
|
||||
int font = flint_ui_font();
|
||||
int small = flint_ui_font_small();
|
||||
ProfileLeaderboardDrawRow draw_rows[24];
|
||||
InbeSyncAccount account;
|
||||
int has_account = sync_account_load(&account) && account.public_id[0] != '\0';
|
||||
int self_seen = 0;
|
||||
char self_value[48];
|
||||
double self_sort_value;
|
||||
|
||||
self_sort_value = profile_local_leaderboard_value(app, self_value, sizeof(self_value));
|
||||
|
||||
while(p != NULL && (p = strchr(p, '{')) != NULL && rows < 24) {
|
||||
char alias[48];
|
||||
char user_id[80];
|
||||
char value[48];
|
||||
char label[48];
|
||||
double number;
|
||||
|
||||
if(profile_json_string_value(p, "user_id_hash", user_id, sizeof(user_id)) == NULL)
|
||||
break;
|
||||
profile_json_string_value(p, "alias", alias, sizeof(alias));
|
||||
profile_json_string_value(p, "label", label, sizeof(label));
|
||||
number = profile_json_number_value(p, "value");
|
||||
if(has_account && strcmp(user_id, account.public_id) == 0) {
|
||||
snprintf(value, sizeof(value), "%s", self_value);
|
||||
number = self_sort_value;
|
||||
self_seen = 1;
|
||||
} else if(app != NULL &&
|
||||
app->profile_leaderboard_practice == EXERCISE_MEDITATION &&
|
||||
app->profile_leaderboard_metric == PROFILE_LEADERBOARD_AVG_HOLD &&
|
||||
label[0] != '\0') {
|
||||
snprintf(value, sizeof(value), "%s", label);
|
||||
} else {
|
||||
snprintf(value, sizeof(value), "%.0f", number);
|
||||
}
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s", user_id);
|
||||
snprintf(draw_rows[rows].alias, sizeof(draw_rows[rows].alias), "%s", alias);
|
||||
snprintf(draw_rows[rows].value, sizeof(draw_rows[rows].value), "%s", value);
|
||||
draw_rows[rows].sort_value = number;
|
||||
rows++;
|
||||
p++;
|
||||
}
|
||||
|
||||
if(has_account && !self_seen && rows < 24) {
|
||||
const char *alias_text = storage_get_setting_text("sync_account_alias");
|
||||
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s",
|
||||
account.public_id);
|
||||
snprintf(draw_rows[rows].alias, sizeof(draw_rows[rows].alias), "%s",
|
||||
alias_text != NULL ? alias_text : "");
|
||||
snprintf(draw_rows[rows].value, sizeof(draw_rows[rows].value), "%s", self_value);
|
||||
draw_rows[rows].sort_value = self_sort_value;
|
||||
rows++;
|
||||
}
|
||||
|
||||
p = strstr(app != NULL ? app->profile_friends_json : "", "\"friends\"");
|
||||
while(p != NULL && (p = strchr(p, '{')) != NULL && rows < 24) {
|
||||
char alias[48];
|
||||
char user_id[80];
|
||||
|
||||
if(profile_json_string_value(p, "user_id_hash", user_id, sizeof(user_id)) == NULL)
|
||||
break;
|
||||
if(profile_leaderboard_row_seen(draw_rows, rows, user_id)) {
|
||||
p++;
|
||||
continue;
|
||||
}
|
||||
profile_json_string_value(p, "alias", alias, sizeof(alias));
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s", user_id);
|
||||
snprintf(draw_rows[rows].alias, sizeof(draw_rows[rows].alias), "%s", alias);
|
||||
snprintf(draw_rows[rows].value, sizeof(draw_rows[rows].value), "%s",
|
||||
app != NULL &&
|
||||
app->profile_leaderboard_practice == EXERCISE_MEDITATION &&
|
||||
app->profile_leaderboard_metric == PROFILE_LEADERBOARD_AVG_HOLD
|
||||
? "0:00"
|
||||
: "0");
|
||||
draw_rows[rows].sort_value = 0.0;
|
||||
rows++;
|
||||
p++;
|
||||
}
|
||||
|
||||
qsort(draw_rows, (size_t)rows, sizeof(draw_rows[0]), profile_leaderboard_row_compare);
|
||||
for(int i = 0; i < rows && i < 12; i++) {
|
||||
char display[96];
|
||||
char name[128];
|
||||
|
||||
profile_display_name(display, sizeof(display),
|
||||
draw_rows[i].alias, draw_rows[i].user_id);
|
||||
snprintf(name, sizeof(name), "%d. %s", i + 1, display);
|
||||
flint_text_draw(name, x, *y, font, flint_theme_get_text());
|
||||
profile_draw_leaderboard_value(x, w, *y, draw_rows[i].value, font);
|
||||
*y += flint_px(30);
|
||||
}
|
||||
|
||||
if(rows == 0) {
|
||||
flint_text_draw(locale_get("profile_no_leaderboard_data"), x, *y, small,
|
||||
flint_darken(flint_theme_get_text(), 35));
|
||||
*y += flint_px(24);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
profile_leaderboard_row_count(InbeApp *app, const char *json)
|
||||
{
|
||||
const char *p = strstr(json != NULL ? json : "", "\"rows\"");
|
||||
ProfileLeaderboardDrawRow draw_rows[24];
|
||||
InbeSyncAccount account;
|
||||
int has_account = sync_account_load(&account) && account.public_id[0] != '\0';
|
||||
int self_seen = 0;
|
||||
int rows = 0;
|
||||
|
||||
while(p != NULL && (p = strchr(p, '{')) != NULL && rows < 24) {
|
||||
char user_id[80];
|
||||
|
||||
if(profile_json_string_value(p, "user_id_hash", user_id, sizeof(user_id)) == NULL)
|
||||
break;
|
||||
if(has_account && strcmp(user_id, account.public_id) == 0)
|
||||
self_seen = 1;
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s", user_id);
|
||||
draw_rows[rows].alias[0] = '\0';
|
||||
rows++;
|
||||
p++;
|
||||
}
|
||||
if(has_account && !self_seen && rows < 24) {
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s",
|
||||
account.public_id);
|
||||
rows++;
|
||||
}
|
||||
p = strstr(app != NULL ? app->profile_friends_json : "", "\"friends\"");
|
||||
while(p != NULL && (p = strchr(p, '{')) != NULL && rows < 24) {
|
||||
char user_id[80];
|
||||
|
||||
if(profile_json_string_value(p, "user_id_hash", user_id, sizeof(user_id)) == NULL)
|
||||
break;
|
||||
if(!profile_leaderboard_row_seen(draw_rows, rows, user_id)) {
|
||||
snprintf(draw_rows[rows].user_id, sizeof(draw_rows[rows].user_id), "%s",
|
||||
user_id);
|
||||
rows++;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
return rows > 12 ? 12 : rows;
|
||||
}
|
||||
|
||||
int
|
||||
profile_social_leaderboard_content_height(InbeApp *app, int content_w)
|
||||
{
|
||||
int metric_count;
|
||||
int rows;
|
||||
|
||||
(void)content_w;
|
||||
if(app == NULL)
|
||||
return flint_px(160);
|
||||
metric_count = profile_leaderboard_metric_count(app->profile_leaderboard_practice);
|
||||
rows = profile_leaderboard_row_count(app, app->profile_leaderboard_json);
|
||||
return flint_px(16) + flint_px(22) + flint_px(46) +
|
||||
flint_px(34) + flint_px(10) +
|
||||
(metric_count > 0 ? 0 : 0) +
|
||||
flint_px(22) +
|
||||
(rows > 0 ? rows * flint_px(30) : flint_px(24)) +
|
||||
flint_px(16);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_refresh_leaderboard(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
profile_social_load_leaderboard_cache(app);
|
||||
app_request_social_refresh(app);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
profile_social_refresh_cache(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
profile_social_load_friends_cache(app);
|
||||
profile_social_load_leaderboard_cache(app);
|
||||
app_request_social_refresh(app);
|
||||
settings_screen_set_status_success(locale_get("profile_updating_status"), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
profile_draw_choice_row(InbeApp *app, int x, int w, int *y, int *value,
|
||||
const char *const *labels, int count)
|
||||
{
|
||||
int gap = flint_px(8);
|
||||
int btn_h = flint_px(34);
|
||||
int btn_w;
|
||||
|
||||
if(count <= 0)
|
||||
return;
|
||||
btn_w = (w - gap * (count - 1)) / count;
|
||||
for(int i = 0; i < count; i++) {
|
||||
int hover = 0;
|
||||
int bx = x + i * (btn_w + gap);
|
||||
int bw = i == count - 1 ? x + w - bx : btn_w;
|
||||
int selected = *value == i;
|
||||
if(ui_draw_generic_button(bx, *y, bw, btn_h, labels[i],
|
||||
selected ? UI_BUTTON_STYLE_TAB_SELECTED
|
||||
: UI_BUTTON_STYLE_TAB,
|
||||
0, &hover) && !selected) {
|
||||
*value = i;
|
||||
profile_social_load_leaderboard_cache(app);
|
||||
}
|
||||
}
|
||||
*y += btn_h + flint_px(10);
|
||||
}
|
||||
|
||||
void
|
||||
profile_social_draw_leaderboard(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
const char *practice_options[EXERCISE_COUNT];
|
||||
const char *metric_options[PROFILE_LEADERBOARD_METRIC_COUNT];
|
||||
int metric_count;
|
||||
int before_practice;
|
||||
int before_metric;
|
||||
|
||||
if(app == NULL)
|
||||
return;
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++)
|
||||
practice_options[i] = profile_practice_label(i);
|
||||
if(app->profile_leaderboard_practice < 0 ||
|
||||
app->profile_leaderboard_practice >= EXERCISE_COUNT)
|
||||
app->profile_leaderboard_practice = EXERCISE_WIM_HOF;
|
||||
if(app->profile_leaderboard_metric < 0 ||
|
||||
app->profile_leaderboard_metric >= PROFILE_LEADERBOARD_METRIC_COUNT)
|
||||
app->profile_leaderboard_metric = PROFILE_LEADERBOARD_STREAK;
|
||||
metric_count = profile_leaderboard_metric_count(app->profile_leaderboard_practice);
|
||||
if(app->profile_leaderboard_metric >= metric_count)
|
||||
app->profile_leaderboard_metric = PROFILE_LEADERBOARD_STREAK;
|
||||
if(!app->profile_leaderboard_loaded)
|
||||
profile_social_load_leaderboard_cache(app);
|
||||
metric_options[PROFILE_LEADERBOARD_STREAK] =
|
||||
profile_leaderboard_metric_label(app->profile_leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_STREAK);
|
||||
metric_options[PROFILE_LEADERBOARD_AVG_HOLD] =
|
||||
profile_leaderboard_metric_label(app->profile_leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_AVG_HOLD);
|
||||
|
||||
*y += flint_px(16);
|
||||
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;
|
||||
ui_draw_dropdown_button(811, x, *y, w, flint_px(36), practice_options,
|
||||
EXERCISE_COUNT, &app->profile_leaderboard_practice);
|
||||
if(app->profile_leaderboard_practice != before_practice) {
|
||||
metric_count = profile_leaderboard_metric_count(app->profile_leaderboard_practice);
|
||||
if(app->profile_leaderboard_metric >= metric_count)
|
||||
app->profile_leaderboard_metric = PROFILE_LEADERBOARD_STREAK;
|
||||
metric_options[PROFILE_LEADERBOARD_STREAK] =
|
||||
profile_leaderboard_metric_label(app->profile_leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_STREAK);
|
||||
metric_options[PROFILE_LEADERBOARD_AVG_HOLD] =
|
||||
profile_leaderboard_metric_label(app->profile_leaderboard_practice,
|
||||
PROFILE_LEADERBOARD_AVG_HOLD);
|
||||
profile_refresh_leaderboard(app);
|
||||
}
|
||||
*y += flint_px(46);
|
||||
before_metric = app->profile_leaderboard_metric;
|
||||
profile_draw_choice_row(app, x, w, y, &app->profile_leaderboard_metric,
|
||||
metric_options, metric_count);
|
||||
if(app->profile_leaderboard_metric != before_metric)
|
||||
profile_refresh_leaderboard(app);
|
||||
*y += flint_px(22);
|
||||
if(!app->profile_friends_loaded)
|
||||
profile_social_load_friends_cache(app);
|
||||
profile_draw_leaderboard_rows(app, app->profile_leaderboard_json, x, w, y);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef INBE_PROFILE_SOCIAL_H
|
||||
#define INBE_PROFILE_SOCIAL_H
|
||||
|
||||
#include "app_fwd.h"
|
||||
|
||||
void profile_social_load_friends_cache(InbeApp *app);
|
||||
void profile_social_load_leaderboard_cache(InbeApp *app);
|
||||
void profile_social_refresh_cache(InbeApp *app);
|
||||
int profile_social_friends_count(InbeApp *app);
|
||||
int profile_social_pending_count(InbeApp *app);
|
||||
int profile_social_friends_content_height(InbeApp *app, int content_w);
|
||||
int profile_social_leaderboard_content_height(InbeApp *app, int content_w);
|
||||
void profile_social_draw_friends(InbeApp *app, int x, int w, int *y);
|
||||
void profile_social_draw_leaderboard(InbeApp *app, int x, int w, int *y);
|
||||
|
||||
#endif
|
||||
@@ -225,10 +225,10 @@ settings_draw_sync_review_modal(InbeApp *app)
|
||||
free(diff_detail);
|
||||
return 0;
|
||||
}
|
||||
frame = ui_draw_modal_frame(modal_w, modal_h, "Sync needs review",
|
||||
frame = ui_draw_modal_frame(modal_w, modal_h, locale_get("sync_review_needed"),
|
||||
(Texture2D){0}, (Texture2D){0});
|
||||
intro = (FlintUIParagraph){
|
||||
.text = "Review data differences.",
|
||||
.text = locale_get("sync_review_message"),
|
||||
.width = frame.content_w,
|
||||
.font = flint_ui_font_small(),
|
||||
.line_gap = flint_px(2),
|
||||
@@ -954,9 +954,9 @@ settings_data_draw_modals(InbeApp *app)
|
||||
app_reload_after_import(app, 0);
|
||||
else
|
||||
app_auto_sync(app);
|
||||
settings_screen_set_status_success(use_remote ? "Using remote data" : "Keeping local data", NULL);
|
||||
settings_screen_set_status_success(locale_get(use_remote ? "sync_review_using_remote" : "sync_review_keeping_local"), NULL);
|
||||
} else {
|
||||
settings_screen_set_status_error("Sync review failed");
|
||||
settings_screen_set_status_error(locale_get("sync_review_failed"));
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "flint_locale.h"
|
||||
#include "flint_theme.h"
|
||||
#include "flint_ui.h"
|
||||
#include "settings_ui.h"
|
||||
|
||||
static int
|
||||
settings_device_orientation_option_count(void)
|
||||
@@ -18,59 +19,6 @@ settings_device_orientation_option_count(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static FlintUIParagraph
|
||||
settings_device_label_paragraph(const char *label, int w)
|
||||
{
|
||||
return (FlintUIParagraph){
|
||||
.text = label,
|
||||
.width = w
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
settings_device_toggle_row_height(const char *label, int w)
|
||||
{
|
||||
int label_h;
|
||||
int row_h;
|
||||
|
||||
if(w <= 0)
|
||||
w = flint_px(160);
|
||||
|
||||
label_h = flint_ui_paragraph_height(settings_device_label_paragraph(label, w));
|
||||
row_h = label_h + flint_px(8) + flint_px(30) + flint_px(22);
|
||||
if(row_h < flint_px(76))
|
||||
row_h = flint_px(76);
|
||||
return row_h;
|
||||
}
|
||||
|
||||
static int
|
||||
settings_device_draw_toggle_row(int x, int w, int *y, const char *label, int *value)
|
||||
{
|
||||
int label_y;
|
||||
int label_h;
|
||||
int row_h;
|
||||
int toggle_w = flint_px(56);
|
||||
int toggle_h = flint_px(30);
|
||||
|
||||
if(y == NULL)
|
||||
return 0;
|
||||
|
||||
row_h = settings_device_toggle_row_height(label, w);
|
||||
label_y = *y;
|
||||
flint_ui_paragraph_draw(settings_device_label_paragraph(label, w), x, &label_y);
|
||||
label_h = label_y - *y;
|
||||
|
||||
if(ui_draw_toggle_switch(x, *y + label_h + flint_px(8), toggle_w, toggle_h,
|
||||
value, locale_get("toggle_off"),
|
||||
locale_get("toggle_on"))) {
|
||||
*y += row_h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*y += row_h;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
settings_device_content_height(int content_w)
|
||||
{
|
||||
@@ -80,7 +28,7 @@ settings_device_content_height(int content_w)
|
||||
#if !ANDROID_BUILD && !defined(PLATFORM_WEB)
|
||||
height += flint_px(50);
|
||||
#endif
|
||||
height += settings_device_toggle_row_height(locale_get("on_screen_keyboard_label"), label_w);
|
||||
height += settings_ui_toggle_row_height(locale_get("on_screen_keyboard_label"), label_w);
|
||||
return height;
|
||||
}
|
||||
|
||||
@@ -133,8 +81,8 @@ settings_device_draw(InbeApp *app, int x, int w, int *y, SettingsDeviceState *st
|
||||
*y += flint_px(50);
|
||||
#endif
|
||||
|
||||
if(settings_device_draw_toggle_row(x, w, y, locale_get("on_screen_keyboard_label"),
|
||||
&keyboard_toggle)) {
|
||||
if(settings_ui_draw_toggle_row(x, w, y, locale_get("on_screen_keyboard_label"),
|
||||
&keyboard_toggle)) {
|
||||
app->on_screen_keyboard_enabled = keyboard_toggle;
|
||||
app->settings_dirty = 1;
|
||||
}
|
||||
|
||||
@@ -23,32 +23,6 @@ static char unified_status[256] = "";
|
||||
static char unified_detail[256] = "";
|
||||
static int unified_status_type = 0;
|
||||
|
||||
static int
|
||||
settings_draw_desktop_tab_bar(InbeApp *app, int y, const char **tab_names)
|
||||
{
|
||||
FlintUITab tabs[SETTINGS_TAB_COUNT];
|
||||
|
||||
if(app == NULL)
|
||||
return -1;
|
||||
|
||||
for(int i = 0; i < SETTINGS_TAB_COUNT; i++)
|
||||
tabs[i] = (FlintUITab){
|
||||
.label = tab_names[i],
|
||||
.icon = (Texture2D){0},
|
||||
.icon_size = 0,
|
||||
.disabled = app->modal.active
|
||||
};
|
||||
|
||||
return ui_draw_tab_bar((FlintUITabBar){
|
||||
.bounds = {0, (float)y, (float)view_width, (float)ui_tab_bar_height()},
|
||||
.tabs = tabs,
|
||||
.count = SETTINGS_TAB_COUNT,
|
||||
.selected_index = app->settings_tab,
|
||||
.min_tab_width = flint_px(110),
|
||||
.max_tab_width = flint_px(170)
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
settings_screen_set_status_success(const char *message, const char *detail)
|
||||
{
|
||||
@@ -132,6 +106,13 @@ settings_tab_content_height(InbeApp *app, int tab, int content_w)
|
||||
return settings_about_content_height(content_w);
|
||||
}
|
||||
|
||||
static int
|
||||
settings_overview_content_height(int content_w)
|
||||
{
|
||||
(void)content_w;
|
||||
return flint_px(250);
|
||||
}
|
||||
|
||||
typedef struct SettingsScrollPageContext {
|
||||
InbeApp *app;
|
||||
int tab;
|
||||
@@ -145,43 +126,87 @@ settings_scroll_page_content_height(int content_w, void *user_data)
|
||||
|
||||
if(planned_content_w < flint_px(160))
|
||||
planned_content_w = content_w;
|
||||
if(ctx->tab == SETTINGS_TAB_OVERVIEW)
|
||||
return settings_overview_content_height(planned_content_w);
|
||||
return settings_tab_content_height(ctx->app, ctx->tab, planned_content_w);
|
||||
}
|
||||
|
||||
static const char *
|
||||
settings_tab_label(int tab)
|
||||
{
|
||||
switch(tab) {
|
||||
case SETTINGS_TAB_SESSION:
|
||||
return locale_get("settings_section_session");
|
||||
case SETTINGS_TAB_DEVICE:
|
||||
return locale_get("settings_tab_device");
|
||||
case SETTINGS_TAB_THEME:
|
||||
return locale_get("settings_section_appearance");
|
||||
case SETTINGS_TAB_ABOUT:
|
||||
return locale_get("settings_tab_about");
|
||||
default:
|
||||
return locale_get("settings_title");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
settings_draw_section_header(InbeApp *app, int tab)
|
||||
{
|
||||
int header_h = ui_tab_bar_height();
|
||||
const char *title = settings_tab_label(tab);
|
||||
|
||||
if(flint_ui_return_title_bar(app->icons[UI_ICON_TYPE_RETURN], title, header_h)) {
|
||||
app->settings_tab = SETTINGS_TAB_OVERVIEW;
|
||||
app->settings_scroll = 0;
|
||||
if(app->modal.type == UIModalThemePicker)
|
||||
app_close_modal(app);
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
settings_draw_overview(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
const int tabs[] = {
|
||||
SETTINGS_TAB_SESSION,
|
||||
SETTINGS_TAB_DEVICE,
|
||||
SETTINGS_TAB_THEME,
|
||||
SETTINGS_TAB_ABOUT
|
||||
};
|
||||
int btn_h = flint_px(40);
|
||||
int gap = flint_px(10);
|
||||
int hover = 0;
|
||||
for(int i = 0; i < 4; i++) {
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, settings_tab_label(tabs[i]),
|
||||
UI_BUTTON_STYLE_SECONDARY, app->modal.active,
|
||||
&hover)) {
|
||||
app->settings_tab = tabs[i];
|
||||
app->settings_scroll = 0;
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
*y += btn_h + gap;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
settings_screen_draw(InbeApp *app)
|
||||
{
|
||||
int detail_header_h;
|
||||
int selector_h;
|
||||
int tab_content_start_y;
|
||||
int content_viewport_h;
|
||||
int selected_tab;
|
||||
int clicked_tab = -1;
|
||||
int draw_settings_menu = 0;
|
||||
const char *settings_tabs[] = {
|
||||
locale_get("settings_section_session"),
|
||||
locale_get("settings_tab_device"),
|
||||
locale_get("settings_section_appearance"),
|
||||
locale_get("settings_tab_about"),
|
||||
};
|
||||
SettingsDeviceState device_state = {0};
|
||||
|
||||
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
|
||||
app->settings_drag_slider = 0;
|
||||
|
||||
if(app->settings_tab < SETTINGS_TAB_SESSION || app->settings_tab >= SETTINGS_TAB_COUNT)
|
||||
app->settings_tab = SETTINGS_TAB_SESSION;
|
||||
selected_tab = app->settings_tab;
|
||||
if(app->settings_tab < SETTINGS_TAB_OVERVIEW || app->settings_tab >= SETTINGS_TAB_COUNT)
|
||||
app->settings_tab = SETTINGS_TAB_OVERVIEW;
|
||||
|
||||
if(settings_data_draw_pending_file_dialog(app))
|
||||
return 1;
|
||||
|
||||
detail_header_h = 0;
|
||||
|
||||
selector_h = detail_header_h > 0 ? 0 : ui_tab_bar_height();
|
||||
tab_content_start_y = detail_header_h + selector_h;
|
||||
if(selector_h > 0)
|
||||
tab_content_start_y += flint_px(SETTINGS_CONTENT_TOP_PADDING);
|
||||
detail_header_h = ui_tab_bar_height();
|
||||
tab_content_start_y = detail_header_h;
|
||||
tab_content_start_y += flint_px(SETTINGS_CONTENT_TOP_PADDING);
|
||||
content_viewport_h = view_height - tab_content_start_y - app_content_bottom_reserved(app);
|
||||
|
||||
#if ANDROID_BUILD
|
||||
@@ -193,39 +218,10 @@ settings_screen_draw(InbeApp *app)
|
||||
if(content_viewport_h < 0)
|
||||
content_viewport_h = 0;
|
||||
|
||||
if(selector_h > 0) {
|
||||
selected_tab = app->settings_tab;
|
||||
if(app_should_use_tab_bar(app)) {
|
||||
clicked_tab = settings_draw_desktop_tab_bar(app, 0, settings_tabs);
|
||||
} else {
|
||||
(void)ui_draw_toolbar_header((FlintUIToolbarHeader){
|
||||
.leading_icon = (Texture2D){0},
|
||||
.toolbar = (FlintUIToolbar){
|
||||
.id = 302,
|
||||
.height = selector_h,
|
||||
.options = app->modal.active ? NULL : settings_tabs,
|
||||
.option_count = app->modal.active ? 0 : SETTINGS_TAB_COUNT,
|
||||
.selected_index = &selected_tab,
|
||||
.dropdown_min_width = flint_px(150),
|
||||
.dropdown_height = flint_px(36),
|
||||
.side_padding = -1
|
||||
}
|
||||
});
|
||||
draw_settings_menu = !app->modal.active;
|
||||
}
|
||||
}
|
||||
|
||||
if(clicked_tab >= 0 && clicked_tab < SETTINGS_TAB_COUNT)
|
||||
selected_tab = clicked_tab;
|
||||
|
||||
if(selected_tab != app->settings_tab) {
|
||||
app->settings_tab = selected_tab;
|
||||
app->settings_scroll = 0;
|
||||
if(app->modal.type == UIModalThemePicker) {
|
||||
app_close_modal(app);
|
||||
}
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
if(app->settings_tab == SETTINGS_TAB_OVERVIEW)
|
||||
flint_ui_title_bar(locale_get("settings_title"), detail_header_h);
|
||||
else
|
||||
settings_draw_section_header(app, app->settings_tab);
|
||||
|
||||
{
|
||||
SettingsScrollPageContext page_ctx = {app, app->settings_tab};
|
||||
@@ -240,7 +236,9 @@ settings_screen_draw(InbeApp *app)
|
||||
});
|
||||
int y = page.content_y;
|
||||
|
||||
if(app->settings_tab == SETTINGS_TAB_THEME)
|
||||
if(app->settings_tab == SETTINGS_TAB_OVERVIEW)
|
||||
settings_draw_overview(app, page.content_x, page.content_w, &y);
|
||||
else if(app->settings_tab == SETTINGS_TAB_THEME)
|
||||
settings_theme_draw(app, page.content_x, page.content_w, &y, &app->theme_state);
|
||||
else if(app->settings_tab == SETTINGS_TAB_SESSION)
|
||||
settings_session_draw(app, page.content_x, page.content_w, &y);
|
||||
@@ -252,19 +250,6 @@ settings_screen_draw(InbeApp *app)
|
||||
ui_scroll_page_end(page);
|
||||
}
|
||||
|
||||
if(draw_settings_menu) {
|
||||
ui_set_dropdown_clip_top(tab_content_start_y);
|
||||
if(ui_draw_dropdown_menu(302) && selected_tab != app->settings_tab) {
|
||||
app->settings_tab = selected_tab;
|
||||
app->settings_scroll = 0;
|
||||
if(app->modal.type == UIModalThemePicker) {
|
||||
app_close_modal(app);
|
||||
}
|
||||
settings_screen_clear_status();
|
||||
}
|
||||
ui_set_dropdown_clip_top(0);
|
||||
}
|
||||
|
||||
ui_set_dropdown_clip_top(tab_content_start_y);
|
||||
if(app->settings_tab == SETTINGS_TAB_THEME)
|
||||
settings_theme_handle_overlays(app, &app->theme_state);
|
||||
|
||||
@@ -4,72 +4,20 @@
|
||||
#include "app_settings.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_ui.h"
|
||||
#include "settings_ui.h"
|
||||
|
||||
#define SETTINGS_SESSION_SLIDER_ROW_H 52
|
||||
|
||||
static FlintUIParagraph
|
||||
settings_session_label_paragraph(const char *label, int w)
|
||||
{
|
||||
return (FlintUIParagraph){
|
||||
.text = label,
|
||||
.width = w
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
settings_session_toggle_row_height(const char *label, int w)
|
||||
{
|
||||
int label_h;
|
||||
int row_h;
|
||||
|
||||
if(w <= 0)
|
||||
w = flint_px(160);
|
||||
|
||||
label_h = flint_ui_paragraph_height(settings_session_label_paragraph(label, w));
|
||||
row_h = label_h + flint_px(8) + flint_px(30) + flint_px(22);
|
||||
if(row_h < flint_px(76))
|
||||
row_h = flint_px(76);
|
||||
return row_h;
|
||||
}
|
||||
|
||||
static int
|
||||
settings_session_draw_toggle_row(int x, int w, int *y, const char *label, int *value)
|
||||
{
|
||||
int label_y;
|
||||
int label_h;
|
||||
int row_h;
|
||||
int toggle_w = flint_px(56);
|
||||
int toggle_h = flint_px(30);
|
||||
|
||||
if(y == NULL)
|
||||
return 0;
|
||||
|
||||
row_h = settings_session_toggle_row_height(label, w);
|
||||
label_y = *y;
|
||||
flint_ui_paragraph_draw(settings_session_label_paragraph(label, w), x, &label_y);
|
||||
label_h = label_y - *y;
|
||||
|
||||
if(ui_draw_toggle_switch(x, *y + label_h + flint_px(8), toggle_w, toggle_h,
|
||||
value, locale_get("toggle_off"),
|
||||
locale_get("toggle_on"))) {
|
||||
*y += row_h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*y += row_h;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
settings_session_content_height(int content_w)
|
||||
{
|
||||
int label_w = content_w > 0 ? content_w : flint_px(240);
|
||||
int height = flint_px(SETTINGS_SESSION_SLIDER_ROW_H) + flint_px(40);
|
||||
|
||||
height += settings_session_toggle_row_height(locale_get("show_session_volume_control_label"),
|
||||
label_w);
|
||||
height += settings_session_toggle_row_height(locale_get("play_in_background_label"),
|
||||
label_w);
|
||||
height += settings_ui_toggle_row_height(locale_get("show_session_volume_control_label"),
|
||||
label_w);
|
||||
height += settings_ui_toggle_row_height(locale_get("play_in_background_label"),
|
||||
label_w);
|
||||
return height;
|
||||
}
|
||||
|
||||
@@ -93,17 +41,17 @@ settings_session_draw(InbeApp *app, int x, int w, int *y)
|
||||
*y += flint_px(SETTINGS_SESSION_SLIDER_ROW_H);
|
||||
|
||||
show_session_volume = app->show_session_volume_control;
|
||||
if(settings_session_draw_toggle_row(x, w, y,
|
||||
locale_get("show_session_volume_control_label"),
|
||||
&show_session_volume)) {
|
||||
if(settings_ui_draw_toggle_row(x, w, y,
|
||||
locale_get("show_session_volume_control_label"),
|
||||
&show_session_volume)) {
|
||||
app->show_session_volume_control = show_session_volume;
|
||||
app->settings_dirty = 1;
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
play_in_background = app->inbe.play_in_background;
|
||||
if(settings_session_draw_toggle_row(x, w, y, locale_get("play_in_background_label"),
|
||||
&play_in_background)) {
|
||||
if(settings_ui_draw_toggle_row(x, w, y, locale_get("play_in_background_label"),
|
||||
&play_in_background)) {
|
||||
app->inbe.play_in_background = play_in_background;
|
||||
app->settings_dirty = 1;
|
||||
save_settings(app);
|
||||
|
||||
@@ -261,6 +261,21 @@ settings_sync_result_key(FlintLyraSyncResult result)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
settings_sync_create_account(InbeApp *app, InbeSyncAccount *account)
|
||||
{
|
||||
if(account == NULL)
|
||||
return 0;
|
||||
if(!sync_account_create(account)) {
|
||||
settings_screen_set_status_error(locale_get("sync_account_create_failed"));
|
||||
return 0;
|
||||
}
|
||||
settings_screen_set_status_success(locale_get("sync_account_created"), NULL);
|
||||
app_auto_sync(app);
|
||||
settings_sync_open_alias_modal(app, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
settings_sync_run_connect(InbeApp *app)
|
||||
{
|
||||
@@ -276,6 +291,7 @@ settings_sync_run_connect(InbeApp *app)
|
||||
storage_set_setting_text(INBE_SYNC_SERVER_URL_KEY, url);
|
||||
result = sync_client_sync(url);
|
||||
if(result == FLINT_LYRA_SYNC_OK) {
|
||||
app_request_social_refresh(app);
|
||||
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);
|
||||
@@ -284,7 +300,7 @@ settings_sync_run_connect(InbeApp *app)
|
||||
settings_screen_set_status_success(locale_get(settings_sync_result_key(result)), NULL);
|
||||
} else if(storage_sync_review_pending()) {
|
||||
app_open_modal(app, UIModalSyncReview);
|
||||
settings_screen_set_status_error("Sync needs review");
|
||||
settings_screen_set_status_error(locale_get("sync_review_needed"));
|
||||
} else {
|
||||
app_reload_after_import(app, 0);
|
||||
settings_screen_set_status_success(locale_get(settings_sync_result_key(result)), NULL);
|
||||
@@ -360,12 +376,7 @@ settings_sync_account_draw(InbeApp *app, int x, int w, int *y)
|
||||
if(!has_account) {
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, locale_get("sync_create_account_button"),
|
||||
UI_BUTTON_STYLE_PRIMARY, 0, &hover)) {
|
||||
if(sync_account_create(&account)) {
|
||||
settings_screen_set_status_success(locale_get("sync_account_created"), NULL);
|
||||
settings_sync_open_alias_modal(app, 1);
|
||||
} else {
|
||||
settings_screen_set_status_error(locale_get("sync_account_create_failed"));
|
||||
}
|
||||
settings_sync_create_account(app, &account);
|
||||
}
|
||||
*y += btn_h + flint_px(18);
|
||||
return;
|
||||
@@ -437,13 +448,7 @@ settings_sync_account_draw_config(InbeApp *app, int x, int w, int *y)
|
||||
.count = 2
|
||||
});
|
||||
if(clicked == 0) {
|
||||
if(sync_account_create(&account)) {
|
||||
has_account = 1;
|
||||
settings_screen_set_status_success(locale_get("sync_account_created"), NULL);
|
||||
settings_sync_open_alias_modal(app, 1);
|
||||
} else {
|
||||
settings_screen_set_status_error(locale_get("sync_account_create_failed"));
|
||||
}
|
||||
has_account = settings_sync_create_account(app, &account);
|
||||
} else if(clicked == 1) {
|
||||
if(!settings_start_sync_key_import(app))
|
||||
settings_screen_set_status_error(locale_get("sync_private_key_import_failed"));
|
||||
|
||||
@@ -15,7 +15,7 @@ int
|
||||
settings_theme_content_height(int content_w)
|
||||
{
|
||||
(void)content_w;
|
||||
return flint_px(304) + flint_px(60);
|
||||
return flint_px(228) + flint_px(60);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -36,22 +36,6 @@ settings_theme_draw(InbeApp *app, int x, int w, int *y, SettingsThemeState *stat
|
||||
state->draw_theme_mode_menu = 1;
|
||||
*y += flint_px(76);
|
||||
|
||||
{
|
||||
const char *nav_mode_options[2];
|
||||
nav_mode_options[NAV_MODE_TABBAR] = locale_get("nav_mode_tabbar");
|
||||
nav_mode_options[NAV_MODE_DROPDOWN] = locale_get("nav_mode_dropdown");
|
||||
if(app->navigation_mode != NAV_MODE_DROPDOWN)
|
||||
app->navigation_mode = NAV_MODE_TABBAR;
|
||||
|
||||
flint_text_draw(locale_get("nav_mode_label"), x, *y, flint_ui_font(),
|
||||
flint_theme_get_text());
|
||||
ui_draw_dropdown_button(103, x, *y + flint_px(26), w, flint_px(36),
|
||||
nav_mode_options, 2,
|
||||
&app->navigation_mode);
|
||||
}
|
||||
state->draw_nav_mode_menu = 1;
|
||||
*y += flint_px(76);
|
||||
|
||||
{
|
||||
const char *transition_options[2];
|
||||
transition_options[APP_TRANSITION_NONE] = locale_get("transition_none");
|
||||
@@ -92,7 +76,7 @@ settings_theme_draw(InbeApp *app, int x, int w, int *y, SettingsThemeState *stat
|
||||
// Check for click to open modal (skip if modal is active or just closed)
|
||||
if(is_hovered && !app->modal.active &&
|
||||
!ui_input_captures_click(mouse_world) &&
|
||||
app->inbe.frame - app->modal_open_frame > 1) {
|
||||
app->inbe.frame - app->modal_input_block_frame > 1) {
|
||||
ui_mark_clickable();
|
||||
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
|
||||
app_open_modal(app, UIModalThemePicker);
|
||||
@@ -105,7 +89,6 @@ void
|
||||
settings_theme_handle_overlays(InbeApp *app, SettingsThemeState *state)
|
||||
{
|
||||
int theme_mode_changed = 0;
|
||||
int nav_mode_changed = 0;
|
||||
int transition_changed = 0;
|
||||
|
||||
if(app == NULL || state == NULL)
|
||||
@@ -119,15 +102,6 @@ settings_theme_handle_overlays(InbeApp *app, SettingsThemeState *state)
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
if(state->draw_nav_mode_menu && ui_draw_dropdown_menu(103))
|
||||
nav_mode_changed = 1;
|
||||
if(nav_mode_changed) {
|
||||
if(app->navigation_mode != NAV_MODE_DROPDOWN)
|
||||
app->navigation_mode = NAV_MODE_TABBAR;
|
||||
app->settings_dirty = 1;
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
if(state->draw_transition_menu && ui_draw_dropdown_menu(104))
|
||||
transition_changed = 1;
|
||||
if(transition_changed) {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
typedef struct SettingsThemeState {
|
||||
int draw_theme_mode_menu;
|
||||
int draw_nav_mode_menu;
|
||||
int draw_transition_menu;
|
||||
int theme_picker_modal_open;
|
||||
int theme_picker_scroll;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#include "settings_ui.h"
|
||||
|
||||
#include "flint_locale.h"
|
||||
#include "flint_ui.h"
|
||||
|
||||
static FlintUIParagraph
|
||||
settings_ui_label_paragraph(const char *label, int w)
|
||||
{
|
||||
return (FlintUIParagraph){
|
||||
.text = label,
|
||||
.width = w
|
||||
};
|
||||
}
|
||||
|
||||
int
|
||||
settings_ui_toggle_row_height(const char *label, int w)
|
||||
{
|
||||
int label_h;
|
||||
int row_h;
|
||||
|
||||
if(w <= 0)
|
||||
w = flint_px(160);
|
||||
|
||||
label_h = flint_ui_paragraph_height(settings_ui_label_paragraph(label, w));
|
||||
row_h = label_h + flint_px(8) + flint_px(30) + flint_px(22);
|
||||
if(row_h < flint_px(76))
|
||||
row_h = flint_px(76);
|
||||
return row_h;
|
||||
}
|
||||
|
||||
int
|
||||
settings_ui_draw_toggle_row(int x, int w, int *y, const char *label, int *value)
|
||||
{
|
||||
int label_y;
|
||||
int label_h;
|
||||
int row_h;
|
||||
int toggle_w = flint_px(56);
|
||||
int toggle_h = flint_px(30);
|
||||
|
||||
if(y == NULL)
|
||||
return 0;
|
||||
|
||||
row_h = settings_ui_toggle_row_height(label, w);
|
||||
label_y = *y;
|
||||
flint_ui_paragraph_draw(settings_ui_label_paragraph(label, w), x, &label_y);
|
||||
label_h = label_y - *y;
|
||||
|
||||
if(ui_draw_toggle_switch(x, *y + label_h + flint_px(8), toggle_w, toggle_h,
|
||||
value, locale_get("toggle_off"),
|
||||
locale_get("toggle_on"))) {
|
||||
*y += row_h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*y += row_h;
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef INBE_SETTINGS_UI_H
|
||||
#define INBE_SETTINGS_UI_H
|
||||
|
||||
int settings_ui_toggle_row_height(const char *label, int w);
|
||||
int settings_ui_draw_toggle_row(int x, int w, int *y, const char *label, int *value);
|
||||
|
||||
#endif
|
||||
+2
-1
@@ -25,7 +25,7 @@ make_user_id(char *out, size_t out_size)
|
||||
snprintf(out, out_size, "local-%lld-%u", now_seconds(), r);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
storage_join_path(char *out, size_t out_size, const char *root, const char *name)
|
||||
{
|
||||
size_t root_len;
|
||||
@@ -498,6 +498,7 @@ storage_init(const char *root)
|
||||
sqlite3_busy_timeout(g_storage.db, 1000);
|
||||
if(!schema_create() || !migrate_schema() || !load_or_create_user())
|
||||
return 0;
|
||||
storage_migrate_default_habit_ids();
|
||||
storage_materialize_session_habit_days();
|
||||
migrate_legacy_file_sessions_once();
|
||||
return 1;
|
||||
|
||||
@@ -22,6 +22,7 @@ extern StorageState g_storage;
|
||||
|
||||
long long now_seconds(void);
|
||||
int bind_text(sqlite3_stmt *stmt, int index, const char *text);
|
||||
int storage_join_path(char *out, size_t out_size, const char *root, const char *name);
|
||||
int path_exists(const char *path);
|
||||
int ensure_dir_local(const char *path);
|
||||
int exec_sql(const char *sql);
|
||||
@@ -38,7 +39,12 @@ void set_meta_int64(const char *key, long long value);
|
||||
|
||||
void storage_schedule_persist(void);
|
||||
void storage_enqueue_all_sync_state(void);
|
||||
int storage_enqueue_sync_habit(const char *habit_id);
|
||||
int storage_enqueue_sync_habit_day(const char *habit_id, int local_date);
|
||||
int storage_enqueue_sync_session(const char *session_id);
|
||||
int storage_has_sync_account(void);
|
||||
int storage_materialize_session_habit_days(void);
|
||||
int storage_migrate_default_habit_ids(void);
|
||||
int storage_sync_review_write_json(const char *json);
|
||||
void storage_sync_review_delete_json(void);
|
||||
int insert_session_at_ex(long long started_at, int local_date, const int *round_times,
|
||||
|
||||
+7
-21
@@ -98,8 +98,11 @@ static const char *const importable_setting_keys[] = {
|
||||
"meditation_custom_minutes",
|
||||
"meditation_show_extend_controls",
|
||||
"meditation_music_enabled",
|
||||
"meditation_music_shuffle",
|
||||
"meditation_music_track",
|
||||
"practice_music_mask",
|
||||
"practice_music_track_wim_hof",
|
||||
"practice_music_track_meditation",
|
||||
"practice_music_track_sun_salutation",
|
||||
"play_in_background",
|
||||
"language",
|
||||
"practice_category_tab",
|
||||
@@ -465,24 +468,6 @@ read_file_heap(const char *path, size_t *out_size)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int
|
||||
make_temp_path(char *out, size_t out_size, const char *name)
|
||||
{
|
||||
size_t root_len;
|
||||
size_t name_len;
|
||||
|
||||
if(out == NULL || out_size == 0 || name == NULL || g_storage.root[0] == '\0')
|
||||
return 0;
|
||||
root_len = strlen(g_storage.root);
|
||||
name_len = strlen(name);
|
||||
if(root_len + 1 + name_len + 1 > out_size)
|
||||
return 0;
|
||||
memcpy(out, g_storage.root, root_len);
|
||||
out[root_len] = '/';
|
||||
memcpy(out + root_len + 1, name, name_len + 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
char **paths;
|
||||
int count;
|
||||
@@ -1039,7 +1024,7 @@ storage_import_zip_ex(const char *path, InbeStorageImportMode mode)
|
||||
char temp_path[INBE_STORAGE_PATH_SIZE];
|
||||
FILE *fp;
|
||||
db_bytes = mz_zip_reader_extract_file_to_heap(&archive, "inbe-data/inbe.db", &db_size, 0);
|
||||
if(!make_temp_path(temp_path, sizeof(temp_path), "import-inbe.db")) {
|
||||
if(!storage_join_path(temp_path, sizeof(temp_path), g_storage.root, "import-inbe.db")) {
|
||||
TraceLog(LOG_ERROR, "DATA: import temp path is too long");
|
||||
free(db_bytes);
|
||||
mz_zip_reader_end(&archive);
|
||||
@@ -1091,7 +1076,8 @@ storage_inspect_import(const char *path, InbeStorageImportInfo *info)
|
||||
char temp_path[INBE_STORAGE_PATH_SIZE];
|
||||
FILE *fp;
|
||||
db_bytes = mz_zip_reader_extract_file_to_heap(&archive, "inbe-data/inbe.db", &db_size, 0);
|
||||
if(!make_temp_path(temp_path, sizeof(temp_path), "import-inspect-inbe.db")) {
|
||||
if(!storage_join_path(temp_path, sizeof(temp_path), g_storage.root,
|
||||
"import-inspect-inbe.db")) {
|
||||
free(db_bytes);
|
||||
mz_zip_reader_end(&archive);
|
||||
return 0;
|
||||
|
||||
+134
-600
@@ -1,6 +1,5 @@
|
||||
#include "storage.h"
|
||||
|
||||
#include "breath_engine.h"
|
||||
#include "db.h"
|
||||
#include "screens/habits_screen.h"
|
||||
|
||||
@@ -10,7 +9,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
@@ -29,6 +27,8 @@ storage_has_orphan_habit_days(void);
|
||||
static int
|
||||
storage_json_array_count(const char *json, const char *path);
|
||||
static int
|
||||
storage_apply_remote_full_snapshot(const char *response_json);
|
||||
static int
|
||||
storage_clear_local_sync_data(void);
|
||||
static int
|
||||
storage_json_valid(const char *json);
|
||||
@@ -45,6 +45,8 @@ storage_json_valid(const char *json);
|
||||
#define STORAGE_SYNC_FULL_REPLACE_KEY "sync_full_replace_requested"
|
||||
#define STORAGE_SYNC_ACCOUNT_ALIAS_KEY "sync_account_alias"
|
||||
#define STORAGE_SYNC_ZERO_HABIT_DAY_REPAIR_KEY "sync_zero_habit_day_repair_v1_done"
|
||||
#define STORAGE_DEFAULT_HABIT_ID_MIGRATION_KEY "default_habit_id_migration_v1_done"
|
||||
#define STORAGE_ACTIVITY_SUN_SALUTATION_MASK (1 << 2)
|
||||
|
||||
static long long
|
||||
storage_next_change_time(void)
|
||||
@@ -270,19 +272,19 @@ storage_enqueue_sync_entity(const char *entity_type, const char *entity_id, int
|
||||
return rc == SQLITE_DONE;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
storage_enqueue_sync_habit(const char *habit_id)
|
||||
{
|
||||
return storage_enqueue_sync_entity("habit", habit_id, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
storage_enqueue_sync_habit_day(const char *habit_id, int local_date)
|
||||
{
|
||||
return storage_enqueue_sync_entity("habit_day", habit_id, local_date);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
storage_enqueue_sync_session(const char *session_id)
|
||||
{
|
||||
return storage_enqueue_sync_entity("session", session_id, 0);
|
||||
@@ -318,39 +320,6 @@ storage_enqueue_all_sync_state(void)
|
||||
exec_sql("COMMIT");
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
hash_rounds(const int *round_times, int round_count)
|
||||
{
|
||||
unsigned int h = 2166136261u;
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
unsigned int v = (unsigned int)round_times[i];
|
||||
h ^= v & 0xffu;
|
||||
h *= 16777619u;
|
||||
h ^= (v >> 8) & 0xffu;
|
||||
h *= 16777619u;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
static void
|
||||
make_session_id(long long started_at, const int *round_times, int round_count, char *out,
|
||||
size_t out_size)
|
||||
{
|
||||
snprintf(out, out_size, "s-%lld-%08x", started_at, hash_rounds(round_times, round_count));
|
||||
}
|
||||
|
||||
static int
|
||||
parse_db_id(const char *path_or_id, char *out, size_t out_size)
|
||||
{
|
||||
if(path_or_id == NULL || path_or_id[0] == '\0')
|
||||
return 0;
|
||||
if(strncmp(path_or_id, "db:", 3) == 0)
|
||||
snprintf(out, out_size, "%s", path_or_id + 3);
|
||||
else
|
||||
snprintf(out, out_size, "%s", path_or_id);
|
||||
return out[0] != '\0';
|
||||
}
|
||||
|
||||
void
|
||||
storage_reset_sync_state(void)
|
||||
{
|
||||
@@ -849,319 +818,6 @@ storage_materialize_session_habit_days(void)
|
||||
return ok;
|
||||
}
|
||||
|
||||
int
|
||||
insert_session_at_ex(long long started_at, int local_date, const int *round_times, int round_count,
|
||||
int topic, int activity, const char *source, char *out_id, size_t out_id_size)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int rc;
|
||||
int inserted;
|
||||
unsigned int rhash;
|
||||
|
||||
if(g_storage.db == NULL || round_times == NULL || round_count <= 0 || round_count > MaxRounds)
|
||||
return 0;
|
||||
|
||||
rhash = hash_rounds(round_times, round_count);
|
||||
make_session_id(started_at, round_times, round_count, id, sizeof(id));
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT OR IGNORE INTO "
|
||||
"sessions(id,user_id,started_at,local_date,topic,"
|
||||
"activity,source,imported_at,rounds_hash,updated_at) "
|
||||
"VALUES(?1,?2,?3,?4,?5,?6,?7,?8,?9,?10)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
sqlite3_bind_int64(stmt, 3, started_at);
|
||||
sqlite3_bind_int(stmt, 4, local_date);
|
||||
sqlite3_bind_int(stmt, 5, topic);
|
||||
sqlite3_bind_int(stmt, 6, activity);
|
||||
bind_text(stmt, 7, source != NULL ? source : "app");
|
||||
sqlite3_bind_int64(stmt, 8, now_seconds());
|
||||
sqlite3_bind_int64(stmt, 9, (sqlite3_int64)rhash);
|
||||
sqlite3_bind_int64(stmt, 10, now_seconds());
|
||||
rc = sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
if(rc != SQLITE_DONE)
|
||||
return 0;
|
||||
|
||||
inserted = sqlite3_changes(g_storage.db) > 0;
|
||||
if(inserted) {
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT OR REPLACE INTO "
|
||||
"session_rounds(session_id,round_index,seconds) VALUES(?1,?2,?3)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int(stmt, 2, i);
|
||||
sqlite3_bind_int(stmt, 3, round_times[i]);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
storage_enqueue_sync_session(id);
|
||||
}
|
||||
|
||||
if(out_id != NULL && out_id_size > 0)
|
||||
snprintf(out_id, out_id_size, "db:%s", id);
|
||||
if(inserted)
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session_for_activity(const int *round_times, int round_count, int topic, int activity,
|
||||
char *out_id, size_t out_id_size)
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
struct tm *tm = localtime(&now);
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
int local_date;
|
||||
|
||||
if(tm == NULL)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count && i < MaxRounds; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return 0;
|
||||
local_date = (tm->tm_year + 1900) * 10000 + (tm->tm_mon + 1) * 100 + tm->tm_mday;
|
||||
return insert_session_at_ex((long long)now, local_date, saved, saved_count, topic, activity,
|
||||
"app", out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session_at_for_activity(int local_date, int hour, int minute, int second,
|
||||
const int *round_times, int round_count, int topic,
|
||||
int activity, char *out_id, size_t out_id_size)
|
||||
{
|
||||
struct tm tm;
|
||||
time_t started_at;
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
|
||||
if(local_date <= 0)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count && i < MaxRounds; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return 0;
|
||||
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
tm.tm_year = local_date / 10000 - 1900;
|
||||
tm.tm_mon = (local_date / 100) % 100 - 1;
|
||||
tm.tm_mday = local_date % 100;
|
||||
tm.tm_hour = hour;
|
||||
tm.tm_min = minute;
|
||||
tm.tm_sec = second;
|
||||
tm.tm_isdst = -1;
|
||||
started_at = mktime(&tm);
|
||||
if(started_at == (time_t)-1)
|
||||
return 0;
|
||||
|
||||
return insert_session_at_ex((long long)started_at, local_date, saved, saved_count, topic,
|
||||
activity, "app", out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session(const int *round_times, int round_count, char *out_id, size_t out_id_size)
|
||||
{
|
||||
return storage_save_session_for_activity(round_times, round_count, 0, 0, out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_load_session(const char *path_or_id, int *round_times, int max_rounds, int *year,
|
||||
int *month, int *day, int *hour, int *minute, int *second)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int count = 0;
|
||||
long long started_at = 0;
|
||||
int local_date = 0;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || round_times == NULL || max_rounds <= 0)
|
||||
return 0;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT started_at,local_date FROM sessions WHERE "
|
||||
"id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
started_at = sqlite3_column_int64(stmt, 0);
|
||||
local_date = sqlite3_column_int(stmt, 1);
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
if(started_at == 0)
|
||||
return 0;
|
||||
|
||||
if(year)
|
||||
*year = local_date / 10000;
|
||||
if(month)
|
||||
*month = (local_date / 100) % 100;
|
||||
if(day)
|
||||
*day = local_date % 100;
|
||||
{
|
||||
time_t t = (time_t)started_at;
|
||||
struct tm *tm = localtime(&t);
|
||||
if(tm != NULL) {
|
||||
if(hour)
|
||||
*hour = tm->tm_hour;
|
||||
if(minute)
|
||||
*minute = tm->tm_min;
|
||||
if(second)
|
||||
*second = tm->tm_sec;
|
||||
}
|
||||
}
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT seconds FROM session_rounds WHERE "
|
||||
"session_id=?1 ORDER BY round_index",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
while(count < max_rounds && sqlite3_step(stmt) == SQLITE_ROW)
|
||||
round_times[count++] = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count;
|
||||
}
|
||||
|
||||
int
|
||||
storage_replace_session(const char *path_or_id, const int *round_times, int round_count)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || round_times == NULL || round_count < 0 ||
|
||||
round_count > MaxRounds)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return storage_delete_session(path_or_id);
|
||||
|
||||
exec_sql("BEGIN IMMEDIATE");
|
||||
if(sqlite3_prepare_v2(g_storage.db, "DELETE FROM session_rounds WHERE session_id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
for(int i = 0; i < saved_count; i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT INTO session_rounds(session_id,round_index,seconds) "
|
||||
"VALUES(?1,?2,?3)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int(stmt, 2, i);
|
||||
sqlite3_bind_int(stmt, 3, saved[i]);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET rounds_hash=?2,updated_at=?3 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, (sqlite3_int64)hash_rounds(saved, saved_count));
|
||||
sqlite3_bind_int64(stmt, 3, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
exec_sql("COMMIT");
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
|
||||
fail:
|
||||
if(stmt != NULL)
|
||||
sqlite3_finalize(stmt);
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
storage_rename_session_time(const char *path_or_id, int hour, int minute)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
long long started_at = 0;
|
||||
time_t t;
|
||||
struct tm *tm;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || hour < 0 || hour > 23 || minute < 0 ||
|
||||
minute > 59)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT started_at FROM sessions WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
started_at = sqlite3_column_int64(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
if(started_at == 0)
|
||||
return 0;
|
||||
t = (time_t)started_at;
|
||||
tm = localtime(&t);
|
||||
if(tm == NULL)
|
||||
return 0;
|
||||
tm->tm_hour = hour;
|
||||
tm->tm_min = minute;
|
||||
t = mktime(tm);
|
||||
if(t == (time_t)-1)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET started_at=?2,updated_at=?3 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, (sqlite3_int64)t);
|
||||
sqlite3_bind_int64(stmt, 3, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
storage_delete_session(const char *path_or_id)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)))
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET deleted_at=?2,updated_at=?2 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
storage_append_habits_json(JsonBuilder *json, long long through_seq)
|
||||
{
|
||||
@@ -1736,7 +1392,7 @@ storage_has_orphan_habit_days(void)
|
||||
return found;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
storage_has_sync_account(void)
|
||||
{
|
||||
const char *public_id = storage_get_setting_text(STORAGE_SYNC_PUBLIC_ID_KEY);
|
||||
@@ -1895,6 +1551,107 @@ storage_merge_habit_into(const char *keeper_id, const char *duplicate_id)
|
||||
return ok;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_habit_exists(const char *habit_id)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int exists = 0;
|
||||
|
||||
if(habit_id == NULL || habit_id[0] == '\0')
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT 1 FROM habits WHERE id=?1 LIMIT 1",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, habit_id);
|
||||
exists = sqlite3_step(stmt) == SQLITE_ROW;
|
||||
sqlite3_finalize(stmt);
|
||||
return exists;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_enqueue_habit_days_for_sync(const char *habit_id)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int ok = 1;
|
||||
|
||||
if(habit_id == NULL || habit_id[0] == '\0')
|
||||
return 1;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT local_date FROM habit_days WHERE habit_id=?1 "
|
||||
"AND (completed!=0 OR count>0 OR session_count>0)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, habit_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
if(!storage_enqueue_sync_habit_day(habit_id, sqlite3_column_int(stmt, 0)))
|
||||
ok = 0;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
return ok;
|
||||
}
|
||||
|
||||
int
|
||||
storage_migrate_default_habit_ids(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int sync_activity = 0;
|
||||
int deleted_at = 0;
|
||||
int should_migrate;
|
||||
int has_canonical;
|
||||
int ok = 1;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(get_meta_int64(STORAGE_DEFAULT_HABIT_ID_MIGRATION_KEY, 0))
|
||||
return 1;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT sync_activity,deleted_at FROM habits WHERE id='yoga' LIMIT 1",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) != SQLITE_ROW) {
|
||||
sqlite3_finalize(stmt);
|
||||
set_meta_int64(STORAGE_DEFAULT_HABIT_ID_MIGRATION_KEY, 1);
|
||||
return 1;
|
||||
}
|
||||
sync_activity = sqlite3_column_int(stmt, 0);
|
||||
deleted_at = sqlite3_column_int(stmt, 1);
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
should_migrate = deleted_at == 0 &&
|
||||
(sync_activity & STORAGE_ACTIVITY_SUN_SALUTATION_MASK) != 0;
|
||||
if(!should_migrate) {
|
||||
set_meta_int64(STORAGE_DEFAULT_HABIT_ID_MIGRATION_KEY, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
has_canonical = storage_habit_exists("sun-salutation");
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
return 0;
|
||||
if(has_canonical) {
|
||||
ok = storage_merge_habit_into("sun-salutation", "yoga");
|
||||
} else {
|
||||
ok = exec_sql("UPDATE habits SET id='sun-salutation' WHERE id='yoga';"
|
||||
"UPDATE habit_days SET habit_id='sun-salutation' WHERE habit_id='yoga';");
|
||||
}
|
||||
if(ok) {
|
||||
exec_sql("UPDATE OR IGNORE sync_outbox SET entity_id='sun-salutation' "
|
||||
"WHERE entity_id='yoga' AND entity_type IN ('habit','habit_day');"
|
||||
"DELETE FROM sync_outbox WHERE entity_id='yoga' "
|
||||
"AND entity_type IN ('habit','habit_day');");
|
||||
set_meta_int64(STORAGE_DEFAULT_HABIT_ID_MIGRATION_KEY, 1);
|
||||
ok = exec_sql("COMMIT");
|
||||
} else {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
if(!ok)
|
||||
return 0;
|
||||
|
||||
storage_enqueue_sync_habit("sun-salutation");
|
||||
storage_enqueue_habit_days_for_sync("sun-salutation");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_merge_duplicate_habit_names(void)
|
||||
{
|
||||
@@ -2112,20 +1869,9 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
storage_set_setting_text(STORAGE_SYNC_ACCOUNT_ALIAS_KEY, account_alias);
|
||||
if(storage_json_extract_int64(response_json, "$.full_snapshot_required", 0) != 0 &&
|
||||
get_meta_int64(STORAGE_SYNC_APPLY_REVIEW_KEY, 0) == 0) {
|
||||
if(!storage_sync_review_json_has_visible_diff(response_json)) {
|
||||
char *copy = strdup(response_json);
|
||||
int ok;
|
||||
if(copy == NULL)
|
||||
return 0;
|
||||
if(!storage_clear_local_sync_data()) {
|
||||
free(copy);
|
||||
return 0;
|
||||
}
|
||||
set_meta_int64(STORAGE_SYNC_APPLY_REVIEW_KEY, 1);
|
||||
ok = storage_apply_sync_response_json(copy);
|
||||
free(copy);
|
||||
return ok;
|
||||
}
|
||||
if(!storage_has_any() ||
|
||||
storage_sync_review_json_should_auto_apply_remote(response_json))
|
||||
return storage_apply_remote_full_snapshot(response_json);
|
||||
if(!storage_sync_review_write_json(response_json))
|
||||
return 0;
|
||||
set_meta(STORAGE_SYNC_PENDING_REVIEW_KEY, "1");
|
||||
@@ -2185,6 +1931,27 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_apply_remote_full_snapshot(const char *response_json)
|
||||
{
|
||||
char *copy;
|
||||
int ok;
|
||||
|
||||
if(response_json == NULL)
|
||||
return 0;
|
||||
copy = strdup(response_json);
|
||||
if(copy == NULL)
|
||||
return 0;
|
||||
if(!storage_clear_local_sync_data()) {
|
||||
free(copy);
|
||||
return 0;
|
||||
}
|
||||
set_meta_int64(STORAGE_SYNC_APPLY_REVIEW_KEY, 1);
|
||||
ok = storage_apply_sync_response_json(copy);
|
||||
free(copy);
|
||||
return ok;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_clear_local_sync_data(void)
|
||||
{
|
||||
@@ -2276,84 +2043,6 @@ fail:
|
||||
exec_sql("ROLLBACK");
|
||||
}
|
||||
|
||||
void
|
||||
storage_list_session_records(InbeStorageSessionRecordCallback callback, void *user)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
if(callback == NULL || g_storage.db == NULL)
|
||||
return;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT id,started_at,local_date,topic,activity FROM sessions WHERE "
|
||||
"deleted_at=0 ORDER BY started_at DESC LIMIT 48",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return;
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
char dbid[INBE_STORAGE_ID_SIZE + 4];
|
||||
int rounds[MaxRounds];
|
||||
int count = 0;
|
||||
const char *id = (const char *)sqlite3_column_text(stmt, 0);
|
||||
long long started_at = sqlite3_column_int64(stmt, 1);
|
||||
int local_date = sqlite3_column_int(stmt, 2);
|
||||
int topic = sqlite3_column_int(stmt, 3);
|
||||
int activity = sqlite3_column_int(stmt, 4);
|
||||
int y = local_date / 10000;
|
||||
int m = (local_date / 100) % 100;
|
||||
int d = local_date % 100;
|
||||
int hh = 0, mm = 0, ss = 0;
|
||||
time_t t = (time_t)started_at;
|
||||
struct tm *tm = localtime(&t);
|
||||
if(tm != NULL) {
|
||||
hh = tm->tm_hour;
|
||||
mm = tm->tm_min;
|
||||
ss = tm->tm_sec;
|
||||
}
|
||||
snprintf(dbid, sizeof(dbid), "db:%s", id != NULL ? id : "");
|
||||
count = storage_load_session(dbid, rounds, MaxRounds, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if(count > 0)
|
||||
callback(dbid, y, m, d, hh, mm, ss, topic, activity, rounds, count, user);
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
int
|
||||
storage_has_any(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = storage_session_count();
|
||||
|
||||
if(count > 0)
|
||||
return 1;
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
count = storage_habit_count();
|
||||
if(count > 0)
|
||||
return 1;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT COUNT(*) FROM habit_days WHERE completed!=0 OR count>0", -1,
|
||||
&stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
int
|
||||
storage_session_count(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = 0;
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT COUNT(*) FROM sessions WHERE deleted_at=0", -1,
|
||||
&stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_profile_day_offset(int local_date, int today_date)
|
||||
{
|
||||
@@ -2389,7 +2078,6 @@ storage_profile_activity_stats(int activity, int today_date,
|
||||
int seen[371] = {0};
|
||||
int streak = 0;
|
||||
long avg_value = 0;
|
||||
int mask = 1 << activity;
|
||||
|
||||
if(streak_out != NULL)
|
||||
*streak_out = 0;
|
||||
@@ -2401,19 +2089,11 @@ storage_profile_activity_stats(int activity, int today_date,
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT local_date FROM sessions "
|
||||
"WHERE user_id=?1 AND deleted_at=0 AND activity=?2 "
|
||||
" AND local_date>0 "
|
||||
"UNION "
|
||||
"SELECT hd.local_date "
|
||||
"FROM habit_days hd JOIN habits h ON h.id=hd.habit_id "
|
||||
"WHERE h.user_id=?1 AND h.deleted_at=0 "
|
||||
" AND h.sync_mode=?3 AND (h.sync_activity & ?4)<>0 "
|
||||
" AND (hd.completed!=0 OR hd.count>0)",
|
||||
" AND local_date>0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
sqlite3_bind_int(stmt, 2, activity);
|
||||
sqlite3_bind_int(stmt, 3, INBE_HABIT_SYNC_ACTIVITIES);
|
||||
sqlite3_bind_int(stmt, 4, mask);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
int offset = storage_profile_day_offset(sqlite3_column_int(stmt, 0), today_date);
|
||||
if(offset >= 0 && offset <= 370)
|
||||
@@ -2464,152 +2144,6 @@ storage_profile_activity_stats(int activity, int today_date,
|
||||
return 1;
|
||||
}
|
||||
|
||||
long long
|
||||
storage_total_size(void)
|
||||
{
|
||||
struct stat st;
|
||||
if(!storage_has_any())
|
||||
return 0;
|
||||
if(g_storage.db_path[0] != '\0' && stat(g_storage.db_path, &st) == 0)
|
||||
return (long long)st.st_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
long long
|
||||
storage_delete_all_sessions(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = storage_session_count();
|
||||
int habit_day_count = 0;
|
||||
int habit_count = storage_habit_count();
|
||||
long long deleted_at = now_seconds();
|
||||
int changed = 0;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT COUNT(*) FROM habit_days WHERE completed!=0 OR count>0", -1,
|
||||
&stmt, NULL) == SQLITE_OK) {
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
habit_day_count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
if(count <= 0 && habit_day_count <= 0 && habit_count <= 0)
|
||||
return 0;
|
||||
|
||||
if(!storage_has_sync_account()) {
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
return 0;
|
||||
if(!exec_sql("DELETE FROM session_rounds WHERE session_id IN "
|
||||
"(SELECT id FROM sessions WHERE user_id=(SELECT id FROM users "
|
||||
"LIMIT 1));"
|
||||
"DELETE FROM sessions WHERE user_id=(SELECT id FROM users LIMIT 1);"
|
||||
"DELETE FROM habit_days WHERE habit_id IN "
|
||||
"(SELECT id FROM habits WHERE user_id=(SELECT id FROM users LIMIT "
|
||||
"1));"
|
||||
"DELETE FROM habits WHERE user_id=(SELECT id FROM users LIMIT 1);"
|
||||
"DELETE FROM sync_outbox;")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
set_meta_int64("sync_last_server_version", 0);
|
||||
set_meta_int64("sync_last_upload_at", 0);
|
||||
set_meta_int64("sync_full_upload_done", 0);
|
||||
set_meta_int64(STORAGE_SYNC_BACKFILL_KEY, 0);
|
||||
set_meta_int64(STORAGE_SYNC_HABIT_NAME_REPAIR_KEY, 0);
|
||||
if(!exec_sql("COMMIT")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
storage_schedule_persist();
|
||||
return count + habit_day_count + habit_count;
|
||||
}
|
||||
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT id FROM sessions WHERE user_id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_session((const char *)sqlite3_column_text(stmt, 0));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT habit_id,local_date FROM habit_days "
|
||||
"WHERE habit_id IN (SELECT id FROM habits WHERE user_id=?1) "
|
||||
"AND (completed!=0 OR count>0 OR session_count>0)",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_habit_day((const char *)sqlite3_column_text(stmt, 0),
|
||||
sqlite3_column_int(stmt, 1));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT id FROM habits WHERE user_id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_habit((const char *)sqlite3_column_text(stmt, 0));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET deleted_at=?1,updated_at=?1 "
|
||||
"WHERE user_id=?2 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE habit_days SET "
|
||||
"completed=0,count=0,session_count=0,updated_at=?1 "
|
||||
"WHERE habit_id IN (SELECT id FROM habits WHERE user_id=?2) "
|
||||
" AND (completed!=0 OR count>0 OR session_count>0)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE habits SET deleted_at=?1,updated_at=?1 "
|
||||
"WHERE user_id=?2 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(!exec_sql("COMMIT")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
storage_schedule_persist();
|
||||
return changed > 0 ? count + habit_day_count + habit_count : 0;
|
||||
|
||||
fail:
|
||||
if(stmt != NULL)
|
||||
sqlite3_finalize(stmt);
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
storage_habits_empty(void)
|
||||
|
||||
@@ -89,6 +89,7 @@ int storage_sync_review_details(char **local_out, char **remote_out);
|
||||
int storage_sync_review_diff(char **diff_out);
|
||||
int storage_sync_review_has_visible_diff(void);
|
||||
int storage_sync_review_json_has_visible_diff(const char *json);
|
||||
int storage_sync_review_json_should_auto_apply_remote(const char *json);
|
||||
int storage_sync_review_clear_if_no_visible_diff(void);
|
||||
int storage_sync_review_apply_remote_if_local_empty(void);
|
||||
int storage_apply_pending_sync_review(int use_remote);
|
||||
|
||||
@@ -0,0 +1,581 @@
|
||||
#include "storage.h"
|
||||
|
||||
#include "breath_engine.h"
|
||||
#include "db.h"
|
||||
|
||||
#include <sqlite3.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
static unsigned int
|
||||
hash_rounds(const int *round_times, int round_count)
|
||||
{
|
||||
unsigned int h = 2166136261u;
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
unsigned int v = (unsigned int)round_times[i];
|
||||
h ^= v & 0xffu;
|
||||
h *= 16777619u;
|
||||
h ^= (v >> 8) & 0xffu;
|
||||
h *= 16777619u;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
static void
|
||||
make_session_id(long long started_at, const int *round_times, int round_count, char *out,
|
||||
size_t out_size)
|
||||
{
|
||||
snprintf(out, out_size, "s-%lld-%08x", started_at, hash_rounds(round_times, round_count));
|
||||
}
|
||||
|
||||
static int
|
||||
parse_db_id(const char *path_or_id, char *out, size_t out_size)
|
||||
{
|
||||
if(path_or_id == NULL || path_or_id[0] == '\0')
|
||||
return 0;
|
||||
if(strncmp(path_or_id, "db:", 3) == 0)
|
||||
snprintf(out, out_size, "%s", path_or_id + 3);
|
||||
else
|
||||
snprintf(out, out_size, "%s", path_or_id);
|
||||
return out[0] != '\0';
|
||||
}
|
||||
|
||||
int
|
||||
insert_session_at_ex(long long started_at, int local_date, const int *round_times, int round_count,
|
||||
int topic, int activity, const char *source, char *out_id, size_t out_id_size)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int rc;
|
||||
int inserted;
|
||||
unsigned int rhash;
|
||||
|
||||
if(g_storage.db == NULL || round_times == NULL || round_count <= 0 || round_count > MaxRounds)
|
||||
return 0;
|
||||
|
||||
rhash = hash_rounds(round_times, round_count);
|
||||
make_session_id(started_at, round_times, round_count, id, sizeof(id));
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT OR IGNORE INTO "
|
||||
"sessions(id,user_id,started_at,local_date,topic,"
|
||||
"activity,source,imported_at,rounds_hash,updated_at) "
|
||||
"VALUES(?1,?2,?3,?4,?5,?6,?7,?8,?9,?10)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
sqlite3_bind_int64(stmt, 3, started_at);
|
||||
sqlite3_bind_int(stmt, 4, local_date);
|
||||
sqlite3_bind_int(stmt, 5, topic);
|
||||
sqlite3_bind_int(stmt, 6, activity);
|
||||
bind_text(stmt, 7, source != NULL ? source : "app");
|
||||
sqlite3_bind_int64(stmt, 8, now_seconds());
|
||||
sqlite3_bind_int64(stmt, 9, (sqlite3_int64)rhash);
|
||||
sqlite3_bind_int64(stmt, 10, now_seconds());
|
||||
rc = sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
if(rc != SQLITE_DONE)
|
||||
return 0;
|
||||
|
||||
inserted = sqlite3_changes(g_storage.db) > 0;
|
||||
if(inserted) {
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT OR REPLACE INTO "
|
||||
"session_rounds(session_id,round_index,seconds) VALUES(?1,?2,?3)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int(stmt, 2, i);
|
||||
sqlite3_bind_int(stmt, 3, round_times[i]);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
storage_enqueue_sync_session(id);
|
||||
}
|
||||
|
||||
if(out_id != NULL && out_id_size > 0)
|
||||
snprintf(out_id, out_id_size, "db:%s", id);
|
||||
if(inserted)
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session_for_activity(const int *round_times, int round_count, int topic, int activity,
|
||||
char *out_id, size_t out_id_size)
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
struct tm *tm = localtime(&now);
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
int local_date;
|
||||
|
||||
if(tm == NULL)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count && i < MaxRounds; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return 0;
|
||||
local_date = (tm->tm_year + 1900) * 10000 + (tm->tm_mon + 1) * 100 + tm->tm_mday;
|
||||
return insert_session_at_ex((long long)now, local_date, saved, saved_count, topic, activity,
|
||||
"app", out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session_at_for_activity(int local_date, int hour, int minute, int second,
|
||||
const int *round_times, int round_count, int topic,
|
||||
int activity, char *out_id, size_t out_id_size)
|
||||
{
|
||||
struct tm tm;
|
||||
time_t started_at;
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
|
||||
if(local_date <= 0)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count && i < MaxRounds; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return 0;
|
||||
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
tm.tm_year = local_date / 10000 - 1900;
|
||||
tm.tm_mon = (local_date / 100) % 100 - 1;
|
||||
tm.tm_mday = local_date % 100;
|
||||
tm.tm_hour = hour;
|
||||
tm.tm_min = minute;
|
||||
tm.tm_sec = second;
|
||||
tm.tm_isdst = -1;
|
||||
started_at = mktime(&tm);
|
||||
if(started_at == (time_t)-1)
|
||||
return 0;
|
||||
|
||||
return insert_session_at_ex((long long)started_at, local_date, saved, saved_count, topic,
|
||||
activity, "app", out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_save_session(const int *round_times, int round_count, char *out_id, size_t out_id_size)
|
||||
{
|
||||
return storage_save_session_for_activity(round_times, round_count, 0, 0, out_id, out_id_size);
|
||||
}
|
||||
|
||||
int
|
||||
storage_load_session(const char *path_or_id, int *round_times, int max_rounds, int *year,
|
||||
int *month, int *day, int *hour, int *minute, int *second)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int count = 0;
|
||||
long long started_at = 0;
|
||||
int local_date = 0;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || round_times == NULL || max_rounds <= 0)
|
||||
return 0;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT started_at,local_date FROM sessions WHERE "
|
||||
"id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
started_at = sqlite3_column_int64(stmt, 0);
|
||||
local_date = sqlite3_column_int(stmt, 1);
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
if(started_at == 0)
|
||||
return 0;
|
||||
|
||||
if(year)
|
||||
*year = local_date / 10000;
|
||||
if(month)
|
||||
*month = (local_date / 100) % 100;
|
||||
if(day)
|
||||
*day = local_date % 100;
|
||||
{
|
||||
time_t t = (time_t)started_at;
|
||||
struct tm *tm = localtime(&t);
|
||||
if(tm != NULL) {
|
||||
if(hour)
|
||||
*hour = tm->tm_hour;
|
||||
if(minute)
|
||||
*minute = tm->tm_min;
|
||||
if(second)
|
||||
*second = tm->tm_sec;
|
||||
}
|
||||
}
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT seconds FROM session_rounds WHERE "
|
||||
"session_id=?1 ORDER BY round_index",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
while(count < max_rounds && sqlite3_step(stmt) == SQLITE_ROW)
|
||||
round_times[count++] = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count;
|
||||
}
|
||||
|
||||
int
|
||||
storage_replace_session(const char *path_or_id, const int *round_times, int round_count)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
int saved[MaxRounds];
|
||||
int saved_count = 0;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || round_times == NULL || round_count < 0 ||
|
||||
round_count > MaxRounds)
|
||||
return 0;
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
if(round_times[i] > 0)
|
||||
saved[saved_count++] = round_times[i];
|
||||
}
|
||||
if(saved_count <= 0)
|
||||
return storage_delete_session(path_or_id);
|
||||
|
||||
exec_sql("BEGIN IMMEDIATE");
|
||||
if(sqlite3_prepare_v2(g_storage.db, "DELETE FROM session_rounds WHERE session_id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
for(int i = 0; i < saved_count; i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT INTO session_rounds(session_id,round_index,seconds) "
|
||||
"VALUES(?1,?2,?3)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int(stmt, 2, i);
|
||||
sqlite3_bind_int(stmt, 3, saved[i]);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET rounds_hash=?2,updated_at=?3 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, (sqlite3_int64)hash_rounds(saved, saved_count));
|
||||
sqlite3_bind_int64(stmt, 3, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
exec_sql("COMMIT");
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
|
||||
fail:
|
||||
if(stmt != NULL)
|
||||
sqlite3_finalize(stmt);
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
storage_rename_session_time(const char *path_or_id, int hour, int minute)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
long long started_at = 0;
|
||||
time_t t;
|
||||
struct tm *tm;
|
||||
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)) || hour < 0 || hour > 23 || minute < 0 ||
|
||||
minute > 59)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT started_at FROM sessions WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
started_at = sqlite3_column_int64(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
if(started_at == 0)
|
||||
return 0;
|
||||
t = (time_t)started_at;
|
||||
tm = localtime(&t);
|
||||
if(tm == NULL)
|
||||
return 0;
|
||||
tm->tm_hour = hour;
|
||||
tm->tm_min = minute;
|
||||
t = mktime(tm);
|
||||
if(t == (time_t)-1)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET started_at=?2,updated_at=?3 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, (sqlite3_int64)t);
|
||||
sqlite3_bind_int64(stmt, 3, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
storage_delete_session(const char *path_or_id)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
if(!parse_db_id(path_or_id, id, sizeof(id)))
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET deleted_at=?2,updated_at=?2 WHERE id=?1", -1, &stmt,
|
||||
NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, id);
|
||||
sqlite3_bind_int64(stmt, 2, now_seconds());
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
storage_enqueue_sync_session(id);
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
storage_list_session_records(InbeStorageSessionRecordCallback callback, void *user)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
if(callback == NULL || g_storage.db == NULL)
|
||||
return;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT id,started_at,local_date,topic,activity FROM sessions WHERE "
|
||||
"deleted_at=0 ORDER BY started_at DESC LIMIT 48",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return;
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
char dbid[INBE_STORAGE_ID_SIZE + 4];
|
||||
int rounds[MaxRounds];
|
||||
int count = 0;
|
||||
const char *id = (const char *)sqlite3_column_text(stmt, 0);
|
||||
long long started_at = sqlite3_column_int64(stmt, 1);
|
||||
int local_date = sqlite3_column_int(stmt, 2);
|
||||
int topic = sqlite3_column_int(stmt, 3);
|
||||
int activity = sqlite3_column_int(stmt, 4);
|
||||
int y = local_date / 10000;
|
||||
int m = (local_date / 100) % 100;
|
||||
int d = local_date % 100;
|
||||
int hh = 0, mm = 0, ss = 0;
|
||||
time_t t = (time_t)started_at;
|
||||
struct tm *tm = localtime(&t);
|
||||
if(tm != NULL) {
|
||||
hh = tm->tm_hour;
|
||||
mm = tm->tm_min;
|
||||
ss = tm->tm_sec;
|
||||
}
|
||||
snprintf(dbid, sizeof(dbid), "db:%s", id != NULL ? id : "");
|
||||
count = storage_load_session(dbid, rounds, MaxRounds, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if(count > 0)
|
||||
callback(dbid, y, m, d, hh, mm, ss, topic, activity, rounds, count, user);
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
int
|
||||
storage_has_any(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = storage_session_count();
|
||||
|
||||
if(count > 0)
|
||||
return 1;
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
count = storage_habit_count();
|
||||
if(count > 0)
|
||||
return 1;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT COUNT(*) FROM habit_days WHERE completed!=0 OR count>0", -1,
|
||||
&stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
int
|
||||
storage_session_count(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = 0;
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT COUNT(*) FROM sessions WHERE deleted_at=0", -1,
|
||||
&stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count;
|
||||
}
|
||||
|
||||
long long
|
||||
storage_total_size(void)
|
||||
{
|
||||
struct stat st;
|
||||
if(!storage_has_any())
|
||||
return 0;
|
||||
if(g_storage.db_path[0] != '\0' && stat(g_storage.db_path, &st) == 0)
|
||||
return (long long)st.st_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
long long
|
||||
storage_delete_all_sessions(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = storage_session_count();
|
||||
int habit_day_count = 0;
|
||||
int habit_count = storage_habit_count();
|
||||
long long deleted_at = now_seconds();
|
||||
int changed = 0;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT COUNT(*) FROM habit_days WHERE completed!=0 OR count>0", -1,
|
||||
&stmt, NULL) == SQLITE_OK) {
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
habit_day_count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
if(count <= 0 && habit_day_count <= 0 && habit_count <= 0)
|
||||
return 0;
|
||||
|
||||
if(!storage_has_sync_account()) {
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
return 0;
|
||||
if(!exec_sql("DELETE FROM session_rounds WHERE session_id IN "
|
||||
"(SELECT id FROM sessions WHERE user_id=(SELECT id FROM users "
|
||||
"LIMIT 1));"
|
||||
"DELETE FROM sessions WHERE user_id=(SELECT id FROM users LIMIT 1);"
|
||||
"DELETE FROM habit_days WHERE habit_id IN "
|
||||
"(SELECT id FROM habits WHERE user_id=(SELECT id FROM users LIMIT "
|
||||
"1));"
|
||||
"DELETE FROM habits WHERE user_id=(SELECT id FROM users LIMIT 1);"
|
||||
"DELETE FROM sync_outbox;")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
set_meta_int64("sync_last_server_version", 0);
|
||||
set_meta_int64("sync_last_upload_at", 0);
|
||||
set_meta_int64("sync_full_upload_done", 0);
|
||||
set_meta_int64("sync_backfill_v2_done", 0);
|
||||
set_meta_int64("sync_habit_name_repair_v1_done", 0);
|
||||
if(!exec_sql("COMMIT")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
storage_schedule_persist();
|
||||
return count + habit_day_count + habit_count;
|
||||
}
|
||||
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT id FROM sessions WHERE user_id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_session((const char *)sqlite3_column_text(stmt, 0));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT habit_id,local_date FROM habit_days "
|
||||
"WHERE habit_id IN (SELECT id FROM habits WHERE user_id=?1) "
|
||||
"AND (completed!=0 OR count>0 OR session_count>0)",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_habit_day((const char *)sqlite3_column_text(stmt, 0),
|
||||
sqlite3_column_int(stmt, 1));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db, "SELECT id FROM habits WHERE user_id=?1 AND deleted_at=0",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
storage_enqueue_sync_habit((const char *)sqlite3_column_text(stmt, 0));
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE sessions SET deleted_at=?1,updated_at=?1 "
|
||||
"WHERE user_id=?2 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE habit_days SET "
|
||||
"completed=0,count=0,session_count=0,updated_at=?1 "
|
||||
"WHERE habit_id IN (SELECT id FROM habits WHERE user_id=?2) "
|
||||
" AND (completed!=0 OR count>0 OR session_count>0)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"UPDATE habits SET deleted_at=?1,updated_at=?1 "
|
||||
"WHERE user_id=?2 AND deleted_at=0",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
goto fail;
|
||||
sqlite3_bind_int64(stmt, 1, deleted_at);
|
||||
bind_text(stmt, 2, g_storage.user_id);
|
||||
if(sqlite3_step(stmt) != SQLITE_DONE)
|
||||
goto fail;
|
||||
changed += sqlite3_changes(g_storage.db);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
|
||||
if(!exec_sql("COMMIT")) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
storage_schedule_persist();
|
||||
return changed > 0 ? count + habit_day_count + habit_count : 0;
|
||||
|
||||
fail:
|
||||
if(stmt != NULL)
|
||||
sqlite3_finalize(stmt);
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
+150
-15
@@ -11,6 +11,7 @@
|
||||
#define STORAGE_SYNC_APPLY_REVIEW_KEY "sync_apply_pending_review"
|
||||
#define STORAGE_SYNC_FULL_REPLACE_KEY "sync_full_replace_requested"
|
||||
#define STORAGE_SYNC_LAST_SERVER_HASH_KEY "sync_last_server_state_hash"
|
||||
#define STORAGE_SYNC_AUTO_APPLY_VISIBLE_CHANGE_LIMIT 2
|
||||
|
||||
typedef struct ReviewText {
|
||||
char *data;
|
||||
@@ -23,8 +24,12 @@ static void review_append_local(ReviewText *out);
|
||||
static void review_append_remote(ReviewText *out, const char *json);
|
||||
static void review_append_unique_lines(ReviewText *out, const char *prefix,
|
||||
const char *lines, const char *other);
|
||||
static int review_has_local_activity(void);
|
||||
static int review_has_pending_outbox(void);
|
||||
static int review_pending_outbox_sessions_only(void);
|
||||
static int review_has_unknown_activity(const char *json);
|
||||
static int review_small_session_only_change(const char *diff);
|
||||
static int review_visible_change_count(const char *diff);
|
||||
|
||||
static int
|
||||
review_reserve(ReviewText *text, size_t extra)
|
||||
@@ -92,21 +97,9 @@ review_appendf(ReviewText *text, const char *fmt, ...)
|
||||
static void
|
||||
storage_sync_review_path(char *out, size_t out_size)
|
||||
{
|
||||
const char *name = "sync-review.json";
|
||||
size_t root_len;
|
||||
size_t name_len;
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
root_len = strlen(g_storage.root);
|
||||
name_len = strlen(name);
|
||||
if(root_len + 1 + name_len + 1 > out_size) {
|
||||
if(!storage_join_path(out, out_size, g_storage.root, "sync-review.json") &&
|
||||
out != NULL && out_size > 0)
|
||||
out[0] = '\0';
|
||||
return;
|
||||
}
|
||||
memcpy(out, g_storage.root, root_len);
|
||||
out[root_len] = '/';
|
||||
memcpy(out + root_len + 1, name, name_len + 1);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -596,7 +589,7 @@ storage_sync_review_apply_remote_if_local_empty(void)
|
||||
{
|
||||
if(!storage_sync_review_pending())
|
||||
return 0;
|
||||
if(storage_has_any())
|
||||
if(review_has_local_activity())
|
||||
return 0;
|
||||
return storage_apply_pending_sync_review(1);
|
||||
}
|
||||
@@ -617,6 +610,59 @@ storage_sync_review_json_has_visible_diff(const char *json)
|
||||
return has_diff;
|
||||
}
|
||||
|
||||
int
|
||||
storage_sync_review_json_should_auto_apply_remote(const char *json)
|
||||
{
|
||||
char *diff = NULL;
|
||||
int result;
|
||||
|
||||
if(review_has_unknown_activity(json))
|
||||
return 0;
|
||||
if(!storage_sync_review_diff_for_json(json, 0, &diff)) {
|
||||
free(diff);
|
||||
return 0;
|
||||
}
|
||||
if(diff == NULL || diff[0] == '\0') {
|
||||
free(diff);
|
||||
return 1;
|
||||
}
|
||||
if(!review_has_local_activity()) {
|
||||
free(diff);
|
||||
return 1;
|
||||
}
|
||||
if(!review_has_pending_outbox()) {
|
||||
free(diff);
|
||||
return 1;
|
||||
}
|
||||
result = review_small_session_only_change(diff);
|
||||
free(diff);
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
review_has_local_activity(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int result = 0;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT EXISTS("
|
||||
" SELECT 1 FROM sessions WHERE deleted_at=0"
|
||||
" UNION ALL"
|
||||
" SELECT 1 FROM habit_days "
|
||||
" WHERE completed!=0 OR count>0 OR session_count>0"
|
||||
" LIMIT 1"
|
||||
")",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 1;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
result = sqlite3_column_int(stmt, 0) != 0;
|
||||
sqlite3_finalize(stmt);
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
review_has_pending_outbox(void)
|
||||
{
|
||||
@@ -635,6 +681,25 @@ review_has_pending_outbox(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
review_pending_outbox_sessions_only(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int result = 0;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT EXISTS(SELECT 1 FROM sync_outbox LIMIT 1) "
|
||||
"AND NOT EXISTS(SELECT 1 FROM sync_outbox WHERE entity_type<>'session')",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
result = sqlite3_column_int(stmt, 0) != 0;
|
||||
sqlite3_finalize(stmt);
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
review_has_unknown_activity(const char *json)
|
||||
{
|
||||
@@ -673,6 +738,76 @@ review_has_unknown_activity(const char *json)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
review_small_session_only_change(const char *diff)
|
||||
{
|
||||
int count;
|
||||
|
||||
if(!review_pending_outbox_sessions_only())
|
||||
return 0;
|
||||
count = review_visible_change_count(diff);
|
||||
return count > 0 && count <= STORAGE_SYNC_AUTO_APPLY_VISIBLE_CHANGE_LIMIT;
|
||||
}
|
||||
|
||||
static int
|
||||
review_line_starts_with_date(const char *line, size_t len)
|
||||
{
|
||||
if(line == NULL || len < 10)
|
||||
return 0;
|
||||
return line[0] >= '0' && line[0] <= '9' &&
|
||||
line[1] >= '0' && line[1] <= '9' &&
|
||||
line[2] >= '0' && line[2] <= '9' &&
|
||||
line[3] >= '0' && line[3] <= '9' &&
|
||||
line[4] == '-' &&
|
||||
line[5] >= '0' && line[5] <= '9' &&
|
||||
line[6] >= '0' && line[6] <= '9' &&
|
||||
line[7] == '-' &&
|
||||
line[8] >= '0' && line[8] <= '9' &&
|
||||
line[9] >= '0' && line[9] <= '9';
|
||||
}
|
||||
|
||||
static int
|
||||
review_line_equals_literal(const char *line, size_t len, const char *literal)
|
||||
{
|
||||
size_t literal_len;
|
||||
|
||||
if(line == NULL || literal == NULL)
|
||||
return 0;
|
||||
literal_len = strlen(literal);
|
||||
return len == literal_len && strncmp(line, literal, len) == 0;
|
||||
}
|
||||
|
||||
static int
|
||||
review_visible_change_count(const char *diff)
|
||||
{
|
||||
const char *p = diff;
|
||||
const char *line;
|
||||
const char *end;
|
||||
size_t len;
|
||||
int date_lines = 0;
|
||||
int changed_lines = 0;
|
||||
|
||||
if(diff == NULL)
|
||||
return 0;
|
||||
while(*p != '\0') {
|
||||
end = strchr(p, '\n');
|
||||
len = end != NULL ? (size_t)(end - p) : strlen(p);
|
||||
if(len > 2 && (p[0] == '-' || p[0] == '+') && p[1] == ' ') {
|
||||
line = p + 2;
|
||||
len -= 2;
|
||||
if(review_line_starts_with_date(line, len))
|
||||
date_lines++;
|
||||
else if(!review_line_equals_literal(line, len, "Sessions") &&
|
||||
!review_line_equals_literal(line, len, "Habit days"))
|
||||
changed_lines++;
|
||||
}
|
||||
if(end == NULL)
|
||||
break;
|
||||
p = end + 1;
|
||||
}
|
||||
return date_lines > 0 ? date_lines : changed_lines;
|
||||
}
|
||||
|
||||
int
|
||||
storage_apply_pending_sync_review(int use_remote)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
#include "app/app.h"
|
||||
#include "app/app_nav.h"
|
||||
#include "flint_locale.h"
|
||||
#include "flint_ui.h"
|
||||
#include "screens/settings/settings_screen.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int view_width = 320;
|
||||
int view_height = 560;
|
||||
|
||||
static int failures = 0;
|
||||
static int mouse_released = 0;
|
||||
static int bottom_nav_draw_count = 0;
|
||||
static int bottom_nav_clicked_route = APP_NAV_ROUTE_NONE;
|
||||
static int save_settings_count = 0;
|
||||
static int reset_settings_preview_count = 0;
|
||||
static int settings_status_clear_count = 0;
|
||||
|
||||
static void
|
||||
expect(int condition, const char *message)
|
||||
{
|
||||
if(!condition) {
|
||||
fprintf(stderr, "FAIL %s\n", message);
|
||||
failures++;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reset_state(void)
|
||||
{
|
||||
mouse_released = 0;
|
||||
bottom_nav_draw_count = 0;
|
||||
bottom_nav_clicked_route = APP_NAV_ROUTE_NONE;
|
||||
save_settings_count = 0;
|
||||
reset_settings_preview_count = 0;
|
||||
settings_status_clear_count = 0;
|
||||
view_width = 320;
|
||||
view_height = 560;
|
||||
app_set_android_bottom_nav_height(0);
|
||||
}
|
||||
|
||||
bool
|
||||
IsMouseButtonReleased(int button)
|
||||
{
|
||||
return button == MOUSE_BUTTON_LEFT && mouse_released;
|
||||
}
|
||||
|
||||
void
|
||||
DrawRectangle(int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
(void)posX;
|
||||
(void)posY;
|
||||
(void)width;
|
||||
(void)height;
|
||||
(void)color;
|
||||
}
|
||||
|
||||
int
|
||||
ui_bottom_nav_height(void)
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
|
||||
FlintUIBottomNavResult
|
||||
ui_draw_bottom_nav(FlintUIBottomNav nav)
|
||||
{
|
||||
(void)nav;
|
||||
bottom_nav_draw_count++;
|
||||
return (FlintUIBottomNavResult){
|
||||
.clicked_route = bottom_nav_clicked_route,
|
||||
.clicked_index = bottom_nav_clicked_route == APP_NAV_ROUTE_NONE ? -1 : 0,
|
||||
.y = 520,
|
||||
.height = 40
|
||||
};
|
||||
}
|
||||
|
||||
const char *
|
||||
locale_get(const char *key)
|
||||
{
|
||||
return key != NULL ? key : "";
|
||||
}
|
||||
|
||||
int
|
||||
clampi(int value, int min, int max)
|
||||
{
|
||||
if(value < min)
|
||||
return min;
|
||||
if(value > max)
|
||||
return max;
|
||||
return value;
|
||||
}
|
||||
|
||||
void
|
||||
app_switch_screen(InbeApp *app, int screen)
|
||||
{
|
||||
if(app != NULL)
|
||||
app->inbe.screen = screen;
|
||||
}
|
||||
|
||||
void
|
||||
app_leave_practice_config(InbeApp *app)
|
||||
{
|
||||
if(app != NULL)
|
||||
app->practice_tab = PRACTICE_TAB_PLAY;
|
||||
}
|
||||
|
||||
void
|
||||
save_settings(InbeApp *app)
|
||||
{
|
||||
(void)app;
|
||||
save_settings_count++;
|
||||
}
|
||||
|
||||
void
|
||||
reset_settings_preview(InbeApp *app)
|
||||
{
|
||||
(void)app;
|
||||
reset_settings_preview_count++;
|
||||
}
|
||||
|
||||
void
|
||||
settings_screen_clear_status(void)
|
||||
{
|
||||
settings_status_clear_count++;
|
||||
}
|
||||
|
||||
#include "../src/app/app_nav.c"
|
||||
|
||||
static InbeApp
|
||||
test_app(void)
|
||||
{
|
||||
InbeApp app;
|
||||
|
||||
memset(&app, 0, sizeof(app));
|
||||
app.inbe.screen = InbeScreenStart;
|
||||
app.inbe.frame = 42;
|
||||
app.practice_tab = PRACTICE_TAB_PLAY;
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE;
|
||||
return app;
|
||||
}
|
||||
|
||||
static void
|
||||
test_same_frame_modal_close_consumes_bottom_nav_click(void)
|
||||
{
|
||||
InbeApp app = test_app();
|
||||
|
||||
reset_state();
|
||||
app.modal_input_block_frame = app.inbe.frame;
|
||||
mouse_released = 1;
|
||||
bottom_nav_clicked_route = APP_NAV_ROUTE_SETTINGS;
|
||||
|
||||
app_draw_bottom_nav(&app);
|
||||
|
||||
expect(bottom_nav_draw_count == 0,
|
||||
"same-frame modal close must skip bottom nav draw");
|
||||
expect(app.inbe.screen == InbeScreenStart,
|
||||
"same-frame modal close must not route to settings");
|
||||
expect(reset_settings_preview_count == 0,
|
||||
"same-frame modal close must not run settings route side effects");
|
||||
}
|
||||
|
||||
static void
|
||||
test_unblocked_bottom_nav_click_still_routes(void)
|
||||
{
|
||||
InbeApp app = test_app();
|
||||
|
||||
reset_state();
|
||||
app.modal_input_block_frame = app.inbe.frame - 1;
|
||||
mouse_released = 1;
|
||||
bottom_nav_clicked_route = APP_NAV_ROUTE_SETTINGS;
|
||||
|
||||
app_draw_bottom_nav(&app);
|
||||
|
||||
expect(bottom_nav_draw_count == 1,
|
||||
"unblocked frame should draw bottom nav");
|
||||
expect(app.inbe.screen == InbeScreenSettings,
|
||||
"unblocked bottom nav click should route to settings");
|
||||
expect(reset_settings_preview_count == 1,
|
||||
"settings route should reset preview");
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
test_same_frame_modal_close_consumes_bottom_nav_click();
|
||||
test_unblocked_bottom_nav_click_still_routes();
|
||||
|
||||
if(failures > 0) {
|
||||
fprintf(stderr, "%d app bottom nav test failure(s)\n", failures);
|
||||
return 1;
|
||||
}
|
||||
printf("app bottom nav tests passed\n");
|
||||
return 0;
|
||||
}
|
||||
+177
-7
@@ -5,7 +5,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
enum {
|
||||
MAX_KEYS = 1024,
|
||||
MAX_KEYS = 2048,
|
||||
MAX_KEY_LEN = 128,
|
||||
MAX_PATH_LEN = 512
|
||||
};
|
||||
@@ -145,7 +145,8 @@ check_locale_file(const LocaleKeys *english, const char *path)
|
||||
}
|
||||
|
||||
static void
|
||||
scan_locale_get_calls_in_file(const LocaleKeys *english, const char *path)
|
||||
scan_locale_literal_calls_in_file(const LocaleKeys *english, const char *path,
|
||||
const char *pattern)
|
||||
{
|
||||
FILE *fp;
|
||||
char line[2048];
|
||||
@@ -158,12 +159,21 @@ scan_locale_get_calls_in_file(const LocaleKeys *english, const char *path)
|
||||
while(fgets(line, sizeof(line), fp) != NULL) {
|
||||
char *cursor = line;
|
||||
line_no++;
|
||||
while((cursor = strstr(cursor, "locale_get(\"")) != NULL) {
|
||||
while((cursor = strstr(cursor, pattern)) != NULL) {
|
||||
char key[MAX_KEY_LEN];
|
||||
char *start = cursor + strlen("locale_get(\"");
|
||||
char *end = strchr(start, '"');
|
||||
char *start = cursor + strlen(pattern);
|
||||
char *end;
|
||||
size_t len;
|
||||
|
||||
if(*start != '"') {
|
||||
if(strcmp(pattern, "locale_format(") != 0 ||
|
||||
(start = strchr(start, '"')) == NULL) {
|
||||
cursor = start != NULL ? start : cursor + strlen(pattern);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
start++;
|
||||
end = strchr(start, '"');
|
||||
if(end == NULL)
|
||||
break;
|
||||
len = (size_t)(end - start);
|
||||
@@ -172,7 +182,7 @@ scan_locale_get_calls_in_file(const LocaleKeys *english, const char *path)
|
||||
memcpy(key, start, len);
|
||||
key[len] = '\0';
|
||||
if(!keys_contains(english, key)) {
|
||||
fprintf(stderr, "FAIL %s:%d locale_get missing English key [%s]\n",
|
||||
fprintf(stderr, "FAIL %s:%d locale call missing English key [%s]\n",
|
||||
path, line_no, key);
|
||||
failures++;
|
||||
}
|
||||
@@ -182,6 +192,160 @@ scan_locale_get_calls_in_file(const LocaleKeys *english, const char *path)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void
|
||||
scan_locale_get_calls_in_file(const LocaleKeys *english, const char *path)
|
||||
{
|
||||
scan_locale_literal_calls_in_file(english, path, "locale_get(");
|
||||
scan_locale_literal_calls_in_file(english, path, "locale_format(");
|
||||
}
|
||||
|
||||
static void
|
||||
scan_used_locale_literal_calls_in_file(const LocaleKeys *english, LocaleKeys *used,
|
||||
const char *path, const char *pattern)
|
||||
{
|
||||
FILE *fp;
|
||||
char line[2048];
|
||||
|
||||
fp = fopen(path, "rb");
|
||||
if(fp == NULL)
|
||||
return;
|
||||
|
||||
while(fgets(line, sizeof(line), fp) != NULL) {
|
||||
char *cursor = line;
|
||||
while((cursor = strstr(cursor, pattern)) != NULL) {
|
||||
char key[MAX_KEY_LEN];
|
||||
char *start = cursor + strlen(pattern);
|
||||
char *end;
|
||||
size_t len;
|
||||
|
||||
if(*start != '"') {
|
||||
if(strcmp(pattern, "locale_format(") != 0 ||
|
||||
(start = strchr(start, '"')) == NULL) {
|
||||
cursor = start != NULL ? start : cursor + strlen(pattern);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
start++;
|
||||
end = strchr(start, '"');
|
||||
if(end == NULL)
|
||||
break;
|
||||
len = (size_t)(end - start);
|
||||
if(len >= sizeof(key))
|
||||
len = sizeof(key) - 1;
|
||||
memcpy(key, start, len);
|
||||
key[len] = '\0';
|
||||
if(keys_contains(english, key))
|
||||
keys_add(used, key);
|
||||
cursor = end + 1;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void
|
||||
scan_used_locale_get_calls_in_file(const LocaleKeys *english, LocaleKeys *used,
|
||||
const char *path)
|
||||
{
|
||||
scan_used_locale_literal_calls_in_file(english, used, path, "locale_get(");
|
||||
scan_used_locale_literal_calls_in_file(english, used, path, "locale_format(");
|
||||
}
|
||||
|
||||
static void
|
||||
scan_used_locale_get_calls_in_dir(const LocaleKeys *english, LocaleKeys *used,
|
||||
const char *dir_path)
|
||||
{
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
|
||||
dir = opendir(dir_path);
|
||||
if(dir == NULL)
|
||||
return;
|
||||
while((entry = readdir(dir)) != NULL) {
|
||||
char path[MAX_PATH_LEN];
|
||||
struct stat st;
|
||||
const char *name = entry->d_name;
|
||||
size_t len = strlen(name);
|
||||
|
||||
if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
|
||||
continue;
|
||||
snprintf(path, sizeof(path), "%s/%s", dir_path, name);
|
||||
if(stat(path, &st) != 0)
|
||||
continue;
|
||||
if(S_ISDIR(st.st_mode)) {
|
||||
scan_used_locale_get_calls_in_dir(english, used, path);
|
||||
} else if(len > 2 && strcmp(name + len - 2, ".c") == 0) {
|
||||
scan_used_locale_get_calls_in_file(english, used, path);
|
||||
} else if(len > 2 && strcmp(name + len - 2, ".h") == 0) {
|
||||
scan_used_locale_get_calls_in_file(english, used, path);
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
}
|
||||
|
||||
static void
|
||||
add_dynamic_locale_keys(LocaleKeys *used)
|
||||
{
|
||||
static const char *const keys[] = {
|
||||
"exercise_wim_hof",
|
||||
"exercise_meditation",
|
||||
"exercise_sun_salutation",
|
||||
"profile_guide_social",
|
||||
"profile_guide_social_no_account",
|
||||
"meditation_music_download_button",
|
||||
"meditation_music_redownload_button",
|
||||
"sync_alias_title",
|
||||
"sync_alias_change_title",
|
||||
"sync_alias_message",
|
||||
"sync_alias_change_message",
|
||||
"sync_alias_register_button",
|
||||
"sync_alias_save_button",
|
||||
"skip_button",
|
||||
"close_button",
|
||||
"sync_review_using_remote",
|
||||
"sync_review_keeping_local",
|
||||
"habit_stats_no_rounds_month",
|
||||
"habit_stats_no_rounds_week",
|
||||
"habit_stats_day_singular",
|
||||
"habit_stats_day_plural",
|
||||
"session_count_singular",
|
||||
"session_count_plural",
|
||||
"deleted_sessions",
|
||||
"sync_pull_ok",
|
||||
"sync_pull_conflict",
|
||||
"sync_push_ok",
|
||||
"sync_push_failed",
|
||||
"sync_sign_failed",
|
||||
"sync_invalid_account",
|
||||
"sync_server_unreachable",
|
||||
"sync_server_error"
|
||||
};
|
||||
|
||||
for(size_t i = 0; i < sizeof(keys) / sizeof(keys[0]); i++)
|
||||
keys_add(used, keys[i]);
|
||||
for(int i = 1; i <= 12; i++) {
|
||||
char key[MAX_KEY_LEN];
|
||||
snprintf(key, sizeof(key), "sun_salutation_step_%d", i);
|
||||
keys_add(used, key);
|
||||
}
|
||||
keys_add(used, "tutorial_step_intro");
|
||||
keys_add(used, "tutorial_step_method");
|
||||
keys_add(used, "tutorial_step_breathe");
|
||||
keys_add(used, "tutorial_step_exhale_hold");
|
||||
keys_add(used, "tutorial_step_inhale_hold");
|
||||
}
|
||||
|
||||
static void
|
||||
check_unused_english_keys(const LocaleKeys *english, const LocaleKeys *used)
|
||||
{
|
||||
for(int i = 0; i < english->count; i++) {
|
||||
if(!keys_contains(used, english->keys[i])) {
|
||||
fprintf(stderr, "FAIL locales/en.txt unused key [%s]\n",
|
||||
english->keys[i]);
|
||||
failures++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
scan_locale_get_calls_in_dir(const LocaleKeys *english, const char *dir_path)
|
||||
{
|
||||
@@ -217,13 +381,19 @@ int
|
||||
main(void)
|
||||
{
|
||||
LocaleKeys english;
|
||||
LocaleKeys used;
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
|
||||
if(!load_locale_keys("locales/en.txt", &english))
|
||||
return 1;
|
||||
memset(&used, 0, sizeof(used));
|
||||
scan_locale_get_calls_in_dir(&english, "src");
|
||||
scan_locale_get_calls_in_dir(&english, "flint/src");
|
||||
scan_locale_get_calls_in_dir(&english, "vendor/flint/src");
|
||||
scan_used_locale_get_calls_in_dir(&english, &used, "src");
|
||||
scan_used_locale_get_calls_in_dir(&english, &used, "vendor/flint/src");
|
||||
add_dynamic_locale_keys(&used);
|
||||
check_unused_english_keys(&english, &used);
|
||||
|
||||
dir = opendir("locales");
|
||||
if(dir == NULL) {
|
||||
|
||||
@@ -739,7 +739,7 @@ test_stale_habit_save_keeps_synced_remote_habits(void)
|
||||
check_int("stale save keeps remote habit rows", loaded_habits.count, 4);
|
||||
check_true("remote push ups survived", find_habit_ci(&loaded_habits, "Push ups") != NULL);
|
||||
check_true("remote cold shower survived", find_habit_ci(&loaded_habits, "Cold Shower") != NULL);
|
||||
check_true("default yoga survived", find_habit_ci(&loaded_habits, "Yoga") != NULL);
|
||||
check_true("default sun salutation survived", find_habit_ci(&loaded_habits, "Sun Salutation") != NULL);
|
||||
|
||||
habits_free(&stale_habits);
|
||||
habits_free(&loaded_habits);
|
||||
@@ -1220,7 +1220,7 @@ assert_imported_database(const char *root)
|
||||
meditation = find_habit_ci(&habits, "Meditation");
|
||||
check_true("imported meditation habit day",
|
||||
meditation != NULL && habit_completed_day(meditation, 20260613));
|
||||
check_true("imported yoga habit", find_habit_ci(&habits, "Yoga") != NULL);
|
||||
check_true("imported sun salutation habit", find_habit_ci(&habits, "Sun Salutation") != NULL);
|
||||
habits_free(&habits);
|
||||
storage_close();
|
||||
}
|
||||
@@ -1406,7 +1406,7 @@ test_delete_all_resets_habits_to_empty_storage(void)
|
||||
check_true("load default habit after delete all", storage_habits_load(&habits));
|
||||
check_int("default habit count after delete all", habits.count, 2);
|
||||
check_true("default meditation after delete all", find_habit_ci(&habits, "Meditation") != NULL);
|
||||
check_true("default yoga after delete all", find_habit_ci(&habits, "Yoga") != NULL);
|
||||
check_true("default sun salutation after delete all", find_habit_ci(&habits, "Sun Salutation") != NULL);
|
||||
check_true("old workout day removed",
|
||||
!habit_completed_day(find_habit_ci(&habits, "Meditation"), 20260618));
|
||||
storage_close();
|
||||
@@ -1537,7 +1537,7 @@ test_empty_initialized_habits_seed_meditation_on_startup(void)
|
||||
check_int("empty initialized startup seeds default habits", habits.count, 2);
|
||||
check_true("empty initialized startup seeds meditation",
|
||||
find_habit_ci(&habits, "Meditation") != NULL);
|
||||
check_true("empty initialized startup seeds yoga", find_habit_ci(&habits, "Yoga") != NULL);
|
||||
check_true("empty initialized startup seeds sun salutation", find_habit_ci(&habits, "Sun Salutation") != NULL);
|
||||
check_int("empty initialized meditation linked mode",
|
||||
find_habit_ci(&habits, "Meditation") != NULL
|
||||
? find_habit_ci(&habits, "Meditation")->sync_mode
|
||||
@@ -1548,12 +1548,12 @@ test_empty_initialized_habits_seed_meditation_on_startup(void)
|
||||
? find_habit_ci(&habits, "Meditation")->sync_activity
|
||||
: -1,
|
||||
(1 << 0) | (1 << 1));
|
||||
check_int("empty initialized yoga linked mode",
|
||||
find_habit_ci(&habits, "Yoga") != NULL ? find_habit_ci(&habits, "Yoga")->sync_mode
|
||||
check_int("empty initialized sun salutation linked mode",
|
||||
find_habit_ci(&habits, "Sun Salutation") != NULL ? find_habit_ci(&habits, "Sun Salutation")->sync_mode
|
||||
: -1,
|
||||
INBE_HABIT_SYNC_ACTIVITIES);
|
||||
check_int("empty initialized yoga linked activities",
|
||||
find_habit_ci(&habits, "Yoga") != NULL ? find_habit_ci(&habits, "Yoga")->sync_activity
|
||||
check_int("empty initialized sun salutation linked activities",
|
||||
find_habit_ci(&habits, "Sun Salutation") != NULL ? find_habit_ci(&habits, "Sun Salutation")->sync_activity
|
||||
: -1,
|
||||
(1 << 2));
|
||||
habits_free(&habits);
|
||||
@@ -1562,7 +1562,7 @@ test_empty_initialized_habits_seed_meditation_on_startup(void)
|
||||
check_true("load seeded defaults from storage", storage_habits_load(&habits));
|
||||
check_int("seeded defaults persisted", habits.count, 2);
|
||||
check_true("persisted seeded meditation", find_habit_ci(&habits, "Meditation") != NULL);
|
||||
check_true("persisted seeded yoga", find_habit_ci(&habits, "Yoga") != NULL);
|
||||
check_true("persisted seeded sun salutation", find_habit_ci(&habits, "Sun Salutation") != NULL);
|
||||
check_int("persisted meditation linked mode",
|
||||
find_habit_ci(&habits, "Meditation") != NULL
|
||||
? find_habit_ci(&habits, "Meditation")->sync_mode
|
||||
|
||||
+111
-2
@@ -261,6 +261,39 @@ mark_empty_local_pending(const char *root)
|
||||
"VALUES('account','alias',0,1782300000);"));
|
||||
}
|
||||
|
||||
static void
|
||||
seed_local_habit_without_activity(const char *root)
|
||||
{
|
||||
check_true("seed local habit without activity",
|
||||
exec_db_sql(root, "INSERT INTO habits(id,user_id,name,color_r,color_g,color_b,"
|
||||
"sync_mode,sync_activity,counter_enabled,sort_order,deleted_at,"
|
||||
"updated_at)"
|
||||
"VALUES('empty-local-habit',(SELECT id FROM users LIMIT 1),"
|
||||
"'Empty Habit',10,20,30,0,0,1,1,0,1782300000);"));
|
||||
}
|
||||
|
||||
static void
|
||||
seed_local_session_only(const char *root)
|
||||
{
|
||||
check_true("seed local session only",
|
||||
exec_db_sql(root, "INSERT INTO "
|
||||
"sessions(id,user_id,started_at,local_date,topic,activity,source,"
|
||||
"imported_at,rounds_hash,deleted_at,updated_at)"
|
||||
"VALUES('tiny-local-session',(SELECT id FROM users LIMIT "
|
||||
"1),1782300000,20260624,1,1,'test',1782300000,101,0,1782300000);"
|
||||
"INSERT INTO session_rounds(session_id,round_index,seconds)"
|
||||
"VALUES('tiny-local-session',0,40);"));
|
||||
}
|
||||
|
||||
static void
|
||||
mark_local_session_only_pending(const char *root)
|
||||
{
|
||||
check_true("mark local session only pending",
|
||||
exec_db_sql(root, "INSERT OR REPLACE INTO "
|
||||
"sync_outbox(entity_type,entity_id,local_date,queued_at)"
|
||||
"VALUES('session','tiny-local-session',0,1782300000);"));
|
||||
}
|
||||
|
||||
static void
|
||||
seed_local_yoga_data(const char *root)
|
||||
{
|
||||
@@ -356,6 +389,29 @@ remote_additive_yoga_response(void)
|
||||
"}";
|
||||
}
|
||||
|
||||
static const char *
|
||||
remote_tiny_session_snapshot_response(void)
|
||||
{
|
||||
return "{"
|
||||
"\"server_version\":15,"
|
||||
"\"server_state_hash\":\"remote-hash-tiny-session\","
|
||||
"\"full_snapshot_required\":true,"
|
||||
"\"changes_complete\":false,"
|
||||
"\"changes\":{"
|
||||
"\"habits\":[],"
|
||||
"\"habit_days\":[],"
|
||||
"\"sessions\":[{\"id\":\"tiny-remote-session\",\"started_at\":\"2026-06-24T10:"
|
||||
"05:00Z\","
|
||||
"\"local_date\":20260624,\"topic\":1,\"activity\":1,\"source\":\"lyra-"
|
||||
"test\","
|
||||
"\"rounds_hash\":404,\"deleted_at\":0,\"updated_at\":\"2026-06-24T10:"
|
||||
"05:00Z\","
|
||||
"\"rounds\":[{\"round_index\":0,\"hold_seconds\":55}]}],"
|
||||
"\"meditation_logs\":[]"
|
||||
"}"
|
||||
"}";
|
||||
}
|
||||
|
||||
static void
|
||||
test_full_snapshot_waits_for_review(void)
|
||||
{
|
||||
@@ -406,6 +462,34 @@ test_full_snapshot_waits_for_review(void)
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_tiny_pending_snapshot_applies_remote_without_review(void)
|
||||
{
|
||||
char root[1024];
|
||||
|
||||
make_clean_root(root, sizeof(root), "tiny-pending");
|
||||
check_true("init tiny pending db", storage_init(root));
|
||||
seed_local_session_only(root);
|
||||
mark_local_session_only_pending(root);
|
||||
|
||||
check_true("apply tiny review response",
|
||||
storage_apply_sync_response_json(remote_tiny_session_snapshot_response()));
|
||||
check_false("tiny review not pending", storage_sync_review_pending());
|
||||
check_int("tiny local session replaced",
|
||||
read_db_count(root,
|
||||
"SELECT COUNT(*) FROM sessions WHERE id='tiny-local-session'"),
|
||||
0);
|
||||
check_int("tiny remote session applied",
|
||||
read_db_count(root,
|
||||
"SELECT COUNT(*) FROM sessions WHERE id='tiny-remote-session'"),
|
||||
1);
|
||||
check_int("tiny outbox cleared",
|
||||
read_db_count(root, "SELECT COUNT(*) FROM sync_outbox"), 0);
|
||||
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_empty_local_pending_snapshot_applies_remote(void)
|
||||
{
|
||||
@@ -417,8 +501,7 @@ test_empty_local_pending_snapshot_applies_remote(void)
|
||||
|
||||
check_true("apply empty local review response",
|
||||
storage_apply_sync_response_json(remote_snapshot_response()));
|
||||
check_true("empty local review pending before policy", storage_sync_review_pending());
|
||||
check_true("empty local applies remote", storage_sync_review_apply_remote_if_local_empty());
|
||||
check_false("empty local review not pending", storage_sync_review_pending());
|
||||
check_false("empty local review cleared", storage_sync_review_pending());
|
||||
check_int("empty local remote session applied",
|
||||
read_db_count(root, "SELECT COUNT(*) FROM sessions WHERE id='remote-session'"), 1);
|
||||
@@ -431,6 +514,30 @@ test_empty_local_pending_snapshot_applies_remote(void)
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_local_habit_without_activity_does_not_force_review(void)
|
||||
{
|
||||
char root[1024];
|
||||
|
||||
make_clean_root(root, sizeof(root), "empty-habit-local");
|
||||
check_true("init empty habit local db", storage_init(root));
|
||||
seed_local_habit_without_activity(root);
|
||||
mark_empty_local_pending(root);
|
||||
|
||||
check_true("apply empty habit local response",
|
||||
storage_apply_sync_response_json(remote_snapshot_response()));
|
||||
check_false("empty habit local review not pending", storage_sync_review_pending());
|
||||
check_int("empty habit local remote session applied",
|
||||
read_db_count(root, "SELECT COUNT(*) FROM sessions WHERE id='remote-session'"), 1);
|
||||
check_int("empty habit local remote habit applied",
|
||||
read_db_count(root, "SELECT COUNT(*) FROM habits WHERE id='remote-habit'"), 1);
|
||||
check_int("empty habit local outbox cleared",
|
||||
read_db_count(root, "SELECT COUNT(*) FROM sync_outbox"), 0);
|
||||
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_review_ignores_deleted_remote_rows(void)
|
||||
{
|
||||
@@ -696,7 +803,9 @@ main(void)
|
||||
tzset();
|
||||
|
||||
test_full_snapshot_waits_for_review();
|
||||
test_tiny_pending_snapshot_applies_remote_without_review();
|
||||
test_empty_local_pending_snapshot_applies_remote();
|
||||
test_local_habit_without_activity_does_not_force_review();
|
||||
test_review_ignores_deleted_remote_rows();
|
||||
test_remote_additions_apply_without_review();
|
||||
test_remote_snapshot_removes_absent_local_yoga_without_pending_edits();
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#include <string.h>
|
||||
|
||||
const char *
|
||||
locale_get(const char *key)
|
||||
{
|
||||
if(key == NULL)
|
||||
return "";
|
||||
if(strcmp(key, "habit_default_name_format") == 0)
|
||||
return "Habit %d";
|
||||
if(strcmp(key, "habit_default_meditation_name") == 0)
|
||||
return "Meditation";
|
||||
if(strcmp(key, "habit_default_meditation_description") == 0)
|
||||
return "Breathing and meditation sessions.";
|
||||
if(strcmp(key, "habit_default_sun_salutation_name") == 0)
|
||||
return "Sun Salutation";
|
||||
if(strcmp(key, "habit_default_sun_salutation_description") == 0)
|
||||
return "Sun Salutation practice sessions.";
|
||||
if(strcmp(key, "habit_new_default_name") == 0)
|
||||
return "New Habit";
|
||||
return key;
|
||||
}
|
||||
Vendored
+1
-1
Submodule vendor/flint updated: 2504f6f089...1c9f8624f6.
+4
-4
@@ -3,8 +3,8 @@
|
||||
IDI_APP_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,7,3,0
|
||||
PRODUCTVERSION 1,7,3,0
|
||||
FILEVERSION 1,7,8,0
|
||||
PRODUCTVERSION 1,7,8,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -21,11 +21,11 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "waozi"
|
||||
VALUE "FileDescription", "Inner Breeze"
|
||||
VALUE "FileVersion", "1.7.3"
|
||||
VALUE "FileVersion", "1.7.8"
|
||||
VALUE "InternalName", "inbe"
|
||||
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "1.7.3"
|
||||
VALUE "ProductVersion", "1.7.8"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in new issue
Block a user