2018-09-30 04:19:30 +00:00
|
|
|
export const dirPath = '/';
|
|
|
|
export const gettext = window.gettext;
|
|
|
|
|
|
|
|
export const siteRoot = window.app.config.siteRoot;
|
2018-10-08 07:33:40 +00:00
|
|
|
export const loginUrl = window.app.config.loginUrl;
|
2018-09-30 04:19:30 +00:00
|
|
|
export const avatarInfo = window.app.config.avatarInfo;
|
|
|
|
export const logoPath = window.app.config.logoPath;
|
|
|
|
export const mediaUrl = window.app.config.mediaUrl;
|
|
|
|
export const siteTitle = window.app.config.siteTitle;
|
|
|
|
export const logoWidth = window.app.config.logoWidth;
|
|
|
|
export const logoHeight = window.app.config.logoHeight;
|
2018-10-09 02:56:59 +00:00
|
|
|
export const isPro = window.app.config.isPro === 'True';
|
2018-09-30 04:19:30 +00:00
|
|
|
export const lang = window.app.config.lang;
|
|
|
|
export const fileServerRoot = window.app.config.fileServerRoot;
|
|
|
|
|
2018-10-25 05:36:06 +00:00
|
|
|
//pageOptions
|
2018-12-04 08:52:27 +00:00
|
|
|
export const username = window.app.pageOptions.username;
|
2018-10-25 05:36:06 +00:00
|
|
|
export const canGenerateShareLink = window.app.pageOptions.canGenerateShareLink === 'True';
|
|
|
|
export const canGenerateUploadLink = window.app.pageOptions.canGenerateUploadLink === 'True';
|
2018-11-19 10:28:31 +00:00
|
|
|
export const canViewOrg = window.app.pageOptions.canViewOrg === 'True';
|
2018-10-25 05:36:06 +00:00
|
|
|
export const fileAuditEnabled = window.app.pageOptions.fileAuditEnabled ? true : false;
|
|
|
|
export const enableFileComment = window.app.pageOptions.enableFileComment ? true : false;
|
|
|
|
export const folderPermEnabled = window.app.pageOptions.folderPermEnabled === 'True';
|
2018-11-14 02:55:11 +00:00
|
|
|
export const enableUploadFolder = window.app.pageOptions.enableUploadFolder === 'True';
|
|
|
|
export const enableResumableFileUpload = window.app.pageOptions.enableResumableFileUpload === 'True';
|
2018-11-30 09:18:41 +00:00
|
|
|
export const storages = window.app.pageOptions.storages; // storage backends
|
|
|
|
export const enableRepoSnapshotLabel = window.app.pageOptions.enableRepoSnapshotLabel;
|
2018-12-06 03:28:16 +00:00
|
|
|
export const shareLinkExpireDaysMin = window.app.pageOptions.shareLinkExpireDaysMin;
|
|
|
|
export const shareLinkExpireDaysMax = window.app.pageOptions.shareLinkExpireDaysMax;
|
2018-12-10 09:59:26 +00:00
|
|
|
export const maxFileName = window.app.pageOptions.maxFileName;
|
2018-11-14 02:55:11 +00:00
|
|
|
|
2018-09-30 04:19:30 +00:00
|
|
|
// wiki
|
|
|
|
export const slug = window.wiki ? window.wiki.config.slug : '';
|
|
|
|
export const repoID = window.wiki ? window.wiki.config.repoId : '';
|
2018-11-22 03:26:00 +00:00
|
|
|
export const initialPath = window.wiki ? window.wiki.config.initial_path : '';
|
2018-09-30 04:19:30 +00:00
|
|
|
export const permission = window.wiki ? window.wiki.config.permission === 'True' : '';
|
2018-11-22 03:26:00 +00:00
|
|
|
export const isDir = window.wiki ? window.wiki.config.isDir : '';
|
2018-09-30 04:19:30 +00:00
|
|
|
|
|
|
|
// file history
|
|
|
|
export const PER_PAGE = 25;
|
|
|
|
export const historyRepoID = window.fileHistory ? window.fileHistory.pageOptions.repoID : '';
|
|
|
|
export const repoName = window.fileHistory ? window.fileHistory.pageOptions.repoName : '';
|
|
|
|
export const filePath = window.fileHistory ? window.fileHistory.pageOptions.filePath : '';
|
|
|
|
export const fileName = window.fileHistory ? window.fileHistory.pageOptions.fileName : '';
|
2018-10-15 07:51:29 +00:00
|
|
|
|
|
|
|
// Draft review
|
|
|
|
export const draftFilePath = window.draftReview ? window.draftReview.config.draftFilePath: '';
|
|
|
|
export const draftOriginFilePath = window.draftReview ? window.draftReview.config.draftOriginFilePath: '';
|
|
|
|
export const draftOriginRepoID = window.draftReview ? window.draftReview.config.draftOriginRepoID: '';
|
|
|
|
export const draftFileName = window.draftReview ? window.draftReview.config.draftFileName: '';
|
|
|
|
export const reviewID = window.draftReview ? window.draftReview.config.reviewID : '';
|
2018-10-30 03:07:01 +00:00
|
|
|
export const draftID = window.draftReview ? window.draftReview.config.draftID : '';
|
2018-10-15 07:51:29 +00:00
|
|
|
export const opStatus = window.draftReview ? window.draftReview.config.opStatus : '';
|
2018-11-05 02:33:33 +00:00
|
|
|
export const reviewPerm = window.draftReview ? window.draftReview.config.perm : '';
|
2018-10-15 07:51:29 +00:00
|
|
|
export const publishFileVersion = window.draftReview ? window.draftReview.config.publishFileVersion : '';
|
|
|
|
export const originFileVersion = window.draftReview ? window.draftReview.config.originFileVersion : '';
|
2018-11-09 09:32:36 +00:00
|
|
|
export const author = window.draftReview ? window.draftReview.config.author : '';
|
|
|
|
export const authorAvatar = window.draftReview ? window.draftReview.config.authorAvatar : '';
|