mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 23:38:37 +00:00
fix edit detail failed in image previewer (#7685)
Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
parent
da16173f35
commit
8eb1c65ae3
@ -21,11 +21,6 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
|
||||
return urlParams.has('view');
|
||||
}, []);
|
||||
|
||||
const isTag = useMemo(() => {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
return urlParams.has('tag');
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const fullPath = path.split('/').pop() === dirent?.name ? path : Utils.joinPath(path, dirent?.name || '');
|
||||
seafileAPI.getFileInfo(repoID, fullPath).then(res => {
|
||||
@ -37,7 +32,7 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
|
||||
}, [repoID, path, dirent]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isView || isTag) return;
|
||||
if (isView) return;
|
||||
|
||||
let isExistContext = true;
|
||||
if (!window.sfMetadataContext) {
|
||||
|
@ -73,7 +73,7 @@ const TagsEditor = ({ record, value, field, updateFileTags }) => {
|
||||
if (!showEditor) return null;
|
||||
const { width, bottom } = ref.current.getBoundingClientRect();
|
||||
const viewportHeight = window.innerHeight;
|
||||
const shouldPlaceBottom = (viewportHeight - bottom) > 300;
|
||||
const shouldPlaceBottom = (viewportHeight - bottom) > 400;
|
||||
|
||||
return (
|
||||
<Popover
|
||||
@ -84,15 +84,6 @@ const TagsEditor = ({ record, value, field, updateFileTags }) => {
|
||||
fade={false}
|
||||
className="sf-metadata-property-editor-popover sf-metadata-tags-property-editor-popover"
|
||||
boundariesElement="viewport"
|
||||
popperModifiers={{
|
||||
preventOverflow: {
|
||||
enabled: true,
|
||||
padding: 8
|
||||
},
|
||||
offset: {
|
||||
offset: '0, 8',
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Editor
|
||||
saveImmediately={true}
|
||||
|
Loading…
Reference in New Issue
Block a user