mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add list style for resource dashboard (#1389)
* stash: file upload * feat: add style button * feat: add style of list * feat: add checkbox for list * feat: support file upload by drag * feat: beautify the ui * feat: support file upload * stash * fix: the resource is incorrectly when upload multiple files * feat: beautify the ui * chore: reduce unused line * stash * chore: deleted unused line * chore: deleted unused line * chore * chore: change the function declare * feat: support to prompt file is too large * feat:drop prompt to cover all element * fix: eslint * fix: the name of i18n * chore: refactor the import deps * feat: beautify the ui * feat: support the style of button * feat: beautify the switch ui * chore: refactor the component * chore: refactor the resource item dropdown * feat: use memo to reduce unused computing in drop * feat: use memo to reduce the calc of resource list * chore:change name * Update web/src/locales/en.json Co-authored-by: boojack <stevenlgtm@gmail.com> * chore: the import of deps * fix: the window size of fecting data * feat: support to save the state of style * remove pnpm-lock * merge main * chore: simpify the statement * fix: delete conflict marker * feat: add i18n for select * feat:support dark mode * eslint * feat: delete the storage of resource style --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
17
web/src/hooks/useListStyle.ts
Normal file
17
web/src/hooks/useListStyle.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { useState } from "react";
|
||||
|
||||
const useListStyle = () => {
|
||||
// true is Table Style, false is Grid Style
|
||||
const [listStyle, setListStyle] = useState(false);
|
||||
|
||||
return {
|
||||
listStyle: listStyle,
|
||||
setToTableStyle: () => {
|
||||
setListStyle(true);
|
||||
},
|
||||
setToGridStyle: () => {
|
||||
setListStyle(false);
|
||||
},
|
||||
};
|
||||
};
|
||||
export default useListStyle;
|
Reference in New Issue
Block a user