Add tab bar mode and fix Click file handling
No files matched your search
@@ -1,4 +1,17 @@
|
||||
# Changelog
|
||||
## [1.5.0] - 2026-06-22
|
||||
### Changed
|
||||
- New logo
|
||||
- improve tabbar ui
|
||||
### Fixed
|
||||
- sync issues
|
||||
|
||||
## [1.4.11] - 2026-06-21
|
||||
### Added
|
||||
- tab bar mode for habits and exercises
|
||||
### Changed
|
||||
- fix ut click file
|
||||
|
||||
## [1.4.10] - 2026-06-21
|
||||
### Added
|
||||
- Added guide to habits page
|
||||
|
||||
@@ -36,11 +36,6 @@ CLICK_FRAMEWORK ?= ubuntu-sdk-20.04
|
||||
CLICK_POLICY_VERSION ?= 20.04
|
||||
CLICK_INCLUDE_METAINFO ?= 0
|
||||
CLICK_DIR := packaging/click
|
||||
CLICK_MANIFEST_TEMPLATE := $(CLICK_DIR)/manifest.json.in
|
||||
CLICK_CONTROL_TEMPLATE := $(CLICK_DIR)/control.in
|
||||
CLICK_APPARMOR_TEMPLATE := $(CLICK_DIR)/inbe.apparmor.in
|
||||
CLICK_DESKTOP_TEMPLATE := $(CLICK_DIR)/inbe.desktop.in
|
||||
CLICK_METAINFO_TEMPLATE := $(CLICK_DIR)/inbe.metainfo.xml.in
|
||||
CLICK_RUNNER := $(CLICK_DIR)/run-inbe.sh
|
||||
CLICK_BUILD_DIR := $(BUILD_OBJ_DIR)/click/$(CLICK_ARCH)
|
||||
CLICK_ROOT := $(CLICK_BUILD_DIR)/$(CLICK_PACKAGE)
|
||||
@@ -240,7 +235,7 @@ CHROME_WEB_STORE_ICONS := \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-32.png \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-48.png \
|
||||
$(CHROME_WEB_STORE_ICON_DIR)/icon-128.png
|
||||
WEB_ASSET_FILES := $(shell find web-assets -type f 2>/dev/null)
|
||||
WEB_ASSET_FILES := $(shell find web-assets site-icons -type f 2>/dev/null)
|
||||
UNPACKAGED_AUDIO_DIR := unpackaged_assets/audio
|
||||
UNPACKAGED_AUDIO_FILES := $(shell find $(UNPACKAGED_AUDIO_DIR) -type f 2>/dev/null)
|
||||
MEDITATION_AUDIO_ZIP := web-assets/dl/inbe-meditation-audio-v1.zip
|
||||
@@ -300,11 +295,12 @@ run: $(TARGET)
|
||||
run-fresh: $(TARGET)
|
||||
@root=$$(mktemp -d /tmp/inbe-fresh.XXXXXX); \
|
||||
echo "INBE_DATA_ROOT=$$root"; \
|
||||
INBE_DATA_ROOT="$$root" ./$(TARGET)
|
||||
INBE_FORCE_DARK_MODE=1 INBE_DATA_ROOT="$$root" ./$(TARGET)
|
||||
|
||||
screenshot: $(TARGET)
|
||||
./scripts/generate-screenshots.sh "$(TARGET)"
|
||||
|
||||
|
||||
test: $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(GUIDE_OVERLAY_TEST)
|
||||
$(STORAGE_IMPORT_TEST)
|
||||
$(LOCALE_KEYS_TEST)
|
||||
@@ -637,15 +633,13 @@ $(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(
|
||||
fi
|
||||
|
||||
$(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_TEMPLATE) $(CLICK_APPARMOR_TEMPLATE) $(CLICK_DESKTOP_TEMPLATE) $(CLICK_METAINFO_TEMPLATE) $(CLICK_RUNNER) $(LINUX_APPIMAGE_ICON) | $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR)
|
||||
@command -v ar >/dev/null || { \
|
||||
echo "ar is missing. Re-enter the flake shell with: nix develop"; \
|
||||
@command -v zip >/dev/null || { \
|
||||
echo "zip is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
rm -rf $(CLICK_ROOT) $(CLICK_CONTROL_DIR)
|
||||
rm -rf $(CLICK_ROOT)
|
||||
rm -f $(CLICK_DIST_DIR)/$(CLICK_PACKAGE)_*_$(CLICK_ARCH).click
|
||||
rm -f $(CLICK_BUILD_DIR)/debian-binary $(CLICK_BUILD_DIR)/control.tar.gz $(CLICK_BUILD_DIR)/data.tar.gz
|
||||
mkdir -p $(CLICK_ROOT)/usr/bin $(CLICK_ROOT)/usr/lib $(CLICK_ROOT)/usr/share/applications $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps $(CLICK_ROOT)/usr/share/metainfo
|
||||
mkdir -p $(CLICK_CONTROL_DIR)
|
||||
cp $(CLICK_BIN_INPUT) $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
cp $(CLICK_RUNNER) $(CLICK_ROOT)/run-inbe.sh
|
||||
chmod +x $(CLICK_ROOT)/run-inbe.sh $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
@@ -659,47 +653,16 @@ $(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_T
|
||||
if [ -f "$$elf" ]; then patchelf --set-rpath '$$ORIGIN' "$$elf" >/dev/null 2>&1 || true; fi; \
|
||||
done; \
|
||||
fi
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
|
||||
-e 's#__CLICK_FRAMEWORK__#$(CLICK_FRAMEWORK)#g' \
|
||||
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
|
||||
$(CLICK_MANIFEST_TEMPLATE) > $(CLICK_ROOT)/manifest.json
|
||||
cp $(CLICK_ROOT)/manifest.json $(CLICK_CONTROL_DIR)/manifest
|
||||
installed_size=$$(du -sk $(CLICK_ROOT) | awk '{ print $$1 }'); \
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
|
||||
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
|
||||
-e "s#__INSTALLED_SIZE__#$$installed_size#g" \
|
||||
$(CLICK_CONTROL_TEMPLATE) > $(CLICK_CONTROL_DIR)/control
|
||||
printf '%s\n' '#! /bin/sh' \
|
||||
'echo "Click packages may not be installed directly using dpkg."' \
|
||||
'echo "Use '\''click install'\'' instead."' \
|
||||
'exit 1' > $(CLICK_CONTROL_DIR)/preinst
|
||||
sed -e 's#__CLICK_POLICY_VERSION__#$(CLICK_POLICY_VERSION)#g' \
|
||||
$(CLICK_APPARMOR_TEMPLATE) > $(CLICK_ROOT)/inbe.apparmor
|
||||
sed -e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
|
||||
$(CLICK_DESKTOP_TEMPLATE) > $(CLICK_ROOT)/inbe.desktop
|
||||
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
|
||||
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
|
||||
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
|
||||
-e 's#__RELEASE_DATE__#$(shell date -u +%Y-%m-%d)#g' \
|
||||
$(CLICK_METAINFO_TEMPLATE) > $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_PACKAGE).metainfo.xml; \
|
||||
fi
|
||||
cp $(CLICK_DIR)/manifest.json $(CLICK_ROOT)/manifest.json
|
||||
cp $(CLICK_DIR)/inbe.apparmor $(CLICK_ROOT)/inbe.apparmor
|
||||
cp $(CLICK_DIR)/inbe.desktop $(CLICK_ROOT)/inbe.desktop
|
||||
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
|
||||
mkdir -p $(CLICK_ROOT)/usr/share/metainfo; \
|
||||
cp $(CLICK_DIR)/inbe.metainfo.xml $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_PACKAGE).metainfo.xml; \
|
||||
fi
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/inbe.png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps/inbe.png
|
||||
cd $(CLICK_ROOT) && find . -type f -printf '%P\n' | LC_ALL=C sort | xargs md5sum > $(abspath $(CLICK_CONTROL_DIR)/md5sums)
|
||||
printf '2.0\n' > $(CLICK_BUILD_DIR)/debian-binary
|
||||
tar -C $(CLICK_CONTROL_DIR) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/control.tar.gz) control manifest md5sums preinst
|
||||
tar -C $(CLICK_ROOT) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/data.tar.gz) inbe.apparmor inbe.desktop inbe.png manifest.json run-inbe.sh usr
|
||||
cd $(CLICK_BUILD_DIR) && ar rcs $(abspath $@) debian-binary control.tar.gz data.tar.gz
|
||||
test -f $@
|
||||
ar t $@ | grep -qx debian-binary
|
||||
ar t $@ | grep -qx control.tar.gz
|
||||
ar t $@ | grep -qx data.tar.gz
|
||||
cd $(CLICK_ROOT) && zip -qr $(abspath $@) .
|
||||
|
||||
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
|
||||
$(WIN64_CC) $(WINDOWS_CFLAGS) \
|
||||
@@ -822,7 +785,9 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SR
|
||||
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index.html
|
||||
cp $(WEB_BOOT_JS) $(WEB_DIST_DIR)/index_boot.js
|
||||
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index_boot.js
|
||||
rm -rf $(WEB_DIST_DIR)/web-assets $(WEB_DIST_DIR)/site-icons
|
||||
cp -R web-assets $(WEB_DIST_DIR)/
|
||||
cp -R site-icons $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/webmanifest.json
|
||||
|
||||
android-copy-assets:
|
||||
|
||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 99 KiB |
@@ -35,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 45
|
||||
versionName "1.4.10"
|
||||
versionCode 46
|
||||
versionName "1.5.0"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#E2EEFC" />
|
||||
<solid android:color="#87CEEB" />
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 22 KiB |
@@ -1,2 +1,3 @@
|
||||
### Fixed
|
||||
Fixed
|
||||
---
|
||||
- Import now restores habits, habit sync settings, and optionally app settings from Inbe SQLite exports.
|
||||
@@ -0,0 +1,4 @@
|
||||
### Added
|
||||
- tab bar mode for habits and exercises
|
||||
### Changed
|
||||
- fix ut click file
|
||||
@@ -0,0 +1,3 @@
|
||||
### Changed
|
||||
- New logo
|
||||
- improve tabbar ui
|
||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 249 KiB |
@@ -194,7 +194,7 @@ EOF
|
||||
sdl2Pkgs.SDL2.dev
|
||||
butler
|
||||
binutils
|
||||
clickable
|
||||
ubports-click
|
||||
ccache
|
||||
cmake
|
||||
curl
|
||||
|
||||
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 995 B |
|
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 136 B |
@@ -340,6 +340,26 @@ typedef struct {
|
||||
int font;
|
||||
} FlintUISubtabBar;
|
||||
|
||||
typedef struct {
|
||||
const char *label;
|
||||
Texture2D icon;
|
||||
int icon_size;
|
||||
int disabled;
|
||||
Color accent;
|
||||
} FlintUITab;
|
||||
|
||||
typedef struct {
|
||||
Rectangle bounds;
|
||||
const FlintUITab *tabs;
|
||||
int count;
|
||||
int selected_index;
|
||||
int font;
|
||||
int min_tab_width;
|
||||
int max_tab_width;
|
||||
int *scroll_offset;
|
||||
int focus_selected;
|
||||
} FlintUITabBar;
|
||||
|
||||
typedef struct {
|
||||
Rectangle anchor;
|
||||
const char *text;
|
||||
@@ -436,6 +456,7 @@ typedef void (*FlintUITextInputPlatformCallback)(int active);
|
||||
|
||||
void ui_init(int width, int height, float dpi);
|
||||
void ui_set_colors(Color text, Color bg, Color surface, Color circle, Color button, Color button_hover, Color icon);
|
||||
int ui_is_desktop_mode(void);
|
||||
void ui_set_frame(Camera2D camera);
|
||||
void flint_ui_set_text_input_platform_callback(FlintUITextInputPlatformCallback callback);
|
||||
void ui_set_cursor_clickable(int *cursor_clickable);
|
||||
@@ -451,6 +472,7 @@ int flint_ui_title_font(const char *title, int max_width);
|
||||
int flint_ui_text_y(const char *text, int box_y, int box_h, int font);
|
||||
void flint_ui_draw_text_centered(const char *text, int center_x, int center_y, int font, Color color);
|
||||
void flint_ui_draw_text_left_in_rect(const char *text, Rectangle rect, int font_size, Color color);
|
||||
void ui_draw_fitted_text_in_rect(const char *text, Rectangle rect, int preferred_size, int min_size, Color color);
|
||||
void flint_ui_draw_text_input(Rectangle bounds, const char *text, int cursor_position,
|
||||
int focused, int cursor_visible, int font,
|
||||
FlintUITextInputStyle style);
|
||||
@@ -495,6 +517,8 @@ int ui_draw_text_btn(int x, int y, const char *label, int *hover);
|
||||
int ui_draw_generic_button(int x, int y, int w, int h, const char *label,
|
||||
UIButtonStyle style, int disabled, int *hover);
|
||||
int ui_draw_subtab_bar(FlintUISubtabBar bar);
|
||||
int ui_draw_tab_bar(FlintUITabBar bar);
|
||||
int ui_tab_bar_height(void);
|
||||
|
||||
void ui_draw_icon_link(int x, int y, int icon_size, Texture2D icon, const char *url);
|
||||
int ui_draw_slider(int id, int x, int y, int w, const char *label, int min, int max, int *value, const char *suffix);
|
||||
|
||||
@@ -256,57 +256,68 @@ static const unsigned char flint_icon_home[] = {
|
||||
|
||||
static const unsigned char flint_icon_inbe[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a,
|
||||
0xf4, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x02, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xad, 0x57, 0x4d, 0x4b, 0x5b, 0x41, 0x14, 0x3d,
|
||||
0x79, 0x11, 0x41, 0x52, 0x1b, 0x05, 0x37, 0x15, 0x21, 0x14, 0xb2, 0x72, 0x51, 0x04, 0x71, 0x6f,
|
||||
0x7f, 0x44, 0x7e, 0x81, 0x58, 0x02, 0x5d, 0x18, 0xc8, 0x26, 0x41, 0xc8, 0x42, 0x90, 0x64, 0x23,
|
||||
0xe8, 0xa2, 0x10, 0x14, 0x7f, 0x41, 0xda, 0xdf, 0x60, 0xf7, 0x45, 0x70, 0xd5, 0x55, 0x20, 0x08,
|
||||
0xa2, 0x9b, 0x40, 0x13, 0x2a, 0x08, 0x81, 0x24, 0x5d, 0x94, 0x33, 0xb9, 0x73, 0xe7, 0xce, 0x4b,
|
||||
0x2a, 0x3d, 0xf0, 0x08, 0xf3, 0xf1, 0xee, 0x39, 0xf7, 0x63, 0xee, 0xbc, 0x64, 0x72, 0xb9, 0xc2,
|
||||
0x14, 0x0a, 0x4f, 0x97, 0xeb, 0x78, 0xf7, 0xe9, 0x97, 0x9e, 0xf6, 0x90, 0x4d, 0xf2, 0xa9, 0xeb,
|
||||
0x8b, 0x22, 0xa1, 0x31, 0x1a, 0x7c, 0xba, 0x5c, 0xf7, 0x7e, 0xff, 0x07, 0xf9, 0x43, 0x3b, 0xc1,
|
||||
0x43, 0x3b, 0x31, 0xd7, 0x32, 0xb9, 0x5c, 0x61, 0x4a, 0x83, 0xe3, 0xc9, 0xd0, 0x91, 0x6f, 0x95,
|
||||
0x27, 0x6e, 0x4c, 0x14, 0x4b, 0x07, 0xa9, 0x44, 0xbd, 0x6f, 0x5f, 0x53, 0x45, 0x00, 0xc0, 0x56,
|
||||
0x79, 0x32, 0x5f, 0x80, 0x1e, 0x4b, 0x01, 0x27, 0xb5, 0x0a, 0x00, 0xe0, 0xf1, 0x25, 0xeb, 0xe6,
|
||||
0x37, 0x57, 0xc6, 0x68, 0xb4, 0xce, 0x01, 0x00, 0xdd, 0xce, 0x75, 0x34, 0x42, 0xe3, 0xc9, 0x30,
|
||||
0x58, 0xf3, 0xe2, 0x22, 0x53, 0xa1, 0xc9, 0x25, 0x24, 0x39, 0xc7, 0x14, 0x66, 0xbd, 0x3b, 0x9e,
|
||||
0x0c, 0x4d, 0xf2, 0x40, 0x80, 0xdc, 0xac, 0x21, 0xbd, 0x6f, 0x5f, 0x9c, 0x61, 0x73, 0x65, 0xec,
|
||||
0x1e, 0x0b, 0x69, 0x0e, 0xc8, 0x3d, 0x19, 0x9e, 0x82, 0x6c, 0x92, 0x8f, 0xbe, 0x24, 0xc9, 0x19,
|
||||
0x6a, 0x00, 0x38, 0xa9, 0x55, 0xcc, 0x71, 0xb7, 0x73, 0xed, 0xe6, 0x62, 0x76, 0x19, 0x8d, 0xa5,
|
||||
0x79, 0xe4, 0x1a, 0x32, 0xd4, 0x92, 0xf4, 0xa4, 0x56, 0x71, 0xa9, 0x29, 0x96, 0x0e, 0x02, 0x11,
|
||||
0xc3, 0x1f, 0xef, 0x01, 0x00, 0xf9, 0xbd, 0x9e, 0x97, 0x92, 0x20, 0x05, 0xcf, 0xb7, 0x3b, 0x0b,
|
||||
0x09, 0xd1, 0x22, 0x74, 0x5d, 0x68, 0xe4, 0xf7, 0x7a, 0xe6, 0x7c, 0x02, 0xf8, 0xc7, 0x8f, 0x22,
|
||||
0x64, 0x41, 0x02, 0x7e, 0xe8, 0x1b, 0xad, 0x73, 0xf7, 0x48, 0xb0, 0x1e, 0xa4, 0xf7, 0xf4, 0x76,
|
||||
0x3c, 0x19, 0x7a, 0x22, 0x68, 0xdb, 0x45, 0x80, 0xe4, 0xbf, 0x6f, 0xef, 0x01, 0xc0, 0x85, 0x4c,
|
||||
0x1a, 0x24, 0xa1, 0x4c, 0x03, 0xe7, 0xe4, 0x51, 0xfc, 0x17, 0x78, 0x7d, 0x80, 0xcd, 0x62, 0x75,
|
||||
0xb7, 0xe0, 0xd4, 0xca, 0xda, 0x60, 0x23, 0x62, 0xc8, 0xe9, 0xb1, 0x24, 0x96, 0xde, 0x3f, 0xdf,
|
||||
0xee, 0xe0, 0xcd, 0xee, 0x5d, 0xaa, 0x00, 0x2f, 0x05, 0xec, 0x52, 0xb1, 0x7c, 0xd1, 0xb8, 0xcc,
|
||||
0xb7, 0xec, 0x01, 0x9a, 0x5c, 0xfe, 0xc6, 0x9a, 0x53, 0x46, 0x5f, 0x46, 0x72, 0xa3, 0xd5, 0x09,
|
||||
0xcb, 0x47, 0x55, 0x00, 0xb3, 0x7c, 0x53, 0x4c, 0xfb, 0xe2, 0x2c, 0x10, 0xb1, 0x08, 0x9c, 0x00,
|
||||
0x86, 0x4b, 0x1f, 0xc9, 0xce, 0xf7, 0x9f, 0x00, 0x80, 0xfa, 0x97, 0xb3, 0x80, 0x9c, 0x60, 0x3a,
|
||||
0x98, 0x8a, 0xe6, 0xe7, 0xaa, 0x5b, 0x2b, 0xed, 0x6f, 0xcf, 0x17, 0x20, 0x8f, 0x1e, 0x73, 0x76,
|
||||
0x73, 0xd7, 0x75, 0x73, 0x87, 0xa7, 0x4d, 0x00, 0x48, 0x15, 0xc0, 0x79, 0x8a, 0xb8, 0x3a, 0xae,
|
||||
0xa3, 0x3f, 0x18, 0x01, 0x00, 0x36, 0xd6, 0x96, 0x01, 0x00, 0x1f, 0x77, 0x8a, 0x81, 0x80, 0x04,
|
||||
0x98, 0xe5, 0xdc, 0x22, 0x27, 0x98, 0x67, 0xab, 0xda, 0x65, 0x3a, 0xb8, 0xef, 0xf0, 0xb4, 0xe9,
|
||||
0x88, 0xfb, 0x83, 0x11, 0xfa, 0x83, 0x11, 0x6e, 0xee, 0xba, 0x81, 0x6d, 0x77, 0x0c, 0x29, 0x42,
|
||||
0x6f, 0x38, 0x3c, 0x6d, 0xa2, 0x7c, 0x54, 0xf5, 0xc2, 0xac, 0xbb, 0x61, 0xa3, 0x75, 0xee, 0x6a,
|
||||
0xc0, 0x12, 0xc1, 0x87, 0x91, 0x94, 0x1c, 0x5e, 0x11, 0xc6, 0xc8, 0xb5, 0xe7, 0x5a, 0x00, 0x45,
|
||||
0x70, 0x4d, 0xd7, 0x84, 0xc6, 0xd5, 0x71, 0xdd, 0xa5, 0xc3, 0x09, 0xb0, 0xc8, 0xad, 0x0b, 0x28,
|
||||
0x26, 0x40, 0x9e, 0x06, 0xdd, 0xa8, 0xf4, 0x98, 0xf5, 0x51, 0xda, 0xdf, 0xfe, 0x2b, 0x80, 0xe4,
|
||||
0x0c, 0x91, 0x24, 0xe1, 0x0b, 0x31, 0x71, 0xfa, 0x0e, 0x60, 0x2a, 0x62, 0xa0, 0x2d, 0x0a, 0x58,
|
||||
0x8a, 0x6d, 0x94, 0xd5, 0x2c, 0x85, 0xc9, 0x75, 0xa6, 0x67, 0x11, 0x72, 0xed, 0x04, 0xe1, 0x04,
|
||||
0xf4, 0x07, 0x23, 0x73, 0x93, 0xf4, 0x56, 0x42, 0x1e, 0x3d, 0xd9, 0x96, 0x09, 0x79, 0x43, 0x6a,
|
||||
0x61, 0x3c, 0x9e, 0x9e, 0x00, 0x0b, 0x16, 0x79, 0xec, 0x5b, 0x50, 0x13, 0x3f, 0xbe, 0xd8, 0x36,
|
||||
0x49, 0xce, 0x06, 0xb5, 0x64, 0x2d, 0x02, 0xb3, 0xe6, 0xb1, 0x08, 0xb1, 0x14, 0x99, 0x56, 0x13,
|
||||
0x9a, 0x3c, 0x10, 0x60, 0x81, 0x55, 0x9c, 0x46, 0xaa, 0xc9, 0xf5, 0x5e, 0x99, 0x5a, 0xe9, 0x58,
|
||||
0x36, 0xc9, 0x87, 0xc7, 0xd0, 0x8a, 0x02, 0x8b, 0xd0, 0x6a, 0x40, 0x31, 0x48, 0x52, 0x69, 0x53,
|
||||
0x7a, 0xef, 0x09, 0x20, 0xb4, 0x10, 0xa9, 0x58, 0x9f, 0x86, 0x58, 0x65, 0x4b, 0x58, 0x61, 0x27,
|
||||
0x39, 0x60, 0x5c, 0xc7, 0x52, 0xc4, 0x6b, 0x20, 0xbd, 0x05, 0xec, 0x8b, 0x48, 0x5e, 0xf9, 0x99,
|
||||
0xb7, 0xab, 0x1f, 0xa6, 0x40, 0x78, 0xf7, 0xc7, 0x44, 0x68, 0x82, 0x18, 0xe6, 0x11, 0x07, 0x02,
|
||||
0x08, 0xeb, 0xf3, 0xdc, 0x12, 0x93, 0x26, 0x64, 0x63, 0x6d, 0x39, 0xb8, 0x7a, 0xa3, 0x5f, 0x44,
|
||||
0x52, 0xc0, 0xa2, 0xff, 0x0d, 0x5e, 0x03, 0x2d, 0x80, 0x5c, 0x7f, 0x00, 0x33, 0x9f, 0x0a, 0x53,
|
||||
0xdc, 0xa5, 0x75, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71,
|
||||
0xde, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x03, 0x9d, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xed, 0x99, 0x4f, 0x48, 0x1b, 0x41, 0x14, 0xc6,
|
||||
0xbf, 0xad, 0xb5, 0xf6, 0x24, 0x05, 0xd1, 0xac, 0x9e, 0x4a, 0x2c, 0x45, 0x29, 0x49, 0x29, 0x78,
|
||||
0x56, 0x2a, 0x81, 0x52, 0x3d, 0xe5, 0x20, 0xde, 0x05, 0x89, 0x07, 0x95, 0x1e, 0x7b, 0x93, 0xde,
|
||||
0x3c, 0x8a, 0xed, 0xa1, 0x12, 0xc8, 0x3d, 0xf4, 0x20, 0x3d, 0x34, 0x50, 0x10, 0x05, 0xcf, 0x05,
|
||||
0x21, 0x4b, 0x31, 0x07, 0x13, 0xbc, 0xb4, 0x66, 0x95, 0x82, 0xe4, 0xd4, 0x2a, 0x76, 0x7b, 0x90,
|
||||
0x99, 0xcc, 0xce, 0xce, 0xfe, 0x99, 0x64, 0x33, 0x5b, 0x70, 0x7e, 0x10, 0x98, 0xdd, 0xc9, 0x64,
|
||||
0xf6, 0xfb, 0xf6, 0xbd, 0x37, 0xb3, 0x1b, 0x40, 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3,
|
||||
0xd1, 0xdc, 0x45, 0x8c, 0x84, 0xe6, 0x75, 0xb8, 0xe3, 0xa4, 0xae, 0x23, 0x91, 0x89, 0x9d, 0xdf,
|
||||
0xdf, 0x0f, 0x5c, 0x27, 0x1e, 0x3e, 0x7b, 0x99, 0xd4, 0xb5, 0x28, 0x9f, 0x94, 0x8a, 0x1f, 0x38,
|
||||
0xb3, 0x00, 0x00, 0x7f, 0x46, 0x33, 0x00, 0x92, 0x33, 0xe1, 0x9e, 0xea, 0x09, 0x81, 0xb6, 0x78,
|
||||
0xbe, 0x9d, 0x04, 0xca, 0x0d, 0x10, 0x09, 0x4e, 0xd2, 0x84, 0x44, 0x22, 0xe0, 0x7f, 0xe2, 0xbe,
|
||||
0xea, 0x09, 0xed, 0x5a, 0x03, 0x00, 0x90, 0x9a, 0x48, 0xbb, 0x8e, 0x93, 0x22, 0x91, 0x55, 0xa0,
|
||||
0xf9, 0xe1, 0x8d, 0xeb, 0x84, 0xb9, 0xba, 0x95, 0xd4, 0xb5, 0xe8, 0x7d, 0x80, 0xaa, 0x89, 0x5d,
|
||||
0x82, 0x7d, 0x22, 0x80, 0x45, 0x99, 0x21, 0x2a, 0x26, 0xf2, 0x6c, 0x7c, 0x2e, 0x0f, 0x3e, 0xbb,
|
||||
0x8e, 0x53, 0x13, 0x69, 0xba, 0x1f, 0x00, 0xd4, 0xee, 0x09, 0x7a, 0x3d, 0x89, 0x67, 0xe3, 0x13,
|
||||
0x86, 0xea, 0x8d, 0x91, 0x92, 0x65, 0x50, 0x66, 0x9d, 0x57, 0xbd, 0x27, 0xe8, 0xb9, 0x01, 0x03,
|
||||
0x67, 0x96, 0xd4, 0x52, 0x67, 0xd7, 0x1a, 0x4a, 0x4d, 0x50, 0x12, 0x01, 0xe6, 0xea, 0x16, 0xec,
|
||||
0x5a, 0x23, 0xd0, 0x08, 0xd2, 0x2f, 0x28, 0x88, 0x3d, 0xa5, 0x97, 0x06, 0x38, 0xce, 0xde, 0x36,
|
||||
0x3d, 0xd8, 0x48, 0xaf, 0x61, 0x23, 0xbd, 0x26, 0x34, 0xc1, 0xae, 0x35, 0x68, 0x3f, 0x1d, 0x7c,
|
||||
0x3b, 0x96, 0x5f, 0x2e, 0x63, 0xa7, 0xab, 0x9d, 0x60, 0xb1, 0x64, 0xb9, 0x2e, 0x70, 0x79, 0x29,
|
||||
0x13, 0x5a, 0xb4, 0x36, 0xd2, 0x6b, 0x78, 0x57, 0x7b, 0xef, 0x39, 0x97, 0x14, 0x52, 0x06, 0xf0,
|
||||
0x82, 0x9f, 0xbe, 0x1e, 0xf6, 0xed, 0x5f, 0x5e, 0xba, 0xad, 0xe6, 0xe4, 0x8e, 0xef, 0xcc, 0x8d,
|
||||
0xa3, 0x50, 0xa9, 0x03, 0xf0, 0x17, 0xbc, 0x33, 0x37, 0x4e, 0xc7, 0x90, 0xad, 0x32, 0x3f, 0x27,
|
||||
0xf3, 0xfb, 0xb1, 0xac, 0x10, 0x91, 0x0d, 0x28, 0x96, 0x2c, 0x87, 0x17, 0xcc, 0x43, 0xfa, 0x67,
|
||||
0x46, 0x4d, 0xb0, 0xe1, 0xdf, 0x29, 0xce, 0xde, 0x36, 0x8c, 0x5c, 0x06, 0x97, 0xdf, 0x7e, 0x7a,
|
||||
0x3b, 0x4b, 0x96, 0x13, 0x87, 0x09, 0xa1, 0x35, 0xa0, 0x58, 0xb2, 0x9c, 0x28, 0xe2, 0x09, 0xbc,
|
||||
0xf8, 0x0e, 0xf6, 0xf9, 0x46, 0x94, 0x42, 0xb8, 0x90, 0x1d, 0xf2, 0x8d, 0x0e, 0x19, 0x02, 0x23,
|
||||
0x20, 0xaa, 0xf0, 0x99, 0x51, 0x93, 0xb6, 0x59, 0xf1, 0x46, 0x6e, 0xbd, 0x93, 0x6b, 0x72, 0x80,
|
||||
0x76, 0x1a, 0x38, 0x7b, 0xdb, 0x30, 0xa6, 0xc6, 0x68, 0x27, 0x1b, 0x0d, 0x0b, 0xd9, 0x21, 0xc0,
|
||||
0x9d, 0x76, 0xd2, 0x11, 0xe1, 0x3b, 0x40, 0x46, 0x3c, 0x1f, 0xee, 0x22, 0xe1, 0xf9, 0xb7, 0xbb,
|
||||
0xb4, 0x3d, 0x32, 0x9d, 0x75, 0xf5, 0x9d, 0x1f, 0x56, 0x69, 0x7b, 0x77, 0x33, 0x4f, 0xdb, 0xa2,
|
||||
0x34, 0x32, 0x72, 0xeb, 0xe2, 0x94, 0x00, 0xf0, 0xa9, 0xfa, 0x4b, 0xda, 0x84, 0xae, 0x0d, 0x00,
|
||||
0xdc, 0x11, 0xc0, 0xc3, 0x0a, 0x97, 0x81, 0x35, 0x82, 0xc5, 0x4f, 0x3c, 0x41, 0xd6, 0x04, 0xe9,
|
||||
0x65, 0xb0, 0x79, 0xdc, 0x07, 0x73, 0xf2, 0x86, 0xb6, 0x01, 0xa0, 0xbc, 0x7f, 0x01, 0x00, 0x58,
|
||||
0x9c, 0x1d, 0x46, 0xa1, 0x52, 0xc7, 0xc7, 0x07, 0x5f, 0xe8, 0xf7, 0x8d, 0x9c, 0x57, 0x08, 0x31,
|
||||
0xc5, 0x4f, 0x24, 0xe0, 0xbe, 0xfb, 0x2b, 0x57, 0xf3, 0xd8, 0x99, 0x1b, 0x0f, 0x15, 0x0f, 0xb4,
|
||||
0xd3, 0x22, 0xaa, 0x09, 0x81, 0x06, 0xb0, 0x62, 0xc9, 0xb1, 0x1f, 0x44, 0x3c, 0x8f, 0x28, 0x3d,
|
||||
0x88, 0x70, 0xbf, 0x95, 0x42, 0x94, 0x42, 0x85, 0x4a, 0x1d, 0x8f, 0xa6, 0xc6, 0x50, 0xde, 0xbf,
|
||||
0xc0, 0xab, 0xc1, 0xeb, 0xa0, 0xcb, 0x96, 0x22, 0x34, 0x02, 0x78, 0xd1, 0xac, 0x21, 0xe6, 0xe4,
|
||||
0x8d, 0xab, 0xff, 0xfc, 0xb0, 0x8a, 0x91, 0xe9, 0x2c, 0x56, 0xae, 0xe6, 0x3d, 0xbf, 0x73, 0x7e,
|
||||
0x58, 0xf5, 0x08, 0x67, 0x77, 0x85, 0x6c, 0xe5, 0x2f, 0x54, 0xea, 0x58, 0xb9, 0xf2, 0x8e, 0x27,
|
||||
0x7c, 0x6d, 0xf5, 0xfb, 0x9a, 0x70, 0x62, 0xcb, 0x99, 0xd3, 0x55, 0x0a, 0x00, 0x6d, 0x13, 0xca,
|
||||
0xfb, 0x17, 0x58, 0x9c, 0x1d, 0x46, 0x1e, 0xe2, 0x9c, 0xdf, 0xdd, 0xcc, 0xfb, 0xde, 0x71, 0x73,
|
||||
0x75, 0xcb, 0x55, 0x2b, 0x58, 0xb1, 0xec, 0x78, 0x92, 0x6a, 0x71, 0x46, 0x40, 0x60, 0x9e, 0x14,
|
||||
0x4b, 0x96, 0x33, 0xf8, 0xd8, 0xbf, 0xc0, 0xf1, 0xb5, 0x00, 0xb8, 0x4d, 0x85, 0x5e, 0x10, 0x55,
|
||||
0xfc, 0x89, 0x7d, 0x8d, 0x23, 0xbb, 0x15, 0xb9, 0x10, 0x86, 0x7e, 0x89, 0xdf, 0x6c, 0xf0, 0x86,
|
||||
0x84, 0xd5, 0x08, 0xb6, 0xdf, 0x8f, 0xa0, 0xda, 0xc2, 0x12, 0x45, 0x3c, 0x80, 0x78, 0x0d, 0xe0,
|
||||
0x11, 0x45, 0x45, 0x14, 0x91, 0x51, 0x20, 0x46, 0x74, 0x12, 0xe2, 0x6c, 0xee, 0xcb, 0x18, 0x20,
|
||||
0xfd, 0x38, 0xbc, 0xbc, 0x94, 0x31, 0x5a, 0xa7, 0x4d, 0xd7, 0xb9, 0xe6, 0x71, 0x1f, 0xfd, 0xf0,
|
||||
0xe7, 0x79, 0x44, 0xdf, 0x23, 0x98, 0x93, 0x37, 0x1e, 0x33, 0x45, 0x45, 0xed, 0xc4, 0xbe, 0xf6,
|
||||
0x7c, 0x3a, 0xa5, 0xe3, 0x87, 0x09, 0x92, 0x1a, 0x41, 0x35, 0x22, 0x0c, 0x51, 0xe4, 0x3c, 0xff,
|
||||
0xf1, 0x17, 0x80, 0x5b, 0xf8, 0x93, 0x54, 0x3f, 0x6d, 0x87, 0x89, 0x95, 0xb9, 0xfb, 0x40, 0x0c,
|
||||
0x2f, 0x1d, 0xc3, 0x0a, 0x65, 0x18, 0xbc, 0x09, 0x22, 0x03, 0x44, 0x1c, 0xd9, 0x2d, 0xda, 0x7e,
|
||||
0x91, 0x1a, 0xa4, 0xe7, 0x62, 0xdb, 0x0a, 0xcb, 0xd0, 0xad, 0x09, 0x04, 0x36, 0xf7, 0x83, 0x0c,
|
||||
0xe0, 0x85, 0x92, 0x68, 0x8c, 0xf5, 0x61, 0x48, 0x96, 0xb0, 0x47, 0xd3, 0x28, 0x06, 0xf1, 0x06,
|
||||
0xb0, 0x77, 0x99, 0x25, 0xae, 0x97, 0x21, 0x80, 0xc2, 0x7f, 0x60, 0x58, 0x83, 0xa2, 0x98, 0xd1,
|
||||
0x3a, 0x6d, 0xc6, 0x2a, 0xd4, 0x8f, 0x44, 0xfe, 0x93, 0x8b, 0xf2, 0x22, 0x43, 0x85, 0x78, 0x8d,
|
||||
0x46, 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1, 0x68, 0xee, 0x28, 0xff, 0x00, 0x51,
|
||||
0xfb, 0xcb, 0xe3, 0x4e, 0x1c, 0x64, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
|
||||
0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_itch[] = {
|
||||
@@ -558,11 +569,12 @@ static const unsigned char flint_icon_plus[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
|
||||
0x61, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
|
||||
0x00, 0x2f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0xa0, 0x25, 0xf8, 0x0f, 0x05, 0xf8,
|
||||
0xd4, 0x30, 0x51, 0x6a, 0xc9, 0xa8, 0x01, 0x0c, 0x0c, 0x8c, 0x0c, 0x0c, 0x90, 0xd0, 0x26, 0x4b,
|
||||
0x33, 0x23, 0x23, 0x23, 0xc5, 0x2e, 0xc0, 0x0b, 0x46, 0xd3, 0x01, 0x9d, 0x0c, 0xa0, 0x18, 0x00,
|
||||
0x00, 0xbc, 0x7e, 0x14, 0x08, 0x2f, 0x9a, 0xba, 0x41, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||
0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x42, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0xa0, 0x25, 0xf8, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf9, 0xf3, 0xe7, 0xff, 0xc7, 0xa7, 0x86, 0x89, 0x52, 0x4b, 0x46, 0x0d, 0x60, 0x60, 0x60,
|
||||
0x64, 0x60, 0x80, 0x84, 0x36, 0x59, 0x9a, 0x19, 0x19, 0x19, 0x59, 0x18, 0x18, 0x18, 0x18, 0x16,
|
||||
0x2c, 0x58, 0x80, 0x55, 0x41, 0x42, 0x42, 0x02, 0x4e, 0x39, 0xa2, 0xc0, 0x68, 0x3a, 0xa0, 0x93,
|
||||
0x01, 0x14, 0x03, 0x00, 0x3e, 0xca, 0x16, 0xaa, 0xdc, 0x53, 0x92, 0xf7, 0x00, 0x00, 0x00, 0x00,
|
||||
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
static const unsigned char flint_icon_quest[] = {
|
||||
@@ -1219,7 +1231,7 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_GLOBE, "globe", flint_icon_globe, 192u},
|
||||
{UI_ICON_TYPE_HABIT, "habit", flint_icon_habit, 179u},
|
||||
{UI_ICON_TYPE_HOME, "home", flint_icon_home, 216u},
|
||||
{UI_ICON_TYPE_INBE, "inbe", flint_icon_inbe, 832u},
|
||||
{UI_ICON_TYPE_INBE, "inbe", flint_icon_inbe, 995u},
|
||||
{UI_ICON_TYPE_ITCH, "itch", flint_icon_itch, 344u},
|
||||
{UI_ICON_TYPE_JUPITER, "jupiter", flint_icon_jupiter, 151u},
|
||||
{UI_ICON_TYPE_LIGHTOFF, "lightoff", flint_icon_lightoff, 217u},
|
||||
@@ -1235,7 +1247,7 @@ const FlintIconAsset flint_icon_assets[] = {
|
||||
{UI_ICON_TYPE_PAUSE, "pause", flint_icon_pause, 110u},
|
||||
{UI_ICON_TYPE_PLAY, "play", flint_icon_play, 151u},
|
||||
{UI_ICON_TYPE_PLAYSTORE, "playstore", flint_icon_playstore, 263u},
|
||||
{UI_ICON_TYPE_PLUS, "plus", flint_icon_plus, 117u},
|
||||
{UI_ICON_TYPE_PLUS, "plus", flint_icon_plus, 136u},
|
||||
{UI_ICON_TYPE_QUEST, "quest", flint_icon_quest, 714u},
|
||||
{UI_ICON_TYPE_RAY, "ray", flint_icon_ray, 152u},
|
||||
{UI_ICON_TYPE_RETURN, "return", flint_icon_return, 165u},
|
||||
|
||||
@@ -406,7 +406,7 @@ flint_ui_draw_text_left_in_rect(const char *text, Rectangle rect, int font_size,
|
||||
flint_clip_end();
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
ui_draw_fitted_text_in_rect(const char *text, Rectangle rect,
|
||||
int preferred_size, int min_size, Color color)
|
||||
{
|
||||
@@ -1040,6 +1040,12 @@ ui_init(int width, int height, float dpi)
|
||||
flint_set_dpi_scale(dpi);
|
||||
}
|
||||
|
||||
int
|
||||
ui_is_desktop_mode(void)
|
||||
{
|
||||
return ui_view_width >= flint_px(500);
|
||||
}
|
||||
|
||||
void
|
||||
ui_set_colors(Color text, Color bg, Color surface, Color circle, Color button, Color button_hover, Color icon)
|
||||
{
|
||||
|
||||
@@ -25,49 +25,51 @@ guide_draw_arrow(Rectangle tip, Rectangle anchor)
|
||||
int tip_right = (int)(tip.x + tip.width);
|
||||
int tip_top = (int)tip.y;
|
||||
int tip_bottom = (int)(tip.y + tip.height);
|
||||
int point_x = anchor_cx;
|
||||
int point_y = anchor_cy;
|
||||
int base_x = guide_clampi(anchor_cx, tip_left + flint_px(18),
|
||||
tip_right - flint_px(18));
|
||||
Color color = flint_theme_get_button();
|
||||
int arrow_size = flint_px(10);
|
||||
Vector2 start, end;
|
||||
Color color = flint_theme_get_text();
|
||||
|
||||
if(anchor_cy < tip_top) {
|
||||
DrawTriangle((Vector2){(float)base_x, (float)tip_top},
|
||||
(Vector2){(float)(base_x - flint_px(8)),
|
||||
(float)(tip_top - flint_px(12))},
|
||||
(Vector2){(float)(base_x + flint_px(8)),
|
||||
(float)(tip_top - flint_px(12))},
|
||||
start.x = (float)anchor_cx;
|
||||
start.y = (float)(anchor_cy + anchor.height / 2);
|
||||
end.x = (float)anchor_cx;
|
||||
end.y = (float)tip_top;
|
||||
DrawLineEx(start, end, (float)flint_px(2), color);
|
||||
DrawTriangle((Vector2){end.x, end.y},
|
||||
(Vector2){end.x - arrow_size, end.y - arrow_size},
|
||||
(Vector2){end.x + arrow_size, end.y - arrow_size},
|
||||
color);
|
||||
point_y = tip_top - flint_px(12);
|
||||
} else if(anchor_cy > tip_bottom) {
|
||||
DrawTriangle((Vector2){(float)base_x, (float)tip_bottom},
|
||||
(Vector2){(float)(base_x + flint_px(8)),
|
||||
(float)(tip_bottom + flint_px(12))},
|
||||
(Vector2){(float)(base_x - flint_px(8)),
|
||||
(float)(tip_bottom + flint_px(12))},
|
||||
start.x = (float)anchor_cx;
|
||||
start.y = (float)(anchor_cy - anchor.height / 2);
|
||||
end.x = (float)anchor_cx;
|
||||
end.y = (float)tip_bottom;
|
||||
DrawLineEx(start, end, (float)flint_px(2), color);
|
||||
DrawTriangle((Vector2){end.x, end.y},
|
||||
(Vector2){end.x + arrow_size, end.y + arrow_size},
|
||||
(Vector2){end.x - arrow_size, end.y + arrow_size},
|
||||
color);
|
||||
point_y = tip_bottom + flint_px(12);
|
||||
} else if(anchor_cx < tip_left) {
|
||||
DrawTriangle((Vector2){(float)tip_left, (float)anchor_cy},
|
||||
(Vector2){(float)(tip_left - flint_px(12)),
|
||||
(float)(anchor_cy + flint_px(8))},
|
||||
(Vector2){(float)(tip_left - flint_px(12)),
|
||||
(float)(anchor_cy - flint_px(8))},
|
||||
start.x = (float)(anchor_cx + anchor.width / 2);
|
||||
start.y = (float)anchor_cy;
|
||||
end.x = (float)tip_left;
|
||||
end.y = (float)anchor_cy;
|
||||
DrawLineEx(start, end, (float)flint_px(2), color);
|
||||
DrawTriangle((Vector2){end.x, end.y},
|
||||
(Vector2){end.x - arrow_size, end.y - arrow_size},
|
||||
(Vector2){end.x - arrow_size, end.y + arrow_size},
|
||||
color);
|
||||
point_x = tip_left - flint_px(12);
|
||||
} else {
|
||||
DrawTriangle((Vector2){(float)tip_right, (float)anchor_cy},
|
||||
(Vector2){(float)(tip_right + flint_px(12)),
|
||||
(float)(anchor_cy - flint_px(8))},
|
||||
(Vector2){(float)(tip_right + flint_px(12)),
|
||||
(float)(anchor_cy + flint_px(8))},
|
||||
start.x = (float)(anchor_cx - anchor.width / 2);
|
||||
start.y = (float)anchor_cy;
|
||||
end.x = (float)tip_right;
|
||||
end.y = (float)anchor_cy;
|
||||
DrawLineEx(start, end, (float)flint_px(2), color);
|
||||
DrawTriangle((Vector2){end.x, end.y},
|
||||
(Vector2){end.x + arrow_size, end.y - arrow_size},
|
||||
(Vector2){end.x + arrow_size, end.y + arrow_size},
|
||||
color);
|
||||
point_x = tip_right + flint_px(12);
|
||||
}
|
||||
|
||||
DrawLineEx((Vector2){(float)point_x, (float)point_y},
|
||||
(Vector2){(float)anchor_cx, (float)anchor_cy},
|
||||
(float)flint_px(2), flint_theme_get_text());
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
@@ -129,7 +131,7 @@ flint_ui_draw_guide_overlay(FlintUIGuideOverlay guide)
|
||||
int close_size = flint_px(28);
|
||||
int page_font = FLINT_TEXT_12;
|
||||
int line_gap = guide.line_gap > 0 ? guide.line_gap : flint_px(6);
|
||||
char page_text[16];
|
||||
char page_text[32];
|
||||
FlintUIParagraph paragraph;
|
||||
int paragraph_h;
|
||||
int tip_h;
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
#include "ui.h"
|
||||
|
||||
int
|
||||
ui_tab_bar_height(void)
|
||||
{
|
||||
return flint_px(36);
|
||||
}
|
||||
|
||||
static int
|
||||
ui_tab_bar_tab_width(FlintUITabBar bar, int index, int min_tab_w, int icon_tab_w)
|
||||
{
|
||||
const FlintUITab *tab;
|
||||
|
||||
if(index < 0 || index >= bar.count || bar.tabs == NULL)
|
||||
return min_tab_w;
|
||||
|
||||
tab = &bar.tabs[index];
|
||||
if((tab->label == NULL || tab->label[0] == '\0') && tab->icon.id != 0)
|
||||
return icon_tab_w;
|
||||
|
||||
return min_tab_w;
|
||||
}
|
||||
|
||||
int
|
||||
ui_draw_tab_bar(FlintUITabBar bar)
|
||||
{
|
||||
Vector2 mouse_world = ui_mouse_world();
|
||||
int released = IsMouseButtonReleased(MOUSE_BUTTON_LEFT);
|
||||
int clicked_tab = -1;
|
||||
int font = bar.font > 0 ? bar.font : FLINT_TEXT_12;
|
||||
int bar_x = (int)bar.bounds.x;
|
||||
int bar_y = (int)bar.bounds.y;
|
||||
int bar_w = (int)bar.bounds.width;
|
||||
int bar_h = (int)bar.bounds.height;
|
||||
int tab_gap = flint_px(4);
|
||||
int min_tab_w = bar.min_tab_width > 0 ? bar.min_tab_width : flint_px(120);
|
||||
int max_tab_w = bar.max_tab_width > 0 ? bar.max_tab_width : min_tab_w;
|
||||
int icon_tab_w = bar_h + tab_gap * 2;
|
||||
static int default_scroll_offset = 0;
|
||||
static Vector2 last_drag_pos = {0};
|
||||
static int is_dragging = 0;
|
||||
int *scroll_offset = bar.scroll_offset != NULL ? bar.scroll_offset
|
||||
: &default_scroll_offset;
|
||||
|
||||
if(bar.tabs == NULL || bar.count <= 0 || bar.bounds.width <= 0 || bar.bounds.height <= 0)
|
||||
return -1;
|
||||
|
||||
// Draw tab bar background (recessed appearance)
|
||||
DrawRectangle(bar_x, bar_y, bar_w, bar_h, flint_darken(c_bg, 12));
|
||||
DrawLine(bar_x, bar_y, bar_x + bar_w, bar_y, flint_darken(c_bg, 38));
|
||||
|
||||
if(max_tab_w < min_tab_w)
|
||||
max_tab_w = min_tab_w;
|
||||
if(icon_tab_w > max_tab_w)
|
||||
icon_tab_w = max_tab_w;
|
||||
|
||||
// Calculate if scrolling is needed
|
||||
int total_gap_w = tab_gap * (bar.count - 1);
|
||||
int total_tabs_w = total_gap_w;
|
||||
for(int i = 0; i < bar.count; i++)
|
||||
total_tabs_w += ui_tab_bar_tab_width(bar, i, min_tab_w, icon_tab_w);
|
||||
int needs_scroll = total_tabs_w > bar_w;
|
||||
|
||||
// Set scroll offset
|
||||
if(*scroll_offset < 0)
|
||||
*scroll_offset = 0;
|
||||
int max_scroll = total_tabs_w - bar_w;
|
||||
if(max_scroll < 0)
|
||||
max_scroll = 0;
|
||||
if(*scroll_offset > max_scroll)
|
||||
*scroll_offset = max_scroll;
|
||||
|
||||
if(needs_scroll && bar.focus_selected &&
|
||||
bar.selected_index >= 0 && bar.selected_index < bar.count) {
|
||||
int selected_tab_w = ui_tab_bar_tab_width(bar, bar.selected_index,
|
||||
min_tab_w, icon_tab_w);
|
||||
int selected_tab_x = bar_x + tab_gap - *scroll_offset;
|
||||
for(int i = 0; i < bar.selected_index; i++)
|
||||
selected_tab_x += ui_tab_bar_tab_width(bar, i, min_tab_w,
|
||||
icon_tab_w) + tab_gap;
|
||||
int selected_tab_end = selected_tab_x + selected_tab_w;
|
||||
|
||||
if(selected_tab_x < bar_x)
|
||||
*scroll_offset -= (bar_x - selected_tab_x) + tab_gap;
|
||||
else if(selected_tab_end > bar_x + bar_w)
|
||||
*scroll_offset += (selected_tab_end - (bar_x + bar_w)) + tab_gap;
|
||||
|
||||
if(*scroll_offset < 0)
|
||||
*scroll_offset = 0;
|
||||
if(*scroll_offset > max_scroll)
|
||||
*scroll_offset = max_scroll;
|
||||
}
|
||||
|
||||
// Start from left (not centered)
|
||||
int tab_x = bar_x + tab_gap - *scroll_offset;
|
||||
|
||||
for(int i = 0; i < bar.count; i++) {
|
||||
const FlintUITab *tab = &bar.tabs[i];
|
||||
int tab_w = ui_tab_bar_tab_width(bar, i, min_tab_w, icon_tab_w);
|
||||
Rectangle tab_rect = {(float)tab_x, (float)bar_y, (float)tab_w, (float)bar_h};
|
||||
int input_captured = ui_input_captures_click(mouse_world);
|
||||
int is_active = CheckCollisionPointRec(mouse_world, tab_rect) && !input_captured;
|
||||
int is_hovered = is_active && ui_hover_effects_enabled();
|
||||
int is_selected = i == bar.selected_index;
|
||||
int is_disabled = tab->disabled;
|
||||
|
||||
// Determine tab background color
|
||||
Color tab_fill;
|
||||
if(is_disabled) {
|
||||
tab_fill = flint_darken(c_bg, 18);
|
||||
} else if(is_selected) {
|
||||
tab_fill = c_button;
|
||||
} else if(is_hovered) {
|
||||
tab_fill = flint_darken(c_button_hover, 8);
|
||||
} else {
|
||||
tab_fill = flint_darken(c_bg, 10);
|
||||
}
|
||||
|
||||
// Draw tab shape with rounded top corners (Chromium-style)
|
||||
float corner_radius = 0.15f;
|
||||
DrawRectangleRounded(tab_rect, corner_radius, 4, tab_fill);
|
||||
|
||||
// Apply 3D bevel effect for depth
|
||||
if(is_selected) {
|
||||
// Strong bevel for selected tab (appears raised)
|
||||
ui_draw_bevel(tab_x, bar_y, tab_w, bar_h,
|
||||
flint_lighten(tab_fill, 50),
|
||||
flint_darken(tab_fill, 30));
|
||||
} else if(is_hovered && !is_disabled) {
|
||||
// Enhanced bevel for hovered tab
|
||||
ui_draw_bevel(tab_x, bar_y, tab_w, bar_h,
|
||||
flint_lighten(tab_fill, 30),
|
||||
flint_darken(tab_fill, 20));
|
||||
} else if(!is_disabled) {
|
||||
// Subtle bevel for normal tab
|
||||
ui_draw_bevel(tab_x, bar_y, tab_w, bar_h,
|
||||
flint_lighten(tab_fill, 20),
|
||||
flint_darken(tab_fill, 15));
|
||||
}
|
||||
|
||||
// Draw tab text and icon
|
||||
int text_pad = flint_px(8);
|
||||
int icon_size = tab->icon_size > 0 ? tab->icon_size : flint_px(16);
|
||||
int icon_x = tab_x + text_pad;
|
||||
int text_x = icon_x + icon_size + flint_px(4);
|
||||
int content_h = bar_h - flint_px(8);
|
||||
int content_y = bar_y + (bar_h - content_h) / 2;
|
||||
|
||||
Color text_color = c_text;
|
||||
Color icon_color = c_icon;
|
||||
|
||||
if(is_disabled) {
|
||||
text_color = flint_darken(c_text, 70);
|
||||
text_color.a = text_color.a > 150 ? 150 : text_color.a;
|
||||
icon_color = flint_darken(c_icon, 40);
|
||||
} else if(is_selected) {
|
||||
text_color = flint_lighten(c_text, 10);
|
||||
icon_color = flint_lighten(c_icon, 10);
|
||||
}
|
||||
|
||||
// Draw icon if present
|
||||
if(tab->icon.id != 0) {
|
||||
Rectangle icon_rect = {
|
||||
(float)icon_x,
|
||||
(float)(bar_y + (bar_h - icon_size) / 2),
|
||||
(float)icon_size,
|
||||
(float)icon_size
|
||||
};
|
||||
Rectangle icon_src = {0, 0, (float)tab->icon.width, (float)tab->icon.height};
|
||||
DrawTexturePro(tab->icon, icon_src, icon_rect, (Vector2){0}, 0, icon_color);
|
||||
text_x = icon_x + icon_size + flint_px(4);
|
||||
} else {
|
||||
text_x = tab_x + text_pad;
|
||||
}
|
||||
|
||||
// Draw tab label
|
||||
Rectangle text_rect = {
|
||||
(float)text_x,
|
||||
(float)content_y,
|
||||
(float)(tab_x + tab_w - text_pad - text_x),
|
||||
(float)content_h
|
||||
};
|
||||
|
||||
if(text_rect.width > 0 && tab->label != NULL) {
|
||||
flint_ui_draw_text_left_in_rect(tab->label, text_rect, font, text_color);
|
||||
}
|
||||
|
||||
// Handle click detection
|
||||
if(is_active) {
|
||||
if(is_disabled)
|
||||
ui_mark_disabled();
|
||||
else
|
||||
ui_mark_clickable();
|
||||
|
||||
if(released)
|
||||
clicked_tab = i;
|
||||
}
|
||||
|
||||
tab_x += tab_w + tab_gap;
|
||||
}
|
||||
|
||||
if(needs_scroll) {
|
||||
// Handle manual drag scrolling
|
||||
Vector2 current_pos = mouse_world;
|
||||
int is_mouse_down = IsMouseButtonDown(MOUSE_BUTTON_LEFT);
|
||||
|
||||
// Check if mouse is over tab bar area
|
||||
Rectangle scroll_area = {(float)bar_x, (float)bar_y, (float)bar_w, (float)bar_h};
|
||||
int is_over_bar = CheckCollisionPointRec(current_pos, scroll_area);
|
||||
|
||||
if(is_mouse_down && is_over_bar && !is_dragging) {
|
||||
is_dragging = 1;
|
||||
last_drag_pos = current_pos;
|
||||
}
|
||||
|
||||
if(is_dragging) {
|
||||
if(is_mouse_down) {
|
||||
float dx = current_pos.x - last_drag_pos.x;
|
||||
*scroll_offset -= (int)dx;
|
||||
|
||||
// Clamp scroll offset
|
||||
if(*scroll_offset < 0)
|
||||
*scroll_offset = 0;
|
||||
if(*scroll_offset > max_scroll)
|
||||
*scroll_offset = max_scroll;
|
||||
|
||||
last_drag_pos = current_pos;
|
||||
} else {
|
||||
is_dragging = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return clicked_tab;
|
||||
}
|
||||
@@ -52,8 +52,8 @@ ui_draw_toolbar(FlintUIToolbar toolbar)
|
||||
int dropdown_h = toolbar.dropdown_height > 0
|
||||
? toolbar.dropdown_height
|
||||
: flint_px(36);
|
||||
int dropdown_x = toolbar.x + side_padding;
|
||||
int dropdown_y = toolbar.y + (toolbar.height - dropdown_h) / 2;
|
||||
int dropdown_x = 0;
|
||||
int dropdown_y = toolbar.y;
|
||||
int dropdown_w = controls_x - dropdown_x;
|
||||
int dropdown_available_w;
|
||||
|
||||
|
||||
@@ -199,7 +199,6 @@ Data
|
||||
[settings_tab_about]
|
||||
O aplikaci
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Motiv
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Další
|
||||
[coming_soon_label]
|
||||
Brzy...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Celkem sezení: %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Velikost dat: %s
|
||||
[export_data_button]
|
||||
Exportovat data
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Smazat všechna data
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Exportovat data
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Export zrušen
|
||||
[no_data_to_delete]
|
||||
Žádná data ke smazání
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Smazat všechna data?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Tím se trvale smažou všechna uložená sezení.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Mazání zrušeno
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Smazat toto kolo? Tuto akci nelze vrátit.
|
||||
[delete_button]
|
||||
Smazat
|
||||
---
|
||||
[clear_button]
|
||||
Vymazat
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Hudba od Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ Zálohu klíče účtu se nepodařilo uložit
|
||||
[sync_private_key_backup_cancelled]
|
||||
Záloha klíče účtu zrušena
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Smazat účet
|
||||
[clear_local_data_button]
|
||||
Vymazat místní data
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Smazat účet?
|
||||
[clear_local_data_title]
|
||||
Vymazat místní data?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Smazat tento účet ze vzdáleného serveru a z tohoto zařízení? Tuto akci nelze vrátit zpět.
|
||||
[clear_local_data_message]
|
||||
Vymaže pouze data uložená v tomto zařízení. Vzdálená synchronizační data se nezmění.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Účet smazán
|
||||
[sync_logout_button]
|
||||
Odhlásit se
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Smazání účtu zrušeno
|
||||
[sync_logged_out]
|
||||
Odhlášeno
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Vymazat vzdálená data
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Vymazat vzdálená data?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Vymaže tento synchronizační účet ze vzdáleného serveru a potom se na tomto zařízení odhlásí. Tuto akci nelze vrátit zpět.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Vzdálená data vymazána
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Mazání vzdálených dat zrušeno
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nový návyk
|
||||
@@ -787,3 +794,15 @@ Zvolte Tyden nebo Kalendar pro kontrolu navyku.
|
||||
[habits_guide_statistics]
|
||||
Zde zobrazite statistiky navyku.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigace
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Auto
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Rozbalovací
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Karty
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Daten
|
||||
[settings_tab_about]
|
||||
Über
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Thema
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Weiter
|
||||
[coming_soon_label]
|
||||
Demnächst...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Gesamtsitzungen: %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Speicher: %s
|
||||
[export_data_button]
|
||||
Daten exportieren
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Alle Daten löschen
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Daten exportieren
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Keine Daten zum Exportieren
|
||||
[no_data_to_delete]
|
||||
Keine Daten zum Löschen
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Alle Daten löschen?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Dadurch werden alle gespeicherten Sitzungen dauerhaft gelöscht.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Löschen abgebrochen
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Diese Runde löschen? Das kann nicht rückgängig gemacht werden.
|
||||
[delete_button]
|
||||
Löschen
|
||||
---
|
||||
[clear_button]
|
||||
Löschen
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musik von Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ Kontoschlüssel-Sicherung konnte nicht gespeichert werden
|
||||
[sync_private_key_backup_cancelled]
|
||||
Kontoschlüssel-Sicherung abgebrochen
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Konto löschen
|
||||
[clear_local_data_button]
|
||||
Lokale Daten löschen
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Konto löschen?
|
||||
[clear_local_data_title]
|
||||
Lokale Daten löschen?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Dieses Konto vom Remote-Server und von diesem Gerät löschen? Das kann nicht rückgängig gemacht werden.
|
||||
[clear_local_data_message]
|
||||
Löscht nur die auf diesem Gerät gespeicherten Daten. Remote-Sync-Daten bleiben unverändert.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Konto gelöscht
|
||||
[sync_logout_button]
|
||||
Abmelden
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Kontolöschung abgebrochen
|
||||
[sync_logged_out]
|
||||
Abgemeldet
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Remote-Daten löschen
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Remote-Daten löschen?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Löscht dieses Sync-Konto vom Remote-Server und meldet dieses Gerät danach ab. Das kann nicht rückgängig gemacht werden.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Remote-Daten gelöscht
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Löschen der Remote-Daten abgebrochen
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Neue Gewohnheit
|
||||
@@ -787,3 +794,15 @@ Wahle Woche oder Kalender, um deine Gewohnheit zu pruefen.
|
||||
[habits_guide_statistics]
|
||||
Sieh dir hier deine Gewohnheitsstatistiken an.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigation
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Auto
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Tabs
|
||||
---
|
||||
@@ -202,7 +202,6 @@ Data
|
||||
[settings_tab_about]
|
||||
About
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Theme
|
||||
---
|
||||
@@ -335,7 +334,6 @@ Next
|
||||
[coming_soon_label]
|
||||
Coming soon...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Total Sessions: %d
|
||||
---
|
||||
@@ -348,9 +346,6 @@ Storage: %s
|
||||
[export_data_button]
|
||||
Export Data
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Delete All Data
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Export Data
|
||||
---
|
||||
@@ -402,12 +397,6 @@ No data to export
|
||||
[no_data_to_delete]
|
||||
No data to delete
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Delete all data?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
This will permanently delete all saved sessions.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Delete cancelled
|
||||
---
|
||||
@@ -532,6 +521,9 @@ Delete this round? This cannot be undone.
|
||||
[delete_button]
|
||||
Delete
|
||||
---
|
||||
[clear_button]
|
||||
Clear
|
||||
---
|
||||
[back_button]
|
||||
Back
|
||||
---
|
||||
@@ -634,21 +626,35 @@ Could not save account key backup
|
||||
[sync_private_key_backup_cancelled]
|
||||
Account key backup cancelled
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Delete Account
|
||||
[clear_local_data_button]
|
||||
Clear Local Data
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Delete Account?
|
||||
[clear_local_data_title]
|
||||
Clear Local Data?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Delete this account from the remote server and this device? This cannot be undone.
|
||||
|
||||
[clear_local_data_message]
|
||||
Clear only the data stored on this device. Remote sync data is not changed.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Account deleted
|
||||
[sync_logout_button]
|
||||
Log out
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Account deletion cancelled
|
||||
[sync_logged_out]
|
||||
Logged out
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Clear Remote Data
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Clear Remote Data?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Clear this sync account from the remote server, then log out on this device. This cannot be undone.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Remote data cleared
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Remote data clear cancelled
|
||||
---
|
||||
[habit_new_default_name]
|
||||
New Habit
|
||||
@@ -788,3 +794,15 @@ Choose Weekly or Calendar to review your habit.
|
||||
[habits_guide_statistics]
|
||||
View habit statistics here.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigation
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Auto
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Tabs
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Datos
|
||||
[settings_tab_about]
|
||||
Acerca de
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Tema
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Más
|
||||
[coming_soon_label]
|
||||
Próximamente...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Sesiones totales: %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Almacenamiento: %s
|
||||
[export_data_button]
|
||||
Exportar datos
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Eliminar todos los datos
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Exportar datos
|
||||
---
|
||||
@@ -345,12 +340,6 @@ No hay datos para exportar
|
||||
[no_data_to_delete]
|
||||
No hay datos para eliminar
|
||||
---
|
||||
[delete_all_data_title]
|
||||
¿Eliminar todos los datos?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Esto eliminará permanentemente todas las sesiones guardadas.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Eliminación cancelada
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Recuento de sesiones: %d
|
||||
[delete_button]
|
||||
Eliminar
|
||||
---
|
||||
[clear_button]
|
||||
Borrar
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Música de Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ No se pudo guardar el respaldo de la clave
|
||||
[sync_private_key_backup_cancelled]
|
||||
Respaldo de clave cancelado
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Eliminar cuenta
|
||||
[clear_local_data_button]
|
||||
Borrar datos locales
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
¿Eliminar cuenta?
|
||||
[clear_local_data_title]
|
||||
¿Borrar datos locales?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
¿Eliminar esta cuenta del servidor remoto y de este dispositivo? Esta acción no se puede deshacer.
|
||||
[clear_local_data_message]
|
||||
Borra solo los datos guardados en este dispositivo. Los datos remotos de sincronización no cambian.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Cuenta eliminada
|
||||
[sync_logout_button]
|
||||
Cerrar sesión
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Eliminación de cuenta cancelada
|
||||
[sync_logged_out]
|
||||
Sesión cerrada
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Borrar datos remotos
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
¿Borrar datos remotos?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Borra esta cuenta de sincronización del servidor remoto y luego cierra sesión en este dispositivo. Esta acción no se puede deshacer.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Datos remotos borrados
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Borrado de datos remotos cancelado
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nuevo hábito
|
||||
@@ -787,3 +794,15 @@ Elige Semanal o Calendario para revisar tu habito.
|
||||
[habits_guide_statistics]
|
||||
Consulta tus estadisticas de habitos aqui.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navegación
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Auto
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Desplegable
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Pestañas
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Données
|
||||
[settings_tab_about]
|
||||
À propos
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Thème
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Suivant
|
||||
[coming_soon_label]
|
||||
Bientôt...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Séances totales : %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Stockage : %s
|
||||
[export_data_button]
|
||||
Exporter les données
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Supprimer toutes les données
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Exporter les données
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Aucune donnée à exporter
|
||||
[no_data_to_delete]
|
||||
Aucune donnée à supprimer
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Supprimer toutes les données ?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Cela supprimera définitivement toutes les séances enregistrées.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Suppression annulée
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Supprimer ce cycle ? Cette action est irréversible.
|
||||
[delete_button]
|
||||
Supprimer
|
||||
---
|
||||
[clear_button]
|
||||
Effacer
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musique par Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ Impossible d’enregistrer la sauvegarde de la clé
|
||||
[sync_private_key_backup_cancelled]
|
||||
Sauvegarde de la clé annulée
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Supprimer le compte
|
||||
[clear_local_data_button]
|
||||
Effacer les données locales
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Supprimer le compte ?
|
||||
[clear_local_data_title]
|
||||
Effacer les données locales ?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Supprimer ce compte du serveur distant et de cet appareil ? Cette action est irréversible.
|
||||
[clear_local_data_message]
|
||||
Efface uniquement les données stockées sur cet appareil. Les données de synchronisation distantes ne sont pas modifiées.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Compte supprimé
|
||||
[sync_logout_button]
|
||||
Se déconnecter
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Suppression du compte annulée
|
||||
[sync_logged_out]
|
||||
Déconnecté
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Effacer les données distantes
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Effacer les données distantes ?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Efface ce compte de synchronisation du serveur distant, puis vous déconnecte sur cet appareil. Cette action est irréversible.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Données distantes effacées
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Effacement des données distantes annulé
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nouvelle habitude
|
||||
@@ -787,3 +794,15 @@ Choisissez Hebdomadaire ou Calendrier pour suivre votre habitude.
|
||||
[habits_guide_statistics]
|
||||
Consultez vos statistiques d'habitudes ici.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigation
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Auto
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Déroulante
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Onglets
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Data
|
||||
[settings_tab_about]
|
||||
Tentang
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Tema
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Lanjut
|
||||
[coming_soon_label]
|
||||
Segera hadir...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Total Sesi: %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Penyimpanan: %s
|
||||
[export_data_button]
|
||||
Ekspor Data
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Hapus Semua Data
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Ekspor Data
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Tidak ada data untuk diekspor
|
||||
[no_data_to_delete]
|
||||
Tidak ada data untuk dihapus
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Hapus semua data?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Ini akan menghapus semua sesi tersimpan secara permanen.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Penghapusan dibatalkan
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Hapus ronde ini? Tidak dapat dibatalkan.
|
||||
[delete_button]
|
||||
Hapus
|
||||
---
|
||||
[clear_button]
|
||||
Hapus
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musik oleh Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ Tidak dapat menyimpan cadangan kunci akun
|
||||
[sync_private_key_backup_cancelled]
|
||||
Cadangan kunci akun dibatalkan
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Hapus akun
|
||||
[clear_local_data_button]
|
||||
Hapus data lokal
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Hapus akun?
|
||||
[clear_local_data_title]
|
||||
Hapus data lokal?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Hapus akun ini dari server remote dan perangkat ini? Tindakan ini tidak dapat dibatalkan.
|
||||
[clear_local_data_message]
|
||||
Hanya menghapus data yang tersimpan di perangkat ini. Data sinkronisasi jarak jauh tidak berubah.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Akun dihapus
|
||||
[sync_logout_button]
|
||||
Keluar
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Penghapusan akun dibatalkan
|
||||
[sync_logged_out]
|
||||
Sudah keluar
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Hapus data jarak jauh
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Hapus data jarak jauh?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Menghapus akun sinkronisasi ini dari server jarak jauh, lalu keluar di perangkat ini. Tindakan ini tidak dapat dibatalkan.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Data jarak jauh dihapus
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Penghapusan data jarak jauh dibatalkan
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Kebiasaan baru
|
||||
@@ -787,3 +794,15 @@ Pilih Mingguan atau Kalender untuk meninjau kebiasaan.
|
||||
[habits_guide_statistics]
|
||||
Lihat statistik kebiasaan Anda di sini.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigasi
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Otomatis
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Tab
|
||||
---
|
||||
@@ -343,9 +343,6 @@ Spazio: %s
|
||||
[export_data_button]
|
||||
Esporta Dati
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Elimina Tutti i Dati
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Esporta Dati
|
||||
---
|
||||
@@ -397,12 +394,6 @@ Nessun dato da esportare
|
||||
[no_data_to_delete]
|
||||
Nessun dato da eliminare
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Eliminare tutti i dati?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Ciò eliminerà permanentemente tutte le sessioni salvate.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Eliminazione annullata
|
||||
---
|
||||
@@ -527,6 +518,9 @@ Eliminare questo round? Questa azione non può essere annullata.
|
||||
[delete_button]
|
||||
Elimina
|
||||
---
|
||||
[clear_button]
|
||||
Cancella
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Musica di Elijah_K.
|
||||
---
|
||||
@@ -632,20 +626,35 @@ Impossibile salvare il backup della chiave account
|
||||
[sync_private_key_backup_cancelled]
|
||||
Backup chiave account annullato
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Elimina account
|
||||
[clear_local_data_button]
|
||||
Cancella dati locali
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Eliminare account?
|
||||
[clear_local_data_title]
|
||||
Cancellare i dati locali?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Eliminare questo account dal server remoto e da questo dispositivo? L’azione non può essere annullata.
|
||||
[clear_local_data_message]
|
||||
Cancella solo i dati salvati su questo dispositivo. I dati di sincronizzazione remoti non vengono modificati.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Account eliminato
|
||||
[sync_logout_button]
|
||||
Esci
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Eliminazione account annullata
|
||||
[sync_logged_out]
|
||||
Disconnesso
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Cancella dati remoti
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Cancellare i dati remoti?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Cancella questo account di sincronizzazione dal server remoto e poi esce su questo dispositivo. L’azione non può essere annullata.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Dati remoti cancellati
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Cancellazione dei dati remoti annullata
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Nuova abitudine
|
||||
@@ -785,3 +794,15 @@ Scegli Settimanale o Calendario per rivedere l'abitudine.
|
||||
[habits_guide_statistics]
|
||||
Visualizza qui le statistiche delle abitudini.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navigazione
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Automatico
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Schede
|
||||
---
|
||||
@@ -199,7 +199,6 @@ OK
|
||||
[settings_tab_about]
|
||||
情報
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
テーマ
|
||||
---
|
||||
@@ -278,7 +277,6 @@ OK
|
||||
[coming_soon_label]
|
||||
近日公開...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
総セッション数:%d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ OK
|
||||
[export_data_button]
|
||||
データを書き出す
|
||||
---
|
||||
[delete_all_data_button]
|
||||
すべてのデータを削除
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
データを書き出す
|
||||
---
|
||||
@@ -345,12 +340,6 @@ OK
|
||||
[no_data_to_delete]
|
||||
削除するデータがありません
|
||||
---
|
||||
[delete_all_data_title]
|
||||
すべてのデータを削除しますか?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
保存済みのすべてのセッションが完全に削除されます。
|
||||
---
|
||||
[delete_cancelled]
|
||||
削除をキャンセルしました
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Inner Breeze データ書き出し
|
||||
[delete_button]
|
||||
削除
|
||||
---
|
||||
[clear_button]
|
||||
クリア
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
音楽: Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ https:// または localhost:8080 のようなループバックを使用して
|
||||
[sync_private_key_backup_cancelled]
|
||||
アカウントキーのバックアップをキャンセルしました
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
アカウントを削除
|
||||
[clear_local_data_button]
|
||||
ローカルデータをクリア
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
アカウントを削除しますか?
|
||||
[clear_local_data_title]
|
||||
ローカルデータをクリアしますか?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
このアカウントをリモートサーバーとこのデバイスから削除しますか?この操作は元に戻せません。
|
||||
[clear_local_data_message]
|
||||
この端末に保存されたデータだけをクリアします。リモートの同期データは変更されません。
|
||||
---
|
||||
[sync_account_deleted]
|
||||
アカウントを削除しました
|
||||
[sync_logout_button]
|
||||
ログアウト
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
アカウント削除をキャンセルしました
|
||||
[sync_logged_out]
|
||||
ログアウトしました
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
リモートデータをクリア
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
リモートデータをクリアしますか?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
この同期アカウントをリモートサーバーからクリアし、この端末でログアウトします。この操作は元に戻せません。
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
リモートデータをクリアしました
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
リモートデータのクリアをキャンセルしました
|
||||
---
|
||||
[habit_new_default_name]
|
||||
新しい習慣
|
||||
@@ -787,3 +794,15 @@ https:// または localhost:8080 のようなループバックを使用して
|
||||
[habits_guide_statistics]
|
||||
ここで習慣の統計を確認できます。
|
||||
---
|
||||
[nav_mode_label]
|
||||
ナビゲーション
|
||||
---
|
||||
[nav_mode_auto]
|
||||
自動
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
ドロップダウン
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
タブ
|
||||
---
|
||||
@@ -343,9 +343,6 @@ Inner Breeze
|
||||
[export_data_button]
|
||||
데이터 내보내기
|
||||
---
|
||||
[delete_all_data_button]
|
||||
모든 데이터 삭제
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
데이터 내보내기
|
||||
---
|
||||
@@ -397,12 +394,6 @@ Inner Breeze
|
||||
[no_data_to_delete]
|
||||
삭제할 데이터 없음
|
||||
---
|
||||
[delete_all_data_title]
|
||||
모든 데이터를 삭제하시겠습니까?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
저장된 모든 세션이 영구적으로 삭제됩니다.
|
||||
---
|
||||
[delete_cancelled]
|
||||
삭제 취소됨
|
||||
---
|
||||
@@ -526,6 +517,9 @@ Inner Breeze 데이터 내보내기
|
||||
[delete_button]
|
||||
삭제
|
||||
---
|
||||
[clear_button]
|
||||
지우기
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
음악: Elijah_K.
|
||||
---
|
||||
@@ -631,20 +625,35 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
[sync_private_key_backup_cancelled]
|
||||
계정 키 백업 취소됨
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
계정 삭제
|
||||
[clear_local_data_button]
|
||||
로컬 데이터 지우기
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
계정을 삭제할까요?
|
||||
[clear_local_data_title]
|
||||
로컬 데이터를 지울까요?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
원격 서버와 이 기기에서 이 계정을 삭제할까요? 이 작업은 되돌릴 수 없습니다.
|
||||
[clear_local_data_message]
|
||||
이 기기에 저장된 데이터만 지웁니다. 원격 동기화 데이터는 변경되지 않습니다.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
계정 삭제됨
|
||||
[sync_logout_button]
|
||||
로그아웃
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
계정 삭제 취소됨
|
||||
[sync_logged_out]
|
||||
로그아웃됨
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
원격 데이터 지우기
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
원격 데이터를 지울까요?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
이 동기화 계정을 원격 서버에서 지운 뒤 이 기기에서 로그아웃합니다. 이 작업은 되돌릴 수 없습니다.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
원격 데이터가 지워졌습니다
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
원격 데이터 지우기가 취소되었습니다
|
||||
---
|
||||
[habit_new_default_name]
|
||||
새 습관
|
||||
@@ -784,3 +793,15 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
|
||||
[habits_guide_statistics]
|
||||
여기에서 습관 통계를 확인하세요.
|
||||
---
|
||||
[nav_mode_label]
|
||||
탐색
|
||||
---
|
||||
[nav_mode_auto]
|
||||
자동
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
드롭다운
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
탭
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Dados
|
||||
[settings_tab_about]
|
||||
Sobre
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Tema
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Mais
|
||||
[coming_soon_label]
|
||||
Em breve...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Sessões totais: %d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Armazenamento: %s
|
||||
[export_data_button]
|
||||
Exportar dados
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Excluir todos os dados
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Exportar dados
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Não há dados para exportar
|
||||
[no_data_to_delete]
|
||||
Não há dados para excluir
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Excluir todos os dados?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Isso excluirá permanentemente todas as sessões salvas.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Exclusão cancelada
|
||||
---
|
||||
@@ -475,6 +464,9 @@ Excluir esta rodada? Isso não pode ser desfeito.
|
||||
[delete_button]
|
||||
Excluir
|
||||
---
|
||||
[clear_button]
|
||||
Limpar
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
Música por Elijah_K.
|
||||
---
|
||||
@@ -634,20 +626,35 @@ Não foi possível salvar o backup da chave da conta
|
||||
[sync_private_key_backup_cancelled]
|
||||
Backup da chave da conta cancelado
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Excluir conta
|
||||
[clear_local_data_button]
|
||||
Limpar dados locais
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Excluir conta?
|
||||
[clear_local_data_title]
|
||||
Limpar dados locais?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Excluir esta conta do servidor remoto e deste dispositivo? Esta ação não pode ser desfeita.
|
||||
[clear_local_data_message]
|
||||
Limpa apenas os dados armazenados neste dispositivo. Os dados remotos de sincronização não são alterados.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Conta excluída
|
||||
[sync_logout_button]
|
||||
Sair
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Exclusão da conta cancelada
|
||||
[sync_logged_out]
|
||||
Sessão encerrada
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Limpar dados remotos
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Limpar dados remotos?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Limpa esta conta de sincronização do servidor remoto e depois encerra a sessão neste dispositivo. Esta ação não pode ser desfeita.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Dados remotos limpos
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Limpeza dos dados remotos cancelada
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Novo hábito
|
||||
@@ -787,3 +794,15 @@ Escolha Semanal ou Calendario para revisar seu habito.
|
||||
[habits_guide_statistics]
|
||||
Veja suas estatisticas de habitos aqui.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Navegação
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Automático
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Dropdown
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Abas
|
||||
---
|
||||
@@ -202,7 +202,6 @@ OK
|
||||
[settings_tab_about]
|
||||
О приложении
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
Тема
|
||||
---
|
||||
@@ -335,7 +334,6 @@ OK
|
||||
[coming_soon_label]
|
||||
Скоро...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
Всего сессий: %d
|
||||
---
|
||||
@@ -348,9 +346,6 @@ OK
|
||||
[export_data_button]
|
||||
Экспорт данных
|
||||
---
|
||||
[delete_all_data_button]
|
||||
Удалить все данные
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
Экспорт данных
|
||||
---
|
||||
@@ -402,12 +397,6 @@ OK
|
||||
[no_data_to_delete]
|
||||
Нет данных для удаления
|
||||
---
|
||||
[delete_all_data_title]
|
||||
Удалить все данные?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
Это навсегда удалит все сохраненные сессии.
|
||||
---
|
||||
[delete_cancelled]
|
||||
Удаление отменено
|
||||
---
|
||||
@@ -532,6 +521,9 @@ OK
|
||||
[delete_button]
|
||||
Удалить
|
||||
---
|
||||
[clear_button]
|
||||
Очистить
|
||||
---
|
||||
[back_button]
|
||||
Назад
|
||||
---
|
||||
@@ -634,21 +626,35 @@ liboqs не собран для этой платформы.
|
||||
[sync_private_key_backup_cancelled]
|
||||
Сохранение резервной копии ключа аккаунта отменено
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
Удалить аккаунт
|
||||
[clear_local_data_button]
|
||||
Очистить локальные данные
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
Удалить аккаунт?
|
||||
[clear_local_data_title]
|
||||
Очистить локальные данные?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
Удалить этот аккаунт с удаленного сервера и с этого устройства? Это нельзя отменить.
|
||||
|
||||
[clear_local_data_message]
|
||||
Будут очищены только данные на этом устройстве. Удалённые данные синхронизации не изменятся.
|
||||
---
|
||||
[sync_account_deleted]
|
||||
Аккаунт удален
|
||||
[sync_logout_button]
|
||||
Выйти
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
Удаление аккаунта отменено
|
||||
[sync_logged_out]
|
||||
Выполнен выход
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
Очистить удалённые данные
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
Очистить удалённые данные?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
Этот аккаунт синхронизации будет очищен на удалённом сервере, а затем на этом устройстве будет выполнен выход. Это действие нельзя отменить.
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
Удалённые данные очищены
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
Очистка удалённых данных отменена
|
||||
---
|
||||
[habit_new_default_name]
|
||||
Новая привычка
|
||||
@@ -788,3 +794,15 @@ liboqs не собран для этой платформы.
|
||||
[habits_guide_statistics]
|
||||
Здесь можно посмотреть статистику привычек.
|
||||
---
|
||||
[nav_mode_label]
|
||||
Навигация
|
||||
---
|
||||
[nav_mode_auto]
|
||||
Авто
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
Выпадающий
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
Вкладки
|
||||
---
|
||||
@@ -199,7 +199,6 @@ Wim Hof 呼吸
|
||||
[settings_tab_about]
|
||||
关于
|
||||
---
|
||||
|
||||
[theme_label]
|
||||
主题
|
||||
---
|
||||
@@ -278,7 +277,6 @@ Wim Hof 呼吸
|
||||
[coming_soon_label]
|
||||
即将推出...
|
||||
---
|
||||
|
||||
[total_sessions_label]
|
||||
总练习次数:%d
|
||||
---
|
||||
@@ -291,9 +289,6 @@ Wim Hof 呼吸
|
||||
[export_data_button]
|
||||
导出数据
|
||||
---
|
||||
[delete_all_data_button]
|
||||
删除全部数据
|
||||
---
|
||||
[export_data_dialog_title]
|
||||
导出数据
|
||||
---
|
||||
@@ -345,12 +340,6 @@ Wim Hof 呼吸
|
||||
[no_data_to_delete]
|
||||
没有可删除的数据
|
||||
---
|
||||
[delete_all_data_title]
|
||||
删除所有数据?
|
||||
---
|
||||
[delete_all_data_message]
|
||||
这将永久删除所有已保存的会话。
|
||||
---
|
||||
[delete_cancelled]
|
||||
删除已取消
|
||||
---
|
||||
@@ -473,6 +462,9 @@ Inner Breeze 数据导出
|
||||
[delete_button]
|
||||
删除
|
||||
---
|
||||
[clear_button]
|
||||
清除
|
||||
---
|
||||
[meditation_music_attribution]
|
||||
音乐来自 Elijah_K。
|
||||
---
|
||||
@@ -632,20 +624,35 @@ liboqs 未为此目标构建。
|
||||
[sync_private_key_backup_cancelled]
|
||||
账户密钥备份已取消
|
||||
---
|
||||
[sync_delete_account_button]
|
||||
删除账户
|
||||
[clear_local_data_button]
|
||||
清除本地数据
|
||||
---
|
||||
[sync_delete_account_title]
|
||||
删除账户?
|
||||
[clear_local_data_title]
|
||||
清除本地数据?
|
||||
---
|
||||
[sync_delete_account_message]
|
||||
从远程服务器和此设备删除此账户?此操作无法撤销。
|
||||
[clear_local_data_message]
|
||||
只清除此设备上存储的数据。远程同步数据不会更改。
|
||||
---
|
||||
[sync_account_deleted]
|
||||
账户已删除
|
||||
[sync_logout_button]
|
||||
退出登录
|
||||
---
|
||||
[sync_account_delete_cancelled]
|
||||
账户删除已取消
|
||||
[sync_logged_out]
|
||||
已退出登录
|
||||
---
|
||||
[sync_clear_remote_data_button]
|
||||
清除远程数据
|
||||
---
|
||||
[sync_clear_remote_data_title]
|
||||
清除远程数据?
|
||||
---
|
||||
[sync_clear_remote_data_message]
|
||||
从远程服务器清除此同步账户,然后在此设备上退出登录。此操作无法撤销。
|
||||
---
|
||||
[sync_remote_data_cleared]
|
||||
远程数据已清除
|
||||
---
|
||||
[sync_clear_remote_data_cancelled]
|
||||
已取消清除远程数据
|
||||
---
|
||||
[habit_new_default_name]
|
||||
新习惯
|
||||
@@ -785,3 +792,15 @@ Wim Hof 屏息轮次
|
||||
[habits_guide_statistics]
|
||||
在这里查看习惯统计。
|
||||
---
|
||||
[nav_mode_label]
|
||||
导航
|
||||
---
|
||||
[nav_mode_auto]
|
||||
自动
|
||||
---
|
||||
[nav_mode_dropdown]
|
||||
下拉
|
||||
---
|
||||
[nav_mode_tabbar]
|
||||
标签页
|
||||
---
|
||||
@@ -7,14 +7,26 @@
|
||||
"theme_color": "#779999",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/web-assets/icons/icon-192x192.png",
|
||||
"src": "/site-icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/web-assets/icons/icon-512x512.png",
|
||||
"src": "/site-icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/site-icons/maskable-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/site-icons/maskable-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,10 @@
|
||||
clickable_minimum_required: "7"
|
||||
builder: custom
|
||||
framework: ubuntu-sdk-20.04
|
||||
kill: inbe
|
||||
prebuild: make -C ${ROOT} vendor-prebuilds
|
||||
build: make -C ${ROOT} CLICK_ARCH=${ARCH}
|
||||
build_dir: ${ROOT}/build/obj/click/${ARCH}
|
||||
install_dir: ${ROOT}/build/obj/click/${ARCH}/inbe
|
||||
postbuild: make -C ${ROOT} CLICK_ARCH=${ARCH} click
|
||||
ignore_review_errors: false
|
||||
@@ -0,0 +1,7 @@
|
||||
Package: inbe
|
||||
Version: 1.4.10
|
||||
Architecture: arm64
|
||||
Maintainer: Waozi Project <[email protected]>
|
||||
Click-Version: 0.4
|
||||
Installed-Size: 12560
|
||||
Description: Inner Breeze
|
||||
@@ -1,7 +0,0 @@
|
||||
Package: __CLICK_PACKAGE__
|
||||
Version: __APP_VERSION__
|
||||
Architecture: __CLICK_ARCH__
|
||||
Maintainer: __CLICK_MAINTAINER__
|
||||
Click-Version: 0.4
|
||||
Installed-Size: __INSTALLED_SIZE__
|
||||
Description: __CLICK_TITLE__
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"policy_groups": [],
|
||||
"template": "inbe",
|
||||
"policy_version": 20.04
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"policy_groups": [
|
||||
"networking"
|
||||
],
|
||||
"policy_version": __CLICK_POLICY_VERSION__
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=__CLICK_TITLE__
|
||||
Name=Inner Breeze
|
||||
Exec=run-inbe.sh
|
||||
Icon=inbe
|
||||
Terminal=false
|
||||
X-Ubuntu-Touch=true
|
||||
X-Ubuntu-Supported-Orientations=portrait,landscape
|
||||
X-Ubuntu-Supported-Orientations=portrait,landscape
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>__CLICK_PACKAGE__</id>
|
||||
<id>inbe</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
<name>Inner Breeze</name>
|
||||
@@ -28,7 +28,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="__APP_VERSION__" date="__RELEASE_DATE__"/>
|
||||
<release version="1.4.10" date="2024-06-21"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
</component>
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "inbe.waozi",
|
||||
"title": "Inner Breeze",
|
||||
"version": "1.4.10",
|
||||
"architecture": "arm64",
|
||||
"framework": "ubuntu-sdk-20.04",
|
||||
"description": "Syncable breathing, meditation, and habit practice app.",
|
||||
"maintainer": "Waozi <[email protected]>",
|
||||
"hooks": {
|
||||
"inbe": {
|
||||
"apparmor": "inbe.apparmor",
|
||||
"desktop": "inbe.desktop"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "__CLICK_PACKAGE__",
|
||||
"title": "__CLICK_TITLE__",
|
||||
"version": "__APP_VERSION__",
|
||||
"architecture": "__CLICK_ARCH__",
|
||||
"framework": "__CLICK_FRAMEWORK__",
|
||||
"description": "Syncable breathing, meditation, and habit practice app.",
|
||||
"maintainer": "__CLICK_MAINTAINER__",
|
||||
"hooks": {
|
||||
"inbe": {
|
||||
"apparmor": "inbe.apparmor",
|
||||
"desktop": "inbe.desktop"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,173 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Icon Generation Script for Inner Breeze
|
||||
# Generates transparent icons by default, plus maskable/adaptive variants where
|
||||
# platforms clip icons into a shape and need a full-bleed background.
|
||||
|
||||
SKY_BLUE="#87CEEB"
|
||||
SOURCE_IMAGE="${1:-flint/icons/inbe.png}"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
echo "🔨 Inner Breeze Icon Generator"
|
||||
echo "=============================="
|
||||
echo
|
||||
|
||||
# Validate ImageMagick installation
|
||||
if ! command -v magick &> /dev/null; then
|
||||
echo "❌ Error: ImageMagick v7 not found. Please install ImageMagick:"
|
||||
echo " Ubuntu/Debian: sudo apt-get install imagemagick"
|
||||
echo " macOS: brew install imagemagick"
|
||||
echo " Fedora: sudo dnf install imagemagick"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate source image
|
||||
if [ ! -f "$SOURCE_IMAGE" ]; then
|
||||
echo "❌ Error: Source image not found: $SOURCE_IMAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Using source image: $SOURCE_IMAGE"
|
||||
echo "🎨 Maskable/adaptive background color: $SKY_BLUE (Sky Blue)"
|
||||
echo
|
||||
|
||||
# Create output directories
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/drawable"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-mdpi"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-hdpi"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xhdpi"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxhdpi"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxxhdpi"
|
||||
mkdir -p "$PROJECT_ROOT/droid/app/src/main/res/mipmap-anydpi-v26"
|
||||
mkdir -p "$PROJECT_ROOT/windows"
|
||||
mkdir -p "$PROJECT_ROOT/packaging/linux/appimage"
|
||||
mkdir -p "$PROJECT_ROOT/packaging/chrome-web-store/icons"
|
||||
mkdir -p "$PROJECT_ROOT/web-assets/icons"
|
||||
mkdir -p "$PROJECT_ROOT/site-icons"
|
||||
mkdir -p "$PROJECT_ROOT/fastlane/metadata/android/en-US/images"
|
||||
|
||||
generate_transparent() {
|
||||
local size=$1
|
||||
local output=$2
|
||||
magick "$SOURCE_IMAGE" \
|
||||
-filter lanczos \
|
||||
-resize "${size}x${size}" \
|
||||
-strip \
|
||||
+set date:create +set date:modify +set date:timestamp \
|
||||
-define png:exclude-chunk=time \
|
||||
"$output"
|
||||
}
|
||||
|
||||
generate_maskable() {
|
||||
local size=$1
|
||||
local output=$2
|
||||
local logo_size=$((size * 4 / 5))
|
||||
magick "$SOURCE_IMAGE" \
|
||||
-filter lanczos \
|
||||
-resize "${logo_size}x${logo_size}" \
|
||||
-background none \
|
||||
-gravity center \
|
||||
-extent "${size}x${size}" \
|
||||
\( -size "${size}x${size}" "xc:$SKY_BLUE" \) +swap \
|
||||
-compose over \
|
||||
-composite \
|
||||
-strip \
|
||||
+set date:create +set date:modify +set date:timestamp \
|
||||
-define png:exclude-chunk=time \
|
||||
"$output"
|
||||
}
|
||||
|
||||
write_android_background() {
|
||||
cat > "$PROJECT_ROOT/droid/app/src/main/res/drawable/ic_launcher_background.xml" <<EOF
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="$SKY_BLUE" />
|
||||
</shape>
|
||||
EOF
|
||||
}
|
||||
|
||||
echo "📱 Generating Android icons..."
|
||||
|
||||
# Android legacy launcher icons support transparency.
|
||||
generate_transparent 48 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-mdpi/ic_launcher.png"
|
||||
generate_transparent 72 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-hdpi/ic_launcher.png"
|
||||
generate_transparent 96 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xhdpi/ic_launcher.png"
|
||||
generate_transparent 144 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png"
|
||||
generate_transparent 192 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png"
|
||||
|
||||
generate_transparent 48 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png"
|
||||
generate_transparent 72 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png"
|
||||
generate_transparent 96 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png"
|
||||
generate_transparent 144 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png"
|
||||
generate_transparent 192 "$PROJECT_ROOT/droid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png"
|
||||
|
||||
# Android adaptive icons use a full-bleed background plus a transparent foreground.
|
||||
write_android_background
|
||||
generate_transparent 432 "$PROJECT_ROOT/droid/app/src/main/res/drawable/ic_launcher_foreground.png"
|
||||
|
||||
echo "✅ Android icons generated"
|
||||
|
||||
echo "🪟 Generating Windows icon..."
|
||||
|
||||
# ICO supports transparency; do not flatten.
|
||||
magick \
|
||||
"$SOURCE_IMAGE" -resize 256x256 -strip \
|
||||
"$SOURCE_IMAGE" -resize 192x192 -strip \
|
||||
"$SOURCE_IMAGE" -resize 32x32 -strip \
|
||||
"$PROJECT_ROOT/windows/inbe.ico"
|
||||
|
||||
echo "✅ Windows icon generated"
|
||||
|
||||
echo "🐧 Generating Linux AppImage icon..."
|
||||
|
||||
# AppImage desktop icons are PNGs and support transparency.
|
||||
generate_transparent 256 "$PROJECT_ROOT/packaging/linux/appimage/inbe.png"
|
||||
|
||||
echo "✅ Linux AppImage icon generated"
|
||||
|
||||
echo "🏪 Generating Fastlane store icon..."
|
||||
|
||||
# F-Droid/Fastlane store listing icon expects a 512x512 PNG.
|
||||
generate_maskable 512 "$PROJECT_ROOT/fastlane/metadata/android/en-US/images/icon.png"
|
||||
|
||||
echo "✅ Fastlane store icon generated"
|
||||
|
||||
echo "🌐 Generating Chrome Web Store icons..."
|
||||
|
||||
# Chrome Web Store icons (transparent, various sizes)
|
||||
generate_transparent 16 "$PROJECT_ROOT/packaging/chrome-web-store/icons/icon-16.png"
|
||||
generate_transparent 32 "$PROJECT_ROOT/packaging/chrome-web-store/icons/icon-32.png"
|
||||
generate_transparent 48 "$PROJECT_ROOT/packaging/chrome-web-store/icons/icon-48.png"
|
||||
generate_transparent 128 "$PROJECT_ROOT/packaging/chrome-web-store/icons/icon-128.png"
|
||||
|
||||
echo "✅ Chrome Web Store icons generated"
|
||||
|
||||
echo "🌐 Generating Web/PWA icons..."
|
||||
|
||||
# Web/PWA icons (for manifest.json and web_shell.html)
|
||||
generate_transparent 192 "$PROJECT_ROOT/site-icons/icon-192x192.png"
|
||||
generate_transparent 512 "$PROJECT_ROOT/site-icons/icon-512x512.png"
|
||||
generate_maskable 192 "$PROJECT_ROOT/site-icons/maskable-192x192.png"
|
||||
generate_maskable 512 "$PROJECT_ROOT/site-icons/maskable-512x512.png"
|
||||
generate_transparent 180 "$PROJECT_ROOT/site-icons/apple-touch-icon.png"
|
||||
|
||||
# Favicon PNG supports transparency.
|
||||
generate_transparent 32 "$PROJECT_ROOT/site-icons/favicon-32x32.png"
|
||||
|
||||
echo "✅ Web/PWA icons generated"
|
||||
|
||||
echo
|
||||
echo "🎉 Icon generation complete!"
|
||||
echo
|
||||
echo "Generated icons:"
|
||||
echo " 📱 Android: mipmap PNGs + adaptive drawable foreground/background"
|
||||
echo " 🪟 Windows: windows/inbe.ico (256, 192, 32 resolutions)"
|
||||
echo " 🐧 Linux: packaging/linux/appimage/inbe.png (256x256 transparent)"
|
||||
echo " 🏪 Store: fastlane/metadata/android/en-US/images/icon.png (512x512)"
|
||||
echo " 🌐 Chrome: packaging/chrome-web-store/icons/ (16, 32, 48, 128)"
|
||||
echo " 🌐 Web: site-icons/ (transparent + maskable PWA icons)"
|
||||
echo
|
||||
echo "💡 Tip: Review generated icons before committing to version control."
|
||||
@@ -1,23 +1,29 @@
|
||||
# Icon sizes for Inner Breeze
|
||||
# Run 'make' to regenerate from ../icons/inbe.png
|
||||
# Run 'make' to regenerate from ../flint/icons/inbe.png
|
||||
|
||||
SOURCE_PNG := ../icons/lotus.png
|
||||
SOURCE_PNG := ../flint/icons/inbe.png
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: favicon-32x32.png apple-touch-icon.png icon-192x192.png icon-512x512.png
|
||||
all: favicon-32x32.png apple-touch-icon.png icon-192x192.png icon-512x512.png maskable-192x192.png maskable-512x512.png
|
||||
|
||||
favicon-32x32.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -interpolate Nearest -filter point -resize 32x32 $@
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 32x32 -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
apple-touch-icon.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -interpolate Nearest -filter point -resize 180x180 $@
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 180x180 -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
icon-192x192.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -interpolate Nearest -filter point -resize 192x192 $@
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 192x192 -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
icon-512x512.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -interpolate Nearest -filter point -resize 512x512 $@
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 512x512 -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
maskable-192x192.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 153x153 -background none -gravity center -extent 192x192 \( -size 192x192 xc:"#87CEEB" \) +swap -compose over -composite -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
maskable-512x512.png: $(SOURCE_PNG)
|
||||
magick $(SOURCE_PNG) -filter lanczos -resize 409x409 -background none -gravity center -extent 512x512 \( -size 512x512 xc:"#87CEEB" \) +swap -compose over -composite -strip +set date:create +set date:modify +set date:timestamp -define png:exclude-chunk=time $@
|
||||
|
||||
clean:
|
||||
rm -f favicon-32x32.png apple-touch-icon.png icon-192x192.png icon-512x512.png
|
||||
rm -f favicon-32x32.png apple-touch-icon.png icon-192x192.png icon-512x512.png maskable-192x192.png maskable-512x512.png
|
||||
|
Before Width: | Height: | Size: 983 B After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 249 KiB |
@@ -517,6 +517,9 @@ app_switch_screen(InbeApp *app, int screen)
|
||||
app->screen_transition_target == screen))
|
||||
return;
|
||||
|
||||
if(screen == InbeScreenHabits && app->inbe.screen != InbeScreenHabits)
|
||||
app->habits.focus_selected_tab = 1;
|
||||
|
||||
app->screen_transition_target = screen;
|
||||
if(app->screen_transition.active) {
|
||||
if(app->inbe.screen != screen)
|
||||
@@ -554,6 +557,8 @@ app_observe_direct_screen_change(InbeApp *app, int before_screen)
|
||||
.ticks = 0,
|
||||
.duration = APP_SCREEN_TRANSITION_TICKS
|
||||
};
|
||||
if(app->inbe.screen == InbeScreenHabits && before_screen != InbeScreenHabits)
|
||||
app->habits.focus_selected_tab = 1;
|
||||
app->screen_transition_target = app->inbe.screen;
|
||||
}
|
||||
|
||||
@@ -688,8 +693,11 @@ app_toolbar_height(void)
|
||||
int
|
||||
app_content_top_reserved(const InbeApp *app)
|
||||
{
|
||||
if(app != NULL && app->inbe.screen == InbeScreenStart)
|
||||
return app_toolbar_height() + flint_px(PRACTICE_CATEGORY_TAB_H);
|
||||
if(app != NULL && app->inbe.screen == InbeScreenStart) {
|
||||
int selector_h = app_should_use_tab_bar(app) ? ui_tab_bar_height()
|
||||
: app_toolbar_height();
|
||||
return selector_h + flint_px(PRACTICE_CATEGORY_TAB_H);
|
||||
}
|
||||
return app_toolbar_height();
|
||||
}
|
||||
|
||||
@@ -1470,6 +1478,7 @@ app_init(void *vapp) {
|
||||
app->inbe.screen = app->main_tab == APP_MAIN_TAB_HABITS
|
||||
? InbeScreenHabits
|
||||
: InbeScreenStart;
|
||||
app->habits.focus_selected_tab = app->inbe.screen == InbeScreenHabits;
|
||||
app->screen_transition_target = app->inbe.screen;
|
||||
init_audio(app);
|
||||
for(int i = 0; i < practice_count(); i++) {
|
||||
@@ -1902,7 +1911,8 @@ finish_frame:
|
||||
ui_set_input_blocked(0);
|
||||
practice_screen_draw_first_run_guide(app);
|
||||
habits_screen_draw_first_run_guide(app);
|
||||
ui_set_input_blocked(0);
|
||||
if(!guide_active)
|
||||
ui_set_input_blocked(0);
|
||||
draw_global_modal(app);
|
||||
app_flush_deferred_settings(app);
|
||||
app_observe_direct_screen_change(app, frame_screen);
|
||||
@@ -2053,3 +2063,24 @@ app_destroy(void *vapp)
|
||||
|
||||
free(app);
|
||||
}
|
||||
|
||||
int
|
||||
app_should_use_tab_bar(const InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
|
||||
// Check navigation mode setting
|
||||
switch(app->navigation_mode) {
|
||||
case NAV_MODE_DROPDOWN:
|
||||
return 0; // Always use dropdown
|
||||
case NAV_MODE_TABBAR:
|
||||
return 1; // Always use tab bar
|
||||
case NAV_MODE_AUTO:
|
||||
default:
|
||||
break; // Continue to intelligent detection
|
||||
}
|
||||
|
||||
// Intelligent mode: show tab bar on wider screens
|
||||
return ui_view_width > 500;
|
||||
}
|
||||
@@ -116,6 +116,12 @@ typedef enum AppOrientationMode {
|
||||
APP_ORIENTATION_SENSOR = 3,
|
||||
} AppOrientationMode;
|
||||
|
||||
typedef enum NavigationMode {
|
||||
NAV_MODE_TABBAR = 0,
|
||||
NAV_MODE_DROPDOWN = 1,
|
||||
NAV_MODE_AUTO = 2,
|
||||
} NavigationMode;
|
||||
|
||||
typedef enum AppDeviceOrientation {
|
||||
APP_DEVICE_ORIENTATION_UNKNOWN = 0,
|
||||
APP_DEVICE_ORIENTATION_PORTRAIT = 1,
|
||||
@@ -243,6 +249,7 @@ struct InbeApp {
|
||||
int dark_mode;
|
||||
int theme_mode;
|
||||
int orientation_mode;
|
||||
int navigation_mode;
|
||||
int android_orientation;
|
||||
int main_tab;
|
||||
int sidebar_open;
|
||||
@@ -296,6 +303,7 @@ int app_content_top_reserved(const InbeApp *app);
|
||||
int app_content_bottom_reserved(const InbeApp *app);
|
||||
int app_toolbar_height(void);
|
||||
int app_auto_sync(InbeApp *app);
|
||||
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);
|
||||
void app_unload_texture(Texture2D texture);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
#include <emscripten.h>
|
||||
@@ -311,6 +312,11 @@ app_load_settings(InbeApp *app)
|
||||
|
||||
load_language_setting(app, settings_missing);
|
||||
|
||||
// Check for environment variable override for dark mode
|
||||
if(getenv("INBE_FORCE_DARK_MODE") != NULL) {
|
||||
app->theme_mode = APP_THEME_DARK;
|
||||
}
|
||||
|
||||
#if INBE_ANDROID_BUILD || defined(PLATFORM_WEB)
|
||||
app->inbe.play_in_background =
|
||||
storage_get_setting_int("play_in_background", 1) != 0;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define INBE_VERSION_H
|
||||
|
||||
#define INBE_VERSION_MAJOR 1
|
||||
#define INBE_VERSION_MINOR 4
|
||||
#define INBE_VERSION_PATCH 10
|
||||
#define INBE_VERSION_STRING "1.4.10"
|
||||
#define INBE_VERSION_MINOR 5
|
||||
#define INBE_VERSION_PATCH 0
|
||||
#define INBE_VERSION_STRING "1.5.0"
|
||||
|
||||
#endif
|
||||
@@ -173,6 +173,13 @@ habit_edit_commit(InbeApp *app)
|
||||
habits_save(&app->habits);
|
||||
}
|
||||
} else {
|
||||
// Check for duplicate names when editing existing habit
|
||||
if(habits_name_exists(&app->habits, text, index)) {
|
||||
// Show error modal or prevent the update
|
||||
// For now, just return without saving
|
||||
habit_edit_cancel(app);
|
||||
return;
|
||||
}
|
||||
snprintf(app->habits.items[index].name,
|
||||
sizeof(app->habits.items[index].name), "%s", text);
|
||||
app->habits.items[index].color = app->habit_edit.color;
|
||||
@@ -356,7 +363,7 @@ draw_habit_edit_screen(InbeApp *app)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
top_h = app_content_top_reserved(app) + flint_px(40);
|
||||
top_h = habits_screen_top_reserved(app);
|
||||
y = top_h + flint_px(18);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
/* Helper functions */
|
||||
static void habits_add_seed(InbeHabits *habits, const char *id, const char *name,
|
||||
Color color, int activity_mask);
|
||||
static void habits_repair_default_meditation_link(InbeHabits *habits);
|
||||
|
||||
enum {
|
||||
HABITS_GUIDE_STEPS = 4,
|
||||
@@ -235,6 +236,14 @@ habits_save(InbeHabits *habits)
|
||||
if(habits != NULL)
|
||||
habits->dirty = 0;
|
||||
storage_habits_save(habits);
|
||||
if(habits != NULL) {
|
||||
habits->loaded_count = habits->count;
|
||||
for(int i = 0; i < habits->loaded_count; i++)
|
||||
copy_text(habits->loaded_ids[i], sizeof(habits->loaded_ids[i]),
|
||||
habits->items[i].id);
|
||||
for(int i = habits->loaded_count; i < INBE_HABIT_MAX; i++)
|
||||
habits->loaded_ids[i][0] = '\0';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -318,22 +327,67 @@ habits_delete(InbeHabits *habits, int index)
|
||||
habits_save(habits);
|
||||
}
|
||||
|
||||
int
|
||||
habits_name_exists(const InbeHabits *habits, const char *name, int exclude_index)
|
||||
{
|
||||
if(habits == NULL || name == NULL)
|
||||
return 0;
|
||||
|
||||
for(int i = 0; i < habits->count; i++) {
|
||||
if(i == exclude_index)
|
||||
continue; // Skip current habit when editing
|
||||
if(strcmp(habits->items[i].name, name) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
habits_generate_unique_name(InbeHabits *habits, char *name_buffer, size_t buffer_size, const char *base_name)
|
||||
{
|
||||
if(habits == NULL || name_buffer == NULL || base_name == NULL)
|
||||
return;
|
||||
|
||||
// Try base name first
|
||||
snprintf(name_buffer, buffer_size, "%s", base_name);
|
||||
|
||||
if(!habits_name_exists(habits, name_buffer, -1))
|
||||
return;
|
||||
|
||||
// Append numbers until we find a unique name
|
||||
for(int i = 2; i < 100; i++) {
|
||||
snprintf(name_buffer, buffer_size, "%s %d", base_name, i);
|
||||
if(!habits_name_exists(habits, name_buffer, -1))
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback to timestamp-based name
|
||||
snprintf(name_buffer, buffer_size, "%s %ld", base_name, (long)time(NULL));
|
||||
}
|
||||
|
||||
int
|
||||
habits_add_custom(InbeHabits *habits, const char *name, Color color,
|
||||
int sync_mode, int sync_activity)
|
||||
{
|
||||
InbeHabit *habit;
|
||||
int number;
|
||||
char unique_name[INBE_HABIT_NAME_SIZE];
|
||||
|
||||
if(habits == NULL || habits->count >= INBE_HABIT_MAX)
|
||||
return -1;
|
||||
|
||||
// Ensure name is unique
|
||||
const char *final_name = name != NULL && name[0] != '\0' ? name : "Habit";
|
||||
if(habits_name_exists(habits, final_name, -1)) {
|
||||
habits_generate_unique_name(habits, unique_name, sizeof(unique_name), final_name);
|
||||
final_name = unique_name;
|
||||
}
|
||||
|
||||
number = habits->count + 1;
|
||||
habit = &habits->items[habits->count];
|
||||
memset(habit, 0, sizeof(*habit));
|
||||
snprintf(habit->id, sizeof(habit->id), "habit-%d", number);
|
||||
copy_text(habit->name, sizeof(habit->name),
|
||||
name != NULL && name[0] != '\0' ? name : "Habit");
|
||||
copy_text(habit->name, sizeof(habit->name), final_name);
|
||||
habit->color = color;
|
||||
habit->color.a = 255;
|
||||
habit->sync_mode = sync_mode;
|
||||
@@ -371,6 +425,11 @@ habits_init(InbeHabits *habits)
|
||||
return;
|
||||
data_init();
|
||||
if(storage_habits_load(habits)) {
|
||||
if(habits->count <= 0) {
|
||||
habits_add_default_set(habits);
|
||||
return;
|
||||
}
|
||||
habits_repair_default_meditation_link(habits);
|
||||
if(habits->count == 3 &&
|
||||
strcmp(habits->items[0].id, "mind") == 0 &&
|
||||
strcmp(habits->items[1].id, "yoga") == 0 &&
|
||||
@@ -739,6 +798,80 @@ habit_open_linked_edit_page(InbeApp *app, int habit_index, int day_index)
|
||||
app_switch_screen(app, InbeScreenHabitSessionEdit);
|
||||
}
|
||||
|
||||
static int
|
||||
habits_screen_draw_desktop_tab_bar(InbeApp *app, int y)
|
||||
{
|
||||
FlintUITab tabs[INBE_HABIT_MAX + 1];
|
||||
int tab_count = 0;
|
||||
|
||||
if(app == NULL)
|
||||
return -1;
|
||||
|
||||
// Create tab for each habit
|
||||
for(int i = 0; i < app->habits.count && i < INBE_HABIT_MAX; i++) {
|
||||
tabs[tab_count++] = (FlintUITab){
|
||||
.label = app->habits.items[i].name,
|
||||
.icon = (Texture2D){0},
|
||||
.icon_size = 0,
|
||||
.disabled = app->modal.active,
|
||||
.accent = app->habits.items[i].color
|
||||
};
|
||||
}
|
||||
|
||||
// Add "+" option as last tab
|
||||
tabs[tab_count++] = (FlintUITab){
|
||||
.label = NULL,
|
||||
.icon = app->icons[UI_ICON_TYPE_PLUS],
|
||||
.icon_size = flint_px(16),
|
||||
.disabled = app->modal.active
|
||||
};
|
||||
|
||||
int clicked = ui_draw_tab_bar((FlintUITabBar){
|
||||
.bounds = {0, (float)y, (float)view_width, (float)ui_tab_bar_height()},
|
||||
.tabs = tabs,
|
||||
.count = tab_count,
|
||||
.selected_index = app->habits.selected,
|
||||
.min_tab_width = flint_px(100),
|
||||
.max_tab_width = flint_px(160),
|
||||
.scroll_offset = &app->habits.tab_scroll,
|
||||
.focus_selected = app->habits.focus_selected_tab
|
||||
});
|
||||
app->habits.focus_selected_tab = 0;
|
||||
return clicked;
|
||||
}
|
||||
|
||||
static int
|
||||
habits_screen_selector_height(InbeApp *app)
|
||||
{
|
||||
return app_should_use_tab_bar(app) ? ui_tab_bar_height()
|
||||
: flint_px(HABITS_TOP_H);
|
||||
}
|
||||
|
||||
int
|
||||
habits_screen_top_reserved(InbeApp *app)
|
||||
{
|
||||
return habits_screen_selector_height(app) + flint_px(HABITS_TAB_H);
|
||||
}
|
||||
|
||||
static void
|
||||
habits_repair_default_meditation_link(InbeHabits *habits)
|
||||
{
|
||||
int default_activity = habit_activity_mask_for(EXERCISE_WIM_HOF) |
|
||||
habit_activity_mask_for(EXERCISE_MEDITATION);
|
||||
|
||||
if(habits == NULL || habits->count != 1)
|
||||
return;
|
||||
if(strcmp(habits->items[0].name, "Meditation") != 0)
|
||||
return;
|
||||
if(habits->items[0].sync_mode == INBE_HABIT_SYNC_ACTIVITIES &&
|
||||
habits->items[0].sync_activity == default_activity)
|
||||
return;
|
||||
|
||||
habits->items[0].sync_mode = INBE_HABIT_SYNC_ACTIVITIES;
|
||||
habits->items[0].sync_activity = default_activity;
|
||||
habits_save(habits);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_habits_top_bar(InbeApp *app, int draw_menu)
|
||||
{
|
||||
@@ -768,25 +901,52 @@ draw_habits_top_bar(InbeApp *app, int draw_menu)
|
||||
selected = 0;
|
||||
|
||||
if(!draw_menu) {
|
||||
dropdown_selected = selected;
|
||||
header_result = ui_draw_toolbar_header((FlintUIToolbarHeader){
|
||||
.leading_icon = (Texture2D){0},
|
||||
.toolbar = (FlintUIToolbar){
|
||||
.id = 301,
|
||||
.height = top_h,
|
||||
.options = app->modal.active ? NULL : options,
|
||||
.option_count = app->modal.active ? 0 : option_count,
|
||||
.selected_index = &dropdown_selected,
|
||||
.dropdown_min_width = flint_px(150),
|
||||
.dropdown_max_width = flint_px(260),
|
||||
.dropdown_height = flint_px(36),
|
||||
.side_padding = flint_px(12)
|
||||
}
|
||||
});
|
||||
(void)header_result.leading_clicked;
|
||||
toolbar_result = header_result.toolbar;
|
||||
(void)toolbar_result;
|
||||
// Desktop mode: use tab bar instead of dropdown
|
||||
if(app_should_use_tab_bar(app)) {
|
||||
int clicked_habit = habits_screen_draw_desktop_tab_bar(app, 0);
|
||||
|
||||
// Handle habit selection
|
||||
if(clicked_habit >= 0) {
|
||||
if(clicked_habit == app->habits.count) {
|
||||
// "Add new habit" clicked
|
||||
habit_edit_begin_new(app);
|
||||
} else if(clicked_habit != app->habits.selected) {
|
||||
// Different habit selected
|
||||
int was_edit_tab = app->habits.tab == HABIT_TAB_EDIT;
|
||||
if(was_edit_tab && app->habit_edit.active)
|
||||
habit_edit_commit(app);
|
||||
app->habits.selected = clicked_habit;
|
||||
app->habits.scroll = 0;
|
||||
app->habits.weekly_days = HABIT_WEEKLY_INITIAL_DAYS;
|
||||
if(was_edit_tab) {
|
||||
app->habits.tab = HABIT_TAB_EDIT;
|
||||
habit_edit_begin(app, app->habits.selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Mobile mode: keep existing dropdown
|
||||
dropdown_selected = selected;
|
||||
header_result = ui_draw_toolbar_header((FlintUIToolbarHeader){
|
||||
.leading_icon = (Texture2D){0},
|
||||
.toolbar = (FlintUIToolbar){
|
||||
.id = 301,
|
||||
.height = top_h,
|
||||
.options = app->modal.active ? NULL : options,
|
||||
.option_count = app->modal.active ? 0 : option_count,
|
||||
.selected_index = &dropdown_selected,
|
||||
.dropdown_min_width = flint_px(150),
|
||||
.dropdown_max_width = flint_px(260),
|
||||
.dropdown_height = flint_px(36),
|
||||
.side_padding = flint_px(12)
|
||||
}
|
||||
});
|
||||
(void)header_result.leading_clicked;
|
||||
toolbar_result = header_result.toolbar;
|
||||
(void)toolbar_result;
|
||||
}
|
||||
|
||||
// Keep existing subtab bar for Weekly/Monthly/Statistics/Edit (works in both modes)
|
||||
tabs[HABIT_TAB_WEEKLY] = (FlintUISubtab){
|
||||
.icon = app->icons[UI_ICON_TYPE_WEEKLY],
|
||||
.icon_size = flint_px(20),
|
||||
@@ -807,8 +967,10 @@ draw_habits_top_bar(InbeApp *app, int draw_menu)
|
||||
.icon_size = flint_px(20),
|
||||
.disabled = app->modal.active
|
||||
};
|
||||
|
||||
int tab_y = habits_screen_selector_height(app);
|
||||
clicked_tab = ui_draw_subtab_bar((FlintUISubtabBar){
|
||||
.bounds = {0, (float)top_h, (float)view_width, (float)tab_h},
|
||||
.bounds = {0, (float)tab_y, (float)view_width, (float)tab_h},
|
||||
.tabs = tabs,
|
||||
.count = HABIT_TAB_COUNT,
|
||||
.selected_index = app->habits.tab
|
||||
@@ -943,9 +1105,8 @@ habits_screen_dropdown_anchor(void)
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
habits_screen_tab_anchor(int first_tab, int tab_count)
|
||||
habits_screen_tab_anchor(InbeApp *app, int first_tab, int tab_count)
|
||||
{
|
||||
int top_h = flint_px(HABITS_TOP_H);
|
||||
int tab_h = flint_px(HABITS_TAB_H);
|
||||
int tab_w = view_width / HABIT_TAB_COUNT;
|
||||
int x = first_tab * tab_w;
|
||||
@@ -956,15 +1117,36 @@ habits_screen_tab_anchor(int first_tab, int tab_count)
|
||||
if(w < 1)
|
||||
w = 1;
|
||||
|
||||
return (Rectangle){(float)x, (float)top_h, (float)w, (float)tab_h};
|
||||
return (Rectangle){(float)x, (float)habits_screen_selector_height(app),
|
||||
(float)w, (float)tab_h};
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
habits_screen_practice_list_anchor(void)
|
||||
habits_screen_habit_tabs_anchor(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return (Rectangle){0};
|
||||
|
||||
// Desktop mode: highlight all habit 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 habits_screen_dropdown_anchor();
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
habits_screen_practice_list_anchor(InbeApp *app)
|
||||
{
|
||||
int content_x;
|
||||
int content_w;
|
||||
int top_h = app_content_top_reserved(NULL) + flint_px(HABITS_TAB_H);
|
||||
int top_h = habits_screen_top_reserved(app);
|
||||
int y = top_h + flint_px(18);
|
||||
int field_h = flint_px(40);
|
||||
int section_h = ui_section_label_height((FlintUISectionLabel){0});
|
||||
@@ -993,19 +1175,19 @@ habits_screen_draw_first_run_guide(InbeApp *app)
|
||||
return;
|
||||
|
||||
steps[0] = (FlintUIGuideStep){
|
||||
habits_screen_dropdown_anchor(),
|
||||
habits_screen_habit_tabs_anchor(app),
|
||||
locale_get("habits_guide_dropdown")
|
||||
};
|
||||
steps[1] = (FlintUIGuideStep){
|
||||
habits_screen_practice_list_anchor(),
|
||||
habits_screen_practice_list_anchor(app),
|
||||
locale_get("habits_guide_practice_list")
|
||||
};
|
||||
steps[2] = (FlintUIGuideStep){
|
||||
habits_screen_tab_anchor(HABIT_TAB_WEEKLY, 2),
|
||||
habits_screen_tab_anchor(app, HABIT_TAB_WEEKLY, 2),
|
||||
locale_get("habits_guide_views")
|
||||
};
|
||||
steps[3] = (FlintUIGuideStep){
|
||||
habits_screen_tab_anchor(HABIT_TAB_STATISTICS, 1),
|
||||
habits_screen_tab_anchor(app, HABIT_TAB_STATISTICS, 1),
|
||||
locale_get("habits_guide_statistics")
|
||||
};
|
||||
|
||||
@@ -1015,7 +1197,7 @@ habits_screen_draw_first_run_guide(InbeApp *app)
|
||||
.step = &app->habits_guide_step,
|
||||
.view_width = view_width,
|
||||
.view_height = view_height,
|
||||
.reserved_top = flint_px(HABITS_TOP_H + HABITS_TAB_H),
|
||||
.reserved_top = habits_screen_top_reserved(app),
|
||||
.reserved_bottom = ui_bottom_nav_height(),
|
||||
.max_width = flint_px(300),
|
||||
.paragraph_font = flint_ui_font_small(),
|
||||
@@ -1464,7 +1646,7 @@ draw_habits_screen(InbeApp *app)
|
||||
else if(app->habits.tab == HABIT_TAB_MONTHLY)
|
||||
app->habits.view_mode = HABIT_VIEW_CALENDAR;
|
||||
|
||||
content_top = app_content_top_reserved(app) + flint_px(40);
|
||||
content_top = habits_screen_top_reserved(app);
|
||||
content_bottom = app_content_bottom_reserved(app);
|
||||
y = content_top + flint_px(8);
|
||||
viewport_h = view_height - content_top - content_bottom;
|
||||
|
||||
@@ -61,9 +61,13 @@ typedef struct InbeHabit {
|
||||
|
||||
typedef struct InbeHabits {
|
||||
InbeHabit items[INBE_HABIT_MAX];
|
||||
char loaded_ids[INBE_HABIT_MAX][INBE_HABIT_ID_SIZE];
|
||||
int count;
|
||||
int loaded_count;
|
||||
int selected;
|
||||
int scroll;
|
||||
int tab_scroll;
|
||||
int focus_selected_tab;
|
||||
int month_offset;
|
||||
int selector_open;
|
||||
int view_mode;
|
||||
@@ -118,6 +122,8 @@ void habit_toggle_today(InbeHabits *habits, int index);
|
||||
void habits_add_default(InbeHabits *habits);
|
||||
void habits_add_default_set(InbeHabits *habits);
|
||||
void habits_delete(InbeHabits *habits, int index);
|
||||
int habits_name_exists(const InbeHabits *habits, const char *name, int exclude_index);
|
||||
void habits_generate_unique_name(InbeHabits *habits, char *name_buffer, size_t buffer_size, const char *base_name);
|
||||
int habits_add_custom(InbeHabits *habits, const char *name, Color color,
|
||||
int sync_mode, int sync_activity);
|
||||
int habit_activity_mask_for(int exercise);
|
||||
@@ -135,6 +141,7 @@ void habit_edit_cancel(InbeApp *app);
|
||||
void draw_habits_screen(InbeApp *app);
|
||||
void draw_habit_edit_screen(InbeApp *app);
|
||||
void draw_habit_session_edit_screen(InbeApp *app);
|
||||
int habits_screen_top_reserved(InbeApp *app);
|
||||
int habits_screen_first_run_guide_active(const InbeApp *app);
|
||||
void habits_screen_prepare_first_run_guide(InbeApp *app);
|
||||
void habits_screen_draw_first_run_guide(InbeApp *app);
|
||||
|
||||
@@ -109,6 +109,42 @@ practice_screen_open_tab(InbeApp *app, int tab)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
practice_screen_draw_desktop_tab_bar(InbeApp *app, int y)
|
||||
{
|
||||
FlintUITab tabs[EXERCISE_COUNT];
|
||||
int tab_count = 0;
|
||||
|
||||
if(app == NULL)
|
||||
return -1;
|
||||
|
||||
// Create tab for each exercise type
|
||||
for(int i = 0; i < EXERCISE_COUNT; i++) {
|
||||
tabs[tab_count++] = (FlintUITab){
|
||||
.label = practice_activity_label(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 = tab_count,
|
||||
.selected_index = app->exercise_type,
|
||||
.min_tab_width = flint_px(120),
|
||||
.max_tab_width = flint_px(180)
|
||||
});
|
||||
}
|
||||
|
||||
static int
|
||||
practice_screen_selector_height(InbeApp *app)
|
||||
{
|
||||
return app_should_use_tab_bar(app) ? ui_tab_bar_height()
|
||||
: app_toolbar_height();
|
||||
}
|
||||
|
||||
void
|
||||
practice_screen_draw_top_bar(InbeApp *app, int draw_menu)
|
||||
{
|
||||
@@ -150,23 +186,41 @@ practice_screen_draw_top_bar(InbeApp *app, int draw_menu)
|
||||
return;
|
||||
}
|
||||
|
||||
(void)ui_draw_toolbar_header((FlintUIToolbarHeader){
|
||||
.leading_icon = (Texture2D){0},
|
||||
.toolbar = (FlintUIToolbar){
|
||||
.id = 300,
|
||||
.height = app_toolbar_height(),
|
||||
.options = app->modal.active ? NULL : exercise_options,
|
||||
.option_count = app->modal.active ? 0 : activity_count,
|
||||
.selected_index = &activity_index,
|
||||
.dropdown_min_width = flint_px(160),
|
||||
.dropdown_max_width = flint_px(230),
|
||||
.dropdown_height = flint_px(36),
|
||||
.side_padding = flint_px(12)
|
||||
// Desktop mode: use tab bar instead of dropdown
|
||||
if(app_should_use_tab_bar(app)) {
|
||||
int clicked_exercise = practice_screen_draw_desktop_tab_bar(app, 0);
|
||||
if(clicked_exercise >= 0 && clicked_exercise != app->exercise_type) {
|
||||
if(app->practice_tab == PRACTICE_TAB_CONFIG)
|
||||
app_leave_practice_config(app);
|
||||
app->exercise_type = clicked_exercise;
|
||||
app->manual_scroll = 0;
|
||||
app->settings_scroll = 0;
|
||||
app->tutorial_step = 0;
|
||||
app->practice_config_tab = 0;
|
||||
save_settings(app);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Mobile mode: keep existing dropdown
|
||||
(void)ui_draw_toolbar_header((FlintUIToolbarHeader){
|
||||
.leading_icon = (Texture2D){0},
|
||||
.toolbar = (FlintUIToolbar){
|
||||
.id = 300,
|
||||
.height = app_toolbar_height(),
|
||||
.options = app->modal.active ? NULL : exercise_options,
|
||||
.option_count = app->modal.active ? 0 : activity_count,
|
||||
.selected_index = &activity_index,
|
||||
.dropdown_min_width = flint_px(160),
|
||||
.dropdown_max_width = flint_px(230),
|
||||
.dropdown_height = flint_px(36),
|
||||
.side_padding = flint_px(12)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Keep existing subtab bar for Play/Manual/Config (works in both modes)
|
||||
{
|
||||
int clicked = practice_screen_draw_tab_bar(app, app_toolbar_height());
|
||||
int clicked = practice_screen_draw_tab_bar(app,
|
||||
practice_screen_selector_height(app));
|
||||
if(clicked >= 0 && clicked != app->practice_tab)
|
||||
practice_screen_open_tab(app, clicked);
|
||||
}
|
||||
@@ -195,7 +249,7 @@ practice_screen_dropdown_anchor(void)
|
||||
}
|
||||
|
||||
static Rectangle
|
||||
practice_screen_tab_anchor(int tab)
|
||||
practice_screen_tab_anchor(InbeApp *app, int tab)
|
||||
{
|
||||
int tab_h = flint_px(PRACTICE_CATEGORY_TAB_H);
|
||||
int tab_w = view_width / PRACTICE_TAB_COUNT;
|
||||
@@ -204,12 +258,32 @@ practice_screen_tab_anchor(int tab)
|
||||
|
||||
return (Rectangle){
|
||||
(float)x,
|
||||
(float)app_toolbar_height(),
|
||||
(float)practice_screen_selector_height(app),
|
||||
(float)w,
|
||||
(float)tab_h
|
||||
};
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
static void
|
||||
practice_screen_finish_first_run_guide(InbeApp *app)
|
||||
{
|
||||
@@ -230,16 +304,10 @@ practice_screen_first_run_guide_active(const InbeApp *app)
|
||||
void
|
||||
practice_screen_prepare_first_run_guide(InbeApp *app)
|
||||
{
|
||||
int step;
|
||||
|
||||
if(!practice_screen_first_run_guide_active(app))
|
||||
return;
|
||||
|
||||
step = clampi(app->tutorial_step, 0, PRACTICE_GUIDE_STEPS - 1);
|
||||
if(step == 1)
|
||||
app->practice_tab = PRACTICE_TAB_MANUAL;
|
||||
else
|
||||
app->practice_tab = PRACTICE_TAB_PLAY;
|
||||
app->practice_tab = PRACTICE_TAB_PLAY;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -252,19 +320,19 @@ practice_screen_draw_first_run_guide(InbeApp *app)
|
||||
return;
|
||||
|
||||
steps[0] = (FlintUIGuideStep){
|
||||
practice_screen_dropdown_anchor(),
|
||||
practice_screen_exercise_tabs_anchor(app),
|
||||
locale_get("practice_guide_dropdown")
|
||||
};
|
||||
steps[1] = (FlintUIGuideStep){
|
||||
practice_screen_tab_anchor(PRACTICE_TAB_MANUAL),
|
||||
practice_screen_tab_anchor(app, PRACTICE_TAB_MANUAL),
|
||||
locale_get("practice_guide_manual")
|
||||
};
|
||||
steps[2] = (FlintUIGuideStep){
|
||||
practice_screen_tab_anchor(PRACTICE_TAB_PLAY),
|
||||
practice_screen_tab_anchor(app, PRACTICE_TAB_PLAY),
|
||||
locale_get("practice_guide_sun")
|
||||
};
|
||||
steps[3] = (FlintUIGuideStep){
|
||||
practice_screen_tab_anchor(PRACTICE_TAB_CONFIG),
|
||||
practice_screen_tab_anchor(app, PRACTICE_TAB_CONFIG),
|
||||
locale_get("practice_guide_config")
|
||||
};
|
||||
|
||||
|
||||
@@ -431,11 +431,13 @@ settings_draw_version_centered(int x, int w, int *y)
|
||||
void
|
||||
settings_data_draw(InbeApp *app, int x, int w, int *y)
|
||||
{
|
||||
InbeSyncAccount account;
|
||||
int data_button_h = flint_px(36);
|
||||
int hover_account = 0;
|
||||
int hover_import = 0;
|
||||
int hover_export = 0;
|
||||
int hover_delete = 0;
|
||||
int has_account = sync_account_load(&account);
|
||||
|
||||
settings_sync_account_set_save_dialog(settings_start_sync_key_export_dialog);
|
||||
settings_sync_account_set_import_dialog(settings_start_sync_key_import_dialog);
|
||||
@@ -462,11 +464,13 @@ settings_data_draw(InbeApp *app, int x, int w, int *y)
|
||||
settings_export_data(app);
|
||||
*y += data_button_h + flint_px(12);
|
||||
|
||||
if(ui_draw_generic_button(x, *y, w, data_button_h,
|
||||
locale_get("delete_all_data_button"),
|
||||
UI_BUTTON_STYLE_DANGER, 0, &hover_delete))
|
||||
settings_request_delete_all_data(app);
|
||||
*y += data_button_h + flint_px(12);
|
||||
if(!has_account) {
|
||||
if(ui_draw_generic_button(x, *y, w, data_button_h,
|
||||
locale_get("clear_local_data_button"),
|
||||
UI_BUTTON_STYLE_DANGER, 0, &hover_delete))
|
||||
settings_request_delete_all_data(app);
|
||||
*y += data_button_h + flint_px(12);
|
||||
}
|
||||
settings_screen_draw_status_reserved(x, y, flint_px(42));
|
||||
settings_draw_link_icons(app, x, w, y);
|
||||
*y += flint_px(8);
|
||||
@@ -510,6 +514,34 @@ void settings_data_handle_android_import(InbeApp *app) { (void)app; }
|
||||
#if defined(PLATFORM_WEB)
|
||||
#define SETTINGS_WEB_IMPORT_PATH "/tmp/inbe-web-import.zip"
|
||||
#define SETTINGS_WEB_SYNC_KEY_IMPORT_PATH "/tmp/inbe-sync-key-import.key"
|
||||
#define SETTINGS_WEB_EXPORT_PATH "/tmp/inbe-web-export.zip"
|
||||
|
||||
static int
|
||||
settings_web_download_file(const char *path, const char *filename, const char *mime)
|
||||
{
|
||||
return EM_ASM_INT({
|
||||
try {
|
||||
const path = UTF8ToString($0);
|
||||
const filename = UTF8ToString($1);
|
||||
const mime = UTF8ToString($2);
|
||||
const bytes = FS.readFile(path);
|
||||
const blob = new Blob([bytes], {type: mime || "application/octet-stream"});
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = filename || "inbe-export.zip";
|
||||
a.style.display = "none";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
return 1;
|
||||
} catch(e) {
|
||||
console.error("Inbe web download failed:", e);
|
||||
return 0;
|
||||
}
|
||||
}, path, filename, mime);
|
||||
}
|
||||
|
||||
static void
|
||||
settings_web_import_open_picker(void)
|
||||
@@ -670,6 +702,16 @@ settings_export_data(InbeApp *app)
|
||||
settings_file_dialog_begin(app, SETTINGS_DATA_ACTION_EXPORT);
|
||||
settings_apply_file_dialog_theme(app);
|
||||
flint_file_dialog_begin_save(&export_dlg, locale_get("export_data_dialog_title"), export_filename);
|
||||
#elif defined(PLATFORM_WEB)
|
||||
(void)app;
|
||||
if(data_export(SETTINGS_WEB_EXPORT_PATH) &&
|
||||
settings_web_download_file(SETTINGS_WEB_EXPORT_PATH, export_filename, "application/zip")) {
|
||||
settings_screen_set_status_success(locale_get("exported_label"), NULL);
|
||||
TraceLog(LOG_INFO, "DATA: Web export download started");
|
||||
} else {
|
||||
settings_screen_set_status_error(locale_get("export_failed"));
|
||||
TraceLog(LOG_ERROR, "DATA: Web export failed");
|
||||
}
|
||||
#else
|
||||
(void)app;
|
||||
settings_screen_set_status_error(locale_get("export_failed"));
|
||||
@@ -793,10 +835,10 @@ settings_data_draw_modals(InbeApp *app)
|
||||
}
|
||||
|
||||
if(app->modal.type == UIModalConfirmDeleteData) {
|
||||
int modal_result = ui_draw_modal(locale_get("delete_all_data_title"),
|
||||
locale_get("delete_all_data_message"),
|
||||
int modal_result = ui_draw_modal(locale_get("clear_local_data_title"),
|
||||
locale_get("clear_local_data_message"),
|
||||
locale_get("cancel_button"),
|
||||
locale_get("delete_button"));
|
||||
locale_get("clear_button"));
|
||||
if(modal_result == 1) {
|
||||
app->modal.active = 0;
|
||||
app->modal.type = UIModalNone;
|
||||
@@ -830,18 +872,18 @@ settings_data_draw_modals(InbeApp *app)
|
||||
}
|
||||
|
||||
if(app->modal.type == UIModalConfirmDeleteSyncAccount) {
|
||||
int modal_result = ui_draw_modal(locale_get("sync_delete_account_title"),
|
||||
locale_get("sync_delete_account_message"),
|
||||
int modal_result = ui_draw_modal(locale_get("sync_clear_remote_data_title"),
|
||||
locale_get("sync_clear_remote_data_message"),
|
||||
locale_get("cancel_button"),
|
||||
locale_get("delete_button"));
|
||||
locale_get("clear_button"));
|
||||
if(modal_result == 1) {
|
||||
app->modal.active = 0;
|
||||
app->modal.type = UIModalNone;
|
||||
settings_screen_set_status_error(locale_get("sync_account_delete_cancelled"));
|
||||
settings_screen_set_status_error(locale_get("sync_clear_remote_data_cancelled"));
|
||||
} else if(modal_result == 2) {
|
||||
app->modal.active = 0;
|
||||
app->modal.type = UIModalNone;
|
||||
settings_sync_account_delete_confirmed(app);
|
||||
settings_sync_account_clear_remote_confirmed(app);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -239,8 +239,17 @@ settings_sync_run_connect(InbeApp *app)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
settings_sync_account_logout(InbeApp *app)
|
||||
{
|
||||
if(app == NULL)
|
||||
return;
|
||||
sync_account_clear();
|
||||
settings_screen_set_status_success(locale_get("sync_logged_out"), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
settings_sync_account_delete_confirmed(InbeApp *app)
|
||||
settings_sync_account_clear_remote_confirmed(InbeApp *app)
|
||||
{
|
||||
InbeSyncAccount account;
|
||||
InbeSyncClientResult result;
|
||||
@@ -262,7 +271,7 @@ settings_sync_account_delete_confirmed(InbeApp *app)
|
||||
}
|
||||
|
||||
sync_account_clear();
|
||||
settings_screen_set_status_success(locale_get("sync_account_deleted"), NULL);
|
||||
settings_screen_set_status_success(locale_get("sync_remote_data_cleared"), NULL);
|
||||
}
|
||||
|
||||
static FlintUITextInputStyle
|
||||
@@ -469,11 +478,27 @@ settings_sync_account_draw_config(InbeApp *app, int x, int w, int *y)
|
||||
}
|
||||
*y += btn_h + flint_px(12);
|
||||
|
||||
if(ui_draw_generic_button(x, *y, w, btn_h, locale_get("sync_delete_account_button"),
|
||||
UI_BUTTON_STYLE_DANGER, 0, &hover)) {
|
||||
app->modal.active = 1;
|
||||
app->modal.type = UIModalConfirmDeleteSyncAccount;
|
||||
app->modal.selected_button = 0;
|
||||
{
|
||||
FlintUIButtonRowItem buttons[2] = {
|
||||
{locale_get("sync_logout_button"), UI_BUTTON_STYLE_SECONDARY, 0},
|
||||
{locale_get("sync_clear_remote_data_button"), UI_BUTTON_STYLE_DANGER, 0}
|
||||
};
|
||||
int clicked = ui_draw_button_row((FlintUIButtonRow){
|
||||
.x = x,
|
||||
.y = *y,
|
||||
.width = w,
|
||||
.height = btn_h,
|
||||
.gap = gap,
|
||||
.items = buttons,
|
||||
.count = 2
|
||||
});
|
||||
if(clicked == 0) {
|
||||
settings_sync_account_logout(app);
|
||||
} else if(clicked == 1) {
|
||||
app->modal.active = 1;
|
||||
app->modal.type = UIModalConfirmDeleteSyncAccount;
|
||||
app->modal.selected_button = 0;
|
||||
}
|
||||
}
|
||||
*y += btn_h + flint_px(12);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ void settings_sync_account_set_save_dialog(SettingsSyncKeySaveDialog callback);
|
||||
void settings_sync_account_set_import_dialog(SettingsSyncKeyImportDialog callback);
|
||||
void settings_sync_account_draw(InbeApp *app, int x, int w, int *y);
|
||||
void settings_sync_account_draw_config(InbeApp *app, int x, int w, int *y);
|
||||
void settings_sync_account_delete_confirmed(InbeApp *app);
|
||||
void settings_sync_account_clear_remote_confirmed(InbeApp *app);
|
||||
int settings_sync_account_draw_backup_modal(InbeApp *app);
|
||||
|
||||
#endif
|
||||
@@ -32,6 +32,18 @@ settings_theme_draw(InbeApp *app, int x, int w, int *y, SettingsThemeState *stat
|
||||
state->draw_theme_mode_menu = 1;
|
||||
*y += flint_px(76);
|
||||
|
||||
// Navigation mode setting
|
||||
const char *nav_mode_options[3];
|
||||
nav_mode_options[0] = locale_get("nav_mode_auto");
|
||||
nav_mode_options[1] = locale_get("nav_mode_dropdown");
|
||||
nav_mode_options[2] = locale_get("nav_mode_tabbar");
|
||||
app->navigation_mode = clampi(app->navigation_mode, NAV_MODE_AUTO, 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, 3, &app->navigation_mode);
|
||||
state->draw_nav_mode_menu = 1;
|
||||
*y += flint_px(76);
|
||||
|
||||
if(ui_draw_theme_picker(x, *y, w, app->dark_mode, &app->theme_id)) {
|
||||
app->theme_id = clampi(app->theme_id, 0, FLINT_THEME_COUNT - 1);
|
||||
app_refresh_theme(app);
|
||||
@@ -45,6 +57,7 @@ void
|
||||
settings_theme_handle_overlays(InbeApp *app, const SettingsThemeState *state)
|
||||
{
|
||||
int theme_mode_changed = 0;
|
||||
int nav_mode_changed = 0;
|
||||
|
||||
if(app == NULL || state == NULL)
|
||||
return;
|
||||
@@ -56,4 +69,12 @@ settings_theme_handle_overlays(InbeApp *app, const SettingsThemeState *state)
|
||||
app->settings_dirty = 1;
|
||||
save_settings(app);
|
||||
}
|
||||
|
||||
if(state->draw_nav_mode_menu && ui_draw_dropdown_menu(103))
|
||||
nav_mode_changed = 1;
|
||||
if(nav_mode_changed) {
|
||||
app->navigation_mode = clampi(app->navigation_mode, NAV_MODE_AUTO, NAV_MODE_TABBAR);
|
||||
app->settings_dirty = 1;
|
||||
save_settings(app);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
typedef struct SettingsThemeState {
|
||||
int draw_theme_mode_menu;
|
||||
int draw_nav_mode_menu;
|
||||
} SettingsThemeState;
|
||||
|
||||
int settings_theme_content_height(int content_w);
|
||||
|
||||
@@ -23,8 +23,14 @@
|
||||
#endif
|
||||
|
||||
static long long storage_max_sync_outbox_seq(void);
|
||||
static int storage_has_orphan_habit_days(void);
|
||||
static int storage_json_array_count(const char *json, const char *path);
|
||||
|
||||
#define STORAGE_SYNC_BACKFILL_KEY "sync_backfill_v2_done"
|
||||
#define STORAGE_SYNC_HABIT_NAME_REPAIR_KEY "sync_habit_name_repair_v1_done"
|
||||
#define STORAGE_SYNC_PUBLIC_ID_KEY "sync_public_id"
|
||||
#define STORAGE_SYNC_PUBLIC_KEY_KEY "sync_public_key"
|
||||
#define STORAGE_SYNC_PRIVATE_KEY_KEY "sync_private_key"
|
||||
|
||||
static long long
|
||||
storage_next_change_time(void)
|
||||
@@ -288,9 +294,12 @@ storage_enqueue_sync_session(const char *session_id)
|
||||
void
|
||||
storage_enqueue_all_sync_state(void)
|
||||
{
|
||||
int owns_transaction;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return;
|
||||
if(!exec_sql("BEGIN IMMEDIATE"))
|
||||
owns_transaction = sqlite3_get_autocommit(g_storage.db) != 0;
|
||||
if(owns_transaction && !exec_sql("BEGIN IMMEDIATE"))
|
||||
return;
|
||||
exec_sql("INSERT INTO sync_outbox(entity_type,entity_id,local_date,queued_at) "
|
||||
"SELECT 'habit',id,0,strftime('%s','now') FROM habits "
|
||||
@@ -305,7 +314,8 @@ storage_enqueue_all_sync_state(void)
|
||||
"SELECT 'session',id,0,strftime('%s','now') FROM sessions "
|
||||
"WHERE user_id=(SELECT id FROM users LIMIT 1) "
|
||||
"ON CONFLICT(entity_type,entity_id,local_date) DO UPDATE SET queued_at=excluded.queued_at");
|
||||
exec_sql("COMMIT");
|
||||
if(owns_transaction)
|
||||
exec_sql("COMMIT");
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
@@ -350,6 +360,7 @@ storage_reset_sync_state(void)
|
||||
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);
|
||||
exec_sql("DELETE FROM sync_outbox");
|
||||
storage_enqueue_all_sync_state();
|
||||
storage_schedule_persist();
|
||||
@@ -620,6 +631,12 @@ storage_apply_session_habit_count(const char *habit_id, int local_date,
|
||||
old_session_count = sqlite3_column_int(stmt, 2);
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
if(old_count <= 0 && !old_completed && old_session_count > 0) {
|
||||
if(session_count == old_session_count)
|
||||
return 1;
|
||||
return storage_update_habit_day_session_count(habit_id, local_date, session_count);
|
||||
}
|
||||
|
||||
next_count = old_count;
|
||||
if(old_count <= old_session_count || session_count > old_count)
|
||||
next_count = session_count;
|
||||
@@ -1200,6 +1217,9 @@ storage_build_sync_payload_json(const char *user_id_hash, const char *public_key
|
||||
storage_enqueue_all_sync_state();
|
||||
since_server_version = get_meta_int64("sync_last_server_version", 0);
|
||||
full_upload_done = get_meta_int64("sync_full_upload_done", 0) != 0;
|
||||
if(!get_meta_int64(STORAGE_SYNC_HABIT_NAME_REPAIR_KEY, 0) ||
|
||||
storage_has_orphan_habit_days())
|
||||
since_server_version = 0;
|
||||
through_seq = storage_max_sync_outbox_seq();
|
||||
g_storage.pending_sync_outbox_seq = through_seq;
|
||||
json.ok = 1;
|
||||
@@ -1226,6 +1246,13 @@ storage_build_sync_payload_json(const char *user_id_hash, const char *public_key
|
||||
free(json.data);
|
||||
return NULL;
|
||||
}
|
||||
TraceLog(LOG_INFO,
|
||||
"SYNC: payload since=%lld bootstrap=%d outbox_through=%lld habits=%d habit_days=%d sessions=%d",
|
||||
since_server_version, since_server_version <= 0 || !full_upload_done,
|
||||
through_seq,
|
||||
storage_json_array_count(json.data, "$.habits"),
|
||||
storage_json_array_count(json.data, "$.habit_days"),
|
||||
storage_json_array_count(json.data, "$.sessions"));
|
||||
return json.data;
|
||||
}
|
||||
|
||||
@@ -1288,6 +1315,38 @@ storage_max_sync_outbox_seq(void)
|
||||
return seq;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_has_orphan_habit_days(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int found = 0;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT 1 FROM habit_days hd "
|
||||
"WHERE hd.habit_id<>'' "
|
||||
"AND NOT EXISTS (SELECT 1 FROM habits h WHERE h.id=hd.habit_id) "
|
||||
"LIMIT 1",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
found = sqlite3_step(stmt) == SQLITE_ROW;
|
||||
sqlite3_finalize(stmt);
|
||||
return found;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_has_sync_account(void)
|
||||
{
|
||||
const char *public_id = storage_get_setting_text(STORAGE_SYNC_PUBLIC_ID_KEY);
|
||||
const char *public_key = storage_get_setting_text(STORAGE_SYNC_PUBLIC_KEY_KEY);
|
||||
const char *private_key = storage_get_setting_text(STORAGE_SYNC_PRIVATE_KEY_KEY);
|
||||
|
||||
return public_id != NULL && public_id[0] != '\0' &&
|
||||
public_key != NULL && public_key[0] != '\0' &&
|
||||
private_key != NULL && private_key[0] != '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
storage_clear_uploaded_outbox(long long through_seq)
|
||||
{
|
||||
@@ -1305,6 +1364,12 @@ storage_clear_uploaded_outbox(long long through_seq)
|
||||
|
||||
static int
|
||||
storage_json_array_has_items(const char *json, const char *path)
|
||||
{
|
||||
return storage_json_array_count(json, path) > 0;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_json_array_count(const char *json, const char *path)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int count = 0;
|
||||
@@ -1320,7 +1385,7 @@ storage_json_array_has_items(const char *json, const char *path)
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
count = sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
return count > 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1362,6 +1427,121 @@ storage_exec_json_user_sql(const char *sql, const char *json)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_ascii_equal_ci(const char *a, const char *b)
|
||||
{
|
||||
unsigned char ca;
|
||||
unsigned char cb;
|
||||
|
||||
if(a == NULL || b == NULL)
|
||||
return 0;
|
||||
while(*a != '\0' && *b != '\0') {
|
||||
ca = (unsigned char)*a++;
|
||||
cb = (unsigned char)*b++;
|
||||
if(ca >= 'A' && ca <= 'Z')
|
||||
ca = (unsigned char)(ca - 'A' + 'a');
|
||||
if(cb >= 'A' && cb <= 'Z')
|
||||
cb = (unsigned char)(cb - 'A' + 'a');
|
||||
if(ca != cb)
|
||||
return 0;
|
||||
}
|
||||
return *a == '\0' && *b == '\0';
|
||||
}
|
||||
|
||||
static int
|
||||
storage_merge_habit_into(const char *keeper_id, const char *duplicate_id)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
static const char *const sqls[] = {
|
||||
"UPDATE habit_days "
|
||||
"SET completed=MAX(completed,COALESCE((SELECT d.completed FROM habit_days d "
|
||||
" WHERE d.habit_id=?2 AND d.local_date=habit_days.local_date),0)),"
|
||||
" count=MAX(count,COALESCE((SELECT d.count FROM habit_days d "
|
||||
" WHERE d.habit_id=?2 AND d.local_date=habit_days.local_date),0)),"
|
||||
" session_count=MAX(session_count,COALESCE((SELECT d.session_count FROM habit_days d "
|
||||
" WHERE d.habit_id=?2 AND d.local_date=habit_days.local_date),0)),"
|
||||
" updated_at=MAX(updated_at,COALESCE((SELECT d.updated_at FROM habit_days d "
|
||||
" WHERE d.habit_id=?2 AND d.local_date=habit_days.local_date),0)) "
|
||||
"WHERE habit_id=?1 AND EXISTS (SELECT 1 FROM habit_days d "
|
||||
" WHERE d.habit_id=?2 AND d.local_date=habit_days.local_date)",
|
||||
"INSERT INTO habit_days(habit_id,local_date,completed,count,session_count,updated_at) "
|
||||
"SELECT ?1,d.local_date,d.completed,d.count,d.session_count,d.updated_at "
|
||||
"FROM habit_days d WHERE d.habit_id=?2 "
|
||||
"AND NOT EXISTS (SELECT 1 FROM habit_days k "
|
||||
" WHERE k.habit_id=?1 AND k.local_date=d.local_date)",
|
||||
"DELETE FROM habit_days WHERE habit_id=?2",
|
||||
"DELETE FROM habits WHERE id=?2"
|
||||
};
|
||||
int ok = 1;
|
||||
|
||||
if(keeper_id == NULL || duplicate_id == NULL ||
|
||||
keeper_id[0] == '\0' || duplicate_id[0] == '\0' ||
|
||||
strcmp(keeper_id, duplicate_id) == 0)
|
||||
return 1;
|
||||
|
||||
for(size_t i = 0; i < sizeof(sqls) / sizeof(sqls[0]); i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db, sqls[i], -1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, keeper_id);
|
||||
bind_text(stmt, 2, duplicate_id);
|
||||
ok = sqlite3_step(stmt) == SQLITE_DONE;
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
if(!ok)
|
||||
return 0;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
static int
|
||||
storage_merge_duplicate_habit_names(void)
|
||||
{
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
struct {
|
||||
char id[INBE_STORAGE_ID_SIZE];
|
||||
char name[INBE_HABIT_NAME_SIZE];
|
||||
int merged;
|
||||
} rows[64];
|
||||
int count = 0;
|
||||
int ok = 1;
|
||||
|
||||
if(g_storage.db == NULL)
|
||||
return 0;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT id,name FROM habits WHERE user_id=?1 AND deleted_at=0 "
|
||||
"ORDER BY sort_order,id",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
return 0;
|
||||
bind_text(stmt, 1, g_storage.user_id);
|
||||
while(count < (int)(sizeof(rows) / sizeof(rows[0])) &&
|
||||
sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
const char *id = (const char *)sqlite3_column_text(stmt, 0);
|
||||
const char *name = (const char *)sqlite3_column_text(stmt, 1);
|
||||
|
||||
snprintf(rows[count].id, sizeof(rows[count].id), "%s", id != NULL ? id : "");
|
||||
snprintf(rows[count].name, sizeof(rows[count].name), "%s", name != NULL ? name : "");
|
||||
rows[count].merged = 0;
|
||||
count++;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
for(int i = 0; i < count && ok; i++) {
|
||||
if(rows[i].merged || rows[i].name[0] == '\0')
|
||||
continue;
|
||||
for(int j = i + 1; j < count; j++) {
|
||||
if(rows[j].merged)
|
||||
continue;
|
||||
if(!storage_ascii_equal_ci(rows[i].name, rows[j].name))
|
||||
continue;
|
||||
ok = storage_merge_habit_into(rows[i].id, rows[j].id);
|
||||
rows[j].merged = 1;
|
||||
if(!ok)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int
|
||||
storage_apply_sync_response_json(const char *response_json)
|
||||
{
|
||||
@@ -1405,8 +1585,7 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
"ON CONFLICT(habit_id,local_date) DO UPDATE SET "
|
||||
" completed=excluded.completed,count=excluded.count,updated_at=excluded.updated_at "
|
||||
"WHERE excluded.updated_at > habit_days.updated_at "
|
||||
"OR (excluded.updated_at = habit_days.updated_at AND excluded.count > habit_days.count "
|
||||
" AND NOT EXISTS ("
|
||||
"OR (excluded.updated_at = habit_days.updated_at AND NOT EXISTS ("
|
||||
" SELECT 1 FROM sync_outbox "
|
||||
" WHERE entity_type='habit_day' AND entity_id=habit_days.habit_id "
|
||||
" AND local_date=habit_days.local_date"
|
||||
@@ -1430,13 +1609,25 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
" topic=excluded.topic,activity=excluded.activity,source=excluded.source,"
|
||||
" imported_at=excluded.imported_at,rounds_hash=excluded.rounds_hash,deleted_at=excluded.deleted_at,"
|
||||
" updated_at=excluded.updated_at "
|
||||
"WHERE excluded.updated_at >= sessions.updated_at";
|
||||
"WHERE excluded.updated_at > sessions.updated_at "
|
||||
"OR (excluded.updated_at = sessions.updated_at AND NOT EXISTS ("
|
||||
" SELECT 1 FROM sync_outbox "
|
||||
" WHERE entity_type='session' AND entity_id=sessions.id AND local_date=0"
|
||||
"))";
|
||||
static const char *delete_rounds_sql =
|
||||
"DELETE FROM session_rounds WHERE session_id IN ("
|
||||
" SELECT COALESCE(json_extract(value,'$.id'),'') "
|
||||
" FROM json_each(?1,'$.changes.sessions') "
|
||||
" WHERE CAST(COALESCE(strftime('%s',json_extract(value,'$.updated_at')),strftime('%s',json_extract(value,'$.started_at')),'0') AS INTEGER) "
|
||||
" >= COALESCE((SELECT updated_at FROM sessions WHERE id=COALESCE(json_extract(value,'$.id'),'')),0)"
|
||||
" WHERE COALESCE(json_extract(value,'$.id'),'')<>'' "
|
||||
" AND ("
|
||||
" NOT EXISTS (SELECT 1 FROM sessions WHERE id=COALESCE(json_extract(value,'$.id'),'')) "
|
||||
" OR CAST(COALESCE(strftime('%s',json_extract(value,'$.updated_at')),strftime('%s',json_extract(value,'$.started_at')),'0') AS INTEGER) "
|
||||
" > COALESCE((SELECT updated_at FROM sessions WHERE id=COALESCE(json_extract(value,'$.id'),'')),0) "
|
||||
" OR (CAST(COALESCE(strftime('%s',json_extract(value,'$.updated_at')),strftime('%s',json_extract(value,'$.started_at')),'0') AS INTEGER) "
|
||||
" = COALESCE((SELECT updated_at FROM sessions WHERE id=COALESCE(json_extract(value,'$.id'),'')),0) "
|
||||
" AND NOT EXISTS (SELECT 1 FROM sync_outbox "
|
||||
" WHERE entity_type='session' AND entity_id=COALESCE(json_extract(value,'$.id'),'') AND local_date=0))"
|
||||
" )"
|
||||
")";
|
||||
static const char *rounds_sql =
|
||||
"INSERT OR REPLACE INTO session_rounds(session_id,round_index,seconds) "
|
||||
@@ -1444,7 +1635,13 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
" CAST(COALESCE(json_extract(r.value,'$.round_index'),0) AS INTEGER),"
|
||||
" CAST(COALESCE(json_extract(r.value,'$.hold_seconds'),0) AS INTEGER) "
|
||||
"FROM json_each(?1,'$.changes.sessions') AS s, json_each(s.value,'$.rounds') AS r "
|
||||
"WHERE COALESCE(json_extract(s.value,'$.id'),'')<>''";
|
||||
"WHERE COALESCE(json_extract(s.value,'$.id'),'')<>'' "
|
||||
"AND (CAST(COALESCE(strftime('%s',json_extract(s.value,'$.updated_at')),strftime('%s',json_extract(s.value,'$.started_at')),'0') AS INTEGER) "
|
||||
" > COALESCE((SELECT updated_at FROM sessions WHERE id=COALESCE(json_extract(s.value,'$.id'),'')),0) "
|
||||
"OR (CAST(COALESCE(strftime('%s',json_extract(s.value,'$.updated_at')),strftime('%s',json_extract(s.value,'$.started_at')),'0') AS INTEGER) "
|
||||
" = COALESCE((SELECT updated_at FROM sessions WHERE id=COALESCE(json_extract(s.value,'$.id'),'')),0) "
|
||||
" AND NOT EXISTS (SELECT 1 FROM sync_outbox "
|
||||
" WHERE entity_type='session' AND entity_id=COALESCE(json_extract(s.value,'$.id'),'') AND local_date=0)))";
|
||||
long long server_version;
|
||||
long long old_server_version;
|
||||
|
||||
@@ -1460,9 +1657,10 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
return 0;
|
||||
if(!storage_exec_json_user_sql(habits_sql, response_json) ||
|
||||
!storage_exec_json_user_sql(habit_days_sql, response_json) ||
|
||||
!storage_exec_json_user_sql(sessions_sql, response_json) ||
|
||||
!storage_merge_duplicate_habit_names() ||
|
||||
!storage_exec_json_user_sql(delete_rounds_sql, response_json) ||
|
||||
!storage_exec_json_user_sql(rounds_sql, response_json)) {
|
||||
!storage_exec_json_user_sql(rounds_sql, response_json) ||
|
||||
!storage_exec_json_user_sql(sessions_sql, response_json)) {
|
||||
exec_sql("ROLLBACK");
|
||||
return 0;
|
||||
}
|
||||
@@ -1472,6 +1670,12 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
}
|
||||
storage_materialize_session_habit_days();
|
||||
server_version = storage_json_extract_int64(response_json, "$.server_version", 0);
|
||||
TraceLog(LOG_INFO,
|
||||
"SYNC: response server_version=%lld old_server_version=%lld habits=%d habit_days=%d sessions=%d",
|
||||
server_version, old_server_version,
|
||||
storage_json_array_count(response_json, "$.changes.habits"),
|
||||
storage_json_array_count(response_json, "$.changes.habit_days"),
|
||||
storage_json_array_count(response_json, "$.changes.sessions"));
|
||||
if(server_version > old_server_version && storage_sync_response_has_changes(response_json))
|
||||
g_storage.last_sync_changed = 1;
|
||||
if(server_version > 0)
|
||||
@@ -1480,6 +1684,7 @@ storage_apply_sync_response_json(const char *response_json)
|
||||
g_storage.pending_sync_outbox_seq = 0;
|
||||
set_meta_int64("sync_full_upload_done", 1);
|
||||
set_meta_int64(STORAGE_SYNC_BACKFILL_KEY, 1);
|
||||
set_meta_int64(STORAGE_SYNC_HABIT_NAME_REPAIR_KEY, 1);
|
||||
storage_mark_habits_initialized();
|
||||
storage_schedule_persist();
|
||||
return 1;
|
||||
@@ -1633,6 +1838,32 @@ storage_delete_all_sessions(void)
|
||||
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,
|
||||
@@ -1759,6 +1990,7 @@ storage_habits_load(void *habits_ptr)
|
||||
while(index < INBE_HABIT_MAX && sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
InbeHabit *habit = &habits->items[index];
|
||||
snprintf(habit->id, sizeof(habit->id), "%s", (const char *)sqlite3_column_text(stmt, 0));
|
||||
snprintf(habits->loaded_ids[index], sizeof(habits->loaded_ids[index]), "%s", habit->id);
|
||||
snprintf(habit->name, sizeof(habit->name), "%s", (const char *)sqlite3_column_text(stmt, 1));
|
||||
habit->color = (Color){(unsigned char)sqlite3_column_int(stmt, 2),
|
||||
(unsigned char)sqlite3_column_int(stmt, 3),
|
||||
@@ -1770,6 +2002,7 @@ storage_habits_load(void *habits_ptr)
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
habits->count = index;
|
||||
habits->loaded_count = index;
|
||||
|
||||
for(int i = 0; i < habits->count; i++) {
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
@@ -1814,7 +2047,21 @@ storage_habits_save(const void *habits_ptr)
|
||||
storage_mark_habits_initialized();
|
||||
exec_sql("BEGIN IMMEDIATE");
|
||||
exec_sql("CREATE TEMP TABLE IF NOT EXISTS sync_seen_habits(id TEXT PRIMARY KEY);"
|
||||
"DELETE FROM sync_seen_habits;");
|
||||
"CREATE TEMP TABLE IF NOT EXISTS sync_loaded_habits(id TEXT PRIMARY KEY);"
|
||||
"DELETE FROM sync_seen_habits;"
|
||||
"DELETE FROM sync_loaded_habits;");
|
||||
for(int i = 0; i < habits->loaded_count && i < INBE_HABIT_MAX; i++) {
|
||||
if(habits->loaded_ids[i][0] == '\0')
|
||||
continue;
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"INSERT OR IGNORE INTO sync_loaded_habits(id) VALUES(?1)",
|
||||
-1, &stmt, NULL) != SQLITE_OK)
|
||||
continue;
|
||||
bind_text(stmt, 1, habits->loaded_ids[i]);
|
||||
sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
stmt = NULL;
|
||||
}
|
||||
for(int i = 0; i < habits->count; i++) {
|
||||
const InbeHabit *habit = &habits->items[i];
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
@@ -1888,6 +2135,7 @@ storage_habits_save(const void *habits_ptr)
|
||||
}
|
||||
if(sqlite3_prepare_v2(g_storage.db,
|
||||
"SELECT id FROM habits WHERE user_id=?1 AND deleted_at=0 "
|
||||
"AND id IN (SELECT id FROM sync_loaded_habits) "
|
||||
"AND id NOT IN (SELECT id FROM sync_seen_habits)",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
char deleted_ids[INBE_HABIT_MAX][INBE_STORAGE_ID_SIZE];
|
||||
@@ -1914,6 +2162,7 @@ storage_habits_save(const void *habits_ptr)
|
||||
}
|
||||
}
|
||||
exec_sql("DELETE FROM sync_seen_habits;");
|
||||
exec_sql("DELETE FROM sync_loaded_habits;");
|
||||
exec_sql("COMMIT");
|
||||
storage_materialize_session_habit_days();
|
||||
storage_schedule_persist();
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#if INBE_ANDROID_BUILD
|
||||
#include "android_share.h"
|
||||
#endif
|
||||
#if defined(PLATFORM_WEB)
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
#if defined(INBE_HAS_LIBOQS)
|
||||
#include <oqs/oqs.h>
|
||||
@@ -546,6 +549,24 @@ sync_account_export_private_key(const InbeSyncAccount *account, const char *file
|
||||
#if INBE_ANDROID_BUILD
|
||||
return android_share_bytes((const unsigned char *)body, (size_t)len, filename,
|
||||
"application/octet-stream");
|
||||
#elif defined(PLATFORM_WEB)
|
||||
EM_ASM({
|
||||
const ptr = $0;
|
||||
const len = $1;
|
||||
const filename = UTF8ToString($2);
|
||||
const bytes = HEAPU8.slice(ptr, ptr + len);
|
||||
const blob = new Blob([bytes], {type: "application/octet-stream"});
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = filename || "inbe-sync.key";
|
||||
a.style.display = "none";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
}, body, len, filename);
|
||||
return 1;
|
||||
#else
|
||||
if(strchr(filename, '/') != NULL || strchr(filename, '\\') != NULL)
|
||||
return SaveFileData(filename, body, len);
|
||||
|
||||
@@ -970,7 +970,8 @@ web_sync_start_sync(void)
|
||||
if(!sync_load_valid_auth_token(token, sizeof(token)))
|
||||
return 0;
|
||||
if(g_web_sync.payload == NULL) {
|
||||
g_web_sync.payload = storage_build_sync_payload_json(g_web_sync.account.public_id, NULL);
|
||||
g_web_sync.payload = storage_build_sync_payload_json(g_web_sync.account.public_id,
|
||||
g_web_sync.account.public_key_hex);
|
||||
if(g_web_sync.payload == NULL)
|
||||
return 0;
|
||||
}
|
||||
@@ -1401,7 +1402,7 @@ sync_client_sync(const char *base_url)
|
||||
if(!sync_load_valid_auth_token(token, sizeof(token)))
|
||||
return INBE_SYNC_CLIENT_AUTH_FAILED;
|
||||
}
|
||||
payload = storage_build_sync_payload_json(account.public_id, NULL);
|
||||
payload = storage_build_sync_payload_json(account.public_id, account.public_key_hex);
|
||||
if(payload == NULL)
|
||||
return INBE_SYNC_CLIENT_PAYLOAD_FAILED;
|
||||
result = sync_send_bearer(base_url, account.public_id, payload, token);
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<meta name="twitter:image" content="https://inbe.waozi.xyz/og.jpg">
|
||||
<meta name="twitter:site" content="@waozixyz">
|
||||
<meta name="twitter:creator" content="@waozixyz">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="web-assets/icons/favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" href="web-assets/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="site-icons/favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" href="site-icons/apple-touch-icon.png">
|
||||
<link rel="manifest" href="webmanifest.json">
|
||||
<meta name="theme-color" content="#779999">
|
||||
<style>
|
||||
@@ -147,7 +147,7 @@
|
||||
<body>
|
||||
<div class="loading-screen" id="loading-screen" role="status" aria-live="polite">
|
||||
<div class="loading-panel">
|
||||
<img class="loading-mark" src="web-assets/icons/icon-192x192.png" alt="" width="76" height="76">
|
||||
<img class="loading-mark" src="site-icons/icon-192x192.png" alt="" width="76" height="76">
|
||||
<h1 class="loading-title">Inner Breeze</h1>
|
||||
<div id="status">Downloading...</div>
|
||||
<progress value="0" max="100" id="progress" hidden></progress>
|
||||
|
||||
@@ -214,6 +214,33 @@ read_raw_habit_day_count(const char *root, const char *habit_id, int local_date)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
read_raw_session_round_seconds(const char *root, const char *session_id, int round_index)
|
||||
{
|
||||
char db_path[512];
|
||||
sqlite3 *db = NULL;
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
int seconds = -1;
|
||||
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open raw session round db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db == NULL)
|
||||
return seconds;
|
||||
if(sqlite3_prepare_v2(db,
|
||||
"SELECT seconds FROM session_rounds WHERE session_id=?1 AND round_index=?2",
|
||||
-1, &stmt, NULL) == SQLITE_OK) {
|
||||
sqlite3_bind_text(stmt, 1, session_id, -1, SQLITE_TRANSIENT);
|
||||
sqlite3_bind_int(stmt, 2, round_index);
|
||||
if(sqlite3_step(stmt) == SQLITE_ROW)
|
||||
seconds = sqlite3_column_int(stmt, 0);
|
||||
} else {
|
||||
check_true("prepare raw session round", 0);
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return seconds;
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_payload_omits_uploaded_state_after_upload_marker(void)
|
||||
{
|
||||
@@ -452,8 +479,8 @@ test_sync_apply_preserves_counter_counts(void)
|
||||
check_true("reopen sync counter db", storage_init(root));
|
||||
check_true("apply lower equal counter", storage_apply_sync_response_json(lower_count_response));
|
||||
storage_close();
|
||||
check_int("lower equal sync does not reset counter",
|
||||
read_raw_habit_day_count(root, habit_id, 20260619), 4);
|
||||
check_int("lower equal sync applies latest server count",
|
||||
read_raw_habit_day_count(root, habit_id, 20260619), 1);
|
||||
|
||||
check_true("reopen sync counter db for repair", storage_init(root));
|
||||
check_true("apply higher equal counter", storage_apply_sync_response_json(higher_count_response));
|
||||
@@ -464,6 +491,73 @@ test_sync_apply_preserves_counter_counts(void)
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_apply_sessions_last_write_wins(void)
|
||||
{
|
||||
char root[512];
|
||||
const char *session_id = "session-equal-time";
|
||||
const char *remote_response =
|
||||
"{\"server_version\":1,\"changes\":{\"habits\":[],\"habit_days\":[],\"sessions\":["
|
||||
"{\"id\":\"session-equal-time\",\"started_at\":\"2026-06-19T21:00:00Z\","
|
||||
"\"local_date\":20260619,\"topic\":\"0\",\"activity\":1,\"source\":\"remote\","
|
||||
"\"rounds_hash\":\"remote\",\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:00:00Z\","
|
||||
"\"rounds\":[{\"round_index\":0,\"hold_seconds\":45}]}"
|
||||
"]}}";
|
||||
|
||||
make_clean_root(root, sizeof(root), "sync-session-lww");
|
||||
check_true("init sync session db", storage_init(root));
|
||||
storage_close();
|
||||
|
||||
{
|
||||
char db_path[512];
|
||||
sqlite3 *db = NULL;
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open sync session raw db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db != NULL) {
|
||||
check_true("insert sync session",
|
||||
sqlite3_exec(db,
|
||||
"INSERT INTO sessions(id,user_id,started_at,local_date,topic,activity,source,imported_at,rounds_hash,deleted_at,updated_at) "
|
||||
"VALUES('session-equal-time','default',1781902800,20260619,0,1,'local',1781902800,111,0,1781902800);"
|
||||
"INSERT INTO session_rounds(session_id,round_index,seconds) "
|
||||
"VALUES('session-equal-time',0,60);",
|
||||
NULL, NULL, NULL) == SQLITE_OK);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
}
|
||||
|
||||
check_true("reopen sync session db", storage_init(root));
|
||||
check_true("apply equal session update", storage_apply_sync_response_json(remote_response));
|
||||
storage_close();
|
||||
check_int("equal session update replaces rounds",
|
||||
read_raw_session_round_seconds(root, session_id, 0), 45);
|
||||
|
||||
{
|
||||
char db_path[512];
|
||||
sqlite3 *db = NULL;
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open queued sync session raw db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db != NULL) {
|
||||
check_true("reset queued sync session",
|
||||
sqlite3_exec(db,
|
||||
"UPDATE sessions SET source='local',rounds_hash=111,updated_at=1781902800 WHERE id='session-equal-time';"
|
||||
"DELETE FROM session_rounds WHERE session_id='session-equal-time';"
|
||||
"INSERT INTO session_rounds(session_id,round_index,seconds) VALUES('session-equal-time',0,60);"
|
||||
"INSERT OR REPLACE INTO sync_outbox(entity_type,entity_id,local_date,queued_at) "
|
||||
"VALUES('session','session-equal-time',0,1781902800);",
|
||||
NULL, NULL, NULL) == SQLITE_OK);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
}
|
||||
|
||||
check_true("reopen queued sync session db", storage_init(root));
|
||||
check_true("apply equal queued session update", storage_apply_sync_response_json(remote_response));
|
||||
storage_close();
|
||||
check_int("equal queued session keeps local rounds",
|
||||
read_raw_session_round_seconds(root, session_id, 0), 60);
|
||||
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_apply_updates_habit_counter_enabled(void)
|
||||
{
|
||||
@@ -499,6 +593,171 @@ test_sync_apply_updates_habit_counter_enabled(void)
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_stale_habit_save_keeps_synced_remote_habits(void)
|
||||
{
|
||||
char root[512];
|
||||
InbeHabits stale_habits;
|
||||
InbeHabits loaded_habits;
|
||||
const char *remote_response =
|
||||
"{\"server_version\":1,\"changes\":{\"habits\":["
|
||||
"{\"id\":\"habit-2\",\"name\":\"Push ups\",\"color_r\":99,\"color_g\":196,\"color_b\":165,"
|
||||
"\"sync_mode\":0,\"sync_activity\":0,\"counter_enabled\":0,\"sort_order\":1,"
|
||||
"\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:00:00Z\"},"
|
||||
"{\"id\":\"habit-3\",\"name\":\"Cold Shower\",\"color_r\":99,\"color_g\":196,\"color_b\":165,"
|
||||
"\"sync_mode\":0,\"sync_activity\":0,\"counter_enabled\":0,\"sort_order\":2,"
|
||||
"\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:01:00Z\"}"
|
||||
"],\"habit_days\":["
|
||||
"{\"habit_id\":\"habit-2\",\"local_date\":20260619,\"completed\":true,\"count\":1,"
|
||||
"\"updated_at\":\"2026-06-19T21:00:00Z\"},"
|
||||
"{\"habit_id\":\"habit-3\",\"local_date\":20260619,\"completed\":true,\"count\":1,"
|
||||
"\"updated_at\":\"2026-06-19T21:01:00Z\"}"
|
||||
"],\"sessions\":[]}}";
|
||||
|
||||
make_clean_root(root, sizeof(root), "sync-stale-habit-save");
|
||||
check_true("init stale habit save db", storage_init(root));
|
||||
memset(&stale_habits, 0, sizeof(stale_habits));
|
||||
habits_add_default_set(&stale_habits);
|
||||
|
||||
check_true("apply remote habits behind stale UI",
|
||||
storage_apply_sync_response_json(remote_response));
|
||||
habits_save(&stale_habits);
|
||||
|
||||
memset(&loaded_habits, 0, sizeof(loaded_habits));
|
||||
check_true("load habits after stale save", storage_habits_load(&loaded_habits));
|
||||
check_int("stale save keeps remote habit rows", loaded_habits.count, 3);
|
||||
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);
|
||||
|
||||
habits_free(&stale_habits);
|
||||
habits_free(&loaded_habits);
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_payload_resets_cursor_for_orphan_habit_days(void)
|
||||
{
|
||||
char root[512];
|
||||
char db_path[512];
|
||||
char *payload;
|
||||
sqlite3 *db = NULL;
|
||||
|
||||
make_clean_root(root, sizeof(root), "sync-orphan-habit-days");
|
||||
check_true("init orphan habit day db", storage_init(root));
|
||||
storage_close();
|
||||
insert_raw_habit_day(root, "habit-2", 20260617, 1);
|
||||
insert_raw_habit_day(root, "habit-3", 20260618, 1);
|
||||
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open orphan cursor raw db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db != NULL) {
|
||||
check_true("set orphan sync cursor",
|
||||
sqlite3_exec(db,
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_last_server_version','530');"
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_full_upload_done','1');"
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_backfill_v2_done','1');",
|
||||
NULL, NULL, NULL) == SQLITE_OK);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
check_true("reopen orphan habit day db", storage_init(root));
|
||||
payload = storage_build_sync_payload_json("test-hash", "test-public-key");
|
||||
check_true("orphan habit days request full snapshot",
|
||||
payload != NULL && strstr(payload, "\"since_server_version\":0") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_payload_runs_one_time_habit_name_repair(void)
|
||||
{
|
||||
char root[512];
|
||||
char db_path[512];
|
||||
char *payload;
|
||||
const char *empty_response =
|
||||
"{\"server_version\":530,\"changes\":{\"habits\":[],\"habit_days\":[],\"sessions\":[]}}";
|
||||
sqlite3 *db = NULL;
|
||||
|
||||
make_clean_root(root, sizeof(root), "sync-habit-name-repair");
|
||||
check_true("init habit name repair db", storage_init(root));
|
||||
storage_close();
|
||||
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open habit name repair raw db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db != NULL) {
|
||||
check_true("set old sync cursor",
|
||||
sqlite3_exec(db,
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_last_server_version','530');"
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_full_upload_done','1');"
|
||||
"INSERT OR REPLACE INTO meta(key,value) VALUES('sync_backfill_v2_done','1');",
|
||||
NULL, NULL, NULL) == SQLITE_OK);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
check_true("reopen habit name repair db", storage_init(root));
|
||||
payload = storage_build_sync_payload_json("test-hash", "test-public-key");
|
||||
check_true("habit name repair requests full snapshot",
|
||||
payload != NULL && strstr(payload, "\"since_server_version\":0") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
check_true("apply habit name repair response", storage_apply_sync_response_json(empty_response));
|
||||
payload = storage_build_sync_payload_json("test-hash", "test-public-key");
|
||||
check_true("habit name repair only runs once",
|
||||
payload != NULL && strstr(payload, "\"since_server_version\":530") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_apply_merges_duplicate_habit_names(void)
|
||||
{
|
||||
char root[512];
|
||||
InbeHabits habits;
|
||||
InbeHabit *merged;
|
||||
const char *response =
|
||||
"{\"server_version\":1,\"changes\":{\"habits\":["
|
||||
"{\"id\":\"habit-1\",\"name\":\"New Habit\",\"color_r\":99,\"color_g\":196,\"color_b\":165,"
|
||||
"\"sync_mode\":0,\"sync_activity\":0,\"counter_enabled\":0,\"sort_order\":0,"
|
||||
"\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:00:00Z\"},"
|
||||
"{\"id\":\"habit-2\",\"name\":\"New Habit\",\"color_r\":99,\"color_g\":196,\"color_b\":165,"
|
||||
"\"sync_mode\":0,\"sync_activity\":0,\"counter_enabled\":0,\"sort_order\":1,"
|
||||
"\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:01:00Z\"},"
|
||||
"{\"id\":\"meditation\",\"name\":\"Meditation\",\"color_r\":126,\"color_g\":183,\"color_b\":230,"
|
||||
"\"sync_mode\":1,\"sync_activity\":3,\"counter_enabled\":0,\"sort_order\":2,"
|
||||
"\"deleted_at\":0,\"updated_at\":\"2026-06-19T21:02:00Z\"}"
|
||||
"],\"habit_days\":["
|
||||
"{\"habit_id\":\"habit-1\",\"local_date\":20260617,\"completed\":true,\"count\":1,"
|
||||
"\"updated_at\":\"2026-06-19T21:00:00Z\"},"
|
||||
"{\"habit_id\":\"habit-2\",\"local_date\":20260618,\"completed\":true,\"count\":1,"
|
||||
"\"updated_at\":\"2026-06-19T21:01:00Z\"},"
|
||||
"{\"habit_id\":\"meditation\",\"local_date\":20260619,\"completed\":true,\"count\":1,"
|
||||
"\"updated_at\":\"2026-06-19T21:02:00Z\"}"
|
||||
"],\"sessions\":[]}}";
|
||||
|
||||
make_clean_root(root, sizeof(root), "sync-duplicate-habit-names");
|
||||
check_true("init duplicate habit name db", storage_init(root));
|
||||
check_true("apply duplicate named habits", storage_apply_sync_response_json(response));
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_true("load merged duplicate habits", storage_habits_load(&habits));
|
||||
check_int("duplicate habit names collapse to one tab", habits.count, 2);
|
||||
merged = find_habit_ci(&habits, "New Habit");
|
||||
check_true("merged habit visible", merged != NULL);
|
||||
if(merged != NULL) {
|
||||
check_true("first duplicate day kept", habit_completed_day(merged, 20260617));
|
||||
check_true("second duplicate day moved", habit_completed_day(merged, 20260618));
|
||||
}
|
||||
check_true("meditation remains visible", find_habit_ci(&habits, "Meditation") != NULL);
|
||||
|
||||
habits_free(&habits);
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sync_apply_preserves_queued_habit_counter_enabled(void)
|
||||
{
|
||||
@@ -587,6 +846,21 @@ test_session_linked_counts_materialize_for_sync(void)
|
||||
payload != NULL && strstr(payload, "\"count\":2") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
habit_set_day_count(&habits, 0, today, 0);
|
||||
habits_save(&habits);
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_true("reload linked counter after manual clear", storage_habits_load(&habits));
|
||||
check_int("manual clear overrides linked sessions",
|
||||
habit_day_count(&habits.items[0], today), 0);
|
||||
payload = storage_build_sync_payload_json("test-hash", "test-public-key");
|
||||
check_true("manual clear is in sync payload",
|
||||
payload != NULL && strstr(payload, "\"completed\":false") != NULL &&
|
||||
strstr(payload, "\"count\":0") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
habit_set_day_count(&habits, 0, today, 2);
|
||||
habits_save(&habits);
|
||||
|
||||
check_true("delete linked session one", storage_delete_session(first_id));
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_true("reload linked counter after delete", storage_habits_load(&habits));
|
||||
@@ -906,6 +1180,142 @@ test_delete_all_resets_habits_to_empty_storage(void)
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_delete_all_without_sync_account_does_not_queue_remote_deletes(void)
|
||||
{
|
||||
char root[512];
|
||||
InbeHabits habits;
|
||||
char *payload;
|
||||
long long deleted;
|
||||
|
||||
make_clean_root(root, sizeof(root), "delete-all-no-sync-account");
|
||||
check_true("init local reset db", storage_init(root));
|
||||
storage_set_setting_text("sync_public_id", "");
|
||||
storage_set_setting_text("sync_public_key", "");
|
||||
storage_set_setting_text("sync_private_key", "");
|
||||
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_int("add local reset habit",
|
||||
habits_add_custom(&habits, "Work out",
|
||||
(Color){99, 196, 165, 255},
|
||||
INBE_HABIT_SYNC_NONE, 0),
|
||||
0);
|
||||
habit_set_day(&habits, 0, 20260618, 1);
|
||||
habits_save(&habits);
|
||||
|
||||
deleted = storage_delete_all_sessions();
|
||||
check_true("local reset deleted rows", deleted >= 2);
|
||||
check_int("local reset active habit count", storage_habit_count(), 0);
|
||||
|
||||
storage_set_setting_text("sync_public_id", "test-public-id");
|
||||
storage_set_setting_text("sync_public_key", "test-public-key");
|
||||
storage_set_setting_text("sync_private_key", "test-private-key");
|
||||
storage_reset_sync_state();
|
||||
payload = storage_build_sync_payload_json("test-public-id", "test-public-key");
|
||||
check_true("fresh imported account sends bootstrap",
|
||||
payload != NULL &&
|
||||
strstr(payload, "\"since_server_version\":0") != NULL &&
|
||||
strstr(payload, "\"bootstrap\":true") != NULL);
|
||||
check_true("fresh imported account has no stale habit tombstones",
|
||||
payload != NULL && strstr(payload, "\"habits\":[]") != NULL);
|
||||
check_true("fresh imported account has no stale habit day clears",
|
||||
payload != NULL && strstr(payload, "\"habit_days\":[]") != NULL);
|
||||
check_true("fresh imported account has no stale session tombstones",
|
||||
payload != NULL && strstr(payload, "\"sessions\":[]") != NULL);
|
||||
storage_free_sync_payload_json(payload);
|
||||
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_empty_initialized_habits_seed_meditation_on_startup(void)
|
||||
{
|
||||
char root[512];
|
||||
char db_path[512];
|
||||
sqlite3 *db = NULL;
|
||||
InbeHabits habits;
|
||||
|
||||
make_clean_root(root, sizeof(root), "empty-initialized-habits");
|
||||
check_true("init empty initialized habit db", storage_init(root));
|
||||
storage_mark_habits_initialized();
|
||||
storage_close();
|
||||
|
||||
make_path(db_path, sizeof(db_path), root, "inbe.db");
|
||||
check_true("open empty initialized raw db", sqlite3_open(db_path, &db) == SQLITE_OK);
|
||||
if(db != NULL) {
|
||||
check_true("clear empty initialized habits",
|
||||
sqlite3_exec(db, "DELETE FROM habit_days; DELETE FROM habits;",
|
||||
NULL, NULL, NULL) == SQLITE_OK);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
check_true("reopen empty initialized habit db", storage_init(root));
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
habits_init(&habits);
|
||||
check_int("empty initialized startup seeds one habit", habits.count, 1);
|
||||
check_str("empty initialized startup seeds meditation", habits.items[0].name, "Meditation");
|
||||
check_int("empty initialized startup seeds linked mode",
|
||||
habits.items[0].sync_mode, INBE_HABIT_SYNC_ACTIVITIES);
|
||||
check_int("empty initialized startup seeds linked activities",
|
||||
habits.items[0].sync_activity,
|
||||
(1 << 0) | (1 << 1));
|
||||
habits_free(&habits);
|
||||
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_true("load seeded meditation from storage", storage_habits_load(&habits));
|
||||
check_int("seeded meditation persisted", habits.count, 1);
|
||||
check_str("persisted seeded habit name", habits.items[0].name, "Meditation");
|
||||
check_int("persisted seeded linked mode",
|
||||
habits.items[0].sync_mode, INBE_HABIT_SYNC_ACTIVITIES);
|
||||
check_int("persisted seeded linked activities",
|
||||
habits.items[0].sync_activity,
|
||||
(1 << 0) | (1 << 1));
|
||||
|
||||
habits_free(&habits);
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
test_existing_default_meditation_links_on_startup(void)
|
||||
{
|
||||
char root[512];
|
||||
InbeHabits habits;
|
||||
|
||||
make_clean_root(root, sizeof(root), "default-meditation-link-repair");
|
||||
check_true("init default meditation repair db", storage_init(root));
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_int("add unlinked default meditation",
|
||||
habits_add_custom(&habits, "Meditation",
|
||||
(Color){126, 183, 230, 255},
|
||||
INBE_HABIT_SYNC_NONE, 0),
|
||||
0);
|
||||
habits_free(&habits);
|
||||
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
habits_init(&habits);
|
||||
check_int("default meditation repair count", habits.count, 1);
|
||||
check_str("default meditation repair name", habits.items[0].name, "Meditation");
|
||||
check_int("default meditation repair sync mode",
|
||||
habits.items[0].sync_mode, INBE_HABIT_SYNC_ACTIVITIES);
|
||||
check_int("default meditation repair sync activity",
|
||||
habits.items[0].sync_activity,
|
||||
(1 << 0) | (1 << 1));
|
||||
habits_free(&habits);
|
||||
|
||||
memset(&habits, 0, sizeof(habits));
|
||||
check_true("load repaired default meditation", storage_habits_load(&habits));
|
||||
check_int("persisted repaired sync mode",
|
||||
habits.items[0].sync_mode, INBE_HABIT_SYNC_ACTIVITIES);
|
||||
check_int("persisted repaired sync activity",
|
||||
habits.items[0].sync_activity,
|
||||
(1 << 0) | (1 << 1));
|
||||
habits_free(&habits);
|
||||
storage_close();
|
||||
remove_tree(root);
|
||||
}
|
||||
|
||||
static void
|
||||
write_multi_habit_source_database(const char *root, const char *zip_path)
|
||||
{
|
||||
@@ -1278,19 +1688,27 @@ main(void)
|
||||
test_habit_name_merge_import();
|
||||
test_import_conflict_prefers_data_over_empty();
|
||||
test_delete_all_resets_habits_to_empty_storage();
|
||||
test_delete_all_without_sync_account_does_not_queue_remote_deletes();
|
||||
test_import_modes_preserve_habits_and_settings_choice();
|
||||
test_legacy_zip_import();
|
||||
test_legacy_file_startup_migration();
|
||||
test_tickmate_db_import();
|
||||
test_tickmate_reimport_recovers_counter_data();
|
||||
test_external_tickmate_db_import();
|
||||
test_empty_initialized_habits_seed_meditation_on_startup();
|
||||
test_existing_default_meditation_links_on_startup();
|
||||
test_sync_payload_omits_uploaded_state_after_upload_marker();
|
||||
test_sync_backfill_includes_existing_habits();
|
||||
test_sync_payload_excludes_local_settings();
|
||||
test_sync_payload_includes_queued_current_edits();
|
||||
test_sync_outbox_preserves_edits_after_snapshot();
|
||||
test_sync_apply_preserves_counter_counts();
|
||||
test_sync_apply_sessions_last_write_wins();
|
||||
test_sync_apply_updates_habit_counter_enabled();
|
||||
test_stale_habit_save_keeps_synced_remote_habits();
|
||||
test_sync_payload_resets_cursor_for_orphan_habit_days();
|
||||
test_sync_payload_runs_one_time_habit_name_repair();
|
||||
test_sync_apply_merges_duplicate_habit_names();
|
||||
test_sync_apply_preserves_queued_habit_counter_enabled();
|
||||
test_session_linked_counts_materialize_for_sync();
|
||||
test_existing_sessions_materialize_after_habit_save();
|
||||
|
||||
@@ -89,7 +89,8 @@ while IFS= read -r VERSION; do
|
||||
continue
|
||||
fi
|
||||
|
||||
# Extract changelog content for this version
|
||||
# Extract Fastlane-friendly changelog content for this version. F-Droid
|
||||
# displays changelogs as text, so avoid literal Markdown heading markers.
|
||||
CHANGELOG_CONTENT=$(awk -v ver="$VERSION" '
|
||||
BEGIN { in_section=0 }
|
||||
/^## \[/ {
|
||||
@@ -100,8 +101,13 @@ while IFS= read -r VERSION; do
|
||||
}
|
||||
}
|
||||
in_section {
|
||||
# Print section headers and bullet points
|
||||
if (/^### / || /^- /) print
|
||||
if (/^### /) {
|
||||
sub(/^### /, "")
|
||||
print
|
||||
print "---"
|
||||
} else if (/^- /) {
|
||||
print
|
||||
}
|
||||
}
|
||||
' "$CHANGELOG_FILE")
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 636 B |
|
Before Width: | Height: | Size: 839 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 995 B |
|
Before Width: | Height: | Size: 417 KiB After Width: | Height: | Size: 13 KiB |
@@ -3,8 +3,8 @@
|
||||
IDI_APP_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,10,0
|
||||
PRODUCTVERSION 1,4,10,0
|
||||
FILEVERSION 1,5,0,0
|
||||
PRODUCTVERSION 1,5,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -21,11 +21,11 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "waozi"
|
||||
VALUE "FileDescription", "Inner Breeze"
|
||||
VALUE "FileVersion", "1.4.10"
|
||||
VALUE "FileVersion", "1.5.0"
|
||||
VALUE "InternalName", "inbe"
|
||||
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "1.4.10"
|
||||
VALUE "ProductVersion", "1.5.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||