Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95c69d35e2 | ||
|
|
bc4903e3b8 | ||
|
|
beb6cc5715 | ||
|
|
4c6adc7117 | ||
|
|
c787b87cc5 | ||
|
|
0685735c74 | ||
|
|
064650a585 | ||
|
|
bdfe53fa83 | ||
|
|
f6abf628e3 | ||
|
|
40077da57f | ||
|
|
aa57d07dc0 | ||
|
|
89c85ed7c0 | ||
|
|
ee6af8fb26 | ||
|
|
c6e441d449 | ||
|
|
5043d9cdff | ||
|
|
7e36244478 | ||
|
|
157fc8d95b | ||
|
|
4d2f92b144 | ||
|
|
8e805316fb | ||
|
|
77051e5206 | ||
|
|
7e06415db4 | ||
|
|
cfb987a305 | ||
|
|
3dad9e93ec | ||
|
|
2be4d5aa4e | ||
|
|
e91251759b | ||
|
|
0093c4aec2 | ||
|
|
0563521887 | ||
|
|
9ade0fa0ca | ||
|
|
3ec934a54c | ||
|
|
39fd491d24 | ||
|
|
381fef8502 | ||
|
|
c4cc2712ee | ||
|
|
152d07f21e |
@@ -1,74 +0,0 @@
|
|||||||
name: Build APK
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
ANDROID_HOME: ${{ runner.tool_cache }}/android-sdk
|
|
||||||
ANDROID_SDK_ROOT: ${{ runner.tool_cache }}/android-sdk
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Set up JDK
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Install Android SDK
|
|
||||||
run: |
|
|
||||||
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
|
|
||||||
echo "Android SDK already present in cache"
|
|
||||||
else
|
|
||||||
rm -rf "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mkdir -p "$ANDROID_HOME/cmdline-tools"
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
|
||||||
unzip -q /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
|
|
||||||
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
|
||||||
fi
|
|
||||||
printf 'y\n' | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
|
|
||||||
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
||||||
"platform-tools" \
|
|
||||||
"platforms;android-35" \
|
|
||||||
"platforms;android-36" \
|
|
||||||
"build-tools;35.0.0" \
|
|
||||||
"build-tools;36.0.0" \
|
|
||||||
"ndk;27.1.12297006"
|
|
||||||
mkdir -p carry-your-live/android/app
|
|
||||||
echo "sdk.dir=$ANDROID_HOME" > carry-your-live/android/app/local.properties
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
working-directory: carry-your-live
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Generate debug keystore (signs the release APK)
|
|
||||||
run: |
|
|
||||||
mkdir -p carry-your-live/android/app
|
|
||||||
keytool -genkeypair -v \
|
|
||||||
-keystore carry-your-live/android/app/debug.keystore \
|
|
||||||
-alias androiddebugkey -storepass android -keypass android \
|
|
||||||
-keyalg RSA -keysize 2048 -validity 10000 \
|
|
||||||
-dname "CN=Android Debug,O=Android,C=US"
|
|
||||||
|
|
||||||
- name: Build release APK
|
|
||||||
run: |
|
|
||||||
cd carry-your-live/android
|
|
||||||
./gradlew assembleRelease
|
|
||||||
|
|
||||||
- name: Upload APK
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: carry-your-live-release
|
|
||||||
path: carry-your-live/android/app/build/outputs/release/app-release.apk
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
name: Build Desktop (deb)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
working-directory: carry-your-live
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Export web bundle
|
|
||||||
working-directory: carry-your-live
|
|
||||||
run: npx expo export --platform web
|
|
||||||
|
|
||||||
- name: Build deb package
|
|
||||||
working-directory: carry-your-live
|
|
||||||
run: npx electron-builder --linux deb --config electron-builder.config.js
|
|
||||||
|
|
||||||
- name: Upload deb
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: carry-your-live-desktop-deb
|
|
||||||
path: carry-your-live/desktop-build/*.deb
|
|
||||||
@@ -1,15 +1,92 @@
|
|||||||
name: release
|
name: Build and Release APK
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
ANDROID_HOME: ${{ runner.tool_cache }}/android-sdk
|
||||||
|
ANDROID_SDK_ROOT: ${{ runner.tool_cache }}/android-sdk
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
apk-path: ${{ steps.upload-apk.outputs.path }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Install Android SDK
|
||||||
|
run: |
|
||||||
|
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
|
||||||
|
echo "Android SDK already present in cache"
|
||||||
|
else
|
||||||
|
rm -rf "$ANDROID_HOME/cmdline-tools"
|
||||||
|
mkdir -p "$ANDROID_HOME/cmdline-tools"
|
||||||
|
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdtools.zip
|
||||||
|
unzip -q /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
|
||||||
|
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
||||||
|
fi
|
||||||
|
# Accept all licenses by writing known license hashes
|
||||||
|
mkdir -p "$ANDROID_HOME/licenses"
|
||||||
|
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
|
||||||
|
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
||||||
|
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> "$ANDROID_HOME/licenses/android-sdk-license"
|
||||||
|
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
||||||
|
"platform-tools" \
|
||||||
|
"platforms;android-36" \
|
||||||
|
"build-tools;36.0.0" \
|
||||||
|
"ndk;27.1.12297006"
|
||||||
|
mkdir -p carry-your-live/android/app
|
||||||
|
echo "sdk.dir=$ANDROID_HOME" > carry-your-live/android/app/local.properties
|
||||||
|
|
||||||
|
- name: Install JS dependencies
|
||||||
|
working-directory: carry-your-live
|
||||||
|
run: |
|
||||||
|
for i in {1..3}; do
|
||||||
|
npm ci && break || sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Generate debug keystore (signs the release APK)
|
||||||
|
run: |
|
||||||
|
mkdir -p carry-your-live/android/app
|
||||||
|
rm -f carry-your-live/android/app/debug.keystore
|
||||||
|
keytool -genkeypair -v \
|
||||||
|
-keystore carry-your-live/android/app/debug.keystore \
|
||||||
|
-alias androiddebugkey -storepass android -keypass android \
|
||||||
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||||
|
-dname "CN=Android Debug,O=Android,C=US"
|
||||||
|
|
||||||
|
- name: Build release APK
|
||||||
|
run: |
|
||||||
|
cd carry-your-live/android
|
||||||
|
./gradlew assembleRelease
|
||||||
|
|
||||||
|
- name: Upload APK
|
||||||
|
id: upload-apk
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: carry-your-live-release
|
||||||
|
path: carry-your-live/android/app/build/outputs/release/app-release.apk
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -17,6 +94,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download APK artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: carry-your-live-release
|
||||||
|
path: .
|
||||||
|
|
||||||
- name: Compute next version
|
- name: Compute next version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
@@ -53,4 +136,5 @@ jobs:
|
|||||||
tag_name: ${{ steps.version.outputs.next }}
|
tag_name: ${{ steps.version.outputs.next }}
|
||||||
name: ${{ steps.version.outputs.next }}
|
name: ${{ steps.version.outputs.next }}
|
||||||
body: ${{ steps.changelog.outputs.body }}
|
body: ${{ steps.changelog.outputs.body }}
|
||||||
|
files: ./app-release.apk
|
||||||
generate_release_notes: false
|
generate_release_notes: false
|
||||||
@@ -15,3 +15,14 @@ System architecture design, technical strategy, and scalability planning.
|
|||||||
- Performance benchmarks
|
- Performance benchmarks
|
||||||
- Technical debt ratio
|
- Technical debt ratio
|
||||||
- Architecture compliance
|
- Architecture compliance
|
||||||
|
|
||||||
|
## Android Design Guidelines
|
||||||
|
- Material Design elevation patterns (0-12dp shadows)
|
||||||
|
- Tab bar height: 56dp (standard Android)
|
||||||
|
- Status bar: dark style for light backgrounds, light style for dark
|
||||||
|
- System back button: router.back() or goBack() with confirmation on home screen
|
||||||
|
- Touch ripple: opacity scaling on press (44dp touch targets, 8dp border radius)
|
||||||
|
- Safe area insets: account for bottom navigation bar (84px + system insets)
|
||||||
|
- Theme: primary accent color with complementary supporting colors
|
||||||
|
- Typography: Roboto-inspired font weights (600 for labels, 400/500 for body)
|
||||||
|
- Scaling: 8dp grid system for spacing and margins
|
||||||
@@ -1,6 +1,40 @@
|
|||||||
# Carry Your Live - Mobile To-Do & Calendar App
|
# Carry Your Live - Mobile To-Do & Calendar App
|
||||||
|
|
||||||
A minimalist, offline-first task management app built with Expo, React Native, and WatermelonDB. Features three primary screens: To-Do List, Add New Task, and Calendar with bottom navigation.
|
A minimalist, offline-first task management app built with Expo, React Native, and WatermelonDB. Features multiple screens with bottom navigation, social features, and a full-featured backend API.
|
||||||
|
|
||||||
|
## 📝 Recent Progress (v1.1.0 - Unreleased)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **Friends feature**: Friend requests, accept/decline/remove, user search, full backend routes
|
||||||
|
- **Assignee field on tasks**: Schema v7, model, types, forms, sync, task actions
|
||||||
|
- **AssigneeSelector component** and assignee display in TaskItem
|
||||||
|
- **QuickAddBar** on tasks overview (copied from calendar)
|
||||||
|
- **Backend**: Mounted friends route, added assigneeId to task validation and sync
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Due date prefilled from Calendar "+" button
|
||||||
|
- 12-hour time formatting across task rows and pickers
|
||||||
|
- Calendar strip scrolls to selected day when navigating months
|
||||||
|
- Calendar completion toggle now handles repeating tasks and reminders
|
||||||
|
- Task color strips now use the task's category color
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- WheelTimePicker FlatList scroll clamping - all hours (0-23) and minutes (0-59) reachable
|
||||||
|
- WheelTimePicker selection highlight background connecting selected item with colon separator
|
||||||
|
- WheelTimePicker number alignment in scroll list
|
||||||
|
- Tasks without a due date no longer get overdue styling
|
||||||
|
- `useOverdueTasks` infinite re-subscription loop (Date.now in effect deps)
|
||||||
|
- Web/Android crashes from decorator transform ordering (babel config)
|
||||||
|
- FormButtons crash outside FormProvider; Cancel navigation fallback
|
||||||
|
- Task repeat settings, reminders and series info now sync to backend
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Task color picker (task color now comes from its category)
|
||||||
|
- Drag lift popup from TaskItem (scale + shadow on drag)
|
||||||
|
- Checkbox from task items
|
||||||
|
- Selection bar overlapping QuickAddBar on tasks overview
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@@ -8,97 +42,145 @@ A minimalist, offline-first task management app built with Expo, React Native, a
|
|||||||
- **Offline-First Architecture**: Full CRUD operations work offline with WatermelonDB + SQLite
|
- **Offline-First Architecture**: Full CRUD operations work offline with WatermelonDB + SQLite
|
||||||
- **Auto-Sync**: Background synchronization with custom Postgres API when online
|
- **Auto-Sync**: Background synchronization with custom Postgres API when online
|
||||||
- **Cross-Platform**: iOS, Android, and Web from single codebase
|
- **Cross-Platform**: iOS, Android, and Web from single codebase
|
||||||
|
- **Desktop Support**: Electron wrapper for desktop app distribution
|
||||||
|
|
||||||
### Screens
|
### Screens
|
||||||
|
|
||||||
#### 1. To-Do List Screen
|
#### 1. Tasks Screen (To-Do List)
|
||||||
- **Header**: App logo + "TODO" title with rounded corners
|
- **Header**: App logo + "TODO" title with rounded corners
|
||||||
- **Category Filter**: Horizontal scrollable chips (Work, Personal, School, Shopping, Health, Finance, All)
|
- **Category Filter**: Horizontal scrollable chips (Work, Personal, School, Shopping, Health, Finance, All)
|
||||||
- Single selection with visual feedback (thicker border, shadow, scale animation)
|
- Single selection with visual feedback (thicker border, shadow, scale animation)
|
||||||
- Instant task filtering
|
- Instant task filtering
|
||||||
- **Task List**: Vertical scrolling with:
|
- **QuickAddBar**: Quick task creation from list view
|
||||||
- Checkbox (empty/checked states with animation)
|
- **Task List**: Virtualized FlatList with sections (Pending/Completed)
|
||||||
- Task title (truncated with ellipsis)
|
- Task title (truncated with ellipsis)
|
||||||
- Three-dot overflow menu (Edit, Delete, Duplicate, Mark Complete, Change Category, Change Priority)
|
- Three-dot overflow menu (Edit, Delete, Duplicate, Mark Complete, Change Category, Change Priority)
|
||||||
- Priority badges with colors
|
- Priority badges with colors
|
||||||
- Due date/time with overdue/due-today highlighting
|
- Due date/time with overdue/due-today highlighting
|
||||||
- Completed section (collapsible)
|
- Category color indicator strip
|
||||||
- **Floating Action Button**: Bottom-right, opens Add Task screen with press animation
|
- Assignee display
|
||||||
|
- Swipe actions (left: delete, right: complete)
|
||||||
|
- Drag-to-reorder with visual drop indicators
|
||||||
|
- Long press → Selection mode (multi-delete, multi-complete, change category/priority)
|
||||||
|
- **Floating Action Button**: Bottom-right, opens Add Task screen
|
||||||
|
|
||||||
#### 2. Add New Task Screen
|
#### 2. Calendar Screen
|
||||||
|
- **Date Strip**: Horizontal scrollable days of current month
|
||||||
|
- Current day highlighted, scrolls to selected day on month change
|
||||||
|
- **Month Label**: Centered (e.g., "JAN 2026")
|
||||||
|
- **QuickAddBar**: Quick task creation for selected date
|
||||||
|
- **Task List**: Tasks for selected day with category color, title, time, completion status
|
||||||
|
- **Analog Clock Widget**: Decorative analog clock display
|
||||||
|
- **Empty State**: "No tasks scheduled."
|
||||||
|
- **Day View**: Detailed view for selected day (pushes to stack)
|
||||||
|
|
||||||
|
#### 3. Stats Screen
|
||||||
|
- Client-side statistics (`useStats` hook)
|
||||||
|
- Task completion metrics
|
||||||
|
- Category and priority breakdowns
|
||||||
|
|
||||||
|
#### 4. Settings Screen
|
||||||
|
- **Account**: Login/Register/Sign Out (SyncModal)
|
||||||
|
- **Server URL Override**: Custom API endpoint configuration
|
||||||
|
- **Appearance**: Accent color picker (dark mode toggle planned)
|
||||||
|
- **Task Defaults**: Default category, sort order (Date, Priority, Alphabetically, Creation Date), show completed toggle
|
||||||
|
- **Calendar**: Days ahead to display
|
||||||
|
- **Reminders**: Global reminder preference (stored, wiring in progress)
|
||||||
|
- **Notifications**: Toggle (stored, wiring in progress)
|
||||||
|
- **Legal**: Privacy Policy, Terms of Service
|
||||||
|
- **About**: Version info
|
||||||
|
|
||||||
|
#### 5. Add New Task Screen
|
||||||
- **Category Selector**: Horizontal row of colored circles (required)
|
- **Category Selector**: Horizontal row of colored circles (required)
|
||||||
- **Task Name**: Single-line input, 100 char max (required)
|
- **Task Name**: Single-line input, 100 char max (required)
|
||||||
- **Subtasks**: Unlimited, add/remove individually
|
- **Subtasks**: Unlimited, add/remove individually, nested subtask support
|
||||||
- **Date & Time**: Date picker, time picker, calendar button
|
- **Date & Time**: Date picker, time picker (WheelTimePicker), calendar button
|
||||||
- **Priority**: Dropdown (None, Low, Medium, High, Critical) with color indicators
|
- **Priority**: Dropdown (None, Low, Medium, High, Critical) with color indicators
|
||||||
|
- **Repeat Profile**: Recurring task configuration
|
||||||
|
- **Reminder**: Reminder offset selector
|
||||||
|
- **Assignee**: Assign task to friend
|
||||||
- **Description**: Multi-line text area, 1000 char max
|
- **Description**: Multi-line text area, 1000 char max
|
||||||
- **Bottom Actions**: Submit (primary) / Cancel (secondary) fixed buttons
|
- **Bottom Actions**: Submit (primary) / Cancel (secondary) fixed buttons
|
||||||
|
|
||||||
#### 3. Calendar Screen
|
#### 6. Task Detail Screen
|
||||||
- **Date Strip**: Horizontal scrollable days of current month
|
- Full task view with all fields
|
||||||
- **Month Label**: Centered (e.g., "JAN 2026")
|
- Subtask management (add, complete, reorder, convert to task)
|
||||||
- **Task List**: Tasks for selected day with category color, title, time, completion status
|
- Edit functionality
|
||||||
- **Empty State**: "No tasks scheduled."
|
- Repeat profile configuration
|
||||||
|
|
||||||
#### 4. Settings Screen
|
#### 7. Subtask Detail Screen
|
||||||
- Dark Mode toggle
|
- Nested subtask management
|
||||||
- Push Notifications toggle
|
- Convert subtask ↔ task
|
||||||
- Reminder Preferences
|
- Re-parent subtasks
|
||||||
- Default Category selector
|
|
||||||
- Sort Tasks By (Date, Priority, Alphabetically, Creation Date)
|
|
||||||
- Backup & Sync
|
|
||||||
- Version, Privacy Policy, Terms of Service
|
|
||||||
|
|
||||||
### Task States
|
#### 8. Sync Modal
|
||||||
- **Pending**: Empty checkbox, normal text
|
- Login/Register forms
|
||||||
- **Completed**: Checked checkbox, strikethrough, reduced opacity
|
- Forgot/Reset password flow
|
||||||
- **Overdue**: Red due date, warning indicator
|
- Server URL configuration
|
||||||
- **Due Today**: Blue highlight
|
- Sync status display
|
||||||
- **High Priority**: Priority badge
|
|
||||||
|
|
||||||
### Interactions
|
### Task Features
|
||||||
- Tap task → Edit screen
|
- **Nested Subtasks**: Unlimited depth, re-parenting, drag reorder
|
||||||
- Long press → Selection mode (multi-delete, multi-complete, change category/priority)
|
- **Repeating Tasks**: Repeat profiles, series IDs, this/future/all delete scopes, undo-complete
|
||||||
- Swipe left → Delete
|
- **Categories/Tags**: 6 default categories with colors, custom category editor
|
||||||
- Swipe right → Complete
|
- **Priorities**: None, Low, Medium, High, Critical with color badges
|
||||||
- Pull down → Refresh
|
- **Due Dates/Times**: With all-day option
|
||||||
|
- **Reminders**: Per-task reminder offsets
|
||||||
|
- **Assignees**: Assign tasks to friends
|
||||||
|
- **Overdue/Due Today**: Visual highlighting
|
||||||
|
|
||||||
|
### Social Features
|
||||||
|
- **Friends System**: Send/accept/decline/remove friend requests
|
||||||
|
- **User Search**: Find users by username/email
|
||||||
|
- **Task Assignment**: Assign tasks to friends (client-side, backend schema ready)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Tech Stack
|
## Tech Stack
|
||||||
|
|
||||||
| Layer | Technology |
|
| Layer | Technology |
|
||||||
|-------|------------|
|
|-------|------------|
|
||||||
| Framework | Expo (React Native) |
|
| Framework | Expo (React Native) / Expo Router v3 |
|
||||||
| Language | TypeScript |
|
| Language | TypeScript (strict mode) |
|
||||||
| Navigation | Expo Router (file-based) |
|
| Navigation | Expo Router (file-based) |
|
||||||
| Database | WatermelonDB + SQLite |
|
| Database | WatermelonDB + SQLite (expo-sqlite) |
|
||||||
| State | WatermelonDB (reactive queries, no Redux needed) |
|
| State | WatermelonDB reactive queries (no Redux) |
|
||||||
| Forms | React Hook Form + Zod validation |
|
| Forms | React Hook Form + Zod validation |
|
||||||
| UI Components | React Native Paper + Custom SVG icons |
|
| UI Components | React Native Paper + Custom components |
|
||||||
| Animations | React Native Reanimated |
|
| Animations | React Native Reanimated v3 |
|
||||||
| Date/Time | @react-native-community/datetimepicker + date-fns |
|
| Date/Time | @react-native-community/datetimepicker + date-fns + WheelTimePicker |
|
||||||
| Build | EAS Build / Gradle (local APK) |
|
| Build | EAS Build / Gradle (local APK) / Electron Builder (desktop) |
|
||||||
| CI/CD | Gitea Actions (`.gitea/workflows/build-apk.yml`) |
|
| CI/CD | Gitea Actions (`.gitea/workflows/build-apk.yml`) |
|
||||||
|
| Backend | Node.js + Express + TypeScript |
|
||||||
|
| Backend DB | PostgreSQL + Drizzle ORM |
|
||||||
|
| Auth | JWT (access + refresh tokens) |
|
||||||
|
| Validation | Zod (shared with frontend) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
carry-your-live/
|
carry-your-live/
|
||||||
├── app/
|
├── app/
|
||||||
│ ├── _layout.tsx # Root layout + DatabaseProvider
|
│ ├── _layout.tsx # Root layout + DatabaseProvider + AuthProvider
|
||||||
│ ├── (tabs)/
|
│ ├── (tabs)/
|
||||||
│ │ ├── _layout.tsx # Bottom tab navigator
|
│ │ ├── _layout.tsx # Bottom tab navigator
|
||||||
│ │ ├── index.tsx # Tasks screen
|
│ │ ├── index.tsx # Tasks screen
|
||||||
│ │ ├── calendar.tsx # Calendar screen
|
│ │ ├── calendar.tsx # Calendar screen
|
||||||
|
│ │ ├── stats.tsx # Stats screen
|
||||||
│ │ └── settings.tsx # Settings screen
|
│ │ └── settings.tsx # Settings screen
|
||||||
│ └── add-task.tsx # Add Task screen
|
│ ├── add-task.tsx # Add Task screen
|
||||||
|
│ ├── day-view.tsx # Calendar day detail
|
||||||
|
│ ├── task-detail.tsx # Task view/edit
|
||||||
|
│ └── subtask-detail.tsx # Subtask view/edit
|
||||||
├── src/
|
├── src/
|
||||||
│ ├── components/ # Reusable UI components
|
│ ├── components/ # Reusable UI components (30+)
|
||||||
│ │ ├── Header.tsx
|
│ │ ├── Header.tsx
|
||||||
│ │ ├── CategoryFilter.tsx
|
│ │ ├── CategoryFilter.tsx
|
||||||
│ │ ├── TaskList.tsx
|
│ │ ├── TaskList.tsx
|
||||||
│ │ ├── TaskItem.tsx
|
│ │ ├── TaskItem.tsx
|
||||||
│ │ ├── FloatingActionButton.tsx
|
│ │ ├── FloatingActionButton.tsx
|
||||||
│ │ ├── TabBarIcon.tsx
|
|
||||||
│ │ ├── CategorySelector.tsx
|
│ │ ├── CategorySelector.tsx
|
||||||
│ │ ├── TaskNameInput.tsx
|
│ │ ├── TaskNameInput.tsx
|
||||||
│ │ ├── SubtasksSection.tsx
|
│ │ ├── SubtasksSection.tsx
|
||||||
@@ -106,24 +188,102 @@ carry-your-live/
|
|||||||
│ │ ├── PrioritySelector.tsx
|
│ │ ├── PrioritySelector.tsx
|
||||||
│ │ ├── DescriptionInput.tsx
|
│ │ ├── DescriptionInput.tsx
|
||||||
│ │ ├── FormButtons.tsx
|
│ │ ├── FormButtons.tsx
|
||||||
│ │ └── ListItem.tsx
|
│ │ ├── ListItem.tsx
|
||||||
|
│ │ ├── AnalogClock.tsx
|
||||||
|
│ │ ├── AssigneeSelector.tsx
|
||||||
|
│ │ ├── CategoryEditorModal.tsx
|
||||||
|
│ │ ├── ColorPickerInput.tsx
|
||||||
|
│ │ ├── ColorWheel.tsx
|
||||||
|
│ │ ├── DateTimeInput.tsx
|
||||||
|
│ │ ├── ForgotPasswordModal.tsx
|
||||||
|
│ │ ├── FriendsModal.tsx
|
||||||
|
│ │ ├── LegalModal.tsx
|
||||||
|
│ │ ├── OptionPickerModal.tsx
|
||||||
|
│ │ ├── QuickAddBar.tsx
|
||||||
|
│ │ ├── ReminderSelector.tsx
|
||||||
|
│ │ ├── RepeatSelector.tsx
|
||||||
|
│ │ ├── ServerUrlModal.tsx
|
||||||
|
│ │ ├── SubtaskItem.tsx
|
||||||
|
│ │ ├── SyncModal.tsx
|
||||||
|
│ │ ├── SyncStatus.tsx
|
||||||
|
│ │ ├── TabBarIcon.tsx
|
||||||
|
│ │ ├── TaskDeleteModal.tsx
|
||||||
|
│ │ ├── TaskOverflowMenu.tsx
|
||||||
|
│ │ ├── UpdateNotifier.tsx
|
||||||
|
│ │ └── WheelTimePicker.tsx
|
||||||
|
│ ├── constants/
|
||||||
|
│ │ └── index.ts # Categories, priorities, colors, reminder options
|
||||||
│ ├── database/
|
│ ├── database/
|
||||||
│ │ ├── schema.ts # WatermelonDB schema
|
│ │ ├── schema.ts # WatermelonDB schema (v21)
|
||||||
│ │ ├── index.ts # Database instance + collections
|
│ │ ├── index.ts # Database instance + collections
|
||||||
│ │ └── sync.ts # Custom API sync adapter
|
│ │ ├── sync.ts # Custom API sync adapter (25KB)
|
||||||
│ ├── models/
|
│ │ ├── migrations.ts # Schema migrations
|
||||||
│ │ ├── Task.ts
|
│ │ ├── adapter.ts # Platform-specific adapters
|
||||||
│ │ ├── Category.ts
|
│ │ └── tombstones.ts # Deleted record tracking
|
||||||
│ │ └── Subtask.ts
|
|
||||||
│ ├── hooks/
|
│ ├── hooks/
|
||||||
│ │ ├── useDatabase.tsx # Database context & providers
|
│ │ ├── useDatabase.tsx # Database context & providers
|
||||||
│ │ └── useTasks.tsx # Task queries with reactive state
|
│ │ ├── useTasks.tsx # Task queries with reactive state
|
||||||
│ ├── constants/
|
│ │ ├── useCategories.tsx # Category queries
|
||||||
│ │ └── index.ts # Categories, priorities, colors
|
│ │ ├── useTasksByDate.tsx # Calendar date queries
|
||||||
│ └── types/
|
│ │ ├── useFriends.tsx # Friends state & actions
|
||||||
│ └── index.ts # TypeScript interfaces
|
│ │ ├── useAuth.tsx # Authentication state
|
||||||
|
│ │ └── useStats.tsx # Statistics computation
|
||||||
|
│ ├── models/
|
||||||
|
│ │ ├── Task.ts # Task model (assigneeId, repeat, reminders)
|
||||||
|
│ │ ├── Category.ts
|
||||||
|
│ │ ├── Subtask.ts
|
||||||
|
│ │ ├── RepeatProfile.ts
|
||||||
|
│ │ ├── Friendship.ts
|
||||||
|
│ │ └── Tombstone.ts
|
||||||
|
│ ├── services/
|
||||||
|
│ │ ├── api.ts # API client with auth
|
||||||
|
│ │ ├── auth.ts # Auth token management
|
||||||
|
│ │ ├── friends.ts # Friends API calls
|
||||||
|
│ │ ├── notifications.ts # Reminder scheduling (expo-notifications)
|
||||||
|
│ │ ├── repeat.ts # Repeat task generation
|
||||||
|
│ │ └── taskActions.ts # Task CRUD + sync operations
|
||||||
|
│ ├── theme/
|
||||||
|
│ │ ├── index.ts # Theme context, colors, spacing
|
||||||
|
│ │ └── theme.tsx # Accent color picker, settings sync
|
||||||
|
│ ├── types/
|
||||||
|
│ │ └── index.ts # TypeScript interfaces
|
||||||
|
│ └── utils/
|
||||||
|
│ ├── date.ts # Date formatting utilities
|
||||||
|
│ ├── format.ts # General formatting
|
||||||
|
│ └── validation.ts # Zod schemas
|
||||||
|
├── backend/ # Backend API (separate package)
|
||||||
|
│ ├── src/
|
||||||
|
│ │ ├── index.ts # Express app entry
|
||||||
|
│ │ ├── db/
|
||||||
|
│ │ │ ├── schema.ts # Drizzle schema (Postgres)
|
||||||
|
│ │ │ └── index.ts # DB connection
|
||||||
|
│ │ ├── routes/
|
||||||
|
│ │ │ ├── auth.ts # Register, login, me, forgot/reset password
|
||||||
|
│ │ │ ├── categories.ts # Category CRUD
|
||||||
|
│ │ │ ├── tasks.ts # Task CRUD + batch
|
||||||
|
│ │ │ ├── subtasks.ts # Subtask CRUD
|
||||||
|
│ │ │ ├── sync.ts # Pull/push sync endpoints
|
||||||
|
│ │ │ ├── users.ts # User profile & settings
|
||||||
|
│ │ │ ├── friends.ts # Friend requests, search, management
|
||||||
|
│ │ │ ├── repeatProfiles.ts# Repeat profile CRUD
|
||||||
|
│ │ │ └── pushNotifications.ts
|
||||||
|
│ │ ├── middleware/
|
||||||
|
│ │ │ ├── auth.ts # JWT verification
|
||||||
|
│ │ │ ├── errorHandler.ts
|
||||||
|
│ │ │ └── validation.ts # Zod validation middleware
|
||||||
|
│ │ ├── services/
|
||||||
|
│ │ └── utils/
|
||||||
|
│ ├── drizzle.config.ts
|
||||||
|
│ └── Dockerfile
|
||||||
|
├── electron/ # Desktop app entry
|
||||||
|
├── android/ # Native Android project
|
||||||
|
├── assets/ # Images, fonts
|
||||||
|
├── patches/ # patch-package fixes
|
||||||
|
└── plugins/ # Expo config plugins
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Data Models
|
## Data Models
|
||||||
|
|
||||||
### Task
|
### Task
|
||||||
@@ -135,8 +295,14 @@ carry-your-live/
|
|||||||
categoryId: string;
|
categoryId: string;
|
||||||
priority: 'none' | 'low' | 'medium' | 'high' | 'critical';
|
priority: 'none' | 'low' | 'medium' | 'high' | 'critical';
|
||||||
completed: boolean;
|
completed: boolean;
|
||||||
dueDate: number; // timestamp
|
dueDate: number; // timestamp (ms)
|
||||||
dueTime: string; // "HH:MM"
|
dueTime: string; // "HH:MM" (24h stored, 12h displayed)
|
||||||
|
allDay: boolean;
|
||||||
|
assigneeId: string | null;
|
||||||
|
repeatProfileId: string | null;
|
||||||
|
seriesId: string | null; // For repeating tasks
|
||||||
|
isTemplate: boolean; // Series template
|
||||||
|
reminderOffset: string | null; // e.g., "5m", "1h", "1d"
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
subtasks: Subtask[];
|
subtasks: Subtask[];
|
||||||
@@ -150,6 +316,8 @@ carry-your-live/
|
|||||||
name: string;
|
name: string;
|
||||||
color: '#HEX';
|
color: '#HEX';
|
||||||
order: number;
|
order: number;
|
||||||
|
createdAt: Date;
|
||||||
|
updatedAt: Date;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -158,14 +326,47 @@ carry-your-live/
|
|||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
taskId: string;
|
taskId: string;
|
||||||
|
parentSubtaskId: string | null; // For nesting
|
||||||
title: string;
|
title: string;
|
||||||
completed: boolean;
|
completed: boolean;
|
||||||
order: number;
|
order: number;
|
||||||
|
assigneeId: string | null;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Repeat Profile
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
frequency: 'daily' | 'weekly' | 'monthly' | 'yearly' | 'custom';
|
||||||
|
interval: number;
|
||||||
|
daysOfWeek: number[]; // 0-6 for weekly
|
||||||
|
dayOfMonth: number | null; // For monthly
|
||||||
|
monthOfYear: number | null; // For yearly
|
||||||
|
endDate: number | null; // Timestamp
|
||||||
|
occurrences: number | null;
|
||||||
|
createdAt: Date;
|
||||||
|
updatedAt: Date;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Friendship
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
id: string;
|
||||||
|
userId: string; // Requester
|
||||||
|
friendId: string; // Recipient
|
||||||
|
status: 'pending' | 'accepted' | 'declined' | 'blocked';
|
||||||
|
createdAt: Date;
|
||||||
|
updatedAt: Date;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Default Categories
|
## Default Categories
|
||||||
| Name | Color | Order |
|
| Name | Color | Order |
|
||||||
|------|-------|-------|
|
|------|-------|-------|
|
||||||
@@ -176,6 +377,8 @@ carry-your-live/
|
|||||||
| Health | #8E24AA (Purple) | 4 |
|
| Health | #8E24AA (Purple) | 4 |
|
||||||
| Finance | #FDD835 (Yellow) | 5 |
|
| Finance | #FDD835 (Yellow) | 5 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Priority Colors
|
## Priority Colors
|
||||||
| Priority | Color |
|
| Priority | Color |
|
||||||
|----------|-------|
|
|----------|-------|
|
||||||
@@ -185,6 +388,8 @@ carry-your-live/
|
|||||||
| High | #E53935 |
|
| High | #E53935 |
|
||||||
| Critical | #B71C1C |
|
| Critical | #B71C1C |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
@@ -192,15 +397,23 @@ carry-your-live/
|
|||||||
- npm or yarn
|
- npm or yarn
|
||||||
- Expo CLI (`npm install -g expo-cli`)
|
- Expo CLI (`npm install -g expo-cli`)
|
||||||
- iOS Simulator (Mac) / Android Studio for mobile testing
|
- iOS Simulator (Mac) / Android Studio for mobile testing
|
||||||
|
- PostgreSQL 16+ (or Docker)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
```bash
|
```bash
|
||||||
cd carry-your-live
|
cd carry-your-live
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
|
cd ../backend
|
||||||
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
|
#### Frontend
|
||||||
```bash
|
```bash
|
||||||
|
cd carry-your-live
|
||||||
|
|
||||||
# Start Expo dev server
|
# Start Expo dev server
|
||||||
npx expo start
|
npx expo start
|
||||||
|
|
||||||
@@ -210,6 +423,37 @@ npx expo start --android
|
|||||||
npx expo start --web
|
npx expo start --web
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Backend
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
|
||||||
|
# Start PostgreSQL (Docker)
|
||||||
|
docker-compose up -d postgres
|
||||||
|
|
||||||
|
# Configure environment
|
||||||
|
cp .env.example .env
|
||||||
|
# Edit .env with your settings
|
||||||
|
|
||||||
|
# Run migrations
|
||||||
|
npm run db:push
|
||||||
|
|
||||||
|
# Start dev server
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Server runs at `http://localhost:3000` (health check: `GET /health`)
|
||||||
|
|
||||||
|
#### Desktop (Electron)
|
||||||
|
```bash
|
||||||
|
cd carry-your-live
|
||||||
|
|
||||||
|
# Development with live reload
|
||||||
|
npm run desktop:dev
|
||||||
|
|
||||||
|
# Production build
|
||||||
|
npm run desktop:dist
|
||||||
|
```
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
#### EAS Build (cloud)
|
#### EAS Build (cloud)
|
||||||
@@ -225,18 +469,16 @@ eas build --platform ios
|
|||||||
eas build --platform android
|
eas build --platform android
|
||||||
eas build --platform web
|
eas build --platform web
|
||||||
```
|
```
|
||||||
Profiles are defined in `eas.json` (`development`, `preview`, `production`; production auto-increments version code).
|
Profiles defined in `eas.json` (`development`, `preview`, `production`; production auto-increments version code).
|
||||||
|
|
||||||
#### Gradle (local Android APK)
|
#### Gradle (local Android APK)
|
||||||
The native Android project lives in `carry-your-live/android/`. Requires JDK 17+ and the Android SDK (platform 35, build-tools 35.0.0, NDK 27.1).
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd carry-your-live/android
|
cd carry-your-live/android
|
||||||
|
|
||||||
# Debug APK (unsigned)
|
# Debug APK (unsigned)
|
||||||
./gradlew assembleDebug
|
./gradlew assembleDebug
|
||||||
|
|
||||||
# Release APK (currently signed with the debug keystore)
|
# Release APK (signed with debug keystore)
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
```
|
```
|
||||||
Output:
|
Output:
|
||||||
@@ -244,24 +486,21 @@ Output:
|
|||||||
android/app/build/outputs/apk/debug/app-debug.apk
|
android/app/build/outputs/apk/debug/app-debug.apk
|
||||||
android/app/build/outputs/apk/release/app-release.apk
|
android/app/build/outputs/apk/release/app-release.apk
|
||||||
```
|
```
|
||||||
Key notes:
|
|
||||||
- The debug keystore (`android/app/debug.keystore`) is generated by the CI pipeline and must exist for release builds — create it locally with the same command used in the pipeline (see below) if it's missing.
|
---
|
||||||
- Release builds use `signingConfig signingConfigs.debug` until a production keystore is configured.
|
|
||||||
- Versions are set in `android/app/build.gradle` (`versionCode`, `versionName`).
|
|
||||||
|
|
||||||
## CI/CD Pipeline (Gitea Actions)
|
## CI/CD Pipeline (Gitea Actions)
|
||||||
|
|
||||||
`.gitea/workflows/build-apk.yml` builds a release APK on every push to `main` (also manually triggerable via workflow_dispatch):
|
`.gitea/workflows/build-apk.yml` builds a release APK on every push to `main` (also manually triggerable via `workflow_dispatch`):
|
||||||
|
|
||||||
1. **Checkout** and setup Node 22, JDK 17 (Temurin)
|
1. **Checkout** and setup Node 22, JDK 17 (Temurin)
|
||||||
2. **Android SDK**: installs cmdline-tools, licenses, platform-tools, `platforms;android-35`, `build-tools;35.0.0`, `ndk;27.1.12297006`
|
2. **Android SDK**: installs cmdline-tools, licenses, platform-tools, `platforms;android-35`, `build-tools;35.0.0`, `ndk;27.1.12297006`
|
||||||
3. **JS deps**: `npm ci` in `carry-your-live/`
|
3. **JS deps**: `npm ci` in `carry-your-live/`
|
||||||
4. **Debug keystore**: generates `carry-your-live/android/app/debug.keystore` with `keytool` (alias `androiddebugkey`, passwords `android`)
|
4. **Debug keystore**: generates `carry-your-live/android/app/debug.keystore` with `keytool`
|
||||||
5. **Build**: `./gradlew assembleRelease` in `carry-your-live/android/`
|
5. **Build**: `./gradlew assembleRelease` in `carry-your-live/android/`
|
||||||
6. **Upload**: the APK is saved as the `carry-your-live-release` artifact (downloadable from the run's artifacts page)
|
6. **Upload**: APK saved as `carry-your-live-release` artifact
|
||||||
|
|
||||||
To run the build locally exactly as CI does:
|
|
||||||
|
|
||||||
|
To run locally exactly as CI does:
|
||||||
```bash
|
```bash
|
||||||
keytool -genkeypair -v \
|
keytool -genkeypair -v \
|
||||||
-keystore carry-your-live/android/app/debug.keystore \
|
-keystore carry-your-live/android/app/debug.keystore \
|
||||||
@@ -271,48 +510,119 @@ keytool -genkeypair -v \
|
|||||||
cd carry-your-live/android && ./gradlew assembleRelease
|
cd carry-your-live/android && ./gradlew assembleRelease
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sync API Specification
|
---
|
||||||
|
|
||||||
The app expects a custom API at `http://localhost:3000/api` (configurable in `src/database/sync.ts`):
|
## Backend API Specification
|
||||||
|
|
||||||
### Pull Changes
|
Server runs at `http://localhost:3000/api` (configurable in `src/services/api.ts` and `src/database/sync.ts`):
|
||||||
```
|
|
||||||
GET /sync?since={timestamp}
|
### Authentication
|
||||||
```
|
- `POST /api/auth/register` - Register new user
|
||||||
Response:
|
- `POST /api/auth/login` - Login (returns access + refresh tokens)
|
||||||
```json
|
- `POST /api/auth/refresh` - Refresh access token
|
||||||
{
|
- `POST /api/auth/forgot-password` - Request password reset
|
||||||
"categories": [{ "id", "name", "color", "order", "createdAt", "updatedAt" }],
|
- `POST /api/auth/reset-password` - Reset password with token
|
||||||
"tasks": [{ "id", "title", "description", "categoryId", "priority", "completed", "dueDate", "dueTime", "createdAt", "updatedAt" }],
|
- `GET /api/auth/me` - Get current user
|
||||||
"subtasks": [{ "id", "taskId", "title", "completed", "order", "createdAt", "updatedAt" }],
|
|
||||||
|
### Categories
|
||||||
|
- `GET /api/categories` - List categories
|
||||||
|
- `POST /api/categories` - Create category
|
||||||
|
- `PATCH /api/categories/:id` - Update category
|
||||||
|
- `DELETE /api/categories/:id` - Delete category
|
||||||
|
|
||||||
|
### Tasks
|
||||||
|
- `GET /api/tasks` - List tasks (with filters: category, completed, due date range, assignee)
|
||||||
|
- `GET /api/tasks/:id` - Get task with subtasks
|
||||||
|
- `POST /api/tasks` - Create task
|
||||||
|
- `PATCH /api/tasks/:id` - Update task
|
||||||
|
- `DELETE /api/tasks/:id` - Delete task (scopes: this/future/all for repeating)
|
||||||
|
- `POST /api/tasks/batch` - Batch operations
|
||||||
|
|
||||||
|
### Subtasks
|
||||||
|
- `GET /api/subtasks/task/:taskId` - List subtasks for task
|
||||||
|
- `POST /api/subtasks/task/:taskId` - Create subtask
|
||||||
|
- `PATCH /api/subtasks/:id` - Update subtask
|
||||||
|
- `DELETE /api/subtasks/:id` - Delete subtask
|
||||||
|
|
||||||
|
### Repeat Profiles
|
||||||
|
- `GET /api/repeat-profiles` - List repeat profiles
|
||||||
|
- `POST /api/repeat-profiles` - Create repeat profile
|
||||||
|
- `PATCH /api/repeat-profiles/:id` - Update repeat profile
|
||||||
|
- `DELETE /api/repeat-profiles/:id` - Delete repeat profile
|
||||||
|
|
||||||
|
### Users
|
||||||
|
- `GET /api/users/me` - Get user with settings
|
||||||
|
- `PATCH /api/users/me/settings` - Update settings (darkMode, defaultCategoryId, sortOrder, etc.)
|
||||||
|
- `GET /api/users/search` - Search users (for friends)
|
||||||
|
|
||||||
|
### Friends
|
||||||
|
- `GET /api/friends` - List accepted friends
|
||||||
|
- `GET /api/friends/requests` - List pending requests (incoming/outgoing)
|
||||||
|
- `POST /api/friends/request` - Send friend request
|
||||||
|
- `PATCH /api/friends/request/:id/accept` - Accept request
|
||||||
|
- `PATCH /api/friends/request/:id/decline` - Decline request
|
||||||
|
- `DELETE /api/friends/:id` - Remove friend
|
||||||
|
|
||||||
|
### Sync (Offline-first)
|
||||||
|
- `GET /api/sync?since=<timestamp>` - Pull changes since timestamp
|
||||||
|
- `POST /api/sync/push` - Push local changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Sync Protocol
|
||||||
|
|
||||||
|
The sync endpoint uses a cursor-based approach with tombstones:
|
||||||
|
|
||||||
|
1. **Pull**: Client sends `since` timestamp, server returns all changes since then
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"categories": [...],
|
||||||
|
"tasks": [...],
|
||||||
|
"subtasks": [...],
|
||||||
|
"repeatProfiles": [...],
|
||||||
|
"friendships": [...],
|
||||||
|
"tombstones": [...],
|
||||||
"timestamp": 1234567890
|
"timestamp": 1234567890
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Push Changes
|
2. **Push**: Client sends batched changes with `lastPulledAt`
|
||||||
```
|
```json
|
||||||
POST /sync/push
|
{
|
||||||
```
|
|
||||||
Body:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"changes": {
|
"changes": {
|
||||||
"categories": [...],
|
"categories": [...],
|
||||||
"tasks": [...],
|
"tasks": [...],
|
||||||
"subtasks": [...]
|
"subtasks": [...],
|
||||||
|
"repeatProfiles": [...],
|
||||||
|
"friendships": [...]
|
||||||
},
|
},
|
||||||
|
"tombstones": [...],
|
||||||
"lastPulledAt": 1234567890
|
"lastPulledAt": 1234567890
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. **Conflict Resolution**: Last-write-wins based on `updatedAt` (customizable in `src/database/sync.ts`)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Environment Variables
|
### Frontend Environment Variables
|
||||||
Create `.env` file:
|
Create `.env` file in `carry-your-live/`:
|
||||||
```
|
```
|
||||||
EXPO_PUBLIC_API_URL=http://your-api-url/api
|
EXPO_PUBLIC_API_URL=http://your-api-url/api
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Backend Environment Variables
|
||||||
|
Create `.env` file in `backend/`:
|
||||||
|
```
|
||||||
|
DATABASE_URL=postgresql://user:pass@localhost:5432/carry_your_live
|
||||||
|
JWT_SECRET=your-32-char-secret
|
||||||
|
PORT=3000
|
||||||
|
NODE_ENV=development
|
||||||
|
FRONTEND_URL=http://localhost:8081
|
||||||
|
```
|
||||||
|
|
||||||
### App Config
|
### App Config
|
||||||
Modify `app.json` for:
|
Modify `app.json` for:
|
||||||
- App name, slug, version
|
- App name, slug, version
|
||||||
@@ -320,10 +630,12 @@ Modify `app.json` for:
|
|||||||
- Permissions (notifications, etc.)
|
- Permissions (notifications, etc.)
|
||||||
- Orientation, theme
|
- Orientation, theme
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Visual Style Guide
|
## Visual Style Guide
|
||||||
|
|
||||||
- **Background**: White (#FFFFFF)
|
- **Background**: White (#FFFFFF) / Dark mode (planned)
|
||||||
- **Primary Accent**: #E53935 (Pink/Red)
|
- **Primary Accent**: #E53935 (Pink/Red) - customizable
|
||||||
- **Typography**: Black (#212121) primary, #757575 secondary, #9E9E9E tertiary
|
- **Typography**: Black (#212121) primary, #757575 secondary, #9E9E9E tertiary
|
||||||
- **Borders**: Thin (#E0E0E0), selected #E53935
|
- **Borders**: Thin (#E0E0E0), selected #E53935
|
||||||
- **Radius**: 16-20px for cards/buttons/inputs
|
- **Radius**: 16-20px for cards/buttons/inputs
|
||||||
@@ -331,11 +643,13 @@ Modify `app.json` for:
|
|||||||
- **Shadows**: Minimal (elevation 1-3)
|
- **Shadows**: Minimal (elevation 1-3)
|
||||||
- **Animations**: 150-250ms, cubic easing
|
- **Animations**: 150-250ms, cubic easing
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Offline-First Architecture
|
## Offline-First Architecture
|
||||||
|
|
||||||
```
|
```
|
||||||
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
|
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
|
||||||
│ Expo App │────▶│ WatermelonDB │────▶│ Your API │
|
│ Expo App │────▶│ WatermelonDB │────▶│ Backend │
|
||||||
│ (iOS/Android│ │ (SQLite) │ │ (Postgres) │
|
│ (iOS/Android│ │ (SQLite) │ │ (Postgres) │
|
||||||
│ Web) │◀───▶│ + Sync │◀───▶│ │
|
│ Web) │◀───▶│ + Sync │◀───▶│ │
|
||||||
└─────────────┘ └──────────────┘ └─────────────┘
|
└─────────────┘ └──────────────┘ └─────────────┘
|
||||||
@@ -345,6 +659,79 @@ Modify `app.json` for:
|
|||||||
2. Reactive queries update UI instantly
|
2. Reactive queries update UI instantly
|
||||||
3. Background sync pushes/pulls changes
|
3. Background sync pushes/pulls changes
|
||||||
4. Conflict resolution: last-write-wins (customizable)
|
4. Conflict resolution: last-write-wins (customizable)
|
||||||
|
5. Tombstones track deletions for sync
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Current Implementation Status
|
||||||
|
|
||||||
|
Based on code audit (August 2026):
|
||||||
|
|
||||||
|
| Feature | Status | Notes |
|
||||||
|
|---------|--------|-------|
|
||||||
|
| Core CRUD (tasks, subtasks, categories) | ✅ Complete | |
|
||||||
|
| Nested subtasks | ✅ Complete | Unlimited depth |
|
||||||
|
| Repeating tasks | ✅ Complete | Profiles, series, this/future/all delete |
|
||||||
|
| Categories & priorities | ✅ Complete | |
|
||||||
|
| Calendar with date strip | ✅ Complete | Month nav, day detail |
|
||||||
|
| Stats screen | ✅ Complete | Client-side only |
|
||||||
|
| Settings screen | ✅ Complete | Most settings wired |
|
||||||
|
| Friends system | ✅ Complete | Backend + UI |
|
||||||
|
| Task assignees | ✅ Complete | Schema v7, UI, sync |
|
||||||
|
| QuickAddBar | ✅ Complete | Tasks + Calendar |
|
||||||
|
| Offline sync (WatermelonDB) | ✅ Complete | Schema v21, tombstones |
|
||||||
|
| Backend API | ✅ Complete | Express + Drizzle + Postgres |
|
||||||
|
| Auth (JWT) | ✅ Complete | Register, login, refresh, forgot/reset |
|
||||||
|
| Dark mode / theme toggle | ❌ Missing | Backend column exists, UI not implemented |
|
||||||
|
| Notifications toggle | 🟡 Partial | Stored but not respected |
|
||||||
|
| Global reminder preference | 🟡 Partial | Stored but not applied |
|
||||||
|
| Forgot/reset password UI | 🟡 Partial | Backend done, no client UI |
|
||||||
|
| Pull-to-refresh → sync | 🟡 Partial | Reloads local only |
|
||||||
|
| Client settings sync | 🟡 Partial | AsyncStorage only, not synced to backend |
|
||||||
|
| Reminder enum mismatch | 🟡 Partial | Client uses '5m'/'1h', spec uses minutes |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Roadmap Highlights
|
||||||
|
|
||||||
|
### v1.1.0 — Friends & Assignees (Current Unreleased)
|
||||||
|
- Ship existing Unreleased changes
|
||||||
|
- Fix notifications toggle, wire up `rescheduleAllReminders()`
|
||||||
|
- Apply global reminder preference
|
||||||
|
- Make pull-to-refresh trigger real sync
|
||||||
|
- Add forgot/reset password UI
|
||||||
|
- Unify reminder offset enums
|
||||||
|
|
||||||
|
### v1.2.0 — Theming & Findability
|
||||||
|
- Light mode + follow-system-theme
|
||||||
|
- Sync all settings to `PATCH /users/me/settings`
|
||||||
|
- Task search (filter + global)
|
||||||
|
- Friend request badges/indicators
|
||||||
|
|
||||||
|
### v1.3.0 — Stats & Insights
|
||||||
|
- Persisted stats snapshots
|
||||||
|
- Productivity trends, streaks
|
||||||
|
- Export stats (CSV/image)
|
||||||
|
|
||||||
|
### v1.4.0 — Quick Capture & Calendar UX
|
||||||
|
- Natural language quick-add
|
||||||
|
- Drag-and-drop rescheduling in calendar
|
||||||
|
- Month grid view
|
||||||
|
- "Today at a glance" dashboard
|
||||||
|
|
||||||
|
### v1.5.0 — Power Tools & Personalization
|
||||||
|
- Task templates, soft-archive, attachments
|
||||||
|
- Markdown support, deep links
|
||||||
|
- Biometric lock, haptics, reduced motion
|
||||||
|
- Android home-screen widget
|
||||||
|
|
||||||
|
### v2.0.0 — Collaboration
|
||||||
|
- Real task assignment delivery
|
||||||
|
- Shared lists with permissions
|
||||||
|
- Server push notifications (FCM/APNs)
|
||||||
|
- Comments/activity feed
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -353,6 +740,9 @@ Modify `app.json` for:
|
|||||||
3. Write components with React Hook Form + Zod
|
3. Write components with React Hook Form + Zod
|
||||||
4. Use WatermelonDB decorators for models
|
4. Use WatermelonDB decorators for models
|
||||||
5. Test offline scenarios
|
5. Test offline scenarios
|
||||||
|
6. Run `npm run lint` and `npm run typecheck` before committing
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -41,4 +41,3 @@ yarn-error.*
|
|||||||
|
|
||||||
# generated native folders
|
# generated native folders
|
||||||
/ios
|
/ios
|
||||||
/android
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# OSX
|
||||||
|
#
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Android/IntelliJ
|
||||||
|
#
|
||||||
|
build/
|
||||||
|
.idea
|
||||||
|
.gradle
|
||||||
|
local.properties
|
||||||
|
*.iml
|
||||||
|
*.hprof
|
||||||
|
.cxx/
|
||||||
|
|
||||||
|
# generated inline modules
|
||||||
|
app/src/main/java/inline/
|
||||||
|
|
||||||
|
# Bundle artifacts
|
||||||
|
*.jsbundle
|
||||||
@@ -0,0 +1,182 @@
|
|||||||
|
apply plugin: "com.android.application"
|
||||||
|
apply plugin: "org.jetbrains.kotlin.android"
|
||||||
|
apply plugin: "com.facebook.react"
|
||||||
|
|
||||||
|
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the configuration block to customize your React Native Android app.
|
||||||
|
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
||||||
|
*/
|
||||||
|
react {
|
||||||
|
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
|
||||||
|
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
|
||||||
|
hermesCommand = new File(["node", "--print", "require.resolve('hermes-compiler/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/hermesc/%OS-BIN%/hermesc"
|
||||||
|
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
|
||||||
|
|
||||||
|
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
|
||||||
|
// Use Expo CLI to bundle the app, this ensures the Metro config
|
||||||
|
// works correctly with Expo projects.
|
||||||
|
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
|
||||||
|
bundleCommand = "export:embed"
|
||||||
|
|
||||||
|
/* Folders */
|
||||||
|
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
||||||
|
// root = file("../../")
|
||||||
|
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
||||||
|
// reactNativeDir = file("../../node_modules/react-native")
|
||||||
|
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
||||||
|
// codegenDir = file("../../node_modules/@react-native/codegen")
|
||||||
|
|
||||||
|
/* Variants */
|
||||||
|
// The list of variants to that are debuggable. For those we're going to
|
||||||
|
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
||||||
|
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
||||||
|
// debuggableVariants = ["liteDebug", "prodDebug"]
|
||||||
|
|
||||||
|
/* Bundling */
|
||||||
|
// A list containing the node command and its flags. Default is just 'node'.
|
||||||
|
// nodeExecutableAndArgs = ["node"]
|
||||||
|
|
||||||
|
//
|
||||||
|
// The path to the CLI configuration file. Default is empty.
|
||||||
|
// bundleConfig = file(../rn-cli.config.js)
|
||||||
|
//
|
||||||
|
// The name of the generated asset file containing your JS bundle
|
||||||
|
// bundleAssetName = "MyApplication.android.bundle"
|
||||||
|
//
|
||||||
|
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
||||||
|
// entryFile = file("../js/MyApplication.android.js")
|
||||||
|
//
|
||||||
|
// A list of extra flags to pass to the 'bundle' commands.
|
||||||
|
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
||||||
|
// extraPackagerArgs = []
|
||||||
|
|
||||||
|
/* Hermes Commands */
|
||||||
|
// The hermes compiler command to run. By default it is 'hermesc'
|
||||||
|
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
||||||
|
//
|
||||||
|
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
||||||
|
// hermesFlags = ["-O", "-output-source-map"]
|
||||||
|
|
||||||
|
/* Autolinking */
|
||||||
|
autolinkLibrariesWithApp()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this to true in release builds to optimize the app using [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization).
|
||||||
|
*/
|
||||||
|
def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The preferred build flavor of JavaScriptCore (JSC)
|
||||||
|
*
|
||||||
|
* For example, to use the international variant, you can use:
|
||||||
|
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||||
|
*
|
||||||
|
* The international variant includes ICU i18n library and necessary data
|
||||||
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||||
|
* give correct results when using with locales other than en-US. Note that
|
||||||
|
* this variant is about 6MiB larger per architecture than default.
|
||||||
|
*/
|
||||||
|
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
||||||
|
|
||||||
|
android {
|
||||||
|
ndkVersion = rootProject.ext.ndkVersion
|
||||||
|
|
||||||
|
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||||
|
compileSdk = rootProject.ext.compileSdkVersion
|
||||||
|
|
||||||
|
namespace = 'com.anonymous.carryyourlive'
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = 'com.anonymous.carryyourlive'
|
||||||
|
minSdkVersion = rootProject.ext.minSdkVersion
|
||||||
|
targetSdkVersion = rootProject.ext.targetSdkVersion
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0.0"
|
||||||
|
|
||||||
|
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
||||||
|
}
|
||||||
|
signingConfigs {
|
||||||
|
debug {
|
||||||
|
storeFile file('debug.keystore')
|
||||||
|
storePassword 'android'
|
||||||
|
keyAlias 'androiddebugkey'
|
||||||
|
keyPassword 'android'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
signingConfig = signingConfigs.debug
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
// Caution! In production, you need to generate your own keystore file.
|
||||||
|
// see https://reactnative.dev/docs/signed-apk-android.
|
||||||
|
signingConfig = signingConfigs.debug
|
||||||
|
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
|
||||||
|
shrinkResources = enableShrinkResources.toBoolean()
|
||||||
|
minifyEnabled enableMinifyInReleaseBuilds
|
||||||
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||||
|
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
|
||||||
|
crunchPngs = enablePngCrunchInRelease.toBoolean()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
packagingOptions {
|
||||||
|
jniLibs {
|
||||||
|
def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false'
|
||||||
|
useLegacyPackaging = enableLegacyPackaging.toBoolean()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
androidResources {
|
||||||
|
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply static values from `gradle.properties` to the `android.packagingOptions`
|
||||||
|
// Accepts values in comma delimited lists, example:
|
||||||
|
// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
|
||||||
|
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
|
||||||
|
// Split option: 'foo,bar' -> ['foo', 'bar']
|
||||||
|
def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
|
||||||
|
// Trim all elements in place.
|
||||||
|
for (i in 0..<options.size()) options[i] = options[i].trim();
|
||||||
|
// `[] - ""` is essentially `[""].filter(Boolean)` removing all empty strings.
|
||||||
|
options -= ""
|
||||||
|
|
||||||
|
if (options.length > 0) {
|
||||||
|
println "android.packagingOptions.$prop += $options ($options.length)"
|
||||||
|
// Ex: android.packagingOptions.pickFirsts += '**/SCCS/**'
|
||||||
|
options.each {
|
||||||
|
android.packagingOptions[prop] += it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// The version of react-native is set by the React Native Gradle Plugin
|
||||||
|
implementation("com.facebook.react:react-android")
|
||||||
|
|
||||||
|
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
|
||||||
|
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
|
||||||
|
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
|
||||||
|
|
||||||
|
if (isGifEnabled) {
|
||||||
|
// For animated gif support
|
||||||
|
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isWebpEnabled) {
|
||||||
|
// For webp support
|
||||||
|
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
|
||||||
|
if (isWebpAnimatedEnabled) {
|
||||||
|
// Animated webp support
|
||||||
|
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hermesEnabled.toBoolean()) {
|
||||||
|
implementation("com.facebook.react:hermes-android")
|
||||||
|
} else {
|
||||||
|
implementation jscFlavor
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# By default, the flags in this file are appended to flags specified
|
||||||
|
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
||||||
|
# You can edit the include path and order by changing the proguardFiles
|
||||||
|
# directive in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# react-native-reanimated
|
||||||
|
-keep class com.swmansion.reanimated.** { *; }
|
||||||
|
-keep class com.facebook.react.turbomodule.** { *; }
|
||||||
|
|
||||||
|
# Add any project specific keep options here:
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
|
|
||||||
|
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
|
|
||||||
|
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:replace="android:maxSdkVersion"/>
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:replace="android:maxSdkVersion"/>
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW"/>
|
||||||
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
|
<data android:scheme="https"/>
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false" android:usesCleartextTraffic="true">
|
||||||
|
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color"/>
|
||||||
|
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
||||||
|
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
|
||||||
|
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
|
||||||
|
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
|
||||||
|
<meta-data android:name="expo.modules.updates.ENABLE_BSDIFF_PATCH_SUPPORT" android:value="true"/>
|
||||||
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
||||||
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
||||||
|
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|smallestScreenSize|assetsPaths" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW"/>
|
||||||
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
|
<data android:scheme="exp+carry-your-live"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.anonymous.carryyourlive
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
|
||||||
|
import com.facebook.react.ReactActivity
|
||||||
|
import com.facebook.react.ReactActivityDelegate
|
||||||
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||||
|
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||||
|
|
||||||
|
import expo.modules.ReactActivityDelegateWrapper
|
||||||
|
|
||||||
|
class MainActivity : ReactActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
// Set the theme to AppTheme BEFORE onCreate to support
|
||||||
|
// coloring the background, status bar, and navigation bar.
|
||||||
|
// This is required for expo-splash-screen.
|
||||||
|
setTheme(R.style.AppTheme);
|
||||||
|
super.onCreate(null)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||||
|
* rendering of the component.
|
||||||
|
*/
|
||||||
|
override fun getMainComponentName(): String = "main"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
|
||||||
|
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
|
||||||
|
*/
|
||||||
|
override fun createReactActivityDelegate(): ReactActivityDelegate {
|
||||||
|
return ReactActivityDelegateWrapper(
|
||||||
|
this,
|
||||||
|
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
|
||||||
|
object : DefaultReactActivityDelegate(
|
||||||
|
this,
|
||||||
|
mainComponentName,
|
||||||
|
fabricEnabled
|
||||||
|
){})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Align the back button behavior with Android S
|
||||||
|
* where moving root activities to background instead of finishing activities.
|
||||||
|
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
|
||||||
|
*/
|
||||||
|
override fun invokeDefaultOnBackPressed() {
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
|
||||||
|
if (!moveTaskToBack(false)) {
|
||||||
|
// For non-root activities, use the default implementation to finish them.
|
||||||
|
super.invokeDefaultOnBackPressed()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use the default back button implementation on Android S
|
||||||
|
// because it's doing more than [Activity.moveTaskToBack] in fact.
|
||||||
|
super.invokeDefaultOnBackPressed()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.anonymous.carryyourlive
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import android.content.res.Configuration
|
||||||
|
|
||||||
|
import com.facebook.react.PackageList
|
||||||
|
import com.facebook.react.ReactApplication
|
||||||
|
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
||||||
|
import com.facebook.react.ReactPackage
|
||||||
|
import com.facebook.react.ReactHost
|
||||||
|
import com.facebook.react.common.ReleaseLevel
|
||||||
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
|
||||||
|
|
||||||
|
import expo.modules.ApplicationLifecycleDispatcher
|
||||||
|
import expo.modules.ExpoReactHostFactory
|
||||||
|
|
||||||
|
class MainApplication : Application(), ReactApplication {
|
||||||
|
|
||||||
|
override val reactHost: ReactHost by lazy {
|
||||||
|
ExpoReactHostFactory.getDefaultReactHost(
|
||||||
|
context = applicationContext,
|
||||||
|
packageList =
|
||||||
|
PackageList(this).packages.apply {
|
||||||
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
|
// add(MyReactNativePackage())
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
DefaultNewArchitectureEntryPoint.releaseLevel = try {
|
||||||
|
ReleaseLevel.valueOf(BuildConfig.REACT_NATIVE_RELEASE_LEVEL.uppercase())
|
||||||
|
} catch (e: IllegalArgumentException) {
|
||||||
|
ReleaseLevel.STABLE
|
||||||
|
}
|
||||||
|
loadReactNative(this)
|
||||||
|
ApplicationLifecycleDispatcher.onApplicationCreate(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
|
super.onConfigurationChanged(newConfig)
|
||||||
|
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 584 B |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 65 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@color/splashscreen_background"/>
|
||||||
|
<item>
|
||||||
|
<bitmap android:gravity="center" android:src="@drawable/splashscreen_logo"/>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
||||||
|
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
||||||
|
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
||||||
|
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
||||||
|
>
|
||||||
|
|
||||||
|
<selector>
|
||||||
|
<!--
|
||||||
|
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
||||||
|
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
||||||
|
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
||||||
|
|
||||||
|
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
||||||
|
|
||||||
|
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
||||||
|
-->
|
||||||
|
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
||||||
|
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
||||||
|
</selector>
|
||||||
|
|
||||||
|
</inset>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<resources>
|
||||||
|
<color name="appBackground">#121212</color>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<resources>
|
||||||
|
<color name="splashscreen_background">#FFFFFF</color>
|
||||||
|
<color name="iconBackground">#E6F4FE</color>
|
||||||
|
<color name="colorPrimary">#023c69</color>
|
||||||
|
<color name="notification_icon_color">#1E88E5</color>
|
||||||
|
<color name="appBackground">#121212</color>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">carry-your-live</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
|
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:windowBackground">@color/appBackground</item>
|
||||||
|
</style>
|
||||||
|
<style name="Theme.App.SplashScreen" parent="AppTheme">
|
||||||
|
<item name="android:windowBackground">@drawable/splashscreen_logo</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath('com.android.tools.build:gradle')
|
||||||
|
classpath('com.facebook.react:react-native-gradle-plugin')
|
||||||
|
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven { url = 'https://www.jitpack.io' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: "expo-root-project"
|
||||||
|
apply plugin: "com.facebook.react.rootproject"
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
plugins.withId("com.android.library") {
|
||||||
|
extensions.configure(com.android.build.api.dsl.LibraryExtension) {
|
||||||
|
ndkVersion = rootProject.ext.ndkVersion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugins.withId("com.android.application") {
|
||||||
|
extensions.configure(com.android.build.api.dsl.ApplicationExtension) {
|
||||||
|
ndkVersion = rootProject.ext.ndkVersion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
|
||||||
|
org.gradle.jvmargs=-Xmx1536m -XX:MaxMetaspaceSize=1024m --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED
|
||||||
|
org.gradle.workers.max=2
|
||||||
|
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
org.gradle.parallel=true
|
||||||
|
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which packages are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
|
||||||
|
# Enable AAPT2 PNG crunching
|
||||||
|
android.enablePngCrunchInReleaseBuilds=true
|
||||||
|
|
||||||
|
# Use this property to specify which architecture you want to build.
|
||||||
|
# You can also override it from the CLI using
|
||||||
|
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
||||||
|
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
||||||
|
|
||||||
|
# Use this property to enable support to the new architecture.
|
||||||
|
# This will allow you to use TurboModules and the Fabric render in
|
||||||
|
# your application. You should enable this flag either if you want
|
||||||
|
# to write custom TurboModules/Fabric components OR use libraries that
|
||||||
|
# are providing them. React Native 0.82+ always runs with the New
|
||||||
|
# Architecture, so this flag is no longer honored and was removed.
|
||||||
|
|
||||||
|
# Use this property to enable or disable the Hermes JS engine.
|
||||||
|
# If set to false, you will be using JSC instead.
|
||||||
|
hermesEnabled=true
|
||||||
|
|
||||||
|
# Enable edge-to-edge display support.
|
||||||
|
# This allows your app to draw behind system bars for an immersive UI.
|
||||||
|
# Note: Only works with ReactActivity and should not be used with custom Activity.
|
||||||
|
edgeToEdgeEnabled=true
|
||||||
|
|
||||||
|
# Enable GIF support in React Native images (~200 B increase)
|
||||||
|
expo.gif.enabled=true
|
||||||
|
# Enable webp support in React Native images (~85 KB increase)
|
||||||
|
expo.webp.enabled=true
|
||||||
|
# Enable animated webp support (~3.4 MB increase)
|
||||||
|
# Disabled by default because iOS doesn't support animated webp
|
||||||
|
expo.webp.animated=false
|
||||||
|
|
||||||
|
# Enable network inspector
|
||||||
|
EX_DEV_CLIENT_NETWORK_INSPECTOR=true
|
||||||
|
|
||||||
|
# Use legacy packaging to compress native libraries in the resulting APK.
|
||||||
|
expo.useLegacyPackaging=false
|
||||||
|
|
||||||
|
expo.inlineModules.watchedDirectories=[]
|
||||||
|
# Enabled parallel sync for Gradle 9.4+
|
||||||
|
org.gradle.tooling.parallel=true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#This file is generated by updateDaemonJvm
|
||||||
|
toolchainVersion=17
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
@@ -0,0 +1,248 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
def reactNativeGradlePlugin = new File(
|
||||||
|
providers.exec {
|
||||||
|
workingDir(rootDir)
|
||||||
|
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
|
||||||
|
}.standardOutput.asText.get().trim()
|
||||||
|
).getParentFile().absolutePath
|
||||||
|
includeBuild(reactNativeGradlePlugin)
|
||||||
|
|
||||||
|
def expoPluginsPath = new File(
|
||||||
|
providers.exec {
|
||||||
|
workingDir(rootDir)
|
||||||
|
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
|
||||||
|
}.standardOutput.asText.get().trim(),
|
||||||
|
"../android/expo-gradle-plugin"
|
||||||
|
).absolutePath
|
||||||
|
includeBuild(expoPluginsPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.facebook.react.settings")
|
||||||
|
id("expo-autolinking-settings")
|
||||||
|
}
|
||||||
|
|
||||||
|
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
|
||||||
|
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
|
||||||
|
ex.autolinkLibrariesFromCommand()
|
||||||
|
} else {
|
||||||
|
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expoAutolinking.useExpoModules()
|
||||||
|
|
||||||
|
rootProject.name = 'carry-your-live'
|
||||||
|
|
||||||
|
expoAutolinking.useExpoVersionCatalog()
|
||||||
|
|
||||||
|
include ':app'
|
||||||
|
includeBuild(expoAutolinking.reactNativeGradlePlugin)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Tabs } from 'expo-router';
|
import { Tabs } from 'expo-router';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
import { View, StyleSheet, TouchableOpacity, Animated, } from 'react-native';
|
||||||
import { TabBarIcon } from '@/components/TabBarIcon';
|
import { TabBarIcon } from '@/components/TabBarIcon';
|
||||||
import { useSettings } from '@/theme';
|
import { useSettings } from '@/theme';
|
||||||
import { setLastVisitedTab } from '@/utils/tabHistory';
|
import { setLastVisitedTab } from '@/utils/tabHistory';
|
||||||
@@ -12,29 +12,30 @@ export default function TabLayout() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs
|
<Tabs
|
||||||
screenOptions={{
|
screenOptions={{
|
||||||
tabBarActiveTintColor: theme.accent,
|
tabBarActiveTintColor: theme.accent,
|
||||||
tabBarInactiveTintColor: theme.textSecondary,
|
tabBarInactiveTintColor: theme.textSecondary,
|
||||||
tabBarStyle: {
|
tabBarStyle: {
|
||||||
backgroundColor: theme.tabBarBg,
|
backgroundColor: theme.tabBarBg,
|
||||||
borderTopWidth: 0,
|
borderTopWidth: 0,
|
||||||
height: 84 + insets.bottom,
|
height: 56,
|
||||||
paddingBottom: insets.bottom,
|
paddingBottom: insets.bottom,
|
||||||
paddingTop: 12,
|
paddingTop: insets.top,
|
||||||
paddingHorizontal: 16,
|
paddingHorizontal: 16,
|
||||||
elevation: 0,
|
elevation: 4,
|
||||||
shadowColor: '#000',
|
shadowColor: '#000',
|
||||||
shadowOffset: { width: 0, height: -4 },
|
shadowOffset: { width: 0, height: 2 },
|
||||||
shadowOpacity: 0.12,
|
shadowOpacity: 0.1,
|
||||||
shadowRadius: 20,
|
shadowRadius: 8,
|
||||||
},
|
},
|
||||||
tabBarItemStyle: {
|
tabBarItemStyle: {
|
||||||
paddingVertical: 0,
|
paddingVertical: 6,
|
||||||
|
paddingHorizontal: 12,
|
||||||
},
|
},
|
||||||
tabBarLabelStyle: {
|
tabBarLabelStyle: {
|
||||||
fontSize: 11,
|
fontSize: 12,
|
||||||
fontWeight: '700',
|
fontWeight: '600',
|
||||||
marginTop: 4,
|
marginTop: 2,
|
||||||
},
|
},
|
||||||
headerShown: false,
|
headerShown: false,
|
||||||
sceneStyle: { backgroundColor: theme.background },
|
sceneStyle: { backgroundColor: theme.background },
|
||||||
@@ -48,10 +49,10 @@ export default function TabLayout() {
|
|||||||
backgroundColor: theme.tabBarBg,
|
backgroundColor: theme.tabBarBg,
|
||||||
paddingBottom: Math.max(props.insets.bottom, 8),
|
paddingBottom: Math.max(props.insets.bottom, 8),
|
||||||
shadowColor: '#000',
|
shadowColor: '#000',
|
||||||
shadowOffset: { width: 0, height: -4 },
|
shadowOffset: { width: 0, height: 4 },
|
||||||
shadowOpacity: 0.12,
|
shadowOpacity: 0.1,
|
||||||
shadowRadius: 20,
|
shadowRadius: 8,
|
||||||
elevation: 8,
|
elevation: 4,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
@@ -62,13 +63,18 @@ export default function TabLayout() {
|
|||||||
key={route.name}
|
key={route.name}
|
||||||
style={[
|
style={[
|
||||||
styles.tabItem,
|
styles.tabItem,
|
||||||
focused && styles.tabItemActive,
|
|
||||||
{ backgroundColor: focused ? theme.accentSoft : 'transparent' },
|
{ backgroundColor: focused ? theme.accentSoft : 'transparent' },
|
||||||
]}
|
]}
|
||||||
onPress={() => props.navigation.navigate(route.name as never)}
|
onPress={() => props.navigation.navigate(route.name as never)}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={route.name === 'index' ? 'ToDo' : route.name.charAt(0).toUpperCase() + route.name.slice(1)}
|
accessibilityLabel={route.name === 'index' ? 'ToDo' : route.name.charAt(0).toUpperCase() + route.name.slice(1)}
|
||||||
accessibilityState={{ selected: focused }}
|
accessibilityState={{ selected: focused }}
|
||||||
|
>
|
||||||
|
<Animated.View
|
||||||
|
style={[
|
||||||
|
styles.rippleContainer,
|
||||||
|
{ opacity: focused ? 1 : 0.5 },
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<TabBarIcon
|
<TabBarIcon
|
||||||
name={route.name === 'index' ? 'checklist' : route.name === 'calendar' ? 'calendar' : route.name === 'stats' ? 'stats' : 'gear'}
|
name={route.name === 'index' ? 'checklist' : route.name === 'calendar' ? 'calendar' : route.name === 'stats' ? 'stats' : 'gear'}
|
||||||
@@ -76,6 +82,7 @@ export default function TabLayout() {
|
|||||||
color={focused ? theme.accent : theme.textSecondary}
|
color={focused ? theme.accent : theme.textSecondary}
|
||||||
size={24}
|
size={24}
|
||||||
/>
|
/>
|
||||||
|
</Animated.View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -103,22 +110,23 @@ const styles = StyleSheet.create({
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-around',
|
justifyContent: 'space-around',
|
||||||
paddingTop: 10,
|
paddingTop: 6,
|
||||||
paddingHorizontal: 16,
|
paddingHorizontal: 16,
|
||||||
},
|
},
|
||||||
tabItem: {
|
tabItem: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
paddingVertical: 8,
|
paddingVertical: 6,
|
||||||
paddingHorizontal: 8,
|
paddingHorizontal: 12,
|
||||||
borderRadius: 16,
|
borderRadius: 8,
|
||||||
minWidth: 70,
|
minWidth: 70,
|
||||||
},
|
},
|
||||||
tabItemActive: {
|
rippleContainer: {
|
||||||
shadowColor: '#000',
|
width: 44,
|
||||||
shadowOffset: { width: 0, height: 2 },
|
height: 44,
|
||||||
shadowOpacity: 0.1,
|
borderRadius: 22,
|
||||||
shadowRadius: 8,
|
alignItems: 'center',
|
||||||
elevation: 4,
|
justifyContent: 'center',
|
||||||
|
position: 'relative',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -10,7 +10,7 @@ import { FriendsModal } from '@/components/FriendsModal';
|
|||||||
import { LegalModal } from '@/components/LegalModal';
|
import { LegalModal } from '@/components/LegalModal';
|
||||||
import { ServerUrlModal } from '@/components/ServerUrlModal';
|
import { ServerUrlModal } from '@/components/ServerUrlModal';
|
||||||
import SyncStatus from '@/components/SyncStatus';
|
import SyncStatus from '@/components/SyncStatus';
|
||||||
import { useSettings, SORT_OPTIONS, REMINDER_OPTIONS, ACCENT_PRESETS, DEFAULT_ACCENT } from '@/theme';
|
import { useSettings, SORT_OPTIONS, REMINDER_OPTIONS, ACCENT_PRESETS, DEFAULT_ACCENT, DEFAULT_ACCENT_OPACITY } from '@/theme';
|
||||||
import { useCategories } from '@/hooks/useDatabase';
|
import { useCategories } from '@/hooks/useDatabase';
|
||||||
import { getAuthUser, getAuthToken } from '@/services/auth';
|
import { getAuthUser, getAuthToken } from '@/services/auth';
|
||||||
import { checkForUpdates, getCurrentAppVersion } from '@/services/updates';
|
import { checkForUpdates, getCurrentAppVersion } from '@/services/updates';
|
||||||
@@ -38,16 +38,19 @@ export default function SettingsScreen() {
|
|||||||
const [draftAccentOpacity, setDraftAccentOpacity] = useState(accentOpacity);
|
const [draftAccentOpacity, setDraftAccentOpacity] = useState(accentOpacity);
|
||||||
const [syncSubtitle, setSyncSubtitle] = useState('Checking...');
|
const [syncSubtitle, setSyncSubtitle] = useState('Checking...');
|
||||||
const [updateSubtitle, setUpdateSubtitle] = useState('Tap to check');
|
const [updateSubtitle, setUpdateSubtitle] = useState('Tap to check');
|
||||||
|
const [lastUpdateCheck, setLastUpdateCheck] = useState<string | null>(null);
|
||||||
|
|
||||||
const handleCheckUpdates = async () => {
|
const handleCheckUpdates = async () => {
|
||||||
setUpdateSubtitle('Checking...');
|
setUpdateSubtitle('Checking...');
|
||||||
const update = await checkForUpdates();
|
const update = await checkForUpdates();
|
||||||
if (!update) {
|
if (!update) {
|
||||||
setUpdateSubtitle('Up to date');
|
setUpdateSubtitle('Up to date');
|
||||||
|
setLastUpdateCheck(new Date().toLocaleString());
|
||||||
Alert.alert('Up to date', `You're running the latest version (${getCurrentAppVersion()}).`);
|
Alert.alert('Up to date', `You're running the latest version (${getCurrentAppVersion()}).`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setUpdateSubtitle(`${update.version} available`);
|
setUpdateSubtitle(`${update.version} available`);
|
||||||
|
setLastUpdateCheck(new Date().toLocaleString());
|
||||||
const url = update.apkUrl ?? update.releaseUrl;
|
const url = update.apkUrl ?? update.releaseUrl;
|
||||||
Alert.alert('Update available', `Version ${update.version} is available for download.`, [
|
Alert.alert('Update available', `Version ${update.version} is available for download.`, [
|
||||||
{ text: 'Later', style: 'cancel' },
|
{ text: 'Later', style: 'cancel' },
|
||||||
@@ -60,6 +63,17 @@ export default function SettingsScreen() {
|
|||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const checkForUpdatesOnLoad = async () => {
|
||||||
|
const update = await checkForUpdates();
|
||||||
|
if (!update) {
|
||||||
|
setUpdateSubtitle('Up to date');
|
||||||
|
setLastUpdateCheck(new Date().toLocaleString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setUpdateSubtitle(`${update.version} available`);
|
||||||
|
setLastUpdateCheck(new Date().toLocaleString());
|
||||||
|
};
|
||||||
|
|
||||||
const refreshSyncStatus = async () => {
|
const refreshSyncStatus = async () => {
|
||||||
const token = await getAuthToken();
|
const token = await getAuthToken();
|
||||||
if (!token) {
|
if (!token) {
|
||||||
@@ -84,6 +98,8 @@ export default function SettingsScreen() {
|
|||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
|
refreshSyncStatus();
|
||||||
|
checkForUpdatesOnLoad();
|
||||||
const sub = BackHandler.addEventListener('hardwareBackPress', () => {
|
const sub = BackHandler.addEventListener('hardwareBackPress', () => {
|
||||||
const target = getLastVisitedTab();
|
const target = getLastVisitedTab();
|
||||||
if (target && target !== 'settings') {
|
if (target && target !== 'settings') {
|
||||||
@@ -92,7 +108,7 @@ export default function SettingsScreen() {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
return () => sub.remove();
|
return () => sub.remove();
|
||||||
}, [router])
|
}, [refreshSyncStatus, router])
|
||||||
);
|
);
|
||||||
|
|
||||||
const defaultCategory = categories.find((c) => c.id === defaultCategoryId);
|
const defaultCategory = categories.find((c) => c.id === defaultCategoryId);
|
||||||
@@ -302,6 +318,10 @@ export default function SettingsScreen() {
|
|||||||
onPress={handleCheckUpdates}
|
onPress={handleCheckUpdates}
|
||||||
showChevron
|
showChevron
|
||||||
/>
|
/>
|
||||||
|
<ListItem
|
||||||
|
title="Last checked"
|
||||||
|
subtitle={lastUpdateCheck ?? 'Never'}
|
||||||
|
/>
|
||||||
<ListItem
|
<ListItem
|
||||||
title="Version"
|
title="Version"
|
||||||
subtitle={getCurrentAppVersion()}
|
subtitle={getCurrentAppVersion()}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useEffect } from 'react';
|
|||||||
import { requestQuickAddFocus } from '@/utils/quickAddFocus';
|
import { requestQuickAddFocus } from '@/utils/quickAddFocus';
|
||||||
import { registerForPushNotificationsAsync, setupNotificationChannels, addNotificationResponseReceivedListener, removeNotificationSubscription } from '@/services/pushNotifications';
|
import { registerForPushNotificationsAsync, setupNotificationChannels, addNotificationResponseReceivedListener, removeNotificationSubscription } from '@/services/pushNotifications';
|
||||||
import * as Notifications from 'expo-notifications';
|
import * as Notifications from 'expo-notifications';
|
||||||
import { Platform } from 'react-native';
|
|
||||||
|
|
||||||
Notifications.setNotificationHandler({
|
Notifications.setNotificationHandler({
|
||||||
handleNotification: async () => ({
|
handleNotification: async () => ({
|
||||||
@@ -57,15 +56,24 @@ function RootNavigator() {
|
|||||||
Linking.getInitialURL().then(handleUrl).catch(() => {});
|
Linking.getInitialURL().then(handleUrl).catch(() => {});
|
||||||
const subscription = Linking.addEventListener('url', ({ url }) => handleUrl(url));
|
const subscription = Linking.addEventListener('url', ({ url }) => handleUrl(url));
|
||||||
|
|
||||||
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
|
if (event.key === 'Escape') {
|
||||||
|
router.back();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
subscription.remove();
|
subscription.remove();
|
||||||
removeNotificationSubscription(responseListener);
|
removeNotificationSubscription(responseListener);
|
||||||
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
};
|
};
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||||
<StatusBar style="light" />
|
<StatusBar style="dark" />
|
||||||
<Stack screenOptions={{ headerShown: false }}>
|
<Stack screenOptions={{ headerShown: false }}>
|
||||||
<Stack.Screen name="(tabs)" />
|
<Stack.Screen name="(tabs)" />
|
||||||
<Stack.Screen name="add-task" />
|
<Stack.Screen name="add-task" />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"expo-constants": "~57.0.9",
|
"expo-constants": "~57.0.9",
|
||||||
"expo-dev-client": "~57.0.1",
|
"expo-dev-client": "~57.0.1",
|
||||||
"expo-device": "^57.0.1",
|
"expo-device": "^57.0.1",
|
||||||
|
"expo-intent-launcher": "~57.0.1",
|
||||||
"expo-linking": "~57.0.5",
|
"expo-linking": "~57.0.5",
|
||||||
"expo-notifications": "~57.0.8",
|
"expo-notifications": "~57.0.8",
|
||||||
"expo-router": "~57.0.10",
|
"expo-router": "~57.0.10",
|
||||||
@@ -7594,6 +7595,15 @@
|
|||||||
"react-native": "*"
|
"react-native": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/expo-intent-launcher": {
|
||||||
|
"version": "57.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/expo-intent-launcher/-/expo-intent-launcher-57.0.1.tgz",
|
||||||
|
"integrity": "sha512-BYiPEOUeW3AkW/uxEESbS2UBw9LasJ8Heb6A8kF9Ueh6pqrXQHMNJFHzfrOP8qZfv9G2e8CTzrtzpN5p0vH5fA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"expo": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/expo-json-utils": {
|
"node_modules/expo-json-utils": {
|
||||||
"version": "57.0.1",
|
"version": "57.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/expo-json-utils/-/expo-json-utils-57.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/expo-json-utils/-/expo-json-utils-57.0.1.tgz",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"expo-constants": "~57.0.9",
|
"expo-constants": "~57.0.9",
|
||||||
"expo-dev-client": "~57.0.1",
|
"expo-dev-client": "~57.0.1",
|
||||||
"expo-device": "^57.0.1",
|
"expo-device": "^57.0.1",
|
||||||
|
"expo-intent-launcher": "~57.0.1",
|
||||||
"expo-linking": "~57.0.5",
|
"expo-linking": "~57.0.5",
|
||||||
"expo-notifications": "~57.0.8",
|
"expo-notifications": "~57.0.8",
|
||||||
"expo-router": "~57.0.10",
|
"expo-router": "~57.0.10",
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export function CategoryEditorModal({
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
<ColorWheel color={color} onChange={setColor} />
|
<ColorWheel color={color} opacity={1} onChange={setColor} />
|
||||||
|
|
||||||
<View style={styles.actions}>
|
<View style={styles.actions}>
|
||||||
{category && (
|
{category && (
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export function TaskList({ categoryIds = [], showCompleted = false, onSelectionC
|
|||||||
const subtaskRefs = useRef<Map<string, { ref: View; parentTaskId: string }>>(new Map());
|
const subtaskRefs = useRef<Map<string, { ref: View; parentTaskId: string }>>(new Map());
|
||||||
const dragStateRef = useRef<{ taskId: string; positions: Record<string, { top: number; bottom: number }>; subPositions: Record<string, { top: number; bottom: number }> } | null>(null);
|
const dragStateRef = useRef<{ taskId: string; positions: Record<string, { top: number; bottom: number }>; subPositions: Record<string, { top: number; bottom: number }> } | null>(null);
|
||||||
const subtaskDragRef = useRef<{ subtaskId: string; parentTaskId: string; parentSubtaskId: string | null; positions: Record<string, { top: number; bottom: number }>; subPositions: Record<string, { top: number; bottom: number }> } | null>(null);
|
const subtaskDragRef = useRef<{ subtaskId: string; parentTaskId: string; parentSubtaskId: string | null; positions: Record<string, { top: number; bottom: number }>; subPositions: Record<string, { top: number; bottom: number }> } | null>(null);
|
||||||
|
const taskDragRef = useRef<{ taskId: string; positions: Record<string, { top: number; bottom: number }> } | null>(null);
|
||||||
const {
|
const {
|
||||||
modals,
|
modals,
|
||||||
openTaskDelete,
|
openTaskDelete,
|
||||||
@@ -237,6 +238,22 @@ export function TaskList({ categoryIds = [], showCompleted = false, onSelectionC
|
|||||||
return { positions, subPositions };
|
return { positions, subPositions };
|
||||||
}, [measureItems]);
|
}, [measureItems]);
|
||||||
|
|
||||||
|
const findHoverTask = useCallback((absoluteY: number, draggedId: string, positions: Record<string, { top: number; bottom: number }>) => {
|
||||||
|
const entries = Object.entries(positions);
|
||||||
|
for (let i = entries.length - 1; i >= 0; i--) {
|
||||||
|
const [id, p] = entries[i];
|
||||||
|
if (id === draggedId) continue;
|
||||||
|
if (absoluteY >= p.top && absoluteY <= p.bottom) {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const updateHoverTaskTarget = useCallback((target: string | null) => {
|
||||||
|
setHoverTaskId(target ?? null);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const findHoverTarget = useCallback((absoluteY: number, draggedId: string, positions: Record<string, { top: number; bottom: number }>, subPositions: Record<string, { top: number; bottom: number }>) => {
|
const findHoverTarget = useCallback((absoluteY: number, draggedId: string, positions: Record<string, { top: number; bottom: number }>, subPositions: Record<string, { top: number; bottom: number }>) => {
|
||||||
const subEntries = Object.entries(subPositions);
|
const subEntries = Object.entries(subPositions);
|
||||||
for (let i = subEntries.length - 1; i >= 0; i--) {
|
for (let i = subEntries.length - 1; i >= 0; i--) {
|
||||||
@@ -381,6 +398,49 @@ const handleSubtaskDragEnd = useCallback(async (absoluteY: number) => {
|
|||||||
}
|
}
|
||||||
}, [findHoverTarget, moveSubtaskToTask]);
|
}, [findHoverTarget, moveSubtaskToTask]);
|
||||||
|
|
||||||
|
const handleTaskDragStart = useCallback(async (taskId: string) => {
|
||||||
|
const positions = await measureItems() as Record<string, { top: number; bottom: number }>;
|
||||||
|
taskDragRef.current = { taskId, positions };
|
||||||
|
}, [measureItems]);
|
||||||
|
|
||||||
|
const handleTaskDragUpdate = useCallback((absoluteY: number) => {
|
||||||
|
const state = taskDragRef.current;
|
||||||
|
if (!state) return;
|
||||||
|
const target = findHoverTask(absoluteY, state.taskId, state.positions);
|
||||||
|
updateHoverTaskTarget(target);
|
||||||
|
if (target) {
|
||||||
|
setDropIndicator({ targetId: target, position: 'below' });
|
||||||
|
} else {
|
||||||
|
const lastItem = Object.values(state.positions).reduce((max, p) => p.bottom > max.bottom ? p : max, { bottom: 0 });
|
||||||
|
if (absoluteY > lastItem.bottom) {
|
||||||
|
setDropIndicator({ targetId: null, position: 'below' });
|
||||||
|
} else {
|
||||||
|
setDropIndicator(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [findHoverTask, updateHoverTaskTarget]);
|
||||||
|
|
||||||
|
const handleTaskDragEnd = useCallback(async (absoluteY: number) => {
|
||||||
|
const state = taskDragRef.current;
|
||||||
|
taskDragRef.current = null;
|
||||||
|
setHoverTaskId(null);
|
||||||
|
setDropIndicator(null);
|
||||||
|
if (!state) return;
|
||||||
|
|
||||||
|
const target = findHoverTask(absoluteY, state.taskId, state.positions);
|
||||||
|
if (target === state.taskId) return;
|
||||||
|
|
||||||
|
// Set drop indicator based on target position
|
||||||
|
if (target) {
|
||||||
|
setDropIndicator({ targetId: target, position: 'below' });
|
||||||
|
} else {
|
||||||
|
const lastItem = Object.values(state.positions).reduce((max, p) => p.bottom > max.bottom ? p : max, { bottom: 0 });
|
||||||
|
if (absoluteY > lastItem.bottom) {
|
||||||
|
setDropIndicator({ targetId: null, position: 'below' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [findHoverTask]);
|
||||||
|
|
||||||
const renderItem = useCallback(
|
const renderItem = useCallback(
|
||||||
({ item, index }: { item: Task; index: number }) => {
|
({ item, index }: { item: Task; index: number }) => {
|
||||||
const isExpanded = expandedTasks.has(item.id);
|
const isExpanded = expandedTasks.has(item.id);
|
||||||
|
|||||||
@@ -1,30 +1,278 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
import { Alert, Linking } from 'react-native';
|
import {
|
||||||
import { checkForUpdates, wasPromptedFor, markPrompted } from '@/services/updates';
|
Modal,
|
||||||
|
View,
|
||||||
|
Text,
|
||||||
|
StyleSheet,
|
||||||
|
Pressable,
|
||||||
|
ScrollView,
|
||||||
|
Platform,
|
||||||
|
} from 'react-native';
|
||||||
|
import { checkForUpdates, wasPromptedFor, markPrompted, downloadAPK, installAPK, openReleaseUrl, AppUpdate } from '@/services/updates';
|
||||||
|
import { useSettings } from '@/theme';
|
||||||
|
|
||||||
export function UpdateNotifier() {
|
export function UpdateNotifier() {
|
||||||
useEffect(() => {
|
const { theme } = useSettings();
|
||||||
const run = async () => {
|
const [update, setUpdate] = useState<AppUpdate | null>(null);
|
||||||
const update = await checkForUpdates();
|
const [visible, setVisible] = useState(false);
|
||||||
if (!update || (await wasPromptedFor(update.tagName))) return;
|
const [downloading, setDownloading] = useState(false);
|
||||||
await markPrompted(update.tagName);
|
const [downloadProgress, setDownloadProgress] = useState(0);
|
||||||
const url = update.apkUrl ?? update.releaseUrl;
|
const [downloadError, setDownloadError] = useState<string | null>(null);
|
||||||
Alert.alert(
|
|
||||||
'Update available',
|
const checkUpdate = useCallback(async () => {
|
||||||
`A new version (${update.version}) is available for download.`,
|
const available = await checkForUpdates();
|
||||||
[
|
if (!available) return;
|
||||||
{ text: 'Later', style: 'cancel' },
|
|
||||||
{
|
const prompted = await wasPromptedFor(available.tagName);
|
||||||
text: 'Download',
|
if (prompted && !available.mandatory) return;
|
||||||
onPress: () => {
|
|
||||||
if (url) Linking.openURL(url).catch(() => {});
|
setUpdate(available);
|
||||||
},
|
setVisible(true);
|
||||||
},
|
|
||||||
],
|
|
||||||
);
|
|
||||||
};
|
|
||||||
run();
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return null;
|
useEffect(() => {
|
||||||
|
checkUpdate();
|
||||||
|
}, [checkUpdate]);
|
||||||
|
|
||||||
|
const handleDownload = async () => {
|
||||||
|
if (!update?.apkUrl) {
|
||||||
|
await openReleaseUrl(update?.releaseUrl ?? '');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setDownloading(true);
|
||||||
|
setDownloadProgress(0);
|
||||||
|
setDownloadError(null);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const uri = await downloadAPK(update.apkUrl, setDownloadProgress);
|
||||||
|
if (uri) {
|
||||||
|
const installed = await installAPK(uri);
|
||||||
|
if (!installed) {
|
||||||
|
setDownloadError('Failed to open installer. Please install manually from Downloads.');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setDownloadError('Download failed. Please try again or download from the release page.');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
setDownloadError('An error occurred during download.');
|
||||||
|
} finally {
|
||||||
|
setDownloading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleLater = async () => {
|
||||||
|
if (update) {
|
||||||
|
await markPrompted(update.tagName);
|
||||||
|
}
|
||||||
|
setVisible(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleReleasePage = async () => {
|
||||||
|
if (update) {
|
||||||
|
await openReleaseUrl(update.releaseUrl);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!visible || !update) return null;
|
||||||
|
|
||||||
|
const isMandatory = update.mandatory;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal visible={visible} transparent animationType="fade" onRequestClose={isMandatory ? () => {} : handleLater}>
|
||||||
|
<View style={[styles.overlay, { backgroundColor: theme.overlay }]}>
|
||||||
|
<View style={[styles.modal, { backgroundColor: theme.card }]}>
|
||||||
|
<View style={[styles.header, { borderBottomColor: theme.border }]}>
|
||||||
|
<Text style={[styles.title, { color: theme.text }]}>Update Available</Text>
|
||||||
|
<Text style={[styles.version, { color: theme.textSecondary }]}>Version {update.version}</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<ScrollView style={styles.content} contentContainerStyle={styles.contentContainer}>
|
||||||
|
<Text style={[styles.sectionTitle, { color: theme.text }]}>What's New</Text>
|
||||||
|
<Text style={[styles.notes, { color: theme.textSecondary }]}>
|
||||||
|
{update.notes || 'No release notes provided.'}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
{isMandatory && (
|
||||||
|
<View style={styles.mandatoryBadge}>
|
||||||
|
<Text style={styles.mandatoryText}>Mandatory Update</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{downloading && (
|
||||||
|
<View style={styles.progressContainer}>
|
||||||
|
<View style={[styles.progressBar, { backgroundColor: theme.border }]}>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
styles.progressFill,
|
||||||
|
{ backgroundColor: theme.accent, width: `${downloadProgress * 100}%` },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<Text style={[styles.progressText, { color: theme.textSecondary }]}>
|
||||||
|
Downloading... {Math.round(downloadProgress * 100)}%
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{downloadError && (
|
||||||
|
<View style={styles.errorContainer}>
|
||||||
|
<Text style={styles.errorText}>{downloadError}</Text>
|
||||||
|
<Pressable style={styles.errorAction} onPress={handleDownload}>
|
||||||
|
<Text style={styles.errorActionText}>Retry Download</Text>
|
||||||
|
</Pressable>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<View style={[styles.actions, { borderTopColor: theme.border }]}>
|
||||||
|
{!isMandatory && (
|
||||||
|
<Pressable style={[styles.button, styles.buttonSecondary, { backgroundColor: theme.cardAlt }]} onPress={handleLater}>
|
||||||
|
<Text style={[styles.buttonText, { color: theme.textSecondary }]}>Later</Text>
|
||||||
|
</Pressable>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Pressable
|
||||||
|
style={[
|
||||||
|
styles.button,
|
||||||
|
styles.buttonPrimary,
|
||||||
|
{ backgroundColor: theme.accent, opacity: downloading ? 0.7 : 1 },
|
||||||
|
]}
|
||||||
|
onPress={handleDownload}
|
||||||
|
disabled={downloading}
|
||||||
|
>
|
||||||
|
<Text style={[styles.buttonText, { color: theme.accentText }]}>
|
||||||
|
{downloading ? 'Downloading...' : update.apkUrl ? 'Download & Install' : 'View Release'}
|
||||||
|
</Text>
|
||||||
|
</Pressable>
|
||||||
|
|
||||||
|
<Pressable style={[styles.button, styles.buttonGhost, { backgroundColor: 'transparent' }]} onPress={handleReleasePage}>
|
||||||
|
<Text style={[styles.buttonText, { color: theme.textSecondary }]}>Release Notes</Text>
|
||||||
|
</Pressable>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
overlay: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
padding: 20,
|
||||||
|
},
|
||||||
|
modal: {
|
||||||
|
width: '100%',
|
||||||
|
maxWidth: 480,
|
||||||
|
borderRadius: 20,
|
||||||
|
overflow: 'hidden',
|
||||||
|
maxHeight: '85%',
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
padding: 20,
|
||||||
|
borderBottomWidth: 1,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: '700',
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
version: {
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
maxHeight: 300,
|
||||||
|
},
|
||||||
|
contentContainer: {
|
||||||
|
padding: 20,
|
||||||
|
paddingBottom: 12,
|
||||||
|
},
|
||||||
|
sectionTitle: {
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: '600',
|
||||||
|
marginBottom: 8,
|
||||||
|
textTransform: 'uppercase',
|
||||||
|
letterSpacing: 0.5,
|
||||||
|
},
|
||||||
|
notes: {
|
||||||
|
fontSize: 14,
|
||||||
|
lineHeight: 22,
|
||||||
|
},
|
||||||
|
mandatoryBadge: {
|
||||||
|
marginTop: 12,
|
||||||
|
paddingHorizontal: 12,
|
||||||
|
paddingVertical: 6,
|
||||||
|
borderRadius: 8,
|
||||||
|
backgroundColor: '#FFEBEE',
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
},
|
||||||
|
mandatoryText: {
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: '600',
|
||||||
|
color: '#C62828',
|
||||||
|
},
|
||||||
|
progressContainer: {
|
||||||
|
marginTop: 16,
|
||||||
|
},
|
||||||
|
progressBar: {
|
||||||
|
height: 6,
|
||||||
|
borderRadius: 3,
|
||||||
|
overflow: 'hidden',
|
||||||
|
},
|
||||||
|
progressFill: {
|
||||||
|
height: '100%',
|
||||||
|
borderRadius: 3,
|
||||||
|
},
|
||||||
|
progressText: {
|
||||||
|
fontSize: 12,
|
||||||
|
marginTop: 6,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
errorContainer: {
|
||||||
|
marginTop: 16,
|
||||||
|
padding: 12,
|
||||||
|
borderRadius: 8,
|
||||||
|
backgroundColor: '#FFF3E0',
|
||||||
|
},
|
||||||
|
errorText: {
|
||||||
|
fontSize: 13,
|
||||||
|
color: '#E65100',
|
||||||
|
marginBottom: 8,
|
||||||
|
},
|
||||||
|
errorAction: {
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 16,
|
||||||
|
borderRadius: 6,
|
||||||
|
backgroundColor: '#FF9800',
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
},
|
||||||
|
errorActionText: {
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: '600',
|
||||||
|
color: '#FFF',
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
gap: 8,
|
||||||
|
padding: 16,
|
||||||
|
borderTopWidth: 1,
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
paddingVertical: 10,
|
||||||
|
paddingHorizontal: 20,
|
||||||
|
borderRadius: 10,
|
||||||
|
minWidth: 100,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
buttonPrimary: {},
|
||||||
|
buttonSecondary: {},
|
||||||
|
buttonGhost: {},
|
||||||
|
buttonText: {
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: '600',
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -220,5 +220,9 @@ export const migrations = schemaMigrations({
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
toVersion: 21,
|
||||||
|
steps: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import RepeatProfile from '@/models/RepeatProfile';
|
|||||||
import Friendship from '@/models/Friendship';
|
import Friendship from '@/models/Friendship';
|
||||||
import { TombstoneEntity } from '@/models/Tombstone';
|
import { TombstoneEntity } from '@/models/Tombstone';
|
||||||
import { fetchPendingTombstones, removeTombstonesInBatch } from './tombstones';
|
import { fetchPendingTombstones, removeTombstonesInBatch } from './tombstones';
|
||||||
import { useOnline } from '@/hooks/useOnline';
|
|
||||||
|
|
||||||
const LAST_PULLED_AT_KEY = 'sync:lastPulledAt';
|
const LAST_PULLED_AT_KEY = 'sync:lastPulledAt';
|
||||||
const LAST_PUSHED_AT_KEY = 'sync:lastPushedAt';
|
const LAST_PUSHED_AT_KEY = 'sync:lastPushedAt';
|
||||||
@@ -96,7 +95,7 @@ export async function runSync(): Promise<SyncResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If offline, mark timestamps and return early - changes will sync on next foreground launch
|
// If offline, mark timestamps and return early - changes will sync on next foreground launch
|
||||||
const isCurrentlyOnline = await useOnline();
|
const isCurrentlyOnline = navigator.onLine;
|
||||||
if (!isCurrentlyOnline) {
|
if (!isCurrentlyOnline) {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
await setLastPulledAt(now);
|
await setLastPulledAt(now);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useDatabase } from './useDatabase';
|
|||||||
import { Q } from '@nozbe/watermelondb';
|
import { Q } from '@nozbe/watermelondb';
|
||||||
import { useEffect, useState, useCallback } from 'react';
|
import { useEffect, useState, useCallback } from 'react';
|
||||||
import Task from '../models/Task';
|
import Task from '../models/Task';
|
||||||
|
import { Priority, Repeat, Reminder } from '@/types';
|
||||||
import parseICal from '../utils/icalParser';
|
import parseICal from '../utils/icalParser';
|
||||||
import { startOfMonth, endOfMonth, addMonths, format } from 'date-fns';
|
import { startOfMonth, endOfMonth, addMonths, format } from 'date-fns';
|
||||||
|
|
||||||
@@ -138,57 +139,42 @@ export function useICalImport() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const taskData = events.map(mapICalEventToTask);
|
const taskData = events.map(mapICalEventToTask);
|
||||||
|
const now = Date.now();
|
||||||
|
|
||||||
// Insert tasks into WatermelonDB
|
// Insert tasks into WatermelonDB
|
||||||
const subscription = collections.tasks
|
await Promise.all(
|
||||||
.query()
|
taskData.map((td) =>
|
||||||
.splice(
|
collections.tasks.create((t) => {
|
||||||
0,
|
t.title = td.title;
|
||||||
0,
|
t.description = td.description;
|
||||||
...taskData.map((td) => ({
|
t.categoryId = td.categoryId;
|
||||||
title: td.title,
|
t.priority = td.priority as Priority;
|
||||||
description: td.description,
|
t.completed = td.completed;
|
||||||
category_id: td.categoryId,
|
t.completedAt = td.completedAt;
|
||||||
tags: td.tags,
|
t.dueDate = td.dueDate;
|
||||||
priority: td.priority,
|
t.dueTime = td.dueTime;
|
||||||
completed: td.completed,
|
t.endTime = td.endTime;
|
||||||
completed_at: td.completedAt,
|
t.allDay = td.allDay;
|
||||||
due_date: td.dueDate,
|
t.repeat = td.repeat as Repeat;
|
||||||
due_time: td.dueTime,
|
t.repeatInterval = td.repeatInterval;
|
||||||
end_time: td.endTime,
|
t.repeatDays = td.repeatDays;
|
||||||
all_day: td.allDay,
|
t.seriesId = td.seriesId;
|
||||||
repeat: td.repeat,
|
t.reminder = td.reminder as Reminder;
|
||||||
repeat_interval: td.repeatInterval,
|
t.reminders = td.reminders;
|
||||||
repeat_days: td.repeatDays,
|
t.assigneeId = null;
|
||||||
color: '#9E9E9E',
|
t.createdAt = new Date(now);
|
||||||
series_id: td.seriesId,
|
t.updatedAt = new Date(now);
|
||||||
order: 0,
|
})
|
||||||
reminder: td.reminder,
|
)
|
||||||
reminders: td.reminders,
|
|
||||||
assignee_id: null,
|
|
||||||
created_at: now,
|
|
||||||
updated_at: now,
|
|
||||||
}))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Observe the changes
|
|
||||||
subscription.subscribe({
|
|
||||||
next: (result) => {
|
|
||||||
// Tasks have been imported
|
|
||||||
},
|
|
||||||
error: (err) => {
|
|
||||||
console.error('Import error:', err);
|
|
||||||
setError(err.message);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.error('ICal import failed:', err);
|
console.error('ICal import failed:', err);
|
||||||
setError(err.message || 'Import failed');
|
setError(err.message || 'Import failed');
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, [collections]);
|
}, []);
|
||||||
|
|
||||||
return { importICal, loading, error };
|
return { importICal, loading, error };
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
import Constants from 'expo-constants';
|
import Constants from 'expo-constants';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
import * as FileSystem from 'expo-file-system/legacy';
|
||||||
|
import * as IntentLauncher from 'expo-intent-launcher';
|
||||||
|
import { Platform } from 'react-native';
|
||||||
|
|
||||||
const GITEA_BASE_URL = 'https://gitea.techmos.org';
|
const GITEA_BASE_URL = 'https://gitea.techmos.org';
|
||||||
const GITEA_OWNER = 'tech08mag';
|
const GITEA_OWNER = 'tech08mag';
|
||||||
@@ -12,6 +15,8 @@ export interface AppUpdate {
|
|||||||
notes: string;
|
notes: string;
|
||||||
apkUrl: string | null;
|
apkUrl: string | null;
|
||||||
releaseUrl: string;
|
releaseUrl: string;
|
||||||
|
mandatory: boolean;
|
||||||
|
publishedAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCurrentAppVersion(): string {
|
export function getCurrentAppVersion(): string {
|
||||||
@@ -28,6 +33,13 @@ async function fetchWithTimeout(path: string, timeoutMs: number): Promise<Respon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseMandatoryFromNotes(notes: string, tagName: string): boolean {
|
||||||
|
const mandatoryKeywords = ['mandatory', 'critical', 'security', 'breaking', 'required'];
|
||||||
|
const lowerNotes = notes.toLowerCase();
|
||||||
|
const lowerTag = tagName.toLowerCase();
|
||||||
|
return mandatoryKeywords.some(kw => lowerNotes.includes(kw) || lowerTag.includes(kw));
|
||||||
|
}
|
||||||
|
|
||||||
export async function fetchLatestRelease(): Promise<AppUpdate | null> {
|
export async function fetchLatestRelease(): Promise<AppUpdate | null> {
|
||||||
try {
|
try {
|
||||||
const response = await fetchWithTimeout(
|
const response = await fetchWithTimeout(
|
||||||
@@ -40,14 +52,17 @@ export async function fetchLatestRelease(): Promise<AppUpdate | null> {
|
|||||||
(asset: { name?: string }) => asset.name && /\.apk$/i.test(asset.name),
|
(asset: { name?: string }) => asset.name && /\.apk$/i.test(asset.name),
|
||||||
);
|
);
|
||||||
const tagName: string = release.tag_name ?? release.name ?? '';
|
const tagName: string = release.tag_name ?? release.name ?? '';
|
||||||
|
const notes: string = release.body ?? '';
|
||||||
return {
|
return {
|
||||||
version: tagName.replace(/^v/i, ''),
|
version: tagName.replace(/^v/i, ''),
|
||||||
tagName,
|
tagName,
|
||||||
notes: release.body ?? '',
|
notes,
|
||||||
apkUrl: apkAsset?.browser_download_url ?? null,
|
apkUrl: apkAsset?.browser_download_url ?? null,
|
||||||
releaseUrl:
|
releaseUrl:
|
||||||
release.html_url ??
|
release.html_url ??
|
||||||
`${GITEA_BASE_URL}/${GITEA_OWNER}/${GITEA_REPO}/releases/tag/${tagName}`,
|
`${GITEA_BASE_URL}/${GITEA_OWNER}/${GITEA_REPO}/releases/tag/${tagName}`,
|
||||||
|
mandatory: parseMandatoryFromNotes(notes, tagName),
|
||||||
|
publishedAt: release.published_at ?? new Date().toISOString(),
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
@@ -92,3 +107,55 @@ export async function markPrompted(tagName: string): Promise<void> {
|
|||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function downloadAPK(
|
||||||
|
url: string,
|
||||||
|
onProgress?: (progress: number) => void
|
||||||
|
): Promise<string | null> {
|
||||||
|
if (Platform.OS !== 'android') return null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const downloadDir = `${FileSystem.documentDirectory}downloads/`;
|
||||||
|
await FileSystem.makeDirectoryAsync(downloadDir, { intermediates: true });
|
||||||
|
|
||||||
|
const filename = `carry-your-live-${Date.now()}.apk`;
|
||||||
|
const filepath = `${downloadDir}${filename}`;
|
||||||
|
|
||||||
|
const downloadResumable = FileSystem.createDownloadResumable(
|
||||||
|
url,
|
||||||
|
filepath,
|
||||||
|
{},
|
||||||
|
(downloadProgress) => {
|
||||||
|
const progress = downloadProgress.totalBytesWritten / downloadProgress.totalBytesExpectedToWrite;
|
||||||
|
onProgress?.(progress);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const result = await downloadResumable.downloadAsync();
|
||||||
|
return result?.uri ?? null;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[Updates] Download failed:', error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function installAPK(uri: string): Promise<boolean> {
|
||||||
|
if (Platform.OS !== 'android') return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
await IntentLauncher.startActivityAsync('android.intent.action.VIEW', {
|
||||||
|
data: uri.startsWith('file://') ? uri : `file://${uri}`,
|
||||||
|
type: 'application/vnd.android.package-archive',
|
||||||
|
flags: 1,
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[Updates] Install failed:', error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function openReleaseUrl(url: string): Promise<void> {
|
||||||
|
const { openURL } = await import('expo-linking');
|
||||||
|
await openURL(url);
|
||||||
|
}
|
||||||
@@ -154,6 +154,8 @@ interface SettingsContextType {
|
|||||||
setApiUrl: (value: string) => void;
|
setApiUrl: (value: string) => void;
|
||||||
accentColor: string;
|
accentColor: string;
|
||||||
setAccentColor: (value: string) => void;
|
setAccentColor: (value: string) => void;
|
||||||
|
accentOpacity: number;
|
||||||
|
setAccentOpacity: (value: number) => void;
|
||||||
todoAheadDays: number;
|
todoAheadDays: number;
|
||||||
setTodoAheadDays: (value: number) => void;
|
setTodoAheadDays: (value: number) => void;
|
||||||
showCompleted: boolean;
|
showCompleted: boolean;
|
||||||
@@ -243,6 +245,8 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
|
|||||||
setApiUrl,
|
setApiUrl,
|
||||||
accentColor,
|
accentColor,
|
||||||
setAccentColor,
|
setAccentColor,
|
||||||
|
accentOpacity,
|
||||||
|
setAccentOpacity,
|
||||||
todoAheadDays,
|
todoAheadDays,
|
||||||
setTodoAheadDays,
|
setTodoAheadDays,
|
||||||
showCompleted,
|
showCompleted,
|
||||||
|
|||||||
@@ -1,4 +1,37 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {},
|
"compilerOptions": {
|
||||||
"extends": "expo/tsconfig.base"
|
"allowJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"lib": ["DOM", "ESNext"],
|
||||||
|
"module": "preserve",
|
||||||
|
"moduleDetection": "force",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"customConditions": ["react-native"],
|
||||||
|
"noEmit": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"target": "ESNext",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"deprecationDiagnostics": false,
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["carry-your-live/src/*"],
|
||||||
|
"@/components/*": ["carry-your-live/src/components/*"],
|
||||||
|
"@/hooks/*": ["carry-your-live/src/hooks/*"],
|
||||||
|
"@/database/*": ["carry-your-live/src/database/*"],
|
||||||
|
"@/models/*": ["carry-your-live/src/models/*"],
|
||||||
|
"@/constants/*": ["carry-your-live/src/constants/*"],
|
||||||
|
"@/types/*": ["carry-your-live/src/types/*"],
|
||||||
|
"@/utils/*": ["carry-your-live/src/utils/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extends": "expo/tsconfig.base",
|
||||||
|
"exclude": [
|
||||||
|
"${configDir}/node_modules",
|
||||||
|
"${configDir}/babel.config.js",
|
||||||
|
"${configDir}/metro.config.js",
|
||||||
|
"${configDir}/jest.config.js",
|
||||||
|
"${configDir}/android",
|
||||||
|
"${configDir}/ios"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||