Commit Graph

1311 Commits

Author SHA1 Message Date
Brandon Presley 19307a2a3c Remove progress circle from timer page
- This is partly to figure out what is happening in #206.
- It's also because we have the global timer bar
- Could never quite make it look like the text was centered
2023-11-29 09:25:22 +13:00
Brandon Presley 8e9a6be85d Start alarm service as non-foreground - 2.8 🚀
Closes #209
2023-11-28 11:16:41 +13:00
Brandon Presley 3ed87114d2 Fix view weight graph for small screens 2023-11-27 11:53:54 +13:00
Brandon Presley 5a9030dae7 Fix view of graphs on smaller screens 2023-11-27 11:51:15 +13:00
Brandon Presley fe68ddfae8 Show full date for graphs 2023-11-23 15:04:18 +13:00
Brandon Presley 9ab07c0114 Put selected exercises first when editing a plan - 2.7 🚀
Closes #190
2023-11-22 11:29:12 +13:00
Brandon Presley c18072bdc0 Default showing of steps to false 2023-11-21 19:25:18 +13:00
Brandon Presley 610d55c932 Change color name of Red to Brandy 2023-11-21 19:24:47 +13:00
Brandon Presley 0163788175 Set placeholder for plan title 2023-11-21 19:24:40 +13:00
Brandon Presley 8a1e1b982a Show both date and time by default 2023-11-21 19:14:53 +13:00
Brandon Presley 8cfdc354dc Make fresh installs show the date by default 2023-11-21 19:11:12 +13:00
Brandon Presley c98706bd56 Delete gitea issue template
Not sure how to make different kinds since there can be
bugs or feature requests.
2023-11-21 17:57:08 +13:00
Brandon Presley 303d8fa819 Make version a text input for issue template 2023-11-21 17:56:00 +13:00
Brandon Presley e20d07bcf8 Add issue template to gitea 2023-11-21 17:54:42 +13:00
Brandon Presley cb2fa2fb0c Fix error when saving a set with no weight
Just default it to zero if it isn't entered.
2023-11-21 17:44:53 +13:00
Brandon Presley abbe702f24 Update package-lock.json 2023-11-21 17:30:00 +13:00
Brandon Presley 2a78d2e556 Add button to export sets as CSV - 2.6 🚀
Closes #203
2023-11-21 10:26:34 +13:00
Brandon Presley 3882a95b65 Add whitespace to SettingsPage 2023-11-21 10:16:31 +13:00
Brandon Presley 7e764062f4 Remove redundant exports from gym-set.ts 2023-11-21 10:16:17 +13:00
Brandon Presley 857af61eec Refactor SettingsPage
1. If we rely on query builders too much we lose type safety
2. The update method wasn't really worth factoring out in the
  first place.
2023-11-20 20:06:45 +13:00
Brandon Presley 15a28a0a81 Replace dragging with buttons in edit plan - 2.5 🚀
Every draggable library I tried was buggy.
2023-11-20 12:42:23 +13:00
Brandon Presley 2f24104d13 Set finished notification sound to null - 2.4 🚀
Closes #195
2023-11-20 12:24:43 +13:00
Brandon Presley cc6b37e16a Fix timer not always ending - 2.3 🚀
This bug is because I mis-named the event for the alarm finishing.
It would only be possible to create this bug if you do the following:
1. Create a timer
2. Swap to another app for it's duration and keep your phone screen
   active
3. On timer completion, without tapping the notification, focus the app
4. See the timer has not been set to zero
2023-11-15 22:44:02 +13:00
Brandon Presley b485175082 Stop timer when you undo a set from an open plan 2023-11-15 16:05:28 +13:00
Brandon Presley 086e3ea2df Simplify the peek view of exercises from Plan 2023-11-15 16:03:58 +13:00
Brandon Presley 1b164aaaf1 Remove loading indicator where load times are fast
If the load time is too fast (on a mid-tier device),
then for most people they will see a flicker of a
loading spinner (which looks like a bug). These indicators
would only marginally improve the experience of people with
the slowest devices, but for most people this will just look
like a bug.

