diff --git a/app/assets/javascripts/components/NotesListOptionsMenu.tsx b/app/assets/javascripts/components/NotesListOptionsMenu.tsx index 2976ed275..943911140 100644 --- a/app/assets/javascripts/components/NotesListOptionsMenu.tsx +++ b/app/assets/javascripts/components/NotesListOptionsMenu.tsx @@ -16,10 +16,6 @@ type Props = { export const NotesListOptionsMenu: FunctionComponent = observer( ({ closeDisplayOptionsMenu, closeOnBlur, application, isOpen }) => { - const menuClassName = - 'sn-dropdown sn-dropdown--animated min-w-70 overflow-y-auto \ -border-1 border-solid border-main text-sm z-index-dropdown-menu \ -flex flex-col py-2 top-full bottom-0 left-2 absolute'; const [sortBy, setSortBy] = useState(() => application.getPreference(PrefKey.SortNotesBy, CollectionSort.CreatedAt) ); @@ -117,154 +113,155 @@ flex flex-col py-2 top-full bottom-0 left-2 absolute'; application.setPreference(PrefKey.NotesHideEditorIcon, !hideEditorIcon); }; - const menuRef = useRef(null); - return ( -
- +
+ Sort by +
+ -
- Sort by +
+ Date modified + {sortBy === CollectionSort.UpdatedAt ? ( + sortReverse ? ( + + ) : ( + + ) + ) : null}
- -
- Date modified - {sortBy === CollectionSort.UpdatedAt ? ( - sortReverse ? ( - - ) : ( - - ) - ) : null} -
-
- -
- Creation date - {sortBy === CollectionSort.CreatedAt ? ( - sortReverse ? ( - - ) : ( - - ) - ) : null} -
-
- -
- Title - {sortBy === CollectionSort.Title ? ( - sortReverse ? ( - - ) : ( - - ) - ) : null} -
-
- -
- View + + +
+ Creation date + {sortBy === CollectionSort.CreatedAt ? ( + sortReverse ? ( + + ) : ( + + ) + ) : null}
- -
Show note preview
-
- - Show date - - - Show tags - - - Show editor icon - -
-
- Other + + +
+ Title + {sortBy === CollectionSort.Title ? ( + sortReverse ? ( + + ) : ( + + ) + ) : null}
- - Show pinned notes - - - Show protected notes - - - Show archived notes - - - Show trashed notes - -
-
+ + +
+ View +
+ +
Show note preview
+
+ + Show date + + + Show tags + + + Show editor icon + +
+
+ Other +
+ + Show pinned notes + + + Show protected notes + + + Show archived notes + + + Show trashed notes + + ); } );