mirror of
https://github.com/haiwen/seahub.git
synced 2025-05-10 00:47:19 +00:00
update
This commit is contained in:
parent
75aa1173e9
commit
1d0b007958
frontend/src/pages/wiki2
seahub/api2/endpoints
@ -131,7 +131,6 @@ class MainPanel extends Component {
|
||||
<WikiTopNav
|
||||
config={config}
|
||||
currentPageId={this.props.currentPageId}
|
||||
currentPageConfig={currentPageConfig}
|
||||
currentPageLocked={currentPageLocked}
|
||||
setCurrentPage={this.props.setCurrentPage}
|
||||
toggleFreezeStatus={this.toggleFreezeStatus}
|
||||
|
@ -9,7 +9,6 @@ import { getPaths } from '../utils/index';
|
||||
import './index.css';
|
||||
|
||||
function WikiTopNav({ config, currentPageId, setCurrentPage, toggleFreezeStatus, currentPageLocked }) {
|
||||
// handleLockClick
|
||||
const { navigation, pages } = config;
|
||||
const paths = getPaths(navigation, currentPageId, pages);
|
||||
const { permission } = window.wiki.config;
|
||||
|
@ -47,11 +47,6 @@ const getCurrentPageConfig = (pages, pageId) => {
|
||||
return pages.filter(page => page.id === pageId)[0];
|
||||
};
|
||||
|
||||
const getCurrentPageLocked = (pages, pageId) => {
|
||||
const page = pages.filter(page => page.id === pageId)[0];
|
||||
return page ? page.locked : false;
|
||||
};
|
||||
|
||||
const getWikPageLink = (pageId) => {
|
||||
let { origin, pathname } = window.location;
|
||||
let pathArr = pathname.split('/');
|
||||
@ -146,7 +141,6 @@ export {
|
||||
isObjectNotEmpty,
|
||||
getIconURL,
|
||||
getCurrentPageConfig,
|
||||
getCurrentPageLocked,
|
||||
getWikPageLink,
|
||||
throttle,
|
||||
getPaths,
|
||||
|
@ -19,6 +19,7 @@ const propTypes = {
|
||||
const PageTitle = ({ isUpdateBySide, currentPageConfig, onUpdatePage }) => {
|
||||
const [isShowController, setIsShowController] = useState(false);
|
||||
const isDesktop = Utils.isDesktop();
|
||||
|
||||
const onMouseEnter = useCallback(() => {
|
||||
setIsShowController(true);
|
||||
}, []);
|
||||
|
@ -40,10 +40,10 @@ from seahub.utils import is_org_context, get_user_repos, is_pro_version, is_vali
|
||||
from seahub.views import check_folder_permission
|
||||
from seahub.base.templatetags.seahub_tags import email2nickname
|
||||
from seahub.utils.file_op import check_file_lock
|
||||
from seahub.utils.repo import get_repo_owner, is_valid_repo_id_format, is_group_repo_staff, is_repo_owner, get_locked_files_by_dir
|
||||
from seahub.utils.repo import get_repo_owner, is_valid_repo_id_format, is_group_repo_staff, is_repo_owner
|
||||
from seahub.seadoc.utils import get_seadoc_file_uuid, gen_seadoc_access_token, copy_sdoc_images_with_sdoc_uuid
|
||||
from seahub.settings import ENABLE_STORAGE_CLASSES, STORAGE_CLASS_MAPPING_POLICY, \
|
||||
ENCRYPTED_LIBRARY_VERSION, FILE_LOCK_EXPIRATION_DAYS
|
||||
ENCRYPTED_LIBRARY_VERSION
|
||||
from seahub.utils.timeutils import timestamp_to_isoformat_timestr
|
||||
from seahub.utils.ccnet_db import CcnetDB
|
||||
from seahub.tags.models import FileUUIDMap
|
||||
@ -459,6 +459,7 @@ class Wiki2ConfigView(APIView):
|
||||
|
||||
wiki = wiki.to_dict()
|
||||
wiki_config = get_wiki_config(repo.repo_id, request.user.username)
|
||||
|
||||
wiki['wiki_config'] = wiki_config
|
||||
|
||||
return Response({'wiki': wiki})
|
||||
|
Loading…
Reference in New Issue
Block a user