mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 11:27:18 +00:00
12.0 change toolbar buttons style (#6197)
* 00 fix codes * change toolbar buttons style
This commit is contained in:
@@ -48,24 +48,24 @@ class MainPanel extends Component {
|
||||
serviceUrl: appConfig.serviceURL,
|
||||
assets_url: appConfig.assetsUrl,
|
||||
};
|
||||
const currentPageConfig = getCurrentPageConfig(config.pages, currentPageId)
|
||||
const currentPageConfig = getCurrentPageConfig(config.pages, currentPageId);
|
||||
return { ...props, docUuid: window.seafile.docUuid, currentPageConfig };
|
||||
}
|
||||
|
||||
handleRenameDocument = (e) => {
|
||||
const newName = e.target.value.trim()
|
||||
const { currentPageConfig } = this.state
|
||||
const { id, name, icon } = currentPageConfig
|
||||
const newName = e.target.value.trim();
|
||||
const { currentPageConfig } = this.state;
|
||||
const { id, name, icon } = currentPageConfig;
|
||||
if (newName === name) return;
|
||||
const pageConfig = { name: newName, icon }
|
||||
this.props.onUpdatePage(id, pageConfig)
|
||||
const pageConfig = { name: newName, icon };
|
||||
this.props.onUpdatePage(id, pageConfig);
|
||||
// Reset title if name is empty
|
||||
if (!newName) e.target.value = name;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { permission, pathExist, isDataLoading, isViewFile, config } = this.props;
|
||||
const { currentPageConfig } = this.state
|
||||
const { currentPageConfig } = this.state;
|
||||
const isViewingFile = pathExist && !isDataLoading && isViewFile;
|
||||
const isReadOnly = !(permission === 'rw');
|
||||
|
||||
|
Reference in New Issue
Block a user