1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 03:41:12 +00:00

feat: wiki-side-panel-menu

This commit is contained in:
liuhongbo
2024-06-15 14:24:32 +08:00
parent 7e1d98990f
commit 20401508b7
10 changed files with 87 additions and 11 deletions

View File

@@ -43,8 +43,21 @@ const getIconURL = (repoId, fileName) => {
return serviceURL + '/lib/' + repoId + '/file/_Internal/Wiki/Icon/' + fileName + '?raw=1';
};
const getCurrentPageConfig = (pages,pageId) => {
const getCurrentPageConfig = (pages, pageId) => {
return pages.filter(page => page.id === pageId)[0];
};
export { generatorBase64Code, generateUniqueId, isObjectNotEmpty, getIconURL, getCurrentPageConfig };
const getWikPageLink = (pageId) => {
const { origin, pathname } = window.location;
return `${origin}${pathname}?page_id=${pageId}`;
};
export {
generatorBase64Code,
generateUniqueId,
isObjectNotEmpty,
getIconURL,
getCurrentPageConfig,
getWikPageLink,
};