From 9c35a2dfa63a870242f34b3e6c7fd7772229c85e Mon Sep 17 00:00:00 2001 From: Joe McGrath Date: Wed, 27 Apr 2022 18:18:49 +0900 Subject: [PATCH] feat(files): recent sidebar functionality --- components/ui/SimpleList/SimpleList.html | 20 ++++---- components/ui/SimpleList/SimpleList.less | 42 +++++---------- components/ui/SimpleList/SimpleList.vue | 65 +++++++++++++++++------- components/views/files/aside/Aside.html | 8 +-- components/views/files/aside/Aside.vue | 48 ++++++++++++++++- libraries/Enums/enums.ts | 8 ++- libraries/Enums/types/fileSort.ts | 6 --- libraries/Enums/types/files.ts | 23 +++++++++ libraries/Files/FilSystem.ts | 58 ++++++++++++--------- libraries/Files/test/FilSystem.test.ts | 2 +- locales/en-US.js | 6 +++ pages/files/browse/Browse.html | 12 ++++- pages/files/browse/index.vue | 14 ++++- plugins/thirdparty/filesize.ts | 8 ++- types/ui/sidebar.d.ts | 13 ++--- 15 files changed, 229 insertions(+), 104 deletions(-) delete mode 100644 libraries/Enums/types/fileSort.ts create mode 100644 libraries/Enums/types/files.ts diff --git a/components/ui/SimpleList/SimpleList.html b/components/ui/SimpleList/SimpleList.html index a458aa8e32..263cabaf90 100644 --- a/components/ui/SimpleList/SimpleList.html +++ b/components/ui/SimpleList/SimpleList.html @@ -1,10 +1,10 @@ -
- -
+ diff --git a/components/ui/SimpleList/SimpleList.less b/components/ui/SimpleList/SimpleList.less index 7ec8ae2943..6d1788cd25 100644 --- a/components/ui/SimpleList/SimpleList.less +++ b/components/ui/SimpleList/SimpleList.less @@ -1,33 +1,19 @@ -.simple-menu { - .menu-icon { - width: 15px; - margin-right: @light-spacing; - } - - .active { - &:extend(.background-primary); - &:extend(.font-secondary); - border-radius: @corner-rounding-smaller; +li { + cursor: pointer; + padding: @xlight-spacing @light-spacing; + margin: 0.2rem -@light-spacing; + display: inline-flex; + align-items: center; + border-radius: @corner-rounding-smaller; + &:extend(.full-width); + -webkit-user-select: none; + user-select: none; - &:hover { - &:extend(.background-primary); - } + &:hover { + background: @foreground; } - li { - cursor: pointer; - padding: (@light-spacing / 2) @light-spacing; - margin: 0.2rem -@light-spacing; - display: inline-flex; - align-items: center; - border-radius: @corner-rounding-smaller; - &:extend(.full-width); - - .dynamic-icon { - margin-right: @light-spacing; - } - &:hover { - background: @foreground; - } + svg { + margin-right: @light-spacing; } } diff --git a/components/ui/SimpleList/SimpleList.vue b/components/ui/SimpleList/SimpleList.vue index 1226bbd20f..f743a02357 100644 --- a/components/ui/SimpleList/SimpleList.vue +++ b/components/ui/SimpleList/SimpleList.vue @@ -2,31 +2,62 @@ diff --git a/components/views/files/aside/Aside.html b/components/views/files/aside/Aside.html index ffc4d2b78b..098a16d0ec 100644 --- a/components/views/files/aside/Aside.html +++ b/components/views/files/aside/Aside.html @@ -17,14 +17,10 @@
- +
- +
diff --git a/components/views/files/aside/Aside.vue b/components/views/files/aside/Aside.vue index 61b654b125..18bf79e40c 100644 --- a/components/views/files/aside/Aside.vue +++ b/components/views/files/aside/Aside.vue @@ -1,8 +1,16 @@