1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

change select editor custom style (#7060)

* change select editor custom style

* change add permission
This commit is contained in:
Michael An
2024-11-19 14:03:58 +08:00
committed by GitHub
parent a426c96bd9
commit 1429051186
2 changed files with 12 additions and 4 deletions

View File

@@ -43,20 +43,26 @@ class SelectEditor extends React.Component {
}
setOptions = () => {
const { enableAddCustomPermission, options } = this.props;
this.options = [];
const options = this.props.options;
for (let i = 0, length = options.length; i < length; i++) {
let option = {};
option.value = options[i];
if (!options[i].length) { // it's ''. for example, intitution option in 'system admin - users' page can be ''.
option.label = <div style={{ minHeight: '1em' }}></div>;
} else {
option.label = <div>{this.props.translateOption(options[i])}{ this.props.translateExplanation && <div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>}</div>;
option.label = (
<div>
{this.props.translateOption(options[i])}
{this.props.translateExplanation &&
<div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>
}
</div>
);
}
this.options.push(option);
}
const { enableAddCustomPermission } = this.props;
if (enableAddCustomPermission && !this.props.isWiki) {
const option = {
value: gettext('Add custom permission'),