1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-28 03:10:45 +00:00

update local storage in detail (#7529)

Co-authored-by: -g <aries@Mac.local>
This commit is contained in:
Aries 2025-02-27 16:16:21 +08:00 committed by GitHub
parent bbd4f15cca
commit 2fb65580e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ const Collapse = ({ className, title, children, isShow = true }) => {
const toggleShowChildren = useCallback(() => {
setShowChildren(!showChildren);
window.sfMetadataContext.localStorage.setItem(CAPTURE_INFO_SHOW_KEY, !showChildren);
window.localStorage.setItem(CAPTURE_INFO_SHOW_KEY, !showChildren);
}, [showChildren]);
return (

View File

@ -66,7 +66,7 @@ const FileDetails = React.memo(({ repoID, dirent, path, direntDetail, isShowRepo
const tagsField = useMemo(() => ({ type: CellType.SINGLE_SELECT, name: gettext('Tags') }), []);
useEffect(() => {
const savedValue = window.sfMetadataContext.localStorage.getItem(CAPTURE_INFO_SHOW_KEY) || false;
const savedValue = window.localStorage.getItem(CAPTURE_INFO_SHOW_KEY) === 'true';
setCaptureInfoShow(savedValue);
}, []);