Web:Client: fix close media
This commit is contained in:
parent
a4f8687af9
commit
197e732e5f
@ -181,6 +181,8 @@ const FilesMediaViewer = (props) => {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(url);
|
||||
|
||||
const targetFile = files.find((item) => item.id === currentMediaFileId);
|
||||
if (targetFile) setBufferSelection(targetFile);
|
||||
|
||||
|
@ -401,7 +401,9 @@ class ContextOptionsStore {
|
||||
const itemId = typeof fileId !== "object" ? fileId : item.id;
|
||||
this.mediaViewerDataStore.setMediaViewerData({ visible: true, id: itemId });
|
||||
// localStorage.setItem("isFirstUrl", window.location.href);
|
||||
this.mediaViewerDataStore.saveFirstUrl(window.location.href);
|
||||
this.mediaViewerDataStore.saveFirstUrl(
|
||||
`${window.DocSpace.location.pathname}${window.DocSpace.location.search}`
|
||||
);
|
||||
this.mediaViewerDataStore.changeUrl(itemId);
|
||||
};
|
||||
|
||||
|
@ -254,14 +254,10 @@ class FilesActionStore {
|
||||
activeFiles,
|
||||
activeFolders,
|
||||
} = this.filesStore;
|
||||
const {
|
||||
secondaryProgressDataStore,
|
||||
clearActiveOperations,
|
||||
} = this.uploadDataStore;
|
||||
const {
|
||||
setSecondaryProgressBarData,
|
||||
clearSecondaryProgressData,
|
||||
} = secondaryProgressDataStore;
|
||||
const { secondaryProgressDataStore, clearActiveOperations } =
|
||||
this.uploadDataStore;
|
||||
const { setSecondaryProgressBarData, clearSecondaryProgressData } =
|
||||
secondaryProgressDataStore;
|
||||
const { withPaging } = this.authStore.settingsStore;
|
||||
|
||||
const selection = newSelection
|
||||
@ -1039,15 +1035,11 @@ class FilesActionStore {
|
||||
const { roomsFolder, isRoomsFolder, archiveRoomsId, myRoomsId } =
|
||||
this.treeFoldersStore;
|
||||
|
||||
const {
|
||||
secondaryProgressDataStore,
|
||||
clearActiveOperations,
|
||||
} = this.uploadDataStore;
|
||||
const { secondaryProgressDataStore, clearActiveOperations } =
|
||||
this.uploadDataStore;
|
||||
|
||||
const {
|
||||
setSecondaryProgressBarData,
|
||||
clearSecondaryProgressData,
|
||||
} = secondaryProgressDataStore;
|
||||
const { setSecondaryProgressBarData, clearSecondaryProgressData } =
|
||||
secondaryProgressDataStore;
|
||||
|
||||
if (!myRoomsId || !archiveRoomsId) {
|
||||
console.error("Default categories not found");
|
||||
@ -2010,7 +2002,10 @@ class FilesActionStore {
|
||||
|
||||
if (isMediaOrImage) {
|
||||
// localStorage.setItem("isFirstUrl", window.location.href);
|
||||
this.mediaViewerDataStore.saveFirstUrl(window.location.href);
|
||||
|
||||
this.mediaViewerDataStore.saveFirstUrl(
|
||||
`${window.DocSpace.location.pathname}${window.DocSpace.location.search}`
|
||||
);
|
||||
setMediaViewerData({ visible: true, id });
|
||||
|
||||
const url = "/products/files/#preview/" + id;
|
||||
|
Loading…
Reference in New Issue
Block a user