mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 06:44:16 +00:00
[select-editor, link details] fixup: display the current option rightly for the 'select-editor'; removed ':' after 'Permission' for 'link details' (#6465)
This commit is contained in:
@@ -107,8 +107,6 @@ class SelectEditor extends React.Component {
|
||||
|
||||
render() {
|
||||
let { currentOption, isTextMode } = this.props;
|
||||
// scence1: isTextMode (text)editor-icon --> select
|
||||
// scence2: !isTextMode select
|
||||
return (
|
||||
<div className="permission-editor" onClick={this.onSelectHandler}>
|
||||
{(!isTextMode || this.state.isEditing) &&
|
||||
@@ -116,8 +114,7 @@ class SelectEditor extends React.Component {
|
||||
options={this.state.options}
|
||||
className="permission-editor-select"
|
||||
classNamePrefix="permission-editor"
|
||||
placeholder={this.props.translateOption(currentOption)}
|
||||
value={currentOption}
|
||||
value={this.state.options.filter(item => item.value == currentOption)[0]}
|
||||
onChange={this.onOptionChanged}
|
||||
captureMenuScroll={false}
|
||||
menuPlacement="auto"
|
||||
|
@@ -251,7 +251,7 @@ class LinkDetails extends React.Component {
|
||||
)}
|
||||
{sharedLinkInfo.permissions && (
|
||||
<>
|
||||
<dt className="text-secondary font-weight-normal">{gettext('Permission:')}</dt>
|
||||
<dt className="text-secondary font-weight-normal">{gettext('Permission')}</dt>
|
||||
<dd>
|
||||
<div className="w-50">
|
||||
<SelectEditor
|
||||
|
@@ -7,10 +7,16 @@
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.permission-editor__option--is-selected .permission-editor-explanation {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.permission-editor .permission-editor__option {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.permission-editor .permission-editor__control .permission-editor-explanation {
|
||||
display: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user