Compare commits
1 Commits
build-1eae
...
build-ad3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad3bd9e5dc |
45
.github/copilot-instructions.md
vendored
Normal file
45
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Project Guidelines
|
||||||
|
|
||||||
|
## Code Style
|
||||||
|
- Keep components as functional React components and use hooks-based state.
|
||||||
|
- Follow existing naming and structure in `src/screens` and `src/components`:
|
||||||
|
- Screen files: `*Screen.js`
|
||||||
|
- Shared UI pieces: `src/components/*.js`
|
||||||
|
- Keep styling centralized in `src/styles.js` via `createStyles()` and use theme-driven inline color overrides in screens/components.
|
||||||
|
- Reuse `getTheme(darkMode, pinkMode)` from `src/theme.js` for color values; do not hardcode alternate palettes in individual screens.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
- Root orchestration lives in `App.js`:
|
||||||
|
- App-level state includes current screen, focus mode, theme toggles, and timer/countdown state.
|
||||||
|
- Screen switching is controlled by the `screen` state (`home`, `timeuntil`, `timer`).
|
||||||
|
- Screen responsibilities:
|
||||||
|
- `HomeScreen`: mode selection and top controls.
|
||||||
|
- `TimeUntilScreen`: target clock-time countdown flow.
|
||||||
|
- `TimerScreen`: duration countdown flow.
|
||||||
|
- `FocusScreen`: minimal fullscreen countdown UI.
|
||||||
|
- Shared presentational components:
|
||||||
|
- `TopControls`: dark/pink/fullscreen/focus controls.
|
||||||
|
- `CountdownRow`: reusable HH:MM:SS display.
|
||||||
|
|
||||||
|
## Build And Run
|
||||||
|
- Install dependencies: `npm install`
|
||||||
|
- Start dev server: `npm start`
|
||||||
|
- Run on Android: `npm run android`
|
||||||
|
- Run on iOS: `npm run ios`
|
||||||
|
- Run on web: `npm run web`
|
||||||
|
- EAS builds use `eas.json` profiles (`development`, `preview`, `production`).
|
||||||
|
|
||||||
|
## Conventions
|
||||||
|
- Keep timer/countdown behavior in `App.js` unless intentionally refactoring architecture.
|
||||||
|
- Preserve current time behavior:
|
||||||
|
- `now` updates every second with `setInterval`.
|
||||||
|
- Time-until target is based on local device time and rolls to next day when target time has passed.
|
||||||
|
- Maintain platform guards:
|
||||||
|
- Web-only fullscreen uses `document.fullscreenElement` APIs.
|
||||||
|
- Android hardware back behavior is handled in `App.js` and should keep focus/screen fallback behavior.
|
||||||
|
- For countdown display, continue using `CountdownRow` and 2-digit padded units for consistency.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
- This project has no test scripts configured; do not claim tests were run unless you add and run them.
|
||||||
|
- Be careful with web-only globals (`document`) and keep `Platform.OS` guards.
|
||||||
|
- Avoid introducing timezone assumptions without explicit product requirements; current logic is local-time based.
|
||||||
37
README.md
Normal file
37
README.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Time Until
|
||||||
|
|
||||||
|
A small Expo React Native app with two countdown modes:
|
||||||
|
|
||||||
|
- **Time Until**: count down to a target clock time (local device time)
|
||||||
|
- **Timer**: count down from a duration you enter (hours/minutes/seconds)
|
||||||
|
|
||||||
|
It also includes a minimal focus view, dark mode, and a pink accent theme.
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
You can download ready-to-use apk builds from the Releases page:
|
||||||
|
|
||||||
|
https://gitea.reversed.dev/space/time-until/releases
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
- Main app state and countdown logic live in `App.js`.
|
||||||
|
- Screen components are in `src/screens`.
|
||||||
|
- Shared UI components are in `src/components`.
|
||||||
|
- Theme + styling are managed via `src/theme.js` and `src/styles.js`.
|
||||||
|
|
||||||
|
### Time Until Mode
|
||||||
|
|
||||||
|
- Enter hour/minute in 24-hour format.
|
||||||
|
- If the selected time has already passed today, it rolls to the next day.
|
||||||
|
|
||||||
|
### Timer Mode
|
||||||
|
|
||||||
|
- Enter a duration in hours/minutes/seconds.
|
||||||
|
- Supports start, pause, resume, and reset.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Time calculations are based on local device time.
|
||||||
|
- Web fullscreen uses browser fullscreen APIs.
|
||||||
|
- No automated test scripts are currently configured in `package.json`.
|
||||||
Reference in New Issue
Block a user