[FIX] Change default directory listing to Users (#1948)
* fix: change default directory listing to Users * follow server settings * Fix state to props Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
255254c285
commit
1ce0f6db59
|
@ -47,6 +47,9 @@ export default {
|
||||||
CROWD_Enable: {
|
CROWD_Enable: {
|
||||||
type: 'valueAsBoolean'
|
type: 'valueAsBoolean'
|
||||||
},
|
},
|
||||||
|
Accounts_Directory_DefaultView: {
|
||||||
|
type: 'valueAsString'
|
||||||
|
},
|
||||||
FEDERATION_Enabled: {
|
FEDERATION_Enabled: {
|
||||||
type: 'valueAsBoolean'
|
type: 'valueAsBoolean'
|
||||||
},
|
},
|
||||||
|
|
|
@ -45,7 +45,8 @@ class DirectoryView extends React.Component {
|
||||||
id: PropTypes.string,
|
id: PropTypes.string,
|
||||||
token: PropTypes.string
|
token: PropTypes.string
|
||||||
}),
|
}),
|
||||||
theme: PropTypes.string
|
theme: PropTypes.string,
|
||||||
|
directoryDefaultView: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -57,7 +58,7 @@ class DirectoryView extends React.Component {
|
||||||
total: -1,
|
total: -1,
|
||||||
showOptionsDropdown: false,
|
showOptionsDropdown: false,
|
||||||
globalUsers: true,
|
globalUsers: true,
|
||||||
type: 'channels'
|
type: props.directoryDefaultView
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +257,8 @@ class DirectoryView extends React.Component {
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
baseUrl: state.server.server,
|
baseUrl: state.server.server,
|
||||||
user: getUserSelector(state),
|
user: getUserSelector(state),
|
||||||
isFederationEnabled: state.settings.FEDERATION_Enabled
|
isFederationEnabled: state.settings.FEDERATION_Enabled,
|
||||||
|
directoryDefaultView: state.settings.Accounts_Directory_DefaultView
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(withTheme(DirectoryView));
|
export default connect(mapStateToProps)(withTheme(DirectoryView));
|
||||||
|
|
Loading…
Reference in New Issue