I left the indicators in the InsightsPage since those queries
actually do take >=300ms on a mid-tier device.
2023-11-15 15:53:32 +13:00
Brandon Presley b44cbae131 Fix progress bar not showing on some pages - 2.2 🚀
Moving the bar  from App.tsx -> AppDrawer.tsx was a mistake,
because then the bar only shows on drawer routes instead of
app-wide.
2023-11-15 14:32:29 +13:00
Brandon Presley 608bb3e97a Add settings for default fields on Exercise - 2.1 🚀
Closes #188
2023-11-15 14:05:25 +13:00
Brandon Presley f6a75d89cd Write an empty mp3 when disabling sound - 1.188 🚀
Also revert to the default sound if you enable it again.

Closes #178
2023-11-15 13:28:30 +13:00
Brandon Presley 0592a9d695 Fix wrong text color on primary buttons - 1.187 🚀 2023-11-15 13:07:58 +13:00
Brandon Presley 3544392002 Handle database importing breaking
1. Backup the current database first
2. Restore the database if something goes wrong
3. Show the user a dialog explaining the error
2023-11-15 12:14:47 +13:00
Brandon Presley bdc648d811 Factor out FatalError component from App.tsx 2023-11-15 12:14:34 +13:00
Brandon Presley 50b3a2ef3d Fix text color in App.tsx fatal error message 2023-11-15 11:52:31 +13:00
Brandon Presley 7a24d844c5 Add fatal error message if database fails to initialize
This will help with debugging if the user can directly
provide what error occurred.
2023-11-15 11:46:33 +13:00
Brandon Presley ec17ad5805 Wrap SetItem in React.memo
Apparently large lists in React Native should be wrapped in this,
as long as they don't have any internal state.

So this should theoretically improve performance when you scroll down
a lot.
2023-11-15 11:30:09 +13:00
Brandon Presley ba24649a52 Organize imports 2023-11-15 11:21:49 +13:00
Brandon Presley 70a318a0a4 Add activity indicator for SetList 2023-11-15 11:19:22 +13:00
Brandon Presley 6b168cccfe Rename drawer-param-list -> drawer-params 2023-11-15 11:08:00 +13:00
Brandon Presley b68587f514 Add auto converter - 1.186 🚀
Closes #193
2023-11-15 11:03:23 +13:00
Brandon Presley 1b217f1905 Fix bug of default EditSets unit being wrong
By default, the unit is empty (no change).
Previously it was defaulting to kilograms.
2023-11-15 11:00:09 +13:00
Brandon Presley c3a8034dd4 Make add/subtract buttons float right in EditSets 2023-11-15 10:59:55 +13:00
Brandon Presley 9cc0eae66a Fix logging in EditSets 2023-11-15 10:59:40 +13:00
Brandon Presley 3ac1e74575 Make save button containde in EditExercise 2023-11-15 10:53:16 +13:00
Brandon Presley c507370398 Change style of primary buttons
According to React Native Paper docs, the purpose
of the "contained" mode of button is for the primary
action.

https://callstack.github.io/react-native-paper/docs/components/Button/#mode
2023-11-15 10:51:54 +13:00
Brandon Presley 35a3ef75b6 Add 3 more colors to dark/light mode 2023-11-15 10:43:47 +13:00
Brandon Presley 859818e5b6 Change layout of SetItem
Moved the date to the description,
and the reps x weight to the right.

Related to #192.
2023-11-14 20:44:54 +13:00
Brandon Presley ddceb91211 Add activity indicators to ViewGraph 2023-11-14 15:03:21 +13:00
Brandon Presley 976bb7c189 Add activity indicator for StartPlan 2023-11-14 14:56:58 +13:00
Brandon Presley 8ee07823aa Replace useDark with useTheme - 1.185 🚀 2023-11-14 14:52:35 +13:00
Brandon Presley 456af73e91 Rename useTheme to useAppTheme
React Native and React Native Paper already
have a useTheme so let's not add to the clutter.
2023-11-14 14:45:15 +13:00