1
0
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:
Michael An
2024-06-13 15:27:20 +08:00
committed by GitHub
parent fef6e2d5b5
commit 7e1d98990f
15 changed files with 144 additions and 65 deletions

View File

@@ -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');