Commit Graph

44 Commits

Author SHA1 Message Date
FichteFoll 76e764b706 Round timestamps to whole minutes on creation
The displayed timestamps were always floored, as were calculated
difference and its sum, which meant a duration that seemed like 1 hour
was more often than not displayed as 0:59 instead of 1:00.
2021-12-10 12:09:37 +01:00
FichteFoll 2e35ff377b Don't needlessly display a minimum of 1 minutes 2021-12-10 12:07:24 +01:00
FichteFoll eed6aa1ac7 Don't add to pause group if it is the last item
Also skip the last item if it is from the future in general.
2021-12-07 18:20:13 +01:00
FichteFoll 00647c4ddb Open with the last timesheet item selected 2021-12-06 18:55:54 +01:00
FichteFoll a7696f34cc Add key bindings to go to top or bottom of the list 2021-12-06 18:53:49 +01:00
FichteFoll 82df932a99 Ignore user files 2021-09-01 15:38:06 +02:00
FichteFoll 8974332651 Render summary vertically
With the todo list gone, it makes much more sense to render the summary
vertically (and also to isolate the pause time).
2021-09-01 15:37:03 +02:00
FichteFoll 93857d0675 Don't render todo list and prevent focusing it
This is a very quick and dirty fix, but I can strip out the entire todo
functionality later.
2021-09-01 15:35:58 +02:00
kageru 27d19d91d0 Merge pull request 'Group pause time' (#9) from FichteFoll/tracc:feature/group-pause-time into master
Reviewed-on: kageru/tracc#9
2020-12-19 17:06:46 +01:00
FichteFoll 0c38ac447e Support "break" as pause text 2020-12-10 10:24:52 +01:00
FichteFoll 51e38ccbf1 Group pause time but not for the sum 2020-12-09 20:08:21 +01:00
kageru 17f683e0d3
Properly round to nearest multiple of 5 on adjustment
Fixes #8
2020-06-23 10:07:25 +02:00
kageru 233e4ebb29
Always autosave when entering normal mode 2020-05-27 22:38:38 +02:00
kageru b8fe625405 Move to next todo item after marking one as done 2020-05-27 11:42:17 +02:00
kageru 9503962dd5 Allow for time adjustments with +/-
I much prefer this solution to the old one. Parsing times was a mistake.

I wonder if rustc realizes that I only ever pass 5 or -5 as arguments to
that function and then creates two `time::Duration`s for 5 and -5
minutes respectively to avoid the allocations on each keypress.

Also, I had to satisfy the OCD meme by rounding all adjusted times to %5.
It would be too annoying to change a number without being able to always
set it to a “nice” number.
2020-04-27 16:24:33 +02:00
kageru a94d8b77ea Only allow toggling for todo items 2020-04-27 12:34:58 +02:00
kageru 32590fbfd6 Revert "make editing times possible"
This reverts commit 78ae05de42.
Thinking about what I wrote there made me realize that it’s a horrible
solution that is awful to use and makes the code an order of magnitude
worse.
2020-04-27 10:28:56 +02:00
kageru 78ae05de42
make editing times possible 2020-04-23 23:19:13 +02:00
kageru 0439c3a637 Allow yanking an entry with y 2020-04-23 14:07:51 +02:00
kageru f1eeb7b24e
allow overriding timesheet texts with [something] 2020-04-20 15:31:43 +02:00
kageru b2a2d29216 exclude pause time in calculations 2020-04-20 14:54:47 +02:00
kageru eacc10d625 go back to dd for deletions 2020-04-20 11:12:45 +02:00
kageru 8b3b6c3d0b include current time point in sum calculation 2020-04-20 10:52:45 +02:00
kageru 6075a4369f Use Time instead of DateTime 2020-04-20 10:27:59 +02:00
kageru 129e890670
split into more modules 2020-04-19 20:11:28 +02:00
kageru 1204be40fb
clippy 2020-04-19 19:22:06 +02:00
kageru 1be551d4f5
improve sum_as_str 2020-04-19 19:07:54 +02:00
kageru 84f13d1806
clean up time grouping 2020-04-19 19:04:27 +02:00
kageru 292aeb417f
use macro for current focus 2020-04-18 18:15:23 +02:00
kageru b52311e840
make timesheet work 2020-04-13 23:56:25 +02:00
kageru 559413e4a9
Start refactoring ListViews into trait 2020-01-27 12:06:05 +01:00
kageru 61c385404b
Add WIP timesheet 2020-01-25 22:15:41 +01:00
kageru e0d3bad477
First steps towards adding multiple panels 2020-01-25 18:05:35 +01:00
kageru 1428ced923
Fix panic when deleting the last item 2020-01-25 15:49:54 +01:00
kageru dac7838293
forbid unsafe 2020-01-25 12:39:16 +01:00
kageru 54c217741c
Slightly refactor json read/write 2020-01-25 12:22:36 +01:00
kageru 904a3dbe2d
refactor to OOP because I’m too lazy to pass around stuff 2020-01-25 12:11:19 +01:00
kageru 3279d63952 Clear terminal on exit 2020-01-24 13:23:51 +01:00
kageru 05ed013485 Don’t use Option as selected index 2020-01-24 11:40:16 +01:00
kageru cc7b8beda9 Fix a few panics and add register 2020-01-24 11:07:37 +01:00
kageru d2c142f65f
Add persistent storage via json 2020-01-24 08:11:07 +01:00
kageru 51cba3c68c
Wip: persistent storage of list entries 2020-01-24 00:02:32 +01:00
kageru 78cb4bb1cb
Don’t use copied input handling from the examples 2020-01-23 23:26:18 +01:00
kageru 4fa4764cd4
Initial commit 2020-01-23 23:06:06 +01:00