+
Draft module
The current module is no longer supported
diff --git a/frontend/src/pages/lib-content-view/lib-content-container.js b/frontend/src/pages/lib-content-view/lib-content-container.js
index 231889701e..3bf3619381 100644
--- a/frontend/src/pages/lib-content-view/lib-content-container.js
+++ b/frontend/src/pages/lib-content-view/lib-content-container.js
@@ -187,67 +187,63 @@ class LibContentContainer extends React.Component {
}
{!this.props.pathExist && this.errMessage}
diff --git a/frontend/src/pages/wiki/main-panel.js b/frontend/src/pages/wiki/main-panel.js
index fb2af8cc2b..26dae5fc17 100644
--- a/frontend/src/pages/wiki/main-panel.js
+++ b/frontend/src/pages/wiki/main-panel.js
@@ -104,7 +104,7 @@ class MainPanel extends Component {
{this.props.permission == 'rw' && (
Utils.isDesktop() ?
:
-
+
)}
diff --git a/frontend/src/pages/wiki/wiki.css b/frontend/src/pages/wiki/wiki.css
index 09498a065f..3acb9f37ac 100644
--- a/frontend/src/pages/wiki/wiki.css
+++ b/frontend/src/pages/wiki/wiki.css
@@ -138,4 +138,7 @@ img[src=""] {
.wiki-page-container .article {
padding: 0 !important;
}
+ .wiki-main-panel .mobile-toolbar-icon {
+ font-size: 1.1rem;
+ }
}
diff --git a/frontend/src/pages/wiki2/main-panel.js b/frontend/src/pages/wiki2/main-panel.js
index 8d617f37f2..9503cebc62 100644
--- a/frontend/src/pages/wiki2/main-panel.js
+++ b/frontend/src/pages/wiki2/main-panel.js
@@ -8,7 +8,6 @@ import { Utils } from '../../utils/utils';
import Account from '../../components/common/account';
import WikiTopNav from './top-nav';
import { getCurrentPageConfig } from './utils';
-import WikiExternalOperations from './wiki-external-operations';
const propTypes = {
path: PropTypes.string.isRequired,
@@ -67,7 +66,7 @@ class MainPanel extends Component {
};
render() {
- const { permission, pathExist, isDataLoading, isViewFile, config, onAddWikiPage } = this.props;
+ const { permission, pathExist, isDataLoading, isViewFile, config } = this.props;
const { currentPageConfig = {}, } = this.state;
const isViewingFile = pathExist && !isDataLoading && isViewFile;
const isReadOnly = !(permission === 'rw');
diff --git a/frontend/src/pages/wiki2/view-structure/folders/folder-operation-dropdownmenu.js b/frontend/src/pages/wiki2/view-structure/folders/folder-operation-dropdownmenu.js
index 27fa07bb92..16d76ae5be 100644
--- a/frontend/src/pages/wiki2/view-structure/folders/folder-operation-dropdownmenu.js
+++ b/frontend/src/pages/wiki2/view-structure/folders/folder-operation-dropdownmenu.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
-// import DeleteTip from '@/common/delete-tip';
import { gettext } from '../../../../utils/constants';
import Icon from '../../../../components/icon';
@@ -20,10 +19,7 @@ export default class FolderOperationDropdownMenu extends Component {
super(props);
this.state = {
isMenuShow: false,
- showTip: false,
};
- // this.isDesktop = checkDesktop();
- this.position = {};
}
onDropdownToggle = (e) => {
@@ -43,26 +39,6 @@ export default class FolderOperationDropdownMenu extends Component {
this.props.onDeleteFolder(this.props.folderId);
};
- // onClickDelete = (e) => {
- // if (this.isDesktop) {
- // e.stopPropagation();
- // const { top, left } = this.iconRef.getBoundingClientRect();
- // this.position = {
- // top: top,
- // left: left,
- // };
- // setTimeout(() => {
- // this.setState({ showTip: true });
- // }, 100);
- // } else {
- // this.onDeleteFolder(e);
- // }
- // };
-
- closeTip = () => {
- this.setState({ showTip: false });
- };
-
render() {
return (
<>
@@ -79,7 +55,6 @@ export default class FolderOperationDropdownMenu extends Component {
flip={false}
modifiers={{ preventOverflow: { boundariesElement: document.body } }}
positionFixed={true}
- style={{ zIndex: 1051 }}
>
@@ -89,23 +64,12 @@ export default class FolderOperationDropdownMenu extends Component {
{gettext('Modify name')}
-
+
{gettext('Delete folder')}
- {/* {this.isDesktop && this.state.showTip &&
-
- } */}
>
);
}
diff --git a/frontend/src/pages/wiki2/view-structure/views/drop-target-top-view.js b/frontend/src/pages/wiki2/view-structure/views/drop-target-top-view.js
deleted file mode 100644
index 2540445556..0000000000
--- a/frontend/src/pages/wiki2/view-structure/views/drop-target-top-view.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import React from 'react';
-import { DropTarget } from 'react-dnd';
-import PropTypes from 'prop-types';
-
-const DropTargetTopView = (Placeholder) => class extends React.Component {
-
- static propTypes = {
- connectDropTarget: PropTypes.func.isRequired,
- isOver: PropTypes.bool,
- canDrop: PropTypes.bool,
- draggedPage: PropTypes.object,
- targetFolderId: PropTypes.string,
- targetViewId: PropTypes.string,
- onMoveView: PropTypes.func,
- };
-
- render() {
- const { connectDropTarget, isOver, canDrop, draggedPage } = this.props;
- const { mode } = draggedPage || {};
- if (mode !== 'view') {
- return null;
- }
- const style = {
- position: 'absolute',
- top: 0,
- width: '100%',
- zIndex: canDrop ? 1 : -1,
- };
- return connectDropTarget(
-
-
- {isOver && canDrop &&
}
-
- );
- }
-};
-
-const target = {
- drop(props, monitor) {
- const sourceRow = monitor.getItem();
- if (sourceRow.mode !== 'view') {
- return;
- }
- const { targetFolderId, targetViewId } = props;
- const sourceFolderId = sourceRow.folderId;
- const draggedViewId = sourceRow.data.id;
- if (draggedViewId !== targetViewId) {
- props.onMoveView({
- moved_view_id: draggedViewId,
- target_view_id: targetViewId,
- source_view_folder_id: sourceFolderId,
- target_view_folder_id: targetFolderId,
- move_position: 'move_above'
- });
- }
- }
-};
-
-function collect(connect, monitor) {
- return {
- connectDropTarget: connect.dropTarget(),
- isOver: monitor.isOver(),
- canDrop: monitor.canDrop(),
- draggedPage: monitor.getItem(),
- };
-}
-
-class Placeholder extends React.Component {
-
- static propTypes = {
- key: PropTypes.string,
- };
-
- render() {
- return (
-
- );
- }
-}
-
-export default DropTarget('ViewStructure', target, collect)(DropTargetTopView(Placeholder));
diff --git a/frontend/src/pages/wiki2/view-structure/views/page-dropdownmenu.js b/frontend/src/pages/wiki2/view-structure/views/page-dropdownmenu.js
index 30fa0c8790..e3ceebdf37 100644
--- a/frontend/src/pages/wiki2/view-structure/views/page-dropdownmenu.js
+++ b/frontend/src/pages/wiki2/view-structure/views/page-dropdownmenu.js
@@ -141,7 +141,6 @@ export default class PageDropdownMenu extends Component {
flip={false}
modifiers={{ preventOverflow: { boundariesElement: document.body } }}
positionFixed={true}
- style={{ zIndex: 1051 }}
>
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-left-bar-dialog.css b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-left-bar-dialog.css
deleted file mode 100644
index bd13973df4..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-left-bar-dialog.css
+++ /dev/null
@@ -1,128 +0,0 @@
-.app-settings-dialog .nav .nav-item {
- padding: 0;
-}
-
-.app-settings-dialog .nav .nav-item .nav-link {
- padding: 0.5rem 0;
- font-weight: normal;
- transition: none;
- width: 100%;
-}
-
-.app-settings-dialog .nav .nav-item .nav-link.active {
- color: #ff8000;
- text-decoration: none;
- border-bottom: 0.125rem solid #ff8000;
-}
-
-.app-settings-dialog .nav-pills .nav-item .nav-link {
- padding: 0.3125rem 1rem 0.3125rem 8px;
-}
-
-.app-settings-dialog .nav-pills .nav-item .nav-link:hover {
- background-color: #f5f5f5;
-}
-
-.app-settings-dialog .nav-pills .nav-item .nav-link.active {
- background-color: #ff8000;
- color: #fff;
- border: none;
-}
-
-.app-settings-dialog .ellipsis {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.app-settings-dialog {
- max-width: 800px;
- height: calc(100% - 56px);
-}
-
-.app-settings-dialog .modal-content {
- height: 100%;
-}
-
-.app-settings-dialog .app-settings-dialog-content {
- padding: 0;
- min-height: 27rem;
- display: flex;
- flex-direction: row;
- overflow: hidden;
-}
-
-.app-settings-dialog-content .app-settings-dialog-side {
- display: flex;
- flex: 0 0 25%;
- padding: 12px 8px;
- border-right: 1px solid #eee;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main {
- display: flex;
- flex: 0 0 75%;
- padding: 12px 8px;
- overflow: auto;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main .tab-content {
- flex: 1;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main .tab-pane {
- height: 100%;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main .no-search-result {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-top: 100px;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main .no-search-result span {
- color: #aaa;
- margin-top: 10px;
-}
-
-.app-settings-dialog-content .app-settings-dialog-main .search-text-clear {
- line-height: 38px;
- height: 38px;
- margin-right: 5px;
-}
-
-.app-setting-dialog-icon {
- width: 100%;
- margin: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
-}
-
-.app-setting-dialog-icon img {
- max-height: 128px;
-}
-
-.app-setting-dialog-icon-description {
- color: #999;
- font-size: 13px;
-}
-
-.app-setting-dialog-name {
- padding: 10px;
-}
-
-.app-setting-dialog-name .rename-area-input {
- width: 85%;
-}
-
-.app-setting-dialog-name .rename-area-submit {
- width: 15%;
-}
-
-.tip {
- color: #808080;
- margin-bottom: 1rem;
-}
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-custom-icon.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-custom-icon.js
deleted file mode 100644
index f678b1d334..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-custom-icon.js
+++ /dev/null
@@ -1,98 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { Button } from 'reactstrap';
-import { seafileAPI } from '../../../../utils/seafile-api';
-import { gettext } from '../../../../utils/constants';
-import { getIconURL } from '../../utils';
-
-class AppSettingsDialogCustomIcon extends React.Component {
-
- constructor(props) {
- super(props);
- this.state = {
- iconName: this.props.config.wiki_icon,
- };
- this.fileInput = React.createRef();
- }
-
- openFileInput = () => {
- this.fileInput.current.click();
- };
-
- uploadFile = () => {
- if (!this.fileInput.current.files.length) {
- return;
- }
- const file = this.fileInput.current.files[0];
- this.uploadLocalFile(file).then((iconName) => {
- let wikiConfig = Object.assign({}, this.props.config, {
- wiki_icon: iconName,
- });
- this.props.updateConfig(wikiConfig);
- this.props.onToggle();
- this.setState({
- iconName: iconName,
- });
- });
- };
-
- uploadLocalFile = (imageFile) => {
- let repoID = this.props.repoId;
- const name = 'wiki-icon-image-' + Date.now().toString() + '.png';
- return (
- seafileAPI.getFileServerUploadLink(repoID, '/').then((res) => {
- const uploadLink = res.data + '?ret-json=1';
- const newFile = new File([imageFile], name, {type: imageFile.type});
- const formData = new FormData();
- formData.append('parent_dir', '/');
- formData.append('relative_path', '_Internal/Wiki/Icon');
- formData.append('file', newFile);
- return seafileAPI.uploadImage(uploadLink, formData);
- }).then ((res) => {
- return name;
- })
- );
- };
-
- render() {
- let { iconName } = this.state;
- const src = getIconURL(this.props.repoId, iconName);
- if (src) {
- return (
-
-

-
- {gettext('Please select a png image within 5MB.')}
-
-
- {gettext('Recommended size is 256x256 px.')}
-
-
-
-
- );
- } else {
- return (
-
-
- {gettext('Please select a png image within 5MB.')}
-
-
- {gettext('Recommended size is 256x256 px.')}
-
-
-
-
- );
- }
- }
-}
-
-AppSettingsDialogCustomIcon.propTypes = {
- onToggle: PropTypes.func.isRequired,
- config: PropTypes.object.isRequired,
- updateConfig: PropTypes.func.isRequired,
- repoId: PropTypes.string.isRequired,
-};
-
-export default AppSettingsDialogCustomIcon;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.css b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.css
deleted file mode 100644
index 91f06c8888..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.css
+++ /dev/null
@@ -1,71 +0,0 @@
-.app-settings-dialog-icon-color {
- padding: 10px;
-}
-
-.app-settings-dialog-theme-color .seafile-multicolor-icon-container {
- padding: 8px;
-}
-
-.app-settings-dialog-theme-color .theme-color-backdrop {
- width: 60px;
- height: 60px;
- line-height: 60px;
- opacity: 0;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- text-align: center;
- cursor: pointer;
- border-radius: 50%;
-}
-
-.app-settings-dialog-theme-color .theme-color-backdrop .dtable-font {
- color: #fff;
-}
-
-.app-settings-dialog-theme-color .theme-color-backdrop:hover {
- opacity: 1;
- background-color: rgba(0, 0, 0, 0.3);
-}
-
-#app-settings-dialog-theme-color-input {
- position: relative;
-}
-
-.app-settings-dialog-theme-color .dtable-icon-drop-down {
- position: absolute;
- font-size: 12px;
- color: #b5b5b5;
- -webkit-transform: scale(0.8);
- transform: scale(0.8);
- right: 10px;
- top: 10px;
-}
-
-.app-settings-dialog-theme-color #app-settings-dialog-theme-color-input:hover {
- border-color: rgb(179, 179, 179);
-}
-
-.app-settings-dialog-theme-color .app-theme-colors-content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
-}
-
-.app-settings-dialog-theme-color .app-theme-colors-content .app-theme-color-item {
- display: inline-flex;
- height: fit-content;
- cursor: pointer;
-}
-
-.app-settings-dialog-theme-color .app-theme-colors-content .colorinput-color {
- width: 2.25rem;
- height: 2.25rem;
- border-radius: 50%;
-}
-
-.app-settings-dialog-theme-color .app-theme-colors-content .colorinput-color.light {
- color: #555;
-}
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.js
deleted file mode 100644
index 75adcb13b3..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icon-color.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { FormGroup, Label, Tooltip, Button } from 'reactstrap';
-import IconSettingsPopover from './icon-settings-popover';
-import { gettext } from '../../../../utils/constants';
-import { getIconURL } from '../../utils';
-
-import './app-settings-dialog-icon-color.css';
-
-class AppSettingsDialogIconColor extends React.Component {
-
- constructor(props) {
- super(props);
- this.state = {
- isShowIconPopover: false,
- isTooltipOpen: false,
- };
- this.renameRef = React.createRef();
- }
-
- onIconPopoverToggle = () => {
- this.setState({ isShowIconPopover: !this.state.isShowIconPopover });
- };
-
- onRenameIconToggle = () => {
- this.setState({ isTooltipOpen: !this.state.isTooltipOpen });
- };
-
- render() {
- const { wiki_icon } = this.props.config;
- const src = getIconURL(this.props.repoId, wiki_icon);
- return (
-
-
-
-
- {wiki_icon ?
- <>
-

-
-
-
- >
- :
-
-
-
- }
-
- {gettext('Change icon')}
-
-
-
- {this.state.isShowIconPopover &&
-
- }
-
- );
- }
-}
-
-AppSettingsDialogIconColor.propTypes = {
- config: PropTypes.object.isRequired,
- repoId: PropTypes.string.isRequired,
- updateConfig: PropTypes.func.isRequired,
-};
-
-export default AppSettingsDialogIconColor;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icons.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icons.js
deleted file mode 100644
index 2a98e6d1a6..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-icons.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { mediaUrl } from '../../../../utils/constants';
-
-const ICON_CLASSNAMES = [
- 'default',
-];
-
-class AppSettingsDialogIcons extends React.Component {
-
- onClickIcon = () => {
- if (this.props.config.wiki_icon === 'default') {
- this.props.updateConfig({ wiki_icon: '' });
- } else {
- this.props.updateConfig({ wiki_icon: 'default' });
- }
- this.props.onToggle();
- };
-
- render() {
- return (
-
-
- {ICON_CLASSNAMES.map((name, index) => {
- return (
-
{
- this.onClickIcon(name, e);
- }}
- className={`seafile-multicolor-icon-container ${index < 5 ? 'top' : ''}`}
- >
-

-
- );
- })}
-
-
- );
- }
-}
-
-AppSettingsDialogIcons.propTypes = {
- onToggle: PropTypes.func.isRequired,
- config: PropTypes.object.isRequired,
- updateConfig: PropTypes.func.isRequired,
-};
-
-export default AppSettingsDialogIcons;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-name.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-name.js
deleted file mode 100644
index 55b54c980c..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/app-settings-dialog-name.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { Button, Label } from 'reactstrap';
-import toaster from '../../../../components/toast';
-import { gettext } from '../../../../utils/constants';
-
-class AppSettingsDialogName extends Component {
-
- constructor(props) {
- super(props);
- this.state = {
- name: props.config.wiki_name || '',
- };
- }
-
- onChange = (event) => {
- this.setState({ name: event.target.value });
- };
-
- validateName = (name) => {
- name = name.trim();
- if (name === '') {
- return { isValid: false, message: gettext('Name is required') };
- }
- if (name.includes('/')) {
- return { isValid: false, message: gettext('Name cannot contain slash') };
- }
- if (name.includes('\\')) {
- return { isValid: false, message: gettext('Name cannot contain backslash') };
- }
- return { isValid: true, message: name };
- };
-
- onCommit = () => {
- const { name } = this.state;
- const { isValid, message } = this.validateName(name);
- if (!isValid) {
- toaster.danger(message);
- return;
- } else {
- this.props.updateConfig({ wiki_name: message });
- }
- };
-
- render() {
- const { name } = this.state;
- return (
-
-
-
-
-
-
-
- );
- }
-}
-
-AppSettingsDialogName.propTypes = {
- config: PropTypes.object.isRequired,
- updateConfig: PropTypes.func.isRequired,
-};
-
-export default AppSettingsDialogName;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.css b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.css
deleted file mode 100644
index d09ce945f6..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.css
+++ /dev/null
@@ -1,64 +0,0 @@
-.dtable-icon-settings-popover .popover {
- max-width: 314px;
- width: 314px;
-}
-
-.app-icon-settings-popover-nav .nav {
- border-bottom: 1px solid #efefef;
-}
-
-.app-icon-settings-popover-nav .nav .nav-item {
- padding: 0;
-}
-
-.app-icon-settings-popover-nav .nav .nav-item .nav-link {
- margin: 0;
- display: flex;
- justify-content: center;
- font-weight: 600;
- padding: 0.5rem 0;
- border-bottom: 0.125rem solid transparent;
-}
-
-.app-icon-settings-popover-nav .nav .nav-item .nav-link.active {
- color: #ff8000;
- text-decoration: none;
- border-bottom: 0.125rem solid #ff8000;
-}
-
-.app-icon-settings-popover-main {
- height: 300px;
- display: flex;
- justify-content: center;
- padding: 16px 5px;
- align-items: center;
-}
-
-.app-settings-dialog-icons {
- height: 260px;
-}
-
-.app-settings-dialog-icons .seafile-multicolor-icon-container {
- margin: 10px;
- cursor: pointer;
- width: 40px;
- height: 40px;
- position: relative;
-}
-
-.app-settings-dialog-icons .seafile-multicolor-icon-container.top {
- margin: 0 10px 10px 10px;
-}
-
-.app-settings-dialog-icons .seafile-multicolor-icon-container img {
- width: 40px;
- max-width: fit-content;
- height: 40px;
-}
-
-.app-settings-dialog-icons .seafile-multicolor-icon-container img.active {
- width: 42px;
- height: 42px;
- border: 2px solid #b6e8e4;
- border-radius: 50%;
-}
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.js
deleted file mode 100644
index 2f1bd80fd2..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/icon-settings-popover.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { Nav, NavItem, NavLink, TabContent, TabPane, PopoverBody } from 'reactstrap';
-import SeahubPopover from '../../../../components/common/seahub-popover';
-import { gettext } from '../../../../utils/constants';
-import AppSettingsDialogIcons from './app-settings-dialog-icons';
-import AppSettingsDialogCustomIcon from './app-settings-dialog-custom-icon';
-
-import './icon-settings-popover.css';
-
-export default class IconSettingsPopover extends React.Component {
-
- static propTypes = {
- targetId: PropTypes.string.isRequired,
- onToggle: PropTypes.func.isRequired,
- config: PropTypes.object.isRequired,
- updateConfig: PropTypes.func.isRequired,
- repoId: PropTypes.string.isRequired,
- };
-
- constructor(props) {
- super(props);
- this.state = {
- activeTab: 'system',
- };
- }
-
- toggle = (tab) => {
- if (this.state.activeTab !== tab) {
- this.setState({ activeTab: tab });
- }
- };
-
- onEnter = (e) => {
- e.preventDefault();
- this.props.onToggle();
- };
-
- renderContent = () => {
- let { activeTab } = this.state;
- return (
- <>
-
-
-
-
- >
- );
- };
-
- render() {
- return (
-
-
- {this.renderContent()}
-
-
- );
- }
-}
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/index.js b/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/index.js
deleted file mode 100644
index 5f870028be..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/app-settings-dialog/index.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import React, { Fragment } from 'react';
-import PropTypes from 'prop-types';
-import { Modal, ModalBody, ModalHeader, Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap';
-import AppSettingsDialogIconColor from './app-settings-dialog-icon-color';
-import AppSettingsDialogName from './app-settings-dialog-name';
-import { gettext } from '../../../../utils/constants';
-
-import './app-left-bar-dialog.css';
-
-class AppSettingsDialog extends React.Component {
-
- constructor(props) {
- super(props);
- this.state = {
- activeTab: 'Name',
- };
- }
-
- toggle = (tab) => {
- if (this.state.activeTab !== tab) {
- this.setState({ activeTab: tab });
- }
- };
-
- renderContent = () => {
- const { activeTab } = this.state;
- return (
-
-
-
-
-
-
- );
- };
-
- render() {
- return (
-
- {gettext('Wiki settings')}
-
- {this.renderContent()}
-
-
- );
- }
-}
-
-AppSettingsDialog.propTypes = {
- repoId: PropTypes.string.isRequired,
- toggle: PropTypes.func.isRequired,
- config: PropTypes.object.isRequired,
- updateConfig: PropTypes.func.isRequired,
-};
-
-export default AppSettingsDialog;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar-icon.jsx b/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar-icon.jsx
deleted file mode 100644
index a990f264f5..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar-icon.jsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React, { useState, useRef } from 'react';
-import PropTypes from 'prop-types';
-import { Tooltip } from 'reactstrap';
-import Icon from '../../../components/icon';
-
-function WikiLeftBarIcon(props) {
- const [open, setOpen] = useState(false);
- const inputEl = useRef(null);
-
- function onMouseEnter() {
- if (inputEl && inputEl.current) {
- inputEl.current.style.backgroundColor = '#dedede';
- }
- }
-
- function onMouseLeave() {
- if (inputEl && inputEl.current) {
- inputEl.current.style.backgroundColor = '';
- }
- }
-
- return (
- <>
-
-
-
- setOpen(!open)}
- hideArrow={true}
- fade={false}
- >
- {props.tipText}
-
- >
- );
-}
-
-WikiLeftBarIcon.propTypes = {
- onClick: PropTypes.func.isRequired,
- iconClass: PropTypes.string.isRequired,
- tipText: PropTypes.string.isRequired,
-};
-
-export default WikiLeftBarIcon;
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.css b/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.css
deleted file mode 100644
index 924fffd8ef..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.css
+++ /dev/null
@@ -1,29 +0,0 @@
-.wiki-left-bar {
- flex: 0 0 4%;
- width: 50px;
- background: #f5f5f5;
- border-right: 1px solid #ddd;
- z-index: 101;
-}
-
-.wiki-left-bar .left-bar-button {
- height: 50px;
- line-height: 50px;
- text-align: center;
-}
-
-.wiki-left-bar .left-bar-button:hover {
- cursor: pointer;
-}
-
-.wiki-left-bar .left-bar-button .seafile-multicolor-icon {
- font-size: 22px;
-}
-
-.wiki-left-bar .left-bar-button .seafile-multicolor-icon {
- color: rgba(0, 0, 0, 0.8);
-}
-
-.wiki-left-bar .left-bar-button:hover .seafile-multicolor-icon {
- color: rgba(0, 0, 0, 0.9);
-}
diff --git a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.js b/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.js
deleted file mode 100644
index 714c5c5a22..0000000000
--- a/frontend/src/pages/wiki2/wiki-left-bar/wiki-left-bar.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import AppSettingsDialog from './app-settings-dialog/index';
-import Icon from './wiki-left-bar-icon.jsx';
-import { gettext } from '../../../utils/constants';
-
-import './wiki-left-bar.css';
-
-export default class WikiLeftBar extends React.Component {
-
- static propTypes = {
- config: PropTypes.object.isRequired,
- repoId: PropTypes.string.isRequired,
- updateConfig: PropTypes.func.isRequired,
- };
-
- constructor(props) {
- super(props);
- this.state = {
- isShowSettingsDialog: false,
- };
- }
-
- openPreviewApp = () => {
- window.open(window.location.href.replace('/wikis/', '/published/'));
- };
-
- openAppSettingsDialog = () => {
- this.setState({ isShowSettingsDialog: true });
- };
-
- closeAppSettingsDialog = () => {
- this.setState({ isShowSettingsDialog: false });
- };
-
- render() {
- return (
-
-
-
- {this.state.isShowSettingsDialog &&
-
- }
-
- );
- }
-}