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