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:
CorrectRoadH
2023-03-26 19:32:53 +08:00
committed by GitHub
parent e84d562146
commit 7d89fcc892
9 changed files with 279 additions and 110 deletions

View 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;