Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/open media history version #340

Merged
merged 3 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion products/ASC.Files/Client/src/Files.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const SETTINGS_URL = combineUrl(PROXY_HOMEPAGE_URL, "/settings/:setting");
const HISTORY_URL = combineUrl(PROXY_HOMEPAGE_URL, "/:fileId/history");
const PRIVATE_ROOMS_URL = combineUrl(PROXY_HOMEPAGE_URL, "/private");
const FILTER_URL = combineUrl(PROXY_HOMEPAGE_URL, "/filter");
const MEDIA_VIEW_URL = combineUrl(PROXY_HOMEPAGE_URL, "/view");
const MEDIA_VIEW_URL = combineUrl(PROXY_HOMEPAGE_URL, "/#preview");

if (!window.AppServer) {
window.AppServer = {};
Expand Down
6 changes: 3 additions & 3 deletions products/ASC.Files/Client/src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class PureHome extends React.Component {
const match = window.location.pathname.match(reg);
let filterObj = null;

if (window.location.pathname.indexOf("/files/view") > 1) {
const pathname = window.location.pathname;
const fileId = pathname.slice(pathname.indexOf("view") + 5);
if (window.location.href.indexOf("/files/#preview") > 1) {
const pathname = window.location.href;
const fileId = pathname.slice(pathname.indexOf("#preview") + 9);

getFileInfo(fileId)
.then((data) => {
Expand Down
6 changes: 5 additions & 1 deletion products/ASC.Files/Client/src/store/FilesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,11 @@ class FilesStore {
);

const previewUrl = canOpenPlayer
? combineUrl(AppServerConfig.proxyURL, config.homepage, `/view/${id}`)
? combineUrl(
AppServerConfig.proxyURL,
config.homepage,
`/#preview/${id}`
)
: null;
const contextOptions = this.getFilesContextOptions(item, canOpenPlayer);

Expand Down