mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
optimize code (#5469)
This commit is contained in:
@@ -8,7 +8,7 @@ import { Utils } from './utils/utils';
|
||||
|
||||
const { serviceURL, siteRoot } = window.app.config;
|
||||
const { username, filePerm } = window.app.pageOptions;
|
||||
const { repoID, filePath, fileName, rawPath } = window.shared.pageOptions;
|
||||
const { repoID, filePath, fileName, rawPath, assetsUrl } = window.shared.pageOptions;
|
||||
|
||||
window.seafile = {
|
||||
repoID,
|
||||
@@ -20,6 +20,7 @@ window.seafile = {
|
||||
siteRoot,
|
||||
docPerm: filePerm,
|
||||
historyURL: Utils.generateHistoryURL(siteRoot, repoID, filePath),
|
||||
assetsUrl,
|
||||
};
|
||||
|
||||
ReactDom.render(
|
||||
|
@@ -10,7 +10,7 @@ const { serviceURL, avatarURL, siteRoot } = window.app.config;
|
||||
const { username, name } = window.app.userInfo;
|
||||
const {
|
||||
repoID, repoName, parentDir, filePerm,
|
||||
docPath, docName, docUuid, seadocAccessToken, seadocServerUrl
|
||||
docPath, docName, docUuid, seadocAccessToken, seadocServerUrl, assetsUrl
|
||||
} = window.app.pageOptions;
|
||||
|
||||
window.seafile = {
|
||||
@@ -29,6 +29,7 @@ window.seafile = {
|
||||
docPerm: filePerm,
|
||||
historyURL: Utils.generateHistoryURL(siteRoot, repoID, docPath),
|
||||
parentFolderURL: `${siteRoot}library/${repoID}/${Utils.encodePath(repoName + parentDir)}`,
|
||||
assetsUrl,
|
||||
};
|
||||
|
||||
ReactDom.render(
|
||||
|
Reference in New Issue
Block a user