feat: Add auto-sync, fix partner linking UI, update sharing settings

- Add 10-second periodic auto-sync to CycleEntriesNotifier
- Fix husband_devotional_screen: use partnerId for isConnected check, navigate to SharingSettingsScreen instead of legacy mock dialog
- Remove obsolete _showConnectDialog method and mock data import
- Update husband_settings_screen: show 'Partner Settings' with linked partner name when connected
- Add SharingSettingsScreen: Pad Supplies toggle (disabled when pad tracking off), Intimacy always enabled
- Add CORS OPTIONS handler to backend server
- Add _ensureServerRegistration for reliable partner linking
- Add copy button to Invite Partner dialog
- Dynamic base URL for web (uses window.location.hostname)
This commit is contained in:
2026-01-09 17:20:49 -06:00
parent d28898cb81
commit 1c2c56e9e2
21 changed files with 1690 additions and 493 deletions

View File

@@ -313,6 +313,9 @@ class UserProfile extends HiveObject {
@HiveField(56, defaultValue: false)
bool useExampleData;
@HiveField(57)
String? partnerId; // ID of the partner to sync with
UserProfile({
required this.id,
required this.name,
@@ -370,6 +373,7 @@ class UserProfile extends HiveObject {
this.husbandThemeMode = AppThemeMode.system,
this.husbandAccentColor = '0xFF1A3A5C',
this.useExampleData = false,
this.partnerId,
});
/// Check if user is married
@@ -452,6 +456,7 @@ class UserProfile extends HiveObject {
AppThemeMode? husbandThemeMode,
String? husbandAccentColor,
bool? useExampleData,
String? partnerId,
}) {
return UserProfile(
id: id ?? this.id,
@@ -513,6 +518,7 @@ class UserProfile extends HiveObject {
husbandThemeMode: husbandThemeMode ?? this.husbandThemeMode,
husbandAccentColor: husbandAccentColor ?? this.husbandAccentColor,
useExampleData: useExampleData ?? this.useExampleData,
partnerId: partnerId ?? this.partnerId,
);
}
}