Nicolas Martin
7500d88e93
TIL: 'News' is singular
2020-11-17 15:57:55 -05:00
Nicolas Martin
89965743a1
Ensure the search binding "/" always works
2020-11-17 15:57:55 -05:00
Nicolas Martin
c91501655f
Dont panic during actions in the filtered stash view w/o items
...
Filterng down the stash to 0 items (no cursor is displayed as there are no items
left) caused a panic during execution of one of these actions:
- x: Delete
- m: Set Memo
- s: Stash file
This change prevents that from happening by breaking the switch statement when
there are no items left.
Also glow now uses the filtered markdown notes in the `stashHelpView` so
`m.selectedMarkdown()` cannot return a nil refernce anymore.
2020-11-17 15:57:55 -05:00
Nicolas Martin
56847c1b01
Dim search results during filtering
2020-11-17 15:57:55 -05:00
Nicolas Martin
4782b99154
Display news item count in stash view
2020-11-17 15:57:55 -05:00
Nicolas Martin
7fb4a43474
Fix cursor placement when paging trough filtered notes
2020-11-17 15:57:55 -05:00
Nicolas Martin
fbe93a90ff
Add a prefix according to the markdownType when filtering notes
2020-11-17 15:57:55 -05:00
Nicolas Martin
faeef13e55
Get the cursor movement going while filtering stashitems
2020-11-17 15:57:55 -05:00
Nicolas Martin
259f4b584b
Use setTotalPages() to set the number of items in the paginator
...
This takes the filtered stash state in account
2020-11-17 15:57:55 -05:00
Nicolas Martin
e985f96dc4
Add fuzzy filtering for stash notes
2020-11-17 15:57:55 -05:00
Nicolas Martin
9fd3dfef5a
Add a searchinput box to the stashModel
2020-11-17 15:57:55 -05:00
Nicolas Martin
23fb61f752
Add stash states for searching through notes
...
- stashStateSearchNotes will be used while entering the search term
- stashStateShowFiltered will only display the filtered notes in the stash view.
2020-11-17 15:57:55 -05:00
Christian Rocha
32f0be2688
Use the same type to track docs to load and docs loaded
2020-10-19 15:50:50 +00:00
Christian Rocha
54a7394448
Simplify loading completion check
2020-10-19 15:50:50 +00:00
Christian Rocha
fcf109aaff
Add flag for local files only (aka disable network) in TUI
2020-10-19 15:50:50 +00:00
Christian Rocha
e73190a217
Move "stashed only" flag from the package-level into the model
2020-10-19 15:50:50 +00:00
Christian Rocha
26b3292f57
Don't allow stashing until authed + introduce "offline mode" in UI
2020-10-05 13:54:24 +02:00
Christian Rocha
b94615f5ac
Fix debug log in stash deletion command
2020-10-05 13:54:24 +02:00
Christian Rocha
2b064546b9
Move markdown types into a separate file
2020-10-05 13:54:24 +02:00
Christian Rocha
f2537b1811
Update loading message if you're just loading your stash
2020-10-05 13:54:24 +02:00
Christian Rocha
eb6fa55ec3
Run glow stash
to browse stashed files only
2020-10-05 13:54:24 +02:00
Christian Rocha
676d215966
Keybindings for navigating to the start/end of file listing
2020-10-05 13:54:01 +02:00
Christian Rocha
b296cbb780
Remove newlines the linter is complaining about
2020-10-05 13:54:01 +02:00
Christian Rocha
b2511c54b0
Correct header counts for local items converted to stashed ones
2020-10-05 13:54:01 +02:00
Christian Rocha
912c80651a
Apply fine-grained spinner display rules to file listing view
2020-10-05 13:54:01 +02:00
Christian Rocha
2f9babce80
Restore original displayed path when deleting a newly stashed item
2020-10-05 13:53:26 +02:00
Christian Rocha
5515460f32
Fix regression where note-setting on newly stashed items couldn't be done
2020-10-05 13:53:26 +02:00
Christian Rocha
82acc62783
Move common commands to the main UI file
2020-10-05 13:53:26 +02:00
Christian Rocha
c0daa74358
Add periods to comments to make the linter happy
2020-10-05 13:53:26 +02:00
Christian Rocha
2fdef64478
Stashed docs become local upon delete if they were stashed in-session
2020-10-05 13:53:26 +02:00
Christian Rocha
cdf11136f4
Log when stash item deletions fail
2020-10-05 13:53:26 +02:00
Christian Rocha
e9c47a185f
Be specific that we're deleting only from the stash
2020-10-05 13:53:26 +02:00
Christian Rocha
089b66f622
Fix extreme edge case error logging where local file has no path
2020-10-05 13:53:26 +02:00
Christian Rocha
d7974f035c
When stashing, replace local file with stashed file in the file listing
2020-10-05 13:53:26 +02:00
Christian Rocha
66dae71253
Show spinner in stash view while stashing
2020-10-05 13:53:26 +02:00
Christian Rocha
6e36891857
If a file is currently mid-stash don't let the user stash it again
2020-10-05 13:53:26 +02:00
Christian Rocha
e01dc95d7d
Shorten status messages to 2 seconds
2020-10-05 13:53:26 +02:00
Christian Rocha
9db7c2e3ad
Make general error msg a struct for type safety
2020-10-05 13:53:26 +02:00
Christian Rocha
d9b1d335d4
Use "just now" rather than seconds for documents under 1 minute old
2020-10-05 13:53:26 +02:00
Christian Rocha
40724af7e1
Short circuit help view sooner if we can
2020-10-05 13:53:26 +02:00
Christian Rocha
2e16f2682e
Highlight stash choice in file listing footer
2020-10-05 13:53:26 +02:00
Christian Rocha
04b6089bd9
Stash documents from the stash view
2020-10-05 13:53:26 +02:00
Christian Rocha
651683cd21
Treat Markdown.CreatedAt as values per the updates in the charm lib
2020-10-05 13:53:26 +02:00
Christian Rocha
593d9f07e7
Stash local files from the pager
2020-10-05 13:53:26 +02:00
Christian Rocha
ddbacffc0b
Log IO errors if a logfile is set
2020-10-05 13:52:51 +02:00
Christian Rocha
c55bb23744
Minor comments and cleanup in the TUI
2020-10-05 13:52:36 +02:00
Christian Rocha
2ed9e71533
Bump Charm library + tiny associated code update
2020-10-05 13:52:35 +02:00
Christian Rocha
2a3fa6139c
Simplify messaging in (rare) state where there's absolutely nothing to show
2020-10-05 13:52:22 +02:00
Christian Rocha
2c3c5a8c87
Replace commented-out code about stash-related pagination with a note
2020-10-05 13:52:22 +02:00
Christian Rocha
60cee4a9a1
u/d also pages back/forth in the the file listing
2020-10-05 13:52:07 +02:00