add keybind to sort table
lots of refactoring to do so files on disk, and files in trash interface'd so table is agnostic model keeps track of the files now, to facilitate sorting, and updates its own rows accordingly
This commit is contained in:
parent
dff6c62e56
commit
6af87e4d9d
7 changed files with 448 additions and 394 deletions
28
internal/tables/modes/modes.go
Normal file
28
internal/tables/modes/modes.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package modes
|
||||
|
||||
type Mode int
|
||||
|
||||
const (
|
||||
Trashing Mode = iota + 1
|
||||
Listing
|
||||
Restoring
|
||||
Cleaning
|
||||
Interactive
|
||||
)
|
||||
|
||||
func (m Mode) String() string {
|
||||
switch m {
|
||||
case Trashing:
|
||||
return "Trashing"
|
||||
case Listing:
|
||||
return "Listing"
|
||||
case Restoring:
|
||||
return "Restoring"
|
||||
case Cleaning:
|
||||
return "Cleaning"
|
||||
case Interactive:
|
||||
return "Interactive"
|
||||
default:
|
||||
return "0"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue