mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
Optimized code structure (#2430)
* combine utils file * modify file position
This commit is contained in:
committed by
Daniel Pan
parent
a2cc17778c
commit
c0d645962f
28
frontend/src/utils/constants.js
Normal file
28
frontend/src/utils/constants.js
Normal file
@@ -0,0 +1,28 @@
|
||||
export const dirPath = '/';
|
||||
export const gettext = window.gettext;
|
||||
|
||||
export const siteRoot = window.app.config.siteRoot;
|
||||
export const loginUrl = window.app.config.loginUrl;
|
||||
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;
|
||||
export const isPro = window.app.config.isPro === 'True';
|
||||
export const lang = window.app.config.lang;
|
||||
export const fileServerRoot = window.app.config.fileServerRoot;
|
||||
|
||||
// wiki
|
||||
export const slug = window.wiki ? window.wiki.config.slug : '';
|
||||
export const repoID = window.wiki ? window.wiki.config.repoId : '';
|
||||
export const serviceUrl = window.wiki ? window.wiki.config.serviceUrl : '';
|
||||
export const initialFilePath = window.wiki ? window.wiki.config.initial_file_path : '';
|
||||
export const permission = window.wiki ? window.wiki.config.permission === 'True' : '';
|
||||
|
||||
// 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 : '';
|
Reference in New Issue
Block a user