summaryrefslogtreecommitdiffstats
path: root/src/ui
AgeCommit message (Collapse)Author
2021-09-30move logic out of tui_command_menu.rs into input.rsJeff Zhao
2021-09-30move input logic out of tui_worker_view and into show_workersJeff Zhao
2021-09-26code cleanupJeff Zhao
2021-09-26file previews no longer continuously spawn threads for existing previewsJeff Zhao
- file previews also honor max_preview_size option - removed unnecessary return from cursor_move - parent_cursor_move now works properly with preview loading - reloading now retain directory sizes
2021-09-25cargo fmtJeff Zhao
2021-09-25show_workers can close with custom key via --exit-key optionJeff Zhao
2021-09-04messages now have color supportJeff Zhao
2021-08-19add support for counting files lazilyJeff Zhao
- this should prevent excessive filesystem reading and increase performance on slower storage mediums such as network drives, mtpfs, etc.
2021-08-18add quit_to_cwd commandJeff Zhao
- this command lets users exit to the current directory more easily and more ergonomically
2021-06-27highlight invalid symlinks (#80)DLFW
* own display style for invalid symlinks * add link_invalid to default theme.toml * footer shows link target in link style
2021-06-25show file stem if file extension is too longJeff Zhao
2021-06-24fix preview script being constantly called on files with no previews availableJeff Zhao
2021-06-23code cleanupJeff Zhao
- directory loading is also on separate thread now
2021-06-23fix text preview formattingJeff Zhao
- don't store preview if exit code is 1
2021-06-22rudimentary file preview supportJeff Zhao
- this currently has only been tested with text files - no line formatting is done yet - only prints the preview as a single line - folder previews can now be pushed onto a separate thread if needed
2021-06-21fix not displaying directories without proper permissionsJeff Zhao
- e.g. /root does not appear because we can't count the number of items inside it - add a space padding to the file size/directory size
2021-06-21show size of directories (#76)DLFW
The middle column shows the size of directories in terms of contained files and sub-directories in the right label for each entry. Invalid symlinks and hidden files/dirs are included in the count.
2021-06-21fix: right label disappears (#79)DLFW
2021-06-21revert tui_dirlist_detailed to use MIN_LEFT_LABEL_WIDTHJeff Zhao
- add previewing loading trigger to mouse input as well
2021-06-21refactor previewing codeJeff Zhao
- event.rs is moved out of utils as its an integral part of the codebase - load_child.rs has been replaced with preview module - moved previewing logic inside run.rs instead of spreading it across multiple commands
2021-06-20fix file sizes not appearing when filename too longJeff Zhao
2021-06-20Merge branch 'main' into devJeff Zhao
2021-06-20fix menu not drawing correctlyJeff Zhao
2021-06-20Merge branch 'main' of github.com:kamiyaa/joshutoJeff Zhao
2021-06-20Fix selecting an entry by mouse click when show_borders=true (#77)DLFW
* encapsulate paging strategy This commit introduces one central place where the “paging” (first entry of a dir list shown in the UI) strategy is implemented. This decreases the risk for copy-paste mistakes, makes it easier to change it, and would make the implementation of a configurable paging strategy easier. * fix: correct new index on click for parent column And a little refactoring of the code that handles the left click. * fix: consider borders on left click When selecting a dir entry with a left click of the mouse, the borders were not considered, which led to 1. a faulty, constant y offset of 1 row 2. a faulty offset, which increased with each page scrolled down, due to a wrong calculation of the content height
2021-06-20fix border not being drawn correctly at rootJeff Zhao
2021-06-19fix crash if menu is larger than screenJeff Zhao
2021-06-19Show symlinked files and dirs correctly (#72)DLFW
* Treat symlinks as normal files and dirs * Dirs are recognized as dirs no matter is they are a symlink (correct devicon) * Permission flags shown in the footer are the permissions of the target in case a symlink is selected * Size of a symlinked file is the size of the target * File display to be fixed: symlink arrow now just overrides the file size, but both need to be shown one after the other * Correctly show symlink arrow and file size next This commit includes quite some refactoring. The shortening of the left and right part of an entry in a dir list and the shortening of the file name are separated into functions which don't directly write to the buffer but just return strings. That way, they get testable and further enhancements like different line modes should be easier to implement. * fix review findings * better file name truncation File names are only truncated at grapheme border, while the width is calculated on the actual nuber of terminal cells. * more adequate test organization * more code structure
2021-06-09cargo fmtJeff Zhao
2021-06-09change username color to red when rootJeff Zhao
2021-05-26fix files with long extensions to print out of boundsJeff Zhao
- fixes: Issue #59
2021-05-13Merge branch 'main' into devJeff Zhao
2021-05-13implement clippy fix: #[warn(clippy::single_match)]Prince
2021-05-13format code (cargo fmt)Prince
2021-05-13fix rendering of inner borders.Prince
2021-05-07add more info to io workJeff Zhao
2021-05-06move worker stuff to its own context structJeff Zhao
2021-05-06change pwd to cwdJeff Zhao
- fix issue where folder preview is not loaded upon tab_switch if the preview entry did not previously exist in history
2021-05-01make index public attributeJeff Zhao
- remove unused code and add #[allow(dead_code)]
2021-05-01add UTC to timestampJeff Zhao
2021-05-01move theming out of entry and into utilsJeff Zhao
2021-05-01remove methodsJeff Zhao
2021-04-30fix reload_dir_list and reload_dirlist inconsistencyJeff Zhao
2021-04-29rename some structs that start with Joshuto to AppJeff Zhao
- reduce sharing global variables between modules
2021-04-29rename CommandMapping to KeyMappingJeff Zhao
2021-04-29rework config structureJeff Zhao
- sort options is now nested under display options which holds a lot of previously general options - fix glob search not searching backwards
2021-04-25add support for glob file selectionJeff Zhao
- rename some command configurations
2021-04-24paste jobs now have an accurate number of items to pasteJeff Zhao
- before pasting, joshuto will traverse the paths to determine the total number of files that will need to be copied
2021-04-24cargo fmtJeff Zhao
2021-04-24show visual progress bar in worker viewJeff Zhao