Rebrand from Casera/MyCrib to honeyDue
Total rebrand across KMM project: - Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations) - Gradle: rootProject.name, namespace, applicationId - Android: manifest, strings.xml (all languages), widget resources - iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig - iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc. - Swift source: all class/struct/enum renames - Deep links: casera:// -> honeydue://, .casera -> .honeydue - App icons replaced with honeyDue honeycomb icon - Domains: casera.treytartt.com -> honeyDue.treytartt.com - Bundle IDs: com.tt.casera -> com.tt.honeyDue - Database table names preserved Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24
CLAUDE.md
@@ -10,12 +10,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
MyCrib (Casera) is a Kotlin Multiplatform Mobile (KMM) property management application with shared business logic and platform-specific UI implementations. The backend is a Go REST API with PostgreSQL (located in the sibling `myCribAPI-go` directory).
|
HoneyDue (honeyDue) is a Kotlin Multiplatform Mobile (KMM) property management application with shared business logic and platform-specific UI implementations. The backend is a Go REST API with PostgreSQL (located in the sibling `honeyDueAPI-go` directory).
|
||||||
|
|
||||||
**Tech Stack:**
|
**Tech Stack:**
|
||||||
- **Shared (Kotlin)**: Compose Multiplatform for Android, networking layer, ViewModels, models
|
- **Shared (Kotlin)**: Compose Multiplatform for Android, networking layer, ViewModels, models
|
||||||
- **iOS**: SwiftUI with Kotlin shared layer integration via SKIE
|
- **iOS**: SwiftUI with Kotlin shared layer integration via SKIE
|
||||||
- **Backend**: Go REST API with PostgreSQL (separate directory at `../myCribAPI-go`)
|
- **Backend**: Go REST API with PostgreSQL (separate directory at `../honeyDueAPI-go`)
|
||||||
|
|
||||||
## Build Commands
|
## Build Commands
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ open iosApp/iosApp.xcodeproj
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
### Shared Kotlin Layer (`composeApp/src/commonMain/kotlin/com/example/casera/`)
|
### Shared Kotlin Layer (`composeApp/src/commonMain/kotlin/com/example/honeydue/`)
|
||||||
|
|
||||||
**Core Components:**
|
**Core Components:**
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ FormHeader(
|
|||||||
OrganicFormHeader(
|
OrganicFormHeader(
|
||||||
icon: "person.fill",
|
icon: "person.fill",
|
||||||
title: "Create Account",
|
title: "Create Account",
|
||||||
subtitle: "Join Casera today"
|
subtitle: "Join honeyDue today"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Form section with icon header
|
// Form section with icon header
|
||||||
@@ -880,7 +880,7 @@ The app uses a comprehensive theming system with 11 themes matching iOS:
|
|||||||
fun App() {
|
fun App() {
|
||||||
val currentTheme by remember { derivedStateOf { ThemeManager.currentTheme } }
|
val currentTheme by remember { derivedStateOf { ThemeManager.currentTheme } }
|
||||||
|
|
||||||
MyCribTheme(themeColors = currentTheme) {
|
HoneyDueTheme(themeColors = currentTheme) {
|
||||||
// App content
|
// App content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1199,14 +1199,14 @@ fun ThemePickerDialog(
|
|||||||
|
|
||||||
## Environment Configuration
|
## Environment Configuration
|
||||||
|
|
||||||
**API Environment Toggle** (`composeApp/src/commonMain/kotlin/com/example/casera/network/ApiConfig.kt`):
|
**API Environment Toggle** (`composeApp/src/commonMain/kotlin/com/example/honeydue/network/ApiConfig.kt`):
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
val CURRENT_ENV = Environment.DEV // or Environment.LOCAL
|
val CURRENT_ENV = Environment.DEV // or Environment.LOCAL
|
||||||
```
|
```
|
||||||
|
|
||||||
- `Environment.LOCAL`: Points to `http://10.0.2.2:8000/api` (Android emulator) or `http://127.0.0.1:8000/api` (iOS simulator)
|
- `Environment.LOCAL`: Points to `http://10.0.2.2:8000/api` (Android emulator) or `http://127.0.0.1:8000/api` (iOS simulator)
|
||||||
- `Environment.DEV`: Points to `https://mycrib.treytartt.com/api`
|
- `Environment.DEV`: Points to `https://honeyDue.treytartt.com/api`
|
||||||
|
|
||||||
**Change this to switch between local Go backend and production server.**
|
**Change this to switch between local Go backend and production server.**
|
||||||
|
|
||||||
@@ -1297,7 +1297,7 @@ Currently tests are minimal. When adding tests:
|
|||||||
|
|
||||||
### Committing Changes
|
### Committing Changes
|
||||||
|
|
||||||
When committing changes that span both iOS and Android, commit them together in the KMM repository. If backend changes are needed, commit separately in the `myCribAPI-go` repository.
|
When committing changes that span both iOS and Android, commit them together in the KMM repository. If backend changes are needed, commit separately in the `honeyDueAPI-go` repository.
|
||||||
|
|
||||||
### DataManager Initialization
|
### DataManager Initialization
|
||||||
|
|
||||||
@@ -1344,10 +1344,10 @@ Without `forceRefresh`, APILayer returns cached data.
|
|||||||
## Project Structure Summary
|
## Project Structure Summary
|
||||||
|
|
||||||
```
|
```
|
||||||
MyCribKMM/
|
HoneyDueKMM/
|
||||||
├── composeApp/
|
├── composeApp/
|
||||||
│ └── src/
|
│ └── src/
|
||||||
│ ├── commonMain/kotlin/com/example/casera/
|
│ ├── commonMain/kotlin/com/example/honeydue/
|
||||||
│ │ ├── data/ # DataManager, PersistenceManager
|
│ │ ├── data/ # DataManager, PersistenceManager
|
||||||
│ │ ├── models/ # Shared data models (kotlinx.serialization)
|
│ │ ├── models/ # Shared data models (kotlinx.serialization)
|
||||||
│ │ ├── network/ # APILayer, *Api clients, ApiConfig
|
│ │ ├── network/ # APILayer, *Api clients, ApiConfig
|
||||||
@@ -1382,5 +1382,5 @@ MyCribKMM/
|
|||||||
|
|
||||||
## Related Repositories
|
## Related Repositories
|
||||||
|
|
||||||
- **Backend API**: `../myCribAPI-go` - Go REST API with PostgreSQL
|
- **Backend API**: `../honeyDueAPI-go` - Go REST API with PostgreSQL
|
||||||
- **Documentation**: `../myCribAPI-go/docs` - Server configuration and API docs
|
- **Documentation**: `../honeyDueAPI-go/docs` - Server configuration and API docs
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# Environment Configuration Guide
|
# Environment Configuration Guide
|
||||||
|
|
||||||
This guide explains how to easily switch between local development and the dev server when developing the MyCrib iOS and Android apps.
|
This guide explains how to easily switch between local development and the dev server when developing the HoneyDue iOS and Android apps.
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
**To switch environments, change ONE line in `ApiConfig.kt`:**
|
**To switch environments, change ONE line in `ApiConfig.kt`:**
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
// File: composeApp/src/commonMain/kotlin/com/mycrib/shared/network/ApiConfig.kt
|
// File: composeApp/src/commonMain/kotlin/com/honeydue/shared/network/ApiConfig.kt
|
||||||
|
|
||||||
object ApiConfig {
|
object ApiConfig {
|
||||||
// ⚠️ CHANGE THIS LINE ⚠️
|
// ⚠️ CHANGE THIS LINE ⚠️
|
||||||
@@ -45,7 +45,7 @@ val CURRENT_ENV = Environment.LOCAL
|
|||||||
- Testing with real data
|
- Testing with real data
|
||||||
|
|
||||||
**Connects to:**
|
**Connects to:**
|
||||||
- **Both platforms**: `https://mycrib.treytartt.com/api`
|
- **Both platforms**: `https://honeyDue.treytartt.com/api`
|
||||||
|
|
||||||
**Setup:**
|
**Setup:**
|
||||||
```kotlin
|
```kotlin
|
||||||
@@ -62,7 +62,7 @@ val CURRENT_ENV = Environment.DEV
|
|||||||
|
|
||||||
1. **Start your local API:**
|
1. **Start your local API:**
|
||||||
```bash
|
```bash
|
||||||
cd myCribAPI
|
cd honeyDueAPI
|
||||||
./dev.sh
|
./dev.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -96,8 +96,8 @@ val CURRENT_ENV = Environment.DEV
|
|||||||
3. **Verify in logs:**
|
3. **Verify in logs:**
|
||||||
```
|
```
|
||||||
🌐 API Client initialized
|
🌐 API Client initialized
|
||||||
📍 Environment: Dev Server (mycrib.treytartt.com)
|
📍 Environment: Dev Server (honeyDue.treytartt.com)
|
||||||
🔗 Base URL: https://mycrib.treytartt.com/api
|
🔗 Base URL: https://honeyDue.treytartt.com/api
|
||||||
```
|
```
|
||||||
|
|
||||||
## Platform-Specific Localhost Addresses
|
## Platform-Specific Localhost Addresses
|
||||||
@@ -139,20 +139,20 @@ If you need to test on a physical device with local API:
|
|||||||
|
|
||||||
4. **Update Django's `ALLOWED_HOSTS`:**
|
4. **Update Django's `ALLOWED_HOSTS`:**
|
||||||
```python
|
```python
|
||||||
# myCribAPI/myCrib/settings.py
|
# honeyDueAPI/honeyDue/settings.py
|
||||||
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '192.168.1.xxx']
|
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '192.168.1.xxx']
|
||||||
```
|
```
|
||||||
|
|
||||||
## File Structure
|
## File Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
MyCribKMM/composeApp/src/
|
HoneyDueKMM/composeApp/src/
|
||||||
├── commonMain/kotlin/com/mycrib/shared/network/
|
├── commonMain/kotlin/com/honeydue/shared/network/
|
||||||
│ ├── ApiConfig.kt # ⭐ TOGGLE ENVIRONMENT HERE
|
│ ├── ApiConfig.kt # ⭐ TOGGLE ENVIRONMENT HERE
|
||||||
│ └── ApiClient.kt # Uses ApiConfig
|
│ └── ApiClient.kt # Uses ApiConfig
|
||||||
├── androidMain/kotlin/com/mycrib/shared/network/
|
├── androidMain/kotlin/com/honeydue/shared/network/
|
||||||
│ └── ApiClient.android.kt # Android localhost: 10.0.2.2
|
│ └── ApiClient.android.kt # Android localhost: 10.0.2.2
|
||||||
└── iosMain/kotlin/com/mycrib/shared/network/
|
└── iosMain/kotlin/com/honeydue/shared/network/
|
||||||
└── ApiClient.ios.kt # iOS localhost: 127.0.0.1
|
└── ApiClient.ios.kt # iOS localhost: 127.0.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ MyCribKMM/composeApp/src/
|
|||||||
**Problem:** HTTPS connection issues
|
**Problem:** HTTPS connection issues
|
||||||
|
|
||||||
**Solutions:**
|
**Solutions:**
|
||||||
1. Verify server is accessible: `curl https://mycrib.treytartt.com/api`
|
1. Verify server is accessible: `curl https://honeyDue.treytartt.com/api`
|
||||||
2. Check that SSL certificate is valid
|
2. Check that SSL certificate is valid
|
||||||
3. Make sure you're using `https://` not `http://`
|
3. Make sure you're using `https://` not `http://`
|
||||||
|
|
||||||
@@ -216,10 +216,10 @@ MyCribKMM/composeApp/src/
|
|||||||
| Action | Command/File |
|
| Action | Command/File |
|
||||||
|--------|--------------|
|
|--------|--------------|
|
||||||
| Toggle environment | Edit `ApiConfig.kt` → `CURRENT_ENV` |
|
| Toggle environment | Edit `ApiConfig.kt` → `CURRENT_ENV` |
|
||||||
| Start local API | `cd myCribAPI && ./dev.sh` |
|
| Start local API | `cd honeyDueAPI && ./dev.sh` |
|
||||||
| Android localhost | `10.0.2.2:8000` |
|
| Android localhost | `10.0.2.2:8000` |
|
||||||
| iOS localhost | `127.0.0.1:8000` |
|
| iOS localhost | `127.0.0.1:8000` |
|
||||||
| Dev server | `https://mycrib.treytartt.com` |
|
| Dev server | `https://honeyDue.treytartt.com` |
|
||||||
| View current env | Check app logs for `🌐` emoji |
|
| View current env | Check app logs for `🌐` emoji |
|
||||||
|
|
||||||
## Example Workflow
|
## Example Workflow
|
||||||
@@ -230,7 +230,7 @@ MyCribKMM/composeApp/src/
|
|||||||
val CURRENT_ENV = Environment.LOCAL // ✅ Use local API
|
val CURRENT_ENV = Environment.LOCAL // ✅ Use local API
|
||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
cd myCribAPI
|
cd honeyDueAPI
|
||||||
./dev.sh # Start local server
|
./dev.sh # Start local server
|
||||||
# Work on features...
|
# Work on features...
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ See full documentation for examples of each approach.
|
|||||||
## Files Reference
|
## Files Reference
|
||||||
|
|
||||||
**Android:**
|
**Android:**
|
||||||
- `composeApp/src/commonMain/kotlin/com/example/mycrib/ui/components/ErrorDialog.kt`
|
- `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ErrorDialog.kt`
|
||||||
- `composeApp/src/commonMain/kotlin/com/example/mycrib/ui/components/ApiResultHandler.kt`
|
- `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ApiResultHandler.kt`
|
||||||
|
|
||||||
**iOS:**
|
**iOS:**
|
||||||
- `iosApp/iosApp/Helpers/ErrorAlertModifier.swift`
|
- `iosApp/iosApp/Helpers/ErrorAlertModifier.swift`
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# MyCrib KMM - Quick Start
|
# HoneyDue KMM - Quick Start
|
||||||
|
|
||||||
## 🚀 Switch API Environment
|
## 🚀 Switch API Environment
|
||||||
|
|
||||||
**File:** `composeApp/src/commonMain/kotlin/com/mycrib/shared/network/ApiConfig.kt`
|
**File:** `composeApp/src/commonMain/kotlin/com/honeydue/shared/network/ApiConfig.kt`
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
object ApiConfig {
|
object ApiConfig {
|
||||||
@@ -12,7 +12,7 @@ object ApiConfig {
|
|||||||
|
|
||||||
### Options:
|
### Options:
|
||||||
- **`Environment.LOCAL`** → Your local API (localhost)
|
- **`Environment.LOCAL`** → Your local API (localhost)
|
||||||
- **`Environment.DEV`** → Dev server (https://mycrib.treytartt.com)
|
- **`Environment.DEV`** → Dev server (https://honeyDue.treytartt.com)
|
||||||
|
|
||||||
### After Changing:
|
### After Changing:
|
||||||
1. **Android**: Sync Gradle and run
|
1. **Android**: Sync Gradle and run
|
||||||
@@ -31,13 +31,13 @@ object ApiConfig {
|
|||||||
|
|
||||||
### Android
|
### Android
|
||||||
```bash
|
```bash
|
||||||
cd MyCribKMM
|
cd HoneyDueKMM
|
||||||
./gradlew :composeApp:installDebug
|
./gradlew :composeApp:installDebug
|
||||||
```
|
```
|
||||||
|
|
||||||
### iOS
|
### iOS
|
||||||
```bash
|
```bash
|
||||||
cd MyCribKMM/iosApp
|
cd HoneyDueKMM/iosApp
|
||||||
open iosApp.xcodeproj
|
open iosApp.xcodeproj
|
||||||
# Run in Xcode
|
# Run in Xcode
|
||||||
```
|
```
|
||||||
@@ -47,7 +47,7 @@ open iosApp.xcodeproj
|
|||||||
## 🔧 Start Local API
|
## 🔧 Start Local API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd myCribAPI
|
cd honeyDueAPI
|
||||||
./dev.sh # Auto-reload on code changes
|
./dev.sh # Auto-reload on code changes
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ cd myCribAPI
|
|||||||
|
|
||||||
- **Environment Setup**: `ENVIRONMENT_SETUP.md`
|
- **Environment Setup**: `ENVIRONMENT_SETUP.md`
|
||||||
- **Workspace Overview**: `../WORKSPACE_OVERVIEW.md`
|
- **Workspace Overview**: `../WORKSPACE_OVERVIEW.md`
|
||||||
- **API Deployment**: `../myCribAPI/DOKKU_SETUP_GUIDE.md`
|
- **API Deployment**: `../honeyDueAPI/DOKKU_SETUP_GUIDE.md`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ UI Updates Automatically
|
|||||||
|
|
||||||
### Android
|
### Android
|
||||||
- **Location**: SharedPreferences
|
- **Location**: SharedPreferences
|
||||||
- **File**: `mycrib_cache`
|
- **File**: `honeydue_cache`
|
||||||
- **Key**: `cached_tasks`
|
- **Key**: `cached_tasks`
|
||||||
- **Format**: JSON string
|
- **Format**: JSON string
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ UI Updates Automatically
|
|||||||
|
|
||||||
### JVM/Desktop
|
### JVM/Desktop
|
||||||
- **Location**: Java Preferences
|
- **Location**: Java Preferences
|
||||||
- **Node**: `com.mycrib.cache`
|
- **Node**: `com.honeydue.cache`
|
||||||
- **Key**: `cached_tasks`
|
- **Key**: `cached_tasks`
|
||||||
- **Format**: JSON string
|
- **Format**: JSON string
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ This file tracks the remaining work to migrate hardcoded strings to Compose Reso
|
|||||||
### Priority 1: Dialogs with Many Strings
|
### Priority 1: Dialogs with Many Strings
|
||||||
|
|
||||||
#### AddContractorDialog.kt (~25 strings)
|
#### AddContractorDialog.kt (~25 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/AddContractorDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/AddContractorDialog.kt`
|
||||||
|
|
||||||
Strings to migrate:
|
Strings to migrate:
|
||||||
- Dialog title: "Add Contractor"
|
- Dialog title: "Add Contractor"
|
||||||
@@ -22,7 +22,7 @@ Strings to migrate:
|
|||||||
- Buttons: "Create", "Cancel"
|
- Buttons: "Create", "Cancel"
|
||||||
|
|
||||||
#### CompleteTaskDialog.kt (~22 strings)
|
#### CompleteTaskDialog.kt (~22 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/CompleteTaskDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/CompleteTaskDialog.kt`
|
||||||
|
|
||||||
Strings to migrate:
|
Strings to migrate:
|
||||||
- Dialog title: "Complete Task"
|
- Dialog title: "Complete Task"
|
||||||
@@ -34,29 +34,29 @@ Strings to migrate:
|
|||||||
### Priority 2: Import/Share Dialogs (~14 strings)
|
### Priority 2: Import/Share Dialogs (~14 strings)
|
||||||
|
|
||||||
#### ContractorImportDialog.kt (~7 strings)
|
#### ContractorImportDialog.kt (~7 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/ContractorImportDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ContractorImportDialog.kt`
|
||||||
|
|
||||||
#### ResidenceImportDialog.kt (~7 strings)
|
#### ResidenceImportDialog.kt (~7 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/ResidenceImportDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ResidenceImportDialog.kt`
|
||||||
|
|
||||||
### Priority 3: Task Components (~14 strings)
|
### Priority 3: Task Components (~14 strings)
|
||||||
|
|
||||||
#### TaskActionButtons.kt (~7 strings)
|
#### TaskActionButtons.kt (~7 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/task/TaskActionButtons.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/task/TaskActionButtons.kt`
|
||||||
|
|
||||||
#### TaskCard.kt (~7 strings)
|
#### TaskCard.kt (~7 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/task/TaskCard.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/task/TaskCard.kt`
|
||||||
|
|
||||||
### Priority 4: Other Dialogs (~10 strings)
|
### Priority 4: Other Dialogs (~10 strings)
|
||||||
|
|
||||||
#### JoinResidenceDialog.kt (~7 strings)
|
#### JoinResidenceDialog.kt (~7 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/JoinResidenceDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/JoinResidenceDialog.kt`
|
||||||
|
|
||||||
#### ManageUsersDialog.kt (~2 strings)
|
#### ManageUsersDialog.kt (~2 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/ManageUsersDialog.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ManageUsersDialog.kt`
|
||||||
|
|
||||||
#### TaskTemplatesBrowserSheet.kt (~3 strings)
|
#### TaskTemplatesBrowserSheet.kt (~3 strings)
|
||||||
Location: `composeApp/src/commonMain/kotlin/com/example/casera/ui/components/TaskTemplatesBrowserSheet.kt`
|
Location: `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/TaskTemplatesBrowserSheet.kt`
|
||||||
|
|
||||||
### Priority 5: Smaller Components (~15 strings total)
|
### Priority 5: Smaller Components (~15 strings total)
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ Files with 1-3 hardcoded strings each:
|
|||||||
|
|
||||||
### 1. Add import to the file:
|
### 1. Add import to the file:
|
||||||
```kotlin
|
```kotlin
|
||||||
import casera.composeapp.generated.resources.*
|
import honeydue.composeapp.generated.resources.*
|
||||||
import org.jetbrains.compose.resources.stringResource
|
import org.jetbrains.compose.resources.stringResource
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -113,11 +113,11 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.example.casera"
|
namespace = "com.tt.honeyDue"
|
||||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.example.casera"
|
applicationId = "com.tt.honeyDue"
|
||||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
@@ -152,11 +152,11 @@ dependencies {
|
|||||||
|
|
||||||
compose.desktop {
|
compose.desktop {
|
||||||
application {
|
application {
|
||||||
mainClass = "com.example.casera.MainKt"
|
mainClass = "com.tt.honeyDue.MainKt"
|
||||||
|
|
||||||
nativeDistributions {
|
nativeDistributions {
|
||||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||||
packageName = "com.example.casera"
|
packageName = "com.tt.honeyDue"
|
||||||
packageVersion = "1.0.0"
|
packageVersion = "1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"client_info": {
|
"client_info": {
|
||||||
"mobilesdk_app_id": "1:YOUR_PROJECT_NUMBER:android:YOUR_APP_ID",
|
"mobilesdk_app_id": "1:YOUR_PROJECT_NUMBER:android:YOUR_APP_ID",
|
||||||
"android_client_info": {
|
"android_client_info": {
|
||||||
"package_name": "com.example.casera"
|
"package_name": "com.tt.honeyDue"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [],
|
"oauth_client": [],
|
||||||
|
|||||||
@@ -36,11 +36,11 @@
|
|||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data
|
<data
|
||||||
android:scheme="casera"
|
android:scheme="honeydue"
|
||||||
android:host="reset-password" />
|
android:host="reset-password" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<!-- .casera file import -->
|
<!-- .honeydue file import -->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
@@ -50,10 +50,10 @@
|
|||||||
<data android:scheme="file" />
|
<data android:scheme="file" />
|
||||||
<data android:host="*" />
|
<data android:host="*" />
|
||||||
<data android:mimeType="*/*" />
|
<data android:mimeType="*/*" />
|
||||||
<data android:pathPattern=".*\\.casera" />
|
<data android:pathPattern=".*\\.honeydue" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<!-- .casera file import via content:// -->
|
<!-- .honeydue file import via content:// -->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
@@ -93,11 +93,11 @@
|
|||||||
android:name=".NotificationActionReceiver"
|
android:name=".NotificationActionReceiver"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.example.casera.ACTION_VIEW_TASK" />
|
<action android:name="com.tt.honeyDue.ACTION_VIEW_TASK" />
|
||||||
<action android:name="com.example.casera.ACTION_COMPLETE_TASK" />
|
<action android:name="com.tt.honeyDue.ACTION_COMPLETE_TASK" />
|
||||||
<action android:name="com.example.casera.ACTION_MARK_IN_PROGRESS" />
|
<action android:name="com.tt.honeyDue.ACTION_MARK_IN_PROGRESS" />
|
||||||
<action android:name="com.example.casera.ACTION_CANCEL_TASK" />
|
<action android:name="com.tt.honeyDue.ACTION_CANCEL_TASK" />
|
||||||
<action android:name="com.example.casera.ACTION_UNCANCEL_TASK" />
|
<action android:name="com.tt.honeyDue.ACTION_UNCANCEL_TASK" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
@@ -106,13 +106,13 @@
|
|||||||
android:name=".widget.WidgetTaskActionReceiver"
|
android:name=".widget.WidgetTaskActionReceiver"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.example.casera.COMPLETE_TASK" />
|
<action android:name="com.tt.honeyDue.COMPLETE_TASK" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<!-- Small Widget Receiver (2x1) -->
|
<!-- Small Widget Receiver (2x1) -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".widget.CaseraSmallWidgetReceiver"
|
android:name=".widget.HoneyDueSmallWidgetReceiver"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/widget_small_name">
|
android:label="@string/widget_small_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -120,12 +120,12 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.appwidget.provider"
|
android:name="android.appwidget.provider"
|
||||||
android:resource="@xml/casera_small_widget_info" />
|
android:resource="@xml/honeydue_small_widget_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<!-- Medium Widget Receiver (4x2) -->
|
<!-- Medium Widget Receiver (4x2) -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".widget.CaseraMediumWidgetReceiver"
|
android:name=".widget.HoneyDueMediumWidgetReceiver"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/widget_medium_name">
|
android:label="@string/widget_medium_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -133,12 +133,12 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.appwidget.provider"
|
android:name="android.appwidget.provider"
|
||||||
android:resource="@xml/casera_medium_widget_info" />
|
android:resource="@xml/honeydue_medium_widget_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<!-- Large Widget Receiver (4x4) -->
|
<!-- Large Widget Receiver (4x4) -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".widget.CaseraLargeWidgetReceiver"
|
android:name=".widget.HoneyDueLargeWidgetReceiver"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/widget_large_name">
|
android:label="@string/widget_large_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.appwidget.provider"
|
android:name="android.appwidget.provider"
|
||||||
android:resource="@xml/casera_large_widget_info" />
|
android:resource="@xml/honeydue_large_widget_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.ui.components
|
package com.tt.honeyDue.ui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
@@ -10,8 +10,8 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.example.casera.models.TaskSummary
|
import com.tt.honeyDue.models.TaskSummary
|
||||||
import com.example.casera.models.TaskColumnCategory
|
import com.tt.honeyDue.models.TaskColumnCategory
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a task summary with dynamic categories from the backend.
|
* Displays a task summary with dynamic categories from the backend.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
@@ -22,22 +22,22 @@ import coil3.memory.MemoryCache
|
|||||||
import coil3.request.crossfade
|
import coil3.request.crossfade
|
||||||
import coil3.util.DebugLogger
|
import coil3.util.DebugLogger
|
||||||
import okio.FileSystem
|
import okio.FileSystem
|
||||||
import com.example.casera.storage.TokenManager
|
import com.tt.honeyDue.storage.TokenManager
|
||||||
import com.example.casera.storage.TokenStorage
|
import com.tt.honeyDue.storage.TokenStorage
|
||||||
import com.example.casera.storage.TaskCacheManager
|
import com.tt.honeyDue.storage.TaskCacheManager
|
||||||
import com.example.casera.storage.TaskCacheStorage
|
import com.tt.honeyDue.storage.TaskCacheStorage
|
||||||
import com.example.casera.storage.ThemeStorage
|
import com.tt.honeyDue.storage.ThemeStorage
|
||||||
import com.example.casera.storage.ThemeStorageManager
|
import com.tt.honeyDue.storage.ThemeStorageManager
|
||||||
import com.example.casera.ui.theme.ThemeManager
|
import com.tt.honeyDue.ui.theme.ThemeManager
|
||||||
import com.example.casera.fcm.FCMManager
|
import com.tt.honeyDue.fcm.FCMManager
|
||||||
import com.example.casera.platform.BillingManager
|
import com.tt.honeyDue.platform.BillingManager
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.sharing.ContractorSharingManager
|
import com.tt.honeyDue.sharing.ContractorSharingManager
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.data.PersistenceManager
|
import com.tt.honeyDue.data.PersistenceManager
|
||||||
import com.example.casera.models.CaseraPackageType
|
import com.tt.honeyDue.models.honeyDuePackageType
|
||||||
import com.example.casera.models.detectCaseraPackageType
|
import com.tt.honeyDue.models.detecthoneyDuePackageType
|
||||||
import com.example.casera.analytics.PostHogAnalytics
|
import com.tt.honeyDue.analytics.PostHogAnalytics
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
||||||
@@ -158,12 +158,12 @@ class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
|||||||
try {
|
try {
|
||||||
val authToken = TokenStorage.getToken()
|
val authToken = TokenStorage.getToken()
|
||||||
if (authToken != null) {
|
if (authToken != null) {
|
||||||
val notificationApi = com.example.casera.network.NotificationApi()
|
val notificationApi = com.tt.honeyDue.network.NotificationApi()
|
||||||
val deviceId = android.provider.Settings.Secure.getString(
|
val deviceId = android.provider.Settings.Secure.getString(
|
||||||
contentResolver,
|
contentResolver,
|
||||||
android.provider.Settings.Secure.ANDROID_ID
|
android.provider.Settings.Secure.ANDROID_ID
|
||||||
)
|
)
|
||||||
val request = com.example.casera.models.DeviceRegistrationRequest(
|
val request = com.tt.honeyDue.models.DeviceRegistrationRequest(
|
||||||
deviceId = deviceId,
|
deviceId = deviceId,
|
||||||
registrationId = fcmToken,
|
registrationId = fcmToken,
|
||||||
platform = "android",
|
platform = "android",
|
||||||
@@ -171,14 +171,14 @@ class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
|||||||
)
|
)
|
||||||
|
|
||||||
when (val result = notificationApi.registerDevice(authToken, request)) {
|
when (val result = notificationApi.registerDevice(authToken, request)) {
|
||||||
is com.example.casera.network.ApiResult.Success -> {
|
is com.tt.honeyDue.network.ApiResult.Success -> {
|
||||||
Log.d("MainActivity", "Device registered successfully: ${result.data}")
|
Log.d("MainActivity", "Device registered successfully: ${result.data}")
|
||||||
}
|
}
|
||||||
is com.example.casera.network.ApiResult.Error -> {
|
is com.tt.honeyDue.network.ApiResult.Error -> {
|
||||||
Log.e("MainActivity", "Failed to register device: ${result.message}")
|
Log.e("MainActivity", "Failed to register device: ${result.message}")
|
||||||
}
|
}
|
||||||
is com.example.casera.network.ApiResult.Loading,
|
is com.tt.honeyDue.network.ApiResult.Loading,
|
||||||
is com.example.casera.network.ApiResult.Idle -> {
|
is com.tt.honeyDue.network.ApiResult.Idle -> {
|
||||||
// These states shouldn't occur for direct API calls
|
// These states shouldn't occur for direct API calls
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,7 +248,7 @@ class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
|||||||
private fun handleDeepLink(intent: Intent?) {
|
private fun handleDeepLink(intent: Intent?) {
|
||||||
val data: Uri? = intent?.data
|
val data: Uri? = intent?.data
|
||||||
val isResetLink = data != null &&
|
val isResetLink = data != null &&
|
||||||
data.scheme == "casera" &&
|
data.scheme == "honeydue" &&
|
||||||
data.host == "reset-password"
|
data.host == "reset-password"
|
||||||
if (isResetLink) {
|
if (isResetLink) {
|
||||||
// Extract token from query parameter
|
// Extract token from query parameter
|
||||||
@@ -263,8 +263,8 @@ class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
|||||||
private fun handleFileImport(intent: Intent?) {
|
private fun handleFileImport(intent: Intent?) {
|
||||||
if (intent?.action == Intent.ACTION_VIEW) {
|
if (intent?.action == Intent.ACTION_VIEW) {
|
||||||
val uri = intent.data
|
val uri = intent.data
|
||||||
if (uri != null && ContractorSharingManager.isCaseraFile(applicationContext, uri)) {
|
if (uri != null && ContractorSharingManager.ishoneyDueFile(applicationContext, uri)) {
|
||||||
Log.d("MainActivity", "Casera file received: $uri")
|
Log.d("MainActivity", "honeyDue file received: $uri")
|
||||||
|
|
||||||
// Read file content to detect package type
|
// Read file content to detect package type
|
||||||
try {
|
try {
|
||||||
@@ -273,11 +273,11 @@ class MainActivity : ComponentActivity(), SingletonImageLoader.Factory {
|
|||||||
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
||||||
inputStream.close()
|
inputStream.close()
|
||||||
|
|
||||||
val packageType = detectCaseraPackageType(jsonString)
|
val packageType = detecthoneyDuePackageType(jsonString)
|
||||||
Log.d("MainActivity", "Detected package type: $packageType")
|
Log.d("MainActivity", "Detected package type: $packageType")
|
||||||
|
|
||||||
when (packageType) {
|
when (packageType) {
|
||||||
CaseraPackageType.RESIDENCE -> {
|
honeyDuePackageType.RESIDENCE -> {
|
||||||
Log.d("MainActivity", "Routing to residence import")
|
Log.d("MainActivity", "Routing to residence import")
|
||||||
pendingResidenceImportUri = uri
|
pendingResidenceImportUri = uri
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
@@ -8,7 +8,7 @@ import android.content.Intent
|
|||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.google.firebase.messaging.FirebaseMessagingService
|
import com.google.firebase.messaging.FirebaseMessagingService
|
||||||
import com.google.firebase.messaging.RemoteMessage
|
import com.google.firebase.messaging.RemoteMessage
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@@ -31,14 +31,14 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
// Note: In a real app, you might want to use WorkManager for reliable delivery
|
// Note: In a real app, you might want to use WorkManager for reliable delivery
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
try {
|
try {
|
||||||
val authToken = com.example.casera.storage.TokenStorage.getToken()
|
val authToken = com.tt.honeyDue.storage.TokenStorage.getToken()
|
||||||
if (authToken != null) {
|
if (authToken != null) {
|
||||||
val notificationApi = com.example.casera.network.NotificationApi()
|
val notificationApi = com.tt.honeyDue.network.NotificationApi()
|
||||||
val deviceId = android.provider.Settings.Secure.getString(
|
val deviceId = android.provider.Settings.Secure.getString(
|
||||||
applicationContext.contentResolver,
|
applicationContext.contentResolver,
|
||||||
android.provider.Settings.Secure.ANDROID_ID
|
android.provider.Settings.Secure.ANDROID_ID
|
||||||
)
|
)
|
||||||
val request = com.example.casera.models.DeviceRegistrationRequest(
|
val request = com.tt.honeyDue.models.DeviceRegistrationRequest(
|
||||||
deviceId = deviceId,
|
deviceId = deviceId,
|
||||||
registrationId = token,
|
registrationId = token,
|
||||||
platform = "android",
|
platform = "android",
|
||||||
@@ -46,14 +46,14 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
when (val result = notificationApi.registerDevice(authToken, request)) {
|
when (val result = notificationApi.registerDevice(authToken, request)) {
|
||||||
is com.example.casera.network.ApiResult.Success -> {
|
is com.tt.honeyDue.network.ApiResult.Success -> {
|
||||||
Log.d(TAG, "Device registered successfully with new token")
|
Log.d(TAG, "Device registered successfully with new token")
|
||||||
}
|
}
|
||||||
is com.example.casera.network.ApiResult.Error -> {
|
is com.tt.honeyDue.network.ApiResult.Error -> {
|
||||||
Log.e(TAG, "Failed to register device with new token: ${result.message}")
|
Log.e(TAG, "Failed to register device with new token: ${result.message}")
|
||||||
}
|
}
|
||||||
is com.example.casera.network.ApiResult.Loading,
|
is com.tt.honeyDue.network.ApiResult.Loading,
|
||||||
is com.example.casera.network.ApiResult.Idle -> {
|
is com.tt.honeyDue.network.ApiResult.Idle -> {
|
||||||
// These states shouldn't occur for direct API calls
|
// These states shouldn't occur for direct API calls
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
message.notification?.let { notification ->
|
message.notification?.let { notification ->
|
||||||
Log.d(TAG, "Notification: ${notification.title} - ${notification.body}")
|
Log.d(TAG, "Notification: ${notification.title} - ${notification.body}")
|
||||||
sendNotification(
|
sendNotification(
|
||||||
notification.title ?: "MyCrib",
|
notification.title ?: "honeyDue",
|
||||||
notification.body ?: "",
|
notification.body ?: "",
|
||||||
message.data
|
message.data
|
||||||
)
|
)
|
||||||
@@ -85,7 +85,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
|
|
||||||
// If there's no notification payload, create one from data
|
// If there's no notification payload, create one from data
|
||||||
if (message.notification == null) {
|
if (message.notification == null) {
|
||||||
val title = message.data["title"] ?: "MyCrib"
|
val title = message.data["title"] ?: "honeyDue"
|
||||||
val body = message.data["body"] ?: ""
|
val body = message.data["body"] ?: ""
|
||||||
sendNotification(title, body, message.data)
|
sendNotification(title, body, message.data)
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
val channel = NotificationChannel(
|
val channel = NotificationChannel(
|
||||||
channelId,
|
channelId,
|
||||||
"Casera Notifications",
|
"honeyDue Notifications",
|
||||||
NotificationManager.IMPORTANCE_HIGH
|
NotificationManager.IMPORTANCE_HIGH
|
||||||
).apply {
|
).apply {
|
||||||
description = "Notifications for tasks, residences, and warranties"
|
description = "Notifications for tasks, residences, and warranties"
|
||||||
@@ -210,7 +210,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "FCMService"
|
private const val TAG = "FCMService"
|
||||||
private const val NOTIFICATION_ID = 0
|
private const val NOTIFICATION_ID = 0
|
||||||
private const val PREFS_NAME = "mycrib_prefs"
|
private const val PREFS_NAME = "honeydue_prefs"
|
||||||
private const val KEY_FCM_TOKEN = "fcm_token"
|
private const val KEY_FCM_TOKEN = "fcm_token"
|
||||||
|
|
||||||
fun getStoredToken(context: Context): String? {
|
fun getStoredToken(context: Context): String? {
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.core.app.NotificationManagerCompat
|
import androidx.core.app.NotificationManagerCompat
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.TaskCompletionCreateRequest
|
import com.tt.honeyDue.models.TaskCompletionCreateRequest
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.example.casera.storage.TokenStorage
|
import com.tt.honeyDue.storage.TokenStorage
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -157,11 +157,11 @@ class NotificationActionReceiver : BroadcastReceiver() {
|
|||||||
private const val TAG = "NotificationAction"
|
private const val TAG = "NotificationAction"
|
||||||
|
|
||||||
// Action constants
|
// Action constants
|
||||||
const val ACTION_VIEW_TASK = "com.example.casera.ACTION_VIEW_TASK"
|
const val ACTION_VIEW_TASK = "com.tt.honeyDue.ACTION_VIEW_TASK"
|
||||||
const val ACTION_COMPLETE_TASK = "com.example.casera.ACTION_COMPLETE_TASK"
|
const val ACTION_COMPLETE_TASK = "com.tt.honeyDue.ACTION_COMPLETE_TASK"
|
||||||
const val ACTION_MARK_IN_PROGRESS = "com.example.casera.ACTION_MARK_IN_PROGRESS"
|
const val ACTION_MARK_IN_PROGRESS = "com.tt.honeyDue.ACTION_MARK_IN_PROGRESS"
|
||||||
const val ACTION_CANCEL_TASK = "com.example.casera.ACTION_CANCEL_TASK"
|
const val ACTION_CANCEL_TASK = "com.tt.honeyDue.ACTION_CANCEL_TASK"
|
||||||
const val ACTION_UNCANCEL_TASK = "com.example.casera.ACTION_UNCANCEL_TASK"
|
const val ACTION_UNCANCEL_TASK = "com.tt.honeyDue.ACTION_UNCANCEL_TASK"
|
||||||
|
|
||||||
// Extra constants
|
// Extra constants
|
||||||
const val EXTRA_TASK_ID = "task_id"
|
const val EXTRA_TASK_ID = "task_id"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.analytics
|
package com.tt.honeyDue.analytics
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import com.posthog.PostHog
|
import com.posthog.PostHog
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.auth
|
package com.tt.honeyDue.auth
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.credentials.CredentialManager
|
import androidx.credentials.CredentialManager
|
||||||
@@ -6,7 +6,7 @@ import androidx.credentials.CustomCredential
|
|||||||
import androidx.credentials.GetCredentialRequest
|
import androidx.credentials.GetCredentialRequest
|
||||||
import androidx.credentials.GetCredentialResponse
|
import androidx.credentials.GetCredentialResponse
|
||||||
import androidx.credentials.exceptions.GetCredentialException
|
import androidx.credentials.exceptions.GetCredentialException
|
||||||
import com.example.casera.network.ApiConfig
|
import com.tt.honeyDue.network.ApiConfig
|
||||||
import com.google.android.libraries.identity.googleid.GetGoogleIdOption
|
import com.google.android.libraries.identity.googleid.GetGoogleIdOption
|
||||||
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential
|
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.data
|
package com.tt.honeyDue.data
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@@ -29,7 +29,7 @@ actual class PersistenceManager(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val PREFS_NAME = "casera_data_manager"
|
private const val PREFS_NAME = "honeydue_data_manager"
|
||||||
|
|
||||||
@Volatile
|
@Volatile
|
||||||
private var instance: PersistenceManager? = null
|
private var instance: PersistenceManager? = null
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.fcm
|
package com.tt.honeyDue.fcm
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.network
|
package com.tt.honeyDue.network
|
||||||
|
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.engine.okhttp.*
|
import io.ktor.client.engine.okhttp.*
|
||||||
@@ -34,7 +34,7 @@ actual fun createHttpClient(): HttpClient {
|
|||||||
logger = Logger.DEFAULT
|
logger = Logger.DEFAULT
|
||||||
// Only log full request/response bodies in debug builds to avoid
|
// Only log full request/response bodies in debug builds to avoid
|
||||||
// leaking auth tokens and PII in production logcat.
|
// leaking auth tokens and PII in production logcat.
|
||||||
level = if (com.example.casera.BuildConfig.DEBUG) LogLevel.ALL else LogLevel.INFO
|
level = if (com.tt.honeyDue.BuildConfig.DEBUG) LogLevel.ALL else LogLevel.INFO
|
||||||
}
|
}
|
||||||
|
|
||||||
install(DefaultRequest) {
|
install(DefaultRequest) {
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.android.billingclient.api.*
|
import com.android.billingclient.api.*
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.example.casera.utils.SubscriptionProducts
|
import com.tt.honeyDue.utils.SubscriptionProducts
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.SupervisorJob
|
import kotlinx.coroutines.SupervisorJob
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import com.example.casera.models.Contractor
|
import com.tt.honeyDue.models.Contractor
|
||||||
import com.example.casera.ui.components.ContractorImportHandler as ContractorImportHandlerImpl
|
import com.tt.honeyDue.ui.components.ContractorImportHandler as ContractorImportHandlerImpl
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun ContractorImportHandler(
|
actual fun ContractorImportHandler(
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.example.casera.models.Contractor
|
import com.tt.honeyDue.models.Contractor
|
||||||
import com.example.casera.sharing.ContractorSharingManager
|
import com.tt.honeyDue.sharing.ContractorSharingManager
|
||||||
import com.example.casera.analytics.PostHogAnalytics
|
import com.tt.honeyDue.analytics.PostHogAnalytics
|
||||||
import com.example.casera.analytics.AnalyticsEvents
|
import com.tt.honeyDue.analytics.AnalyticsEvents
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun rememberShareContractor(): (Contractor) -> Unit {
|
actual fun rememberShareContractor(): (Contractor) -> Unit {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import coil3.ImageLoader
|
import coil3.ImageLoader
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.example.casera.ui.subscription.UpgradeScreen
|
import com.tt.honeyDue.ui.subscription.UpgradeScreen
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import com.example.casera.models.JoinResidenceResponse
|
import com.tt.honeyDue.models.JoinResidenceResponse
|
||||||
import com.example.casera.ui.components.ResidenceImportHandler as ResidenceImportHandlerImpl
|
import com.tt.honeyDue.ui.components.ResidenceImportHandler as ResidenceImportHandlerImpl
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun ResidenceImportHandler(
|
actual fun ResidenceImportHandler(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.platform
|
package com.tt.honeyDue.platform
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -8,10 +8,10 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.example.casera.models.Residence
|
import com.tt.honeyDue.models.Residence
|
||||||
import com.example.casera.sharing.ResidenceSharingManager
|
import com.tt.honeyDue.sharing.ResidenceSharingManager
|
||||||
import com.example.casera.analytics.PostHogAnalytics
|
import com.tt.honeyDue.analytics.PostHogAnalytics
|
||||||
import com.example.casera.analytics.AnalyticsEvents
|
import com.tt.honeyDue.analytics.AnalyticsEvents
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
package com.example.casera.sharing
|
package com.tt.honeyDue.sharing
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.core.content.FileProvider
|
import androidx.core.content.FileProvider
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.CaseraShareCodec
|
import com.tt.honeyDue.models.honeyDueShareCodec
|
||||||
import com.example.casera.models.Contractor
|
import com.tt.honeyDue.models.Contractor
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages contractor export and import via .casera files on Android.
|
* Manages contractor export and import via .honeydue files on Android.
|
||||||
*/
|
*/
|
||||||
object ContractorSharingManager {
|
object ContractorSharingManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a share Intent for a contractor.
|
* Creates a share Intent for a contractor.
|
||||||
* The contractor data is written to a temporary .casera file and shared via FileProvider.
|
* The contractor data is written to a temporary .honeydue file and shared via FileProvider.
|
||||||
*
|
*
|
||||||
* @param context Android context
|
* @param context Android context
|
||||||
* @param contractor The contractor to share
|
* @param contractor The contractor to share
|
||||||
@@ -29,8 +29,8 @@ object ContractorSharingManager {
|
|||||||
fun createShareIntent(context: Context, contractor: Contractor): Intent? {
|
fun createShareIntent(context: Context, contractor: Contractor): Intent? {
|
||||||
return try {
|
return try {
|
||||||
val currentUsername = DataManager.currentUser.value?.username ?: "Unknown"
|
val currentUsername = DataManager.currentUser.value?.username ?: "Unknown"
|
||||||
val jsonString = CaseraShareCodec.encodeContractorPackage(contractor, currentUsername)
|
val jsonString = honeyDueShareCodec.encodeContractorPackage(contractor, currentUsername)
|
||||||
val fileName = CaseraShareCodec.safeShareFileName(contractor.name)
|
val fileName = honeyDueShareCodec.safeShareFileName(contractor.name)
|
||||||
|
|
||||||
// Create shared directory
|
// Create shared directory
|
||||||
val shareDir = File(context.cacheDir, "shared")
|
val shareDir = File(context.cacheDir, "shared")
|
||||||
@@ -61,7 +61,7 @@ object ContractorSharingManager {
|
|||||||
* Imports a contractor from a content URI.
|
* Imports a contractor from a content URI.
|
||||||
*
|
*
|
||||||
* @param context Android context
|
* @param context Android context
|
||||||
* @param uri The content URI of the .casera file
|
* @param uri The content URI of the .honeydue file
|
||||||
* @return ApiResult with the created Contractor on success, or error on failure
|
* @return ApiResult with the created Contractor on success, or error on failure
|
||||||
*/
|
*/
|
||||||
suspend fun importContractor(context: Context, uri: Uri): ApiResult<Contractor> {
|
suspend fun importContractor(context: Context, uri: Uri): ApiResult<Contractor> {
|
||||||
@@ -79,7 +79,7 @@ object ContractorSharingManager {
|
|||||||
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
||||||
inputStream.close()
|
inputStream.close()
|
||||||
|
|
||||||
val createRequest = CaseraShareCodec.createContractorImportRequestOrNull(
|
val createRequest = honeyDueShareCodec.createContractorImportRequestOrNull(
|
||||||
jsonContent = jsonString,
|
jsonContent = jsonString,
|
||||||
availableSpecialties = DataManager.contractorSpecialties.value
|
availableSpecialties = DataManager.contractorSpecialties.value
|
||||||
) ?: return@withContext ApiResult.Error("Invalid contractor share package")
|
) ?: return@withContext ApiResult.Error("Invalid contractor share package")
|
||||||
@@ -94,12 +94,12 @@ object ContractorSharingManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the given URI appears to be a .casera file.
|
* Checks if the given URI appears to be a .honeydue file.
|
||||||
*/
|
*/
|
||||||
fun isCaseraFile(context: Context, uri: Uri): Boolean {
|
fun ishoneyDueFile(context: Context, uri: Uri): Boolean {
|
||||||
// Check file extension from URI path
|
// Check file extension from URI path
|
||||||
val path = uri.path ?: uri.toString()
|
val path = uri.path ?: uri.toString()
|
||||||
if (path.endsWith(".casera", ignoreCase = true)) {
|
if (path.endsWith(".honeydue", ignoreCase = true)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ object ContractorSharingManager {
|
|||||||
val nameIndex = cursor.getColumnIndex(android.provider.OpenableColumns.DISPLAY_NAME)
|
val nameIndex = cursor.getColumnIndex(android.provider.OpenableColumns.DISPLAY_NAME)
|
||||||
if (nameIndex >= 0) {
|
if (nameIndex >= 0) {
|
||||||
val name = cursor.getString(nameIndex)
|
val name = cursor.getString(nameIndex)
|
||||||
if (name?.endsWith(".casera", ignoreCase = true) == true) {
|
if (name?.endsWith(".honeydue", ignoreCase = true) == true) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
package com.example.casera.sharing
|
package com.tt.honeyDue.sharing
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.core.content.FileProvider
|
import androidx.core.content.FileProvider
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.CaseraShareCodec
|
import com.tt.honeyDue.models.honeyDueShareCodec
|
||||||
import com.example.casera.models.JoinResidenceResponse
|
import com.tt.honeyDue.models.JoinResidenceResponse
|
||||||
import com.example.casera.models.Residence
|
import com.tt.honeyDue.models.Residence
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages residence share package creation and import via .casera files on Android.
|
* Manages residence share package creation and import via .honeydue files on Android.
|
||||||
* Unlike contractors (which are exported client-side), residence sharing uses
|
* Unlike contractors (which are exported client-side), residence sharing uses
|
||||||
* server-generated share codes.
|
* server-generated share codes.
|
||||||
*/
|
*/
|
||||||
@@ -38,8 +38,8 @@ object ResidenceSharingManager {
|
|||||||
when (result) {
|
when (result) {
|
||||||
is ApiResult.Success -> {
|
is ApiResult.Success -> {
|
||||||
val sharedResidence = result.data
|
val sharedResidence = result.data
|
||||||
val jsonString = CaseraShareCodec.encodeSharedResidence(sharedResidence)
|
val jsonString = honeyDueShareCodec.encodeSharedResidence(sharedResidence)
|
||||||
val fileName = CaseraShareCodec.safeShareFileName(residence.name)
|
val fileName = honeyDueShareCodec.safeShareFileName(residence.name)
|
||||||
|
|
||||||
// Create shared directory
|
// Create shared directory
|
||||||
val shareDir = File(context.cacheDir, "shared")
|
val shareDir = File(context.cacheDir, "shared")
|
||||||
@@ -77,7 +77,7 @@ object ResidenceSharingManager {
|
|||||||
* Imports (joins) a residence from a content URI containing a share code.
|
* Imports (joins) a residence from a content URI containing a share code.
|
||||||
*
|
*
|
||||||
* @param context Android context
|
* @param context Android context
|
||||||
* @param uri The content URI of the .casera file
|
* @param uri The content URI of the .honeydue file
|
||||||
* @return ApiResult with the JoinResidenceResponse on success, or error on failure
|
* @return ApiResult with the JoinResidenceResponse on success, or error on failure
|
||||||
*/
|
*/
|
||||||
suspend fun importResidence(context: Context, uri: Uri): ApiResult<JoinResidenceResponse> {
|
suspend fun importResidence(context: Context, uri: Uri): ApiResult<JoinResidenceResponse> {
|
||||||
@@ -95,7 +95,7 @@ object ResidenceSharingManager {
|
|||||||
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
val jsonString = inputStream.bufferedReader().use { it.readText() }
|
||||||
inputStream.close()
|
inputStream.close()
|
||||||
|
|
||||||
val shareCode = CaseraShareCodec.extractResidenceShareCodeOrNull(jsonString)
|
val shareCode = honeyDueShareCodec.extractResidenceShareCodeOrNull(jsonString)
|
||||||
?: return@withContext ApiResult.Error("Invalid residence share package")
|
?: return@withContext ApiResult.Error("Invalid residence share package")
|
||||||
|
|
||||||
// Call API with share code
|
// Call API with share code
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.storage
|
package com.tt.honeyDue.storage
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@@ -47,7 +47,7 @@ actual class TaskCacheManager(private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val PREFS_NAME = "mycrib_cache"
|
private const val PREFS_NAME = "honeydue_cache"
|
||||||
private const val KEY_TASKS = "cached_tasks"
|
private const val KEY_TASKS = "cached_tasks"
|
||||||
private const val KEY_DIRTY_FLAG = "tasks_dirty"
|
private const val KEY_DIRTY_FLAG = "tasks_dirty"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.storage
|
package com.tt.honeyDue.storage
|
||||||
|
|
||||||
internal actual fun getPlatformTaskCacheManager(): TaskCacheManager? {
|
internal actual fun getPlatformTaskCacheManager(): TaskCacheManager? {
|
||||||
// Android requires context, so must use initialize() method
|
// Android requires context, so must use initialize() method
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.storage
|
package com.tt.honeyDue.storage
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@@ -22,7 +22,7 @@ actual class ThemeStorageManager(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val PREFS_NAME = "mycrib_theme_prefs"
|
private const val PREFS_NAME = "honeydue_theme_prefs"
|
||||||
private const val KEY_THEME_ID = "theme_id"
|
private const val KEY_THEME_ID = "theme_id"
|
||||||
|
|
||||||
@Volatile
|
@Volatile
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.storage
|
package com.tt.honeyDue.storage
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@@ -31,8 +31,8 @@ actual class TokenManager(private val context: Context) {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "TokenManager"
|
private const val TAG = "TokenManager"
|
||||||
private const val ENCRYPTED_PREFS_NAME = "mycrib_secure_prefs"
|
private const val ENCRYPTED_PREFS_NAME = "honeydue_secure_prefs"
|
||||||
private const val FALLBACK_PREFS_NAME = "mycrib_prefs"
|
private const val FALLBACK_PREFS_NAME = "honeydue_prefs"
|
||||||
private const val KEY_TOKEN = "auth_token"
|
private const val KEY_TOKEN = "auth_token"
|
||||||
|
|
||||||
@Volatile
|
@Volatile
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.storage
|
package com.tt.honeyDue.storage
|
||||||
|
|
||||||
internal actual fun getPlatformTokenManager(): TokenManager? {
|
internal actual fun getPlatformTokenManager(): TokenManager? {
|
||||||
// Android requires context, so must use initialize() method
|
// Android requires context, so must use initialize() method
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.ui.components
|
package com.tt.honeyDue.ui.components
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -9,10 +9,10 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.example.casera.models.Contractor
|
import com.tt.honeyDue.models.Contractor
|
||||||
import com.example.casera.models.SharedContractor
|
import com.tt.honeyDue.models.SharedContractor
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.example.casera.sharing.ContractorSharingManager
|
import com.tt.honeyDue.sharing.ContractorSharingManager
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -33,7 +33,7 @@ sealed class ImportState {
|
|||||||
* Android-specific composable that handles the contractor import flow.
|
* Android-specific composable that handles the contractor import flow.
|
||||||
* Shows confirmation dialog, performs import, and displays result.
|
* Shows confirmation dialog, performs import, and displays result.
|
||||||
*
|
*
|
||||||
* @param pendingImportUri The URI of the .casera file to import (or null if none)
|
* @param pendingImportUri The URI of the .honeydue file to import (or null if none)
|
||||||
* @param onClearImport Called when import flow is complete and URI should be cleared
|
* @param onClearImport Called when import flow is complete and URI should be cleared
|
||||||
* @param onImportSuccess Called when import succeeds, with the imported contractor
|
* @param onImportSuccess Called when import succeeds, with the imported contractor
|
||||||
*/
|
*/
|
||||||
@@ -57,7 +57,7 @@ fun ContractorImportHandler(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the .casera file when a new URI is received
|
// Parse the .honeydue file when a new URI is received
|
||||||
LaunchedEffect(pendingImportUri) {
|
LaunchedEffect(pendingImportUri) {
|
||||||
if (pendingImportUri != null && importState is ImportState.Idle) {
|
if (pendingImportUri != null && importState is ImportState.Idle) {
|
||||||
pendingUri = pendingImportUri
|
pendingUri = pendingImportUri
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.ui.components
|
package com.tt.honeyDue.ui.components
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -9,10 +9,10 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.example.casera.models.JoinResidenceResponse
|
import com.tt.honeyDue.models.JoinResidenceResponse
|
||||||
import com.example.casera.models.SharedResidence
|
import com.tt.honeyDue.models.SharedResidence
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.example.casera.sharing.ResidenceSharingManager
|
import com.tt.honeyDue.sharing.ResidenceSharingManager
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -33,7 +33,7 @@ sealed class ResidenceImportState {
|
|||||||
* Android-specific composable that handles the residence import flow.
|
* Android-specific composable that handles the residence import flow.
|
||||||
* Shows confirmation dialog, performs import, and displays result.
|
* Shows confirmation dialog, performs import, and displays result.
|
||||||
*
|
*
|
||||||
* @param pendingImportUri The URI of the .casera file to import (or null if none)
|
* @param pendingImportUri The URI of the .honeydue file to import (or null if none)
|
||||||
* @param onClearImport Called when import flow is complete and URI should be cleared
|
* @param onClearImport Called when import flow is complete and URI should be cleared
|
||||||
* @param onImportSuccess Called when import succeeds, with the join response
|
* @param onImportSuccess Called when import succeeds, with the join response
|
||||||
*/
|
*/
|
||||||
@@ -57,7 +57,7 @@ fun ResidenceImportHandler(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the .casera file when a new URI is received
|
// Parse the .honeydue file when a new URI is received
|
||||||
LaunchedEffect(pendingImportUri) {
|
LaunchedEffect(pendingImportUri) {
|
||||||
if (pendingImportUri != null && importState is ResidenceImportState.Idle) {
|
if (pendingImportUri != null && importState is ResidenceImportState.Idle) {
|
||||||
pendingUri = pendingImportUri
|
pendingUri = pendingImportUri
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.ui.components.auth
|
package com.tt.honeyDue.ui.components.auth
|
||||||
|
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
@@ -13,8 +13,8 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.example.casera.auth.GoogleSignInManager
|
import com.tt.honeyDue.auth.GoogleSignInManager
|
||||||
import com.example.casera.auth.GoogleSignInResult
|
import com.tt.honeyDue.auth.GoogleSignInResult
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.ui.subscription
|
package com.tt.honeyDue.ui.subscription
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
@@ -17,9 +17,9 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.android.billingclient.api.ProductDetails
|
import com.android.billingclient.api.ProductDetails
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.platform.BillingManager
|
import com.tt.honeyDue.platform.BillingManager
|
||||||
import com.example.casera.ui.theme.AppSpacing
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -344,7 +344,7 @@ private fun SubscriptionProductCardAndroid(
|
|||||||
onSelect: () -> Unit
|
onSelect: () -> Unit
|
||||||
) {
|
) {
|
||||||
val isAnnual = productDetails.productId.contains("annual")
|
val isAnnual = productDetails.productId.contains("annual")
|
||||||
val productName = if (isAnnual) "MyCrib Pro Annual" else "MyCrib Pro Monthly"
|
val productName = if (isAnnual) "honeyDue Pro Annual" else "honeyDue Pro Monthly"
|
||||||
val billingPeriod = if (isAnnual) "Billed annually" else "Billed monthly"
|
val billingPeriod = if (isAnnual) "Billed annually" else "Billed monthly"
|
||||||
|
|
||||||
Card(
|
Card(
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.example.casera.util
|
package com.tt.honeyDue.util
|
||||||
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import com.example.casera.platform.ImageData
|
import com.tt.honeyDue.platform.ImageData
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -50,7 +50,7 @@ import kotlinx.serialization.json.Json
|
|||||||
* Large widget showing task list with stats and interactive actions (Pro only)
|
* Large widget showing task list with stats and interactive actions (Pro only)
|
||||||
* Size: 4x4
|
* Size: 4x4
|
||||||
*/
|
*/
|
||||||
class CaseraLargeWidget : GlanceAppWidget() {
|
class HoneyDueLargeWidget : GlanceAppWidget() {
|
||||||
|
|
||||||
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ class CaseraLargeWidget : GlanceAppWidget() {
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Casera",
|
text = "honeyDue",
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
color = ColorProvider(Color(0xFF07A0C3)),
|
color = ColorProvider(Color(0xFF07A0C3)),
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
@@ -346,7 +346,7 @@ class CompleteTaskAction : ActionCallback {
|
|||||||
val taskId = parameters[ActionParameters.Key<Int>("task_id")] ?: return
|
val taskId = parameters[ActionParameters.Key<Int>("task_id")] ?: return
|
||||||
|
|
||||||
// Send broadcast to app to complete the task
|
// Send broadcast to app to complete the task
|
||||||
val intent = Intent("com.example.casera.COMPLETE_TASK").apply {
|
val intent = Intent("com.tt.honeyDue.COMPLETE_TASK").apply {
|
||||||
putExtra("task_id", taskId)
|
putExtra("task_id", taskId)
|
||||||
setPackage(context.packageName)
|
setPackage(context.packageName)
|
||||||
}
|
}
|
||||||
@@ -354,7 +354,7 @@ class CompleteTaskAction : ActionCallback {
|
|||||||
|
|
||||||
// Update widget after action
|
// Update widget after action
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
CaseraLargeWidget().update(context, glanceId)
|
HoneyDueLargeWidget().update(context, glanceId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -362,6 +362,6 @@ class CompleteTaskAction : ActionCallback {
|
|||||||
/**
|
/**
|
||||||
* Receiver for the large widget
|
* Receiver for the large widget
|
||||||
*/
|
*/
|
||||||
class CaseraLargeWidgetReceiver : GlanceAppWidgetReceiver() {
|
class HoneyDueLargeWidgetReceiver : GlanceAppWidgetReceiver() {
|
||||||
override val glanceAppWidget: GlanceAppWidget = CaseraLargeWidget()
|
override val glanceAppWidget: GlanceAppWidget = HoneyDueLargeWidget()
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -46,7 +46,7 @@ import kotlinx.serialization.json.Json
|
|||||||
* Medium widget showing a list of upcoming tasks
|
* Medium widget showing a list of upcoming tasks
|
||||||
* Size: 4x2
|
* Size: 4x2
|
||||||
*/
|
*/
|
||||||
class CaseraMediumWidget : GlanceAppWidget() {
|
class HoneyDueMediumWidget : GlanceAppWidget() {
|
||||||
|
|
||||||
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ class CaseraMediumWidget : GlanceAppWidget() {
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Casera",
|
text = "honeyDue",
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
color = ColorProvider(Color(0xFF07A0C3)),
|
color = ColorProvider(Color(0xFF07A0C3)),
|
||||||
fontSize = 18.sp,
|
fontSize = 18.sp,
|
||||||
@@ -247,6 +247,6 @@ class OpenTaskAction : ActionCallback {
|
|||||||
/**
|
/**
|
||||||
* Receiver for the medium widget
|
* Receiver for the medium widget
|
||||||
*/
|
*/
|
||||||
class CaseraMediumWidgetReceiver : GlanceAppWidgetReceiver() {
|
class HoneyDueMediumWidgetReceiver : GlanceAppWidgetReceiver() {
|
||||||
override val glanceAppWidget: GlanceAppWidget = CaseraMediumWidget()
|
override val glanceAppWidget: GlanceAppWidget = HoneyDueMediumWidget()
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -39,13 +39,13 @@ import androidx.glance.text.TextStyle
|
|||||||
import androidx.glance.unit.ColorProvider
|
import androidx.glance.unit.ColorProvider
|
||||||
import androidx.datastore.preferences.core.Preferences
|
import androidx.datastore.preferences.core.Preferences
|
||||||
import androidx.datastore.preferences.core.intPreferencesKey
|
import androidx.datastore.preferences.core.intPreferencesKey
|
||||||
import com.example.casera.R
|
import com.tt.honeyDue.R
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Small widget showing task count summary
|
* Small widget showing task count summary
|
||||||
* Size: 2x1 or 2x2
|
* Size: 2x1 or 2x2
|
||||||
*/
|
*/
|
||||||
class CaseraSmallWidget : GlanceAppWidget() {
|
class HoneyDueSmallWidget : GlanceAppWidget() {
|
||||||
|
|
||||||
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ class CaseraSmallWidget : GlanceAppWidget() {
|
|||||||
) {
|
) {
|
||||||
// App name/logo
|
// App name/logo
|
||||||
Text(
|
Text(
|
||||||
text = "Casera",
|
text = "honeyDue",
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
color = ColorProvider(Color(0xFF07A0C3)),
|
color = ColorProvider(Color(0xFF07A0C3)),
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
@@ -166,6 +166,6 @@ class OpenAppAction : ActionCallback {
|
|||||||
/**
|
/**
|
||||||
* Receiver for the small widget
|
* Receiver for the small widget
|
||||||
*/
|
*/
|
||||||
class CaseraSmallWidgetReceiver : GlanceAppWidgetReceiver() {
|
class HoneyDueSmallWidgetReceiver : GlanceAppWidgetReceiver() {
|
||||||
override val glanceAppWidget: GlanceAppWidget = CaseraSmallWidget()
|
override val glanceAppWidget: GlanceAppWidget = HoneyDueSmallWidget()
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.datastore.core.DataStore
|
import androidx.datastore.core.DataStore
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.TaskCompletionCreateRequest
|
import com.tt.honeyDue.models.TaskCompletionCreateRequest
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -17,7 +17,7 @@ class WidgetTaskActionReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
when (intent.action) {
|
when (intent.action) {
|
||||||
"com.example.casera.COMPLETE_TASK" -> {
|
"com.tt.honeyDue.COMPLETE_TASK" -> {
|
||||||
val taskId = intent.getIntExtra("task_id", -1)
|
val taskId = intent.getIntExtra("task_id", -1)
|
||||||
if (taskId != -1) {
|
if (taskId != -1) {
|
||||||
completeTask(context, taskId)
|
completeTask(context, taskId)
|
||||||
@@ -45,7 +45,7 @@ class WidgetTaskActionReceiver : BroadcastReceiver() {
|
|||||||
val result = APILayer.createTaskCompletion(request)
|
val result = APILayer.createTaskCompletion(request)
|
||||||
|
|
||||||
// Update widgets after completion
|
// Update widgets after completion
|
||||||
if (result is com.example.casera.network.ApiResult.Success) {
|
if (result is com.tt.honeyDue.network.ApiResult.Success) {
|
||||||
WidgetUpdateManager.updateAllWidgets(context)
|
WidgetUpdateManager.updateAllWidgets(context)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.widget
|
package com.tt.honeyDue.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.datastore.preferences.core.intPreferencesKey
|
import androidx.datastore.preferences.core.intPreferencesKey
|
||||||
@@ -22,7 +22,7 @@ object WidgetUpdateManager {
|
|||||||
private val json = Json { ignoreUnknownKeys = true }
|
private val json = Json { ignoreUnknownKeys = true }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update all Casera widgets with new data
|
* Update all honeyDue widgets with new data
|
||||||
*/
|
*/
|
||||||
fun updateAllWidgets(context: Context) {
|
fun updateAllWidgets(context: Context) {
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
@@ -49,7 +49,7 @@ object WidgetUpdateManager {
|
|||||||
val glanceManager = GlanceAppWidgetManager(context)
|
val glanceManager = GlanceAppWidgetManager(context)
|
||||||
|
|
||||||
// Update small widgets
|
// Update small widgets
|
||||||
val smallWidgetIds = glanceManager.getGlanceIds(CaseraSmallWidget::class.java)
|
val smallWidgetIds = glanceManager.getGlanceIds(HoneyDueSmallWidget::class.java)
|
||||||
smallWidgetIds.forEach { id ->
|
smallWidgetIds.forEach { id ->
|
||||||
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
||||||
prefs.toMutablePreferences().apply {
|
prefs.toMutablePreferences().apply {
|
||||||
@@ -58,11 +58,11 @@ object WidgetUpdateManager {
|
|||||||
this[intPreferencesKey("in_progress_count")] = summary.inProgressCount
|
this[intPreferencesKey("in_progress_count")] = summary.inProgressCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CaseraSmallWidget().update(context, id)
|
HoneyDueSmallWidget().update(context, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update medium widgets
|
// Update medium widgets
|
||||||
val mediumWidgetIds = glanceManager.getGlanceIds(CaseraMediumWidget::class.java)
|
val mediumWidgetIds = glanceManager.getGlanceIds(HoneyDueMediumWidget::class.java)
|
||||||
mediumWidgetIds.forEach { id ->
|
mediumWidgetIds.forEach { id ->
|
||||||
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
||||||
prefs.toMutablePreferences().apply {
|
prefs.toMutablePreferences().apply {
|
||||||
@@ -72,11 +72,11 @@ object WidgetUpdateManager {
|
|||||||
this[stringPreferencesKey("tasks_json")] = json.encodeToString(summary.tasks)
|
this[stringPreferencesKey("tasks_json")] = json.encodeToString(summary.tasks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CaseraMediumWidget().update(context, id)
|
HoneyDueMediumWidget().update(context, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update large widgets
|
// Update large widgets
|
||||||
val largeWidgetIds = glanceManager.getGlanceIds(CaseraLargeWidget::class.java)
|
val largeWidgetIds = glanceManager.getGlanceIds(HoneyDueLargeWidget::class.java)
|
||||||
largeWidgetIds.forEach { id ->
|
largeWidgetIds.forEach { id ->
|
||||||
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
updateAppWidgetState(context, PreferencesGlanceStateDefinition, id) { prefs ->
|
||||||
prefs.toMutablePreferences().apply {
|
prefs.toMutablePreferences().apply {
|
||||||
@@ -89,7 +89,7 @@ object WidgetUpdateManager {
|
|||||||
this[longPreferencesKey("last_updated")] = summary.lastUpdated
|
this[longPreferencesKey("last_updated")] = summary.lastUpdated
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CaseraLargeWidget().update(context, id)
|
HoneyDueLargeWidget().update(context, id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Casera"
|
android:text="honeyDue"
|
||||||
android:textColor="#07A0C3"
|
android:textColor="#07A0C3"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Casera"
|
android:text="honeyDue"
|
||||||
android:textColor="#07A0C3"
|
android:textColor="#07A0C3"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Casera"
|
android:text="honeyDue"
|
||||||
android:textColor="#07A0C3"
|
android:textColor="#07A0C3"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 39 KiB |
@@ -1,14 +1,14 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="default_notification_channel_id">casera_notifications</string>
|
<string name="default_notification_channel_id">honeydue_notifications</string>
|
||||||
|
|
||||||
<!-- Widget Strings -->
|
<!-- Widget Strings -->
|
||||||
<string name="widget_small_name">Casera Summary</string>
|
<string name="widget_small_name">honeyDue Summary</string>
|
||||||
<string name="widget_small_description">Quick task count summary showing overdue, due soon, and active tasks</string>
|
<string name="widget_small_description">Quick task count summary showing overdue, due soon, and active tasks</string>
|
||||||
|
|
||||||
<string name="widget_medium_name">Casera Tasks</string>
|
<string name="widget_medium_name">honeyDue Tasks</string>
|
||||||
<string name="widget_medium_description">List of upcoming tasks with quick access to task details</string>
|
<string name="widget_medium_description">List of upcoming tasks with quick access to task details</string>
|
||||||
|
|
||||||
<string name="widget_large_name">Casera Dashboard</string>
|
<string name="widget_large_name">honeyDue Dashboard</string>
|
||||||
<string name="widget_large_description">Full task dashboard with stats and interactive actions (Pro feature)</string>
|
<string name="widget_large_description">Full task dashboard with stats and interactive actions (Pro feature)</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Verwalten Sie Ihre Immobilien einfach</string>
|
<string name="app_tagline">Verwalten Sie Ihre Immobilien einfach</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Verwalten Sie Ihre Immobilien einfach</string>
|
<string name="auth_login_subtitle">Verwalten Sie Ihre Immobilien einfach</string>
|
||||||
<string name="auth_login_username_label">Benutzername oder E-Mail</string>
|
<string name="auth_login_username_label">Benutzername oder E-Mail</string>
|
||||||
<string name="auth_login_password_label">Passwort</string>
|
<string name="auth_login_password_label">Passwort</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Administra tus propiedades con facilidad</string>
|
<string name="app_tagline">Administra tus propiedades con facilidad</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Administra tus propiedades con facilidad</string>
|
<string name="auth_login_subtitle">Administra tus propiedades con facilidad</string>
|
||||||
<string name="auth_login_username_label">Usuario o Correo</string>
|
<string name="auth_login_username_label">Usuario o Correo</string>
|
||||||
<string name="auth_login_password_label">Contrasena</string>
|
<string name="auth_login_password_label">Contrasena</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Gerez vos proprietes facilement</string>
|
<string name="app_tagline">Gerez vos proprietes facilement</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Gerez vos proprietes facilement</string>
|
<string name="auth_login_subtitle">Gerez vos proprietes facilement</string>
|
||||||
<string name="auth_login_username_label">Nom d\'utilisateur ou Email</string>
|
<string name="auth_login_username_label">Nom d\'utilisateur ou Email</string>
|
||||||
<string name="auth_login_password_label">Mot de passe</string>
|
<string name="auth_login_password_label">Mot de passe</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Gestisci le tue proprietà con facilità</string>
|
<string name="app_tagline">Gestisci le tue proprietà con facilità</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Gestisci le tue proprietà con facilità</string>
|
<string name="auth_login_subtitle">Gestisci le tue proprietà con facilità</string>
|
||||||
<string name="auth_login_username_label">Nome utente o Email</string>
|
<string name="auth_login_username_label">Nome utente o Email</string>
|
||||||
<string name="auth_login_password_label">Password</string>
|
<string name="auth_login_password_label">Password</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">物件管理を簡単に</string>
|
<string name="app_tagline">物件管理を簡単に</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">物件管理を簡単に</string>
|
<string name="auth_login_subtitle">物件管理を簡単に</string>
|
||||||
<string name="auth_login_username_label">ユーザー名またはメールアドレス</string>
|
<string name="auth_login_username_label">ユーザー名またはメールアドレス</string>
|
||||||
<string name="auth_login_password_label">パスワード</string>
|
<string name="auth_login_password_label">パスワード</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">부동산을 쉽게 관리하세요</string>
|
<string name="app_tagline">부동산을 쉽게 관리하세요</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">부동산을 쉽게 관리하세요</string>
|
<string name="auth_login_subtitle">부동산을 쉽게 관리하세요</string>
|
||||||
<string name="auth_login_username_label">사용자 이름 또는 이메일</string>
|
<string name="auth_login_username_label">사용자 이름 또는 이메일</string>
|
||||||
<string name="auth_login_password_label">비밀번호</string>
|
<string name="auth_login_password_label">비밀번호</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Beheer uw eigendommen met gemak</string>
|
<string name="app_tagline">Beheer uw eigendommen met gemak</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Beheer uw eigendommen met gemak</string>
|
<string name="auth_login_subtitle">Beheer uw eigendommen met gemak</string>
|
||||||
<string name="auth_login_username_label">Gebruikersnaam of E-mail</string>
|
<string name="auth_login_username_label">Gebruikersnaam of E-mail</string>
|
||||||
<string name="auth_login_password_label">Wachtwoord</string>
|
<string name="auth_login_password_label">Wachtwoord</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Gerencie suas propriedades com facilidade</string>
|
<string name="app_tagline">Gerencie suas propriedades com facilidade</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Gerencie suas propriedades com facilidade</string>
|
<string name="auth_login_subtitle">Gerencie suas propriedades com facilidade</string>
|
||||||
<string name="auth_login_username_label">Usuario ou Email</string>
|
<string name="auth_login_username_label">Usuario ou Email</string>
|
||||||
<string name="auth_login_password_label">Senha</string>
|
<string name="auth_login_password_label">Senha</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">轻松管理您的房产</string>
|
<string name="app_tagline">轻松管理您的房产</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">轻松管理您的房产</string>
|
<string name="auth_login_subtitle">轻松管理您的房产</string>
|
||||||
<string name="auth_login_username_label">用户名或邮箱</string>
|
<string name="auth_login_username_label">用户名或邮箱</string>
|
||||||
<string name="auth_login_password_label">密码</string>
|
<string name="auth_login_password_label">密码</string>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- App Name -->
|
<!-- App Name -->
|
||||||
<string name="app_name">Casera</string>
|
<string name="app_name">honeyDue</string>
|
||||||
<string name="app_tagline">Manage your properties with ease</string>
|
<string name="app_tagline">Manage your properties with ease</string>
|
||||||
|
|
||||||
<!-- Auth - Login -->
|
<!-- Auth - Login -->
|
||||||
<string name="auth_login_title">Casera</string>
|
<string name="auth_login_title">honeyDue</string>
|
||||||
<string name="auth_login_subtitle">Manage your properties with ease</string>
|
<string name="auth_login_subtitle">Manage your properties with ease</string>
|
||||||
<string name="auth_login_username_label">Username or Email</string>
|
<string name="auth_login_username_label">Username or Email</string>
|
||||||
<string name="auth_login_password_label">Password</string>
|
<string name="auth_login_password_label">Password</string>
|
||||||
@@ -282,7 +282,7 @@
|
|||||||
<string name="manage_users_invite_title">Invite Others</string>
|
<string name="manage_users_invite_title">Invite Others</string>
|
||||||
<string name="manage_users_easy_share">Easy Share</string>
|
<string name="manage_users_easy_share">Easy Share</string>
|
||||||
<string name="manage_users_send_invite">Send Invite Link</string>
|
<string name="manage_users_send_invite">Send Invite Link</string>
|
||||||
<string name="manage_users_easy_share_desc">Send a .casera file via Messages, Email, or share. They just tap to join.</string>
|
<string name="manage_users_easy_share_desc">Send a .honeydue file via Messages, Email, or share. They just tap to join.</string>
|
||||||
<string name="manage_users_share_code">Share Code</string>
|
<string name="manage_users_share_code">Share Code</string>
|
||||||
<string name="manage_users_no_code">No active code</string>
|
<string name="manage_users_no_code">No active code</string>
|
||||||
<string name="manage_users_generate">Generate Code</string>
|
<string name="manage_users_generate">Generate Code</string>
|
||||||
@@ -553,7 +553,7 @@
|
|||||||
<string name="profile_privacy">Privacy Policy</string>
|
<string name="profile_privacy">Privacy Policy</string>
|
||||||
<string name="profile_privacy_subtitle">View our privacy policy</string>
|
<string name="profile_privacy_subtitle">View our privacy policy</string>
|
||||||
<string name="profile_app_version">Version %1$s</string>
|
<string name="profile_app_version">Version %1$s</string>
|
||||||
<string name="profile_app_name">Casera</string>
|
<string name="profile_app_name">honeyDue</string>
|
||||||
<string name="profile_edit_profile">Edit Profile</string>
|
<string name="profile_edit_profile">Edit Profile</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
@@ -690,7 +690,7 @@
|
|||||||
<string name="subscription_limit_tasks">You\'ve reached the task limit for your plan</string>
|
<string name="subscription_limit_tasks">You\'ve reached the task limit for your plan</string>
|
||||||
|
|
||||||
<!-- Onboarding -->
|
<!-- Onboarding -->
|
||||||
<string name="onboarding_welcome_title">Welcome to Casera</string>
|
<string name="onboarding_welcome_title">Welcome to honeyDue</string>
|
||||||
<string name="onboarding_welcome_subtitle">Your home maintenance companion</string>
|
<string name="onboarding_welcome_subtitle">Your home maintenance companion</string>
|
||||||
<string name="onboarding_start_fresh">Start Fresh</string>
|
<string name="onboarding_start_fresh">Start Fresh</string>
|
||||||
<string name="onboarding_join_existing">Join Existing Home</string>
|
<string name="onboarding_join_existing">Join Existing Home</string>
|
||||||
@@ -763,7 +763,7 @@
|
|||||||
<!-- Onboarding - Subscription -->
|
<!-- Onboarding - Subscription -->
|
||||||
<string name="onboarding_subscription_title">Go Pro</string>
|
<string name="onboarding_subscription_title">Go Pro</string>
|
||||||
<string name="onboarding_subscription_subtitle">Take your home management to the next level</string>
|
<string name="onboarding_subscription_subtitle">Take your home management to the next level</string>
|
||||||
<string name="onboarding_subscription_pro">CASERA PRO</string>
|
<string name="onboarding_subscription_pro">HONEYDUE PRO</string>
|
||||||
<string name="onboarding_subscription_social_proof">4.9 • 10K+ homeowners</string>
|
<string name="onboarding_subscription_social_proof">4.9 • 10K+ homeowners</string>
|
||||||
<string name="onboarding_subscription_benefit_properties">Unlimited Properties</string>
|
<string name="onboarding_subscription_benefit_properties">Unlimited Properties</string>
|
||||||
<string name="onboarding_subscription_benefit_properties_desc">Track every home you own</string>
|
<string name="onboarding_subscription_benefit_properties_desc">Track every home you own</string>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
@@ -16,22 +16,22 @@ import androidx.compose.material3.Text
|
|||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import com.example.casera.ui.screens.AddResidenceScreen
|
import com.tt.honeyDue.ui.screens.AddResidenceScreen
|
||||||
import com.example.casera.ui.screens.EditResidenceScreen
|
import com.tt.honeyDue.ui.screens.EditResidenceScreen
|
||||||
import com.example.casera.ui.screens.EditTaskScreen
|
import com.tt.honeyDue.ui.screens.EditTaskScreen
|
||||||
import com.example.casera.ui.screens.ForgotPasswordScreen
|
import com.tt.honeyDue.ui.screens.ForgotPasswordScreen
|
||||||
import com.example.casera.ui.screens.HomeScreen
|
import com.tt.honeyDue.ui.screens.HomeScreen
|
||||||
import com.example.casera.ui.screens.LoginScreen
|
import com.tt.honeyDue.ui.screens.LoginScreen
|
||||||
import com.example.casera.ui.screens.RegisterScreen
|
import com.tt.honeyDue.ui.screens.RegisterScreen
|
||||||
import com.example.casera.ui.screens.ResetPasswordScreen
|
import com.tt.honeyDue.ui.screens.ResetPasswordScreen
|
||||||
import com.example.casera.ui.screens.ResidenceDetailScreen
|
import com.tt.honeyDue.ui.screens.ResidenceDetailScreen
|
||||||
import com.example.casera.ui.screens.ResidencesScreen
|
import com.tt.honeyDue.ui.screens.ResidencesScreen
|
||||||
import com.example.casera.ui.screens.TasksScreen
|
import com.tt.honeyDue.ui.screens.TasksScreen
|
||||||
import com.example.casera.ui.screens.VerifyEmailScreen
|
import com.tt.honeyDue.ui.screens.VerifyEmailScreen
|
||||||
import com.example.casera.ui.screens.VerifyResetCodeScreen
|
import com.tt.honeyDue.ui.screens.VerifyResetCodeScreen
|
||||||
import com.example.casera.ui.screens.onboarding.OnboardingScreen
|
import com.tt.honeyDue.ui.screens.onboarding.OnboardingScreen
|
||||||
import com.example.casera.viewmodel.OnboardingViewModel
|
import com.tt.honeyDue.viewmodel.OnboardingViewModel
|
||||||
import com.example.casera.viewmodel.PasswordResetViewModel
|
import com.tt.honeyDue.viewmodel.PasswordResetViewModel
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import org.jetbrains.compose.resources.painterResource
|
import org.jetbrains.compose.resources.painterResource
|
||||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||||
@@ -40,29 +40,29 @@ import androidx.navigation.compose.NavHost
|
|||||||
import androidx.navigation.compose.rememberNavController
|
import androidx.navigation.compose.rememberNavController
|
||||||
import androidx.navigation.compose.composable
|
import androidx.navigation.compose.composable
|
||||||
import androidx.navigation.toRoute
|
import androidx.navigation.toRoute
|
||||||
import com.example.casera.ui.screens.MainScreen
|
import com.tt.honeyDue.ui.screens.MainScreen
|
||||||
import com.example.casera.ui.screens.ManageUsersScreen
|
import com.tt.honeyDue.ui.screens.ManageUsersScreen
|
||||||
import com.example.casera.ui.screens.NotificationPreferencesScreen
|
import com.tt.honeyDue.ui.screens.NotificationPreferencesScreen
|
||||||
import com.example.casera.ui.screens.ProfileScreen
|
import com.tt.honeyDue.ui.screens.ProfileScreen
|
||||||
import com.example.casera.ui.theme.MyCribTheme
|
import com.tt.honeyDue.ui.theme.HoneyDueTheme
|
||||||
import com.example.casera.ui.theme.ThemeManager
|
import com.tt.honeyDue.ui.theme.ThemeManager
|
||||||
import com.example.casera.navigation.*
|
import com.tt.honeyDue.navigation.*
|
||||||
import com.example.casera.repository.LookupsRepository
|
import com.tt.honeyDue.repository.LookupsRepository
|
||||||
import com.example.casera.models.Residence
|
import com.tt.honeyDue.models.Residence
|
||||||
import com.example.casera.models.TaskCategory
|
import com.tt.honeyDue.models.TaskCategory
|
||||||
import com.example.casera.models.TaskDetail
|
import com.tt.honeyDue.models.TaskDetail
|
||||||
import com.example.casera.models.TaskFrequency
|
import com.tt.honeyDue.models.TaskFrequency
|
||||||
import com.example.casera.models.TaskPriority
|
import com.tt.honeyDue.models.TaskPriority
|
||||||
import com.example.casera.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.example.casera.network.AuthApi
|
import com.tt.honeyDue.network.AuthApi
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
import com.example.casera.platform.ContractorImportHandler
|
import com.tt.honeyDue.platform.ContractorImportHandler
|
||||||
import com.example.casera.platform.PlatformUpgradeScreen
|
import com.tt.honeyDue.platform.PlatformUpgradeScreen
|
||||||
import com.example.casera.platform.ResidenceImportHandler
|
import com.tt.honeyDue.platform.ResidenceImportHandler
|
||||||
|
|
||||||
import casera.composeapp.generated.resources.Res
|
import honeydue.composeapp.generated.resources.Res
|
||||||
import casera.composeapp.generated.resources.compose_multiplatform
|
import honeydue.composeapp.generated.resources.compose_multiplatform
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@Preview
|
@Preview
|
||||||
@@ -119,7 +119,7 @@ fun App(
|
|||||||
|
|
||||||
val currentTheme by remember { derivedStateOf { ThemeManager.currentTheme } }
|
val currentTheme by remember { derivedStateOf { ThemeManager.currentTheme } }
|
||||||
|
|
||||||
MyCribTheme(themeColors = currentTheme) {
|
HoneyDueTheme(themeColors = currentTheme) {
|
||||||
// Handle contractor file imports (Android-specific, no-op on other platforms)
|
// Handle contractor file imports (Android-specific, no-op on other platforms)
|
||||||
ContractorImportHandler(
|
ContractorImportHandler(
|
||||||
pendingContractorImportUri = pendingContractorImportUri,
|
pendingContractorImportUri = pendingContractorImportUri,
|
||||||
@@ -145,7 +145,7 @@ fun App(
|
|||||||
CircularProgressIndicator()
|
CircularProgressIndicator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return@MyCribTheme
|
return@HoneyDueTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
val startDestination = when {
|
val startDestination = when {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
class Greeting {
|
class Greeting {
|
||||||
private val platform = getPlatform()
|
private val platform = getPlatform()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
//package com.casera.android
|
//package com.honeydue.android
|
||||||
//
|
//
|
||||||
//import android.os.Bundle
|
//import android.os.Bundle
|
||||||
//import androidx.activity.ComponentActivity
|
//import androidx.activity.ComponentActivity
|
||||||
@@ -10,15 +10,15 @@
|
|||||||
//import androidx.navigation.compose.NavHost
|
//import androidx.navigation.compose.NavHost
|
||||||
//import androidx.navigation.compose.composable
|
//import androidx.navigation.compose.composable
|
||||||
//import androidx.navigation.compose.rememberNavController
|
//import androidx.navigation.compose.rememberNavController
|
||||||
//import com.example.casera.ui.screens.*
|
//import com.tt.honeyDue.ui.screens.*
|
||||||
//import com.example.casera.ui.theme.MyCribTheme
|
//import com.tt.honeyDue.ui.theme.HoneyDueTheme
|
||||||
//
|
//
|
||||||
//class MainActivity : ComponentActivity() {
|
//class MainActivity : ComponentActivity() {
|
||||||
// override fun onCreate(savedInstanceState: Bundle?) {
|
// override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// super.onCreate(savedInstanceState)
|
// super.onCreate(savedInstanceState)
|
||||||
// setContent {
|
// setContent {
|
||||||
// MyCribTheme {
|
// HoneyDueTheme {
|
||||||
// MyCribApp()
|
// HoneyDueApp()
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera
|
package com.tt.honeyDue
|
||||||
|
|
||||||
interface Platform {
|
interface Platform {
|
||||||
val name: String
|
val name: String
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.analytics
|
package com.tt.honeyDue.analytics
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common analytics interface for cross-platform event tracking.
|
* Common analytics interface for cross-platform event tracking.
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.example.casera.cache
|
package com.tt.honeyDue.cache
|
||||||
|
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.FeatureBenefit
|
import com.tt.honeyDue.models.FeatureBenefit
|
||||||
import com.example.casera.models.Promotion
|
import com.tt.honeyDue.models.Promotion
|
||||||
import com.example.casera.models.SubscriptionStatus
|
import com.tt.honeyDue.models.SubscriptionStatus
|
||||||
import com.example.casera.models.UpgradeTriggerData
|
import com.tt.honeyDue.models.UpgradeTriggerData
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thin facade over DataManager for subscription data.
|
* Thin facade over DataManager for subscription data.
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.example.casera.data
|
package com.tt.honeyDue.data
|
||||||
|
|
||||||
import com.example.casera.models.*
|
import com.tt.honeyDue.models.*
|
||||||
import com.example.casera.storage.TokenManager
|
import com.tt.honeyDue.storage.TokenManager
|
||||||
import com.example.casera.storage.ThemeStorageManager
|
import com.tt.honeyDue.storage.ThemeStorageManager
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.asStateFlow
|
import kotlinx.coroutines.flow.asStateFlow
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.data
|
package com.tt.honeyDue.data
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platform-specific persistence manager for storing app data to disk.
|
* Platform-specific persistence manager for storing app data to disk.
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.encodeToString
|
import kotlinx.serialization.encodeToString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared encoder/decoder for `.casera` payloads across Android and iOS.
|
* Shared encoder/decoder for `.honeydue` payloads across Android and iOS.
|
||||||
*
|
*
|
||||||
* This keeps package JSON shape in one place while each platform owns
|
* This keeps package JSON shape in one place while each platform owns
|
||||||
* native share-sheet presentation details.
|
* native share-sheet presentation details.
|
||||||
*/
|
*/
|
||||||
object CaseraShareCodec {
|
object honeyDueShareCodec {
|
||||||
private val json = Json {
|
private val json = Json {
|
||||||
prettyPrint = true
|
prettyPrint = true
|
||||||
ignoreUnknownKeys = true
|
ignoreUnknownKeys = true
|
||||||
@@ -58,13 +58,13 @@ object CaseraShareCodec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a filesystem-safe package filename with `.casera` extension.
|
* Build a filesystem-safe package filename with `.honeydue` extension.
|
||||||
*/
|
*/
|
||||||
fun safeShareFileName(displayName: String): String {
|
fun safeShareFileName(displayName: String): String {
|
||||||
val safeName = displayName
|
val safeName = displayName
|
||||||
.replace(" ", "_")
|
.replace(" ", "_")
|
||||||
.replace("/", "-")
|
.replace("/", "-")
|
||||||
.take(50)
|
.take(50)
|
||||||
return "$safeName.casera"
|
return "$safeName.honeydue"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlin.time.Clock
|
import kotlin.time.Clock
|
||||||
import kotlin.time.ExperimentalTime
|
import kotlin.time.ExperimentalTime
|
||||||
@@ -9,15 +9,15 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
import kotlinx.serialization.json.jsonPrimitive
|
import kotlinx.serialization.json.jsonPrimitive
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Package type identifiers for .casera files
|
* Package type identifiers for .honeydue files
|
||||||
*/
|
*/
|
||||||
object CaseraPackageType {
|
object honeyDuePackageType {
|
||||||
const val CONTRACTOR = "contractor"
|
const val CONTRACTOR = "contractor"
|
||||||
const val RESIDENCE = "residence"
|
const val RESIDENCE = "residence"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data model for .casera file format used to share contractors between users.
|
* Data model for .honeydue file format used to share contractors between users.
|
||||||
* Contains only the data needed to recreate a contractor, without server-specific IDs.
|
* Contains only the data needed to recreate a contractor, without server-specific IDs.
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -26,7 +26,7 @@ data class SharedContractor(
|
|||||||
val version: Int = 1,
|
val version: Int = 1,
|
||||||
|
|
||||||
/** Package type discriminator */
|
/** Package type discriminator */
|
||||||
val type: String = CaseraPackageType.CONTRACTOR,
|
val type: String = honeyDuePackageType.CONTRACTOR,
|
||||||
|
|
||||||
val name: String,
|
val name: String,
|
||||||
val company: String? = null,
|
val company: String? = null,
|
||||||
@@ -61,7 +61,7 @@ data class SharedContractor(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data model for .casera file format used to share residences between users.
|
* Data model for .honeydue file format used to share residences between users.
|
||||||
* Contains the share code needed to join the residence.
|
* Contains the share code needed to join the residence.
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -70,7 +70,7 @@ data class SharedResidence(
|
|||||||
val version: Int = 1,
|
val version: Int = 1,
|
||||||
|
|
||||||
/** Package type discriminator */
|
/** Package type discriminator */
|
||||||
val type: String = CaseraPackageType.RESIDENCE,
|
val type: String = honeyDuePackageType.RESIDENCE,
|
||||||
|
|
||||||
/** The share code for joining the residence */
|
/** The share code for joining the residence */
|
||||||
@SerialName("share_code")
|
@SerialName("share_code")
|
||||||
@@ -98,14 +98,14 @@ data class SharedResidence(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detect the type of a .casera package from its JSON content.
|
* Detect the type of a .honeydue package from its JSON content.
|
||||||
* Returns null if the type cannot be determined.
|
* Returns null if the type cannot be determined.
|
||||||
*/
|
*/
|
||||||
fun detectCaseraPackageType(jsonContent: String): String? {
|
fun detecthoneyDuePackageType(jsonContent: String): String? {
|
||||||
return try {
|
return try {
|
||||||
val json = Json { ignoreUnknownKeys = true }
|
val json = Json { ignoreUnknownKeys = true }
|
||||||
val jsonObject = json.decodeFromString<JsonObject>(jsonContent)
|
val jsonObject = json.decodeFromString<JsonObject>(jsonContent)
|
||||||
jsonObject["type"]?.jsonPrimitive?.content ?: CaseraPackageType.CONTRACTOR // Default for backward compatibility
|
jsonObject["type"]?.jsonPrimitive?.content ?: honeyDuePackageType.CONTRACTOR // Default for backward compatibility
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ fun detectCaseraPackageType(jsonContent: String): String? {
|
|||||||
fun Contractor.toSharedContractor(exportedBy: String? = null): SharedContractor {
|
fun Contractor.toSharedContractor(exportedBy: String? = null): SharedContractor {
|
||||||
return SharedContractor(
|
return SharedContractor(
|
||||||
version = 1,
|
version = 1,
|
||||||
type = CaseraPackageType.CONTRACTOR,
|
type = honeyDuePackageType.CONTRACTOR,
|
||||||
name = name,
|
name = name,
|
||||||
company = company,
|
company = company,
|
||||||
phone = phone,
|
phone = phone,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.models
|
package com.tt.honeyDue.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.navigation
|
package com.tt.honeyDue.navigation
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.example.casera.network
|
package com.tt.honeyDue.network
|
||||||
|
|
||||||
import com.example.casera.data.DataManager
|
import com.tt.honeyDue.data.DataManager
|
||||||
import com.example.casera.models.*
|
import com.tt.honeyDue.models.*
|
||||||
import com.example.casera.network.*
|
import com.tt.honeyDue.network.*
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.network
|
package com.tt.honeyDue.network
|
||||||
|
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.plugins.contentnegotiation.*
|
import io.ktor.client.plugins.contentnegotiation.*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.network
|
package com.tt.honeyDue.network
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Environment Configuration
|
* API Environment Configuration
|
||||||
@@ -22,7 +22,7 @@ object ApiConfig {
|
|||||||
fun getBaseUrl(): String {
|
fun getBaseUrl(): String {
|
||||||
return when (CURRENT_ENV) {
|
return when (CURRENT_ENV) {
|
||||||
Environment.LOCAL -> "http://${getLocalhostAddress()}:8000/api"
|
Environment.LOCAL -> "http://${getLocalhostAddress()}:8000/api"
|
||||||
Environment.DEV -> "https://casera.treytartt.com/api"
|
Environment.DEV -> "https://honeyDue.treytartt.com/api"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ object ApiConfig {
|
|||||||
fun getMediaBaseUrl(): String {
|
fun getMediaBaseUrl(): String {
|
||||||
return when (CURRENT_ENV) {
|
return when (CURRENT_ENV) {
|
||||||
Environment.LOCAL -> "http://${getLocalhostAddress()}:8000"
|
Environment.LOCAL -> "http://${getLocalhostAddress()}:8000"
|
||||||
Environment.DEV -> "https://casera.treytartt.com"
|
Environment.DEV -> "https://honeyDue.treytartt.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ object ApiConfig {
|
|||||||
fun getEnvironmentName(): String {
|
fun getEnvironmentName(): String {
|
||||||
return when (CURRENT_ENV) {
|
return when (CURRENT_ENV) {
|
||||||
Environment.LOCAL -> "Local (${getLocalhostAddress()}:8000)"
|
Environment.LOCAL -> "Local (${getLocalhostAddress()}:8000)"
|
||||||
Environment.DEV -> "Dev Server (casera.treytartt.com)"
|
Environment.DEV -> "Dev Server (honeyDue.treytartt.com)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.casera.network
|
package com.tt.honeyDue.network
|
||||||
|
|
||||||
sealed class ApiResult<out T> {
|
sealed class ApiResult<out T> {
|
||||||
data class Success<T>(val data: T) : ApiResult<T>()
|
data class Success<T>(val data: T) : ApiResult<T>()
|
||||||