make extra parameters collapsible to make more space for tags
This commit is contained in:
+6
-2
@@ -765,13 +765,17 @@ table.permission-editor td.checkbox {
|
|||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure padding is only applied at
|
/* Make sure padding is only applied at
|
||||||
the top level panel */
|
the top level panel */
|
||||||
.panel-form-row > .panel-form-column {
|
.panel-form-row > .panel-form-column,
|
||||||
|
.panel-form-column > .panel-form-column {
|
||||||
padding: 0!important;
|
padding: 0!important;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
.panel-form-column > .panel-form-row {
|
.panel-form-column > .panel-form-row,
|
||||||
|
.panel-form-row > .panel-form-row
|
||||||
|
{
|
||||||
padding: 0!important;
|
padding: 0!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+86
-46
@@ -528,6 +528,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggle [Title text >] -> [Title text v]
|
||||||
|
class MoreButton extends React.PureComponent {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
open: this.props.open
|
||||||
|
};
|
||||||
|
this.handleToggle = this.handleToggle.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleToggle() {
|
||||||
|
var open = !this.state.open;
|
||||||
|
this.setState({open: open});
|
||||||
|
if (this.props.onToggle) {
|
||||||
|
this.props.onToggle(open);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (<label className="small" onClick={this.handleToggle}>{this.props.title}...
|
||||||
|
{this.state.open ? <i className="material-icons">expand_more</i> :
|
||||||
|
<i className="material-icons">chevron_right</i>}
|
||||||
|
</label>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* BEGIN Lettertile: Avatar box: either a bitmap or a letter tile or a stock icon. */
|
/* BEGIN Lettertile: Avatar box: either a bitmap or a letter tile or a stock icon. */
|
||||||
class LetterTile extends React.PureComponent {
|
class LetterTile extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
@@ -2343,7 +2370,8 @@
|
|||||||
anon: null,
|
anon: null,
|
||||||
contactList: [],
|
contactList: [],
|
||||||
showMemberPanel: this.props.showMemberPanel,
|
showMemberPanel: this.props.showMemberPanel,
|
||||||
showPermissionEditorFor: undefined
|
showPermissionEditorFor: undefined,
|
||||||
|
moreInfoExpanded: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -2585,7 +2613,9 @@
|
|||||||
handleMemberSelected: function(uid) {
|
handleMemberSelected: function(uid) {
|
||||||
this.setState({selectedContact: uid});
|
this.setState({selectedContact: uid});
|
||||||
},
|
},
|
||||||
|
handleMoreInfo: function(open) {
|
||||||
|
this.setState({moreInfoExpanded: open});
|
||||||
|
},
|
||||||
handleContextMenu: function(params) {
|
handleContextMenu: function(params) {
|
||||||
var instance = this;
|
var instance = this;
|
||||||
var topic = Tinode.getTopic(this.props.topic);
|
var topic = Tinode.getTopic(this.props.topic);
|
||||||
@@ -2674,65 +2704,75 @@
|
|||||||
</div>
|
</div>
|
||||||
<div className="hr" />
|
<div className="hr" />
|
||||||
<div className="panel-form-column">
|
<div className="panel-form-column">
|
||||||
<div className="panel-form-row">
|
|
||||||
<label>Address:</label>
|
|
||||||
<tt>{this.state.address}</tt>
|
|
||||||
</div>
|
|
||||||
<div className="panel-form-row">
|
<div className="panel-form-row">
|
||||||
<label>Muted:</label>
|
<label>Muted:</label>
|
||||||
<CheckBox name="P" checked={this.state.muted}
|
<CheckBox name="P" checked={this.state.muted}
|
||||||
onChange={this.handleMuted} />
|
onChange={this.handleMuted} />
|
||||||
</div>
|
</div>
|
||||||
{this.state.groupTopic ?
|
<MoreButton
|
||||||
|
title="More"
|
||||||
|
open={this.state.moreInfoExpanded}
|
||||||
|
onToggle={this.handleMoreInfo} />
|
||||||
|
{this.state.moreInfoExpanded ?
|
||||||
|
<div className="panel-form-column">
|
||||||
<div className="panel-form-row">
|
<div className="panel-form-row">
|
||||||
<label>Your permissions:</label>
|
<label>Address:</label>
|
||||||
<tt className="clickable"
|
<tt>{this.state.address}</tt>
|
||||||
onClick={this.handleLaunchPermissionsEditor.bind(this, 'want')}>
|
|
||||||
{this.state.access}
|
|
||||||
</tt>
|
|
||||||
</div>
|
</div>
|
||||||
:
|
{this.state.groupTopic ?
|
||||||
<div>
|
<div className="panel-form-row">
|
||||||
<div><label className="small">Permissions:</label></div>
|
<label>Your permissions:</label>
|
||||||
<div className="quoted">
|
<tt className="clickable"
|
||||||
<div>Yours: <tt className="clickable"
|
|
||||||
onClick={this.handleLaunchPermissionsEditor.bind(this, 'want')}>
|
onClick={this.handleLaunchPermissionsEditor.bind(this, 'want')}>
|
||||||
{this.state.access}
|
{this.state.access}
|
||||||
</tt></div>
|
</tt>
|
||||||
<div>{this.state.fullName}′s: <tt className="clickable"
|
|
||||||
onClick={this.handleLaunchPermissionsEditor.bind(this, 'given')}>
|
|
||||||
{this.state.modeGiven2}
|
|
||||||
</tt></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
:
|
||||||
}
|
<div>
|
||||||
{this.state.sharer && (this.state.auth || this.state.anon) ?
|
<div><label className="small">Permissions:</label></div>
|
||||||
<div>
|
<div className="quoted">
|
||||||
<div><label className="small">Default access mode:</label></div>
|
<div>Yours: <tt className="clickable"
|
||||||
<div className="quoted">
|
onClick={this.handleLaunchPermissionsEditor.bind(this, 'want')}>
|
||||||
<div>Auth: {this.state.admin ?
|
{this.state.access}
|
||||||
<tt className="clickable"
|
</tt></div>
|
||||||
onClick={this.handleLaunchPermissionsEditor.bind(this, 'auth')}>
|
<div>{this.state.fullName}′s: <tt className="clickable"
|
||||||
{this.state.auth}
|
onClick={this.handleLaunchPermissionsEditor.bind(this, 'given')}>
|
||||||
</tt>
|
{this.state.modeGiven2}
|
||||||
:
|
</tt></div>
|
||||||
<tt>{this.state.auth}</tt>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
<div>Anon: {this.state.admin ?
|
|
||||||
<tt className="clickable"
|
|
||||||
onClick={this.handleLaunchPermissionsEditor.bind(this, 'anon')}>
|
|
||||||
{this.state.anon}
|
|
||||||
</tt>
|
|
||||||
:
|
|
||||||
<tt>{this.state.anon}</tt>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
{this.state.sharer && (this.state.auth || this.state.anon) ?
|
||||||
|
<div>
|
||||||
|
<div><label className="small">Default access mode:</label></div>
|
||||||
|
<div className="quoted">
|
||||||
|
<div>Auth: {this.state.admin ?
|
||||||
|
<tt className="clickable"
|
||||||
|
onClick={this.handleLaunchPermissionsEditor.bind(this, 'auth')}>
|
||||||
|
{this.state.auth}
|
||||||
|
</tt>
|
||||||
|
:
|
||||||
|
<tt>{this.state.auth}</tt>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div>Anon: {this.state.admin ?
|
||||||
|
<tt className="clickable"
|
||||||
|
onClick={this.handleLaunchPermissionsEditor.bind(this, 'anon')}>
|
||||||
|
{this.state.anon}
|
||||||
|
</tt>
|
||||||
|
:
|
||||||
|
<tt>{this.state.anon}</tt>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className="hr" />
|
<div className="hr" />
|
||||||
{this.state.groupTopic ?
|
{this.state.groupTopic ?
|
||||||
|
|||||||
Reference in New Issue
Block a user