1
0
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:
Aries 2025-03-29 17:27:24 +08:00 committed by GitHub
parent da16173f35
commit 8eb1c65ae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 16 deletions

View File

@ -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) {

View File

@ -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}