mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #5387 from vector-im/t3chguy/devtools-filter-case-sens
Devtools: make filtering case-insensitive
This commit is contained in:
commit
f6a920a018
@ -57,7 +57,7 @@ class SendCustomEvent extends React.Component {
|
|||||||
_buttons() {
|
_buttons() {
|
||||||
return <div className="mx_Dialog_buttons">
|
return <div className="mx_Dialog_buttons">
|
||||||
<button onClick={this.onBack}>{ _t('Back') }</button>
|
<button onClick={this.onBack}>{ _t('Back') }</button>
|
||||||
{!this.state.message && <button onClick={this._send}>{ _t('Send') }</button>}
|
{ !this.state.message && <button onClick={this._send}>{ _t('Send') }</button> }
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class SendCustomEvent extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_additionalFields() {
|
_additionalFields() {
|
||||||
return <div/>;
|
return <div />;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onChange(e) {
|
_onChange(e) {
|
||||||
@ -94,15 +94,15 @@ class SendCustomEvent extends React.Component {
|
|||||||
if (this.state.message) {
|
if (this.state.message) {
|
||||||
return <div>
|
return <div>
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
{this.state.message}
|
{ this.state.message }
|
||||||
</div>
|
</div>
|
||||||
{this._buttons()}
|
{ this._buttons() }
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div>
|
return <div>
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
{this._additionalFields()}
|
{ this._additionalFields() }
|
||||||
<div className="mx_TextInputDialog_label">
|
<div className="mx_TextInputDialog_label">
|
||||||
<label htmlFor="eventType"> { _t('Event Type') } </label>
|
<label htmlFor="eventType"> { _t('Event Type') } </label>
|
||||||
</div>
|
</div>
|
||||||
@ -117,7 +117,7 @@ class SendCustomEvent extends React.Component {
|
|||||||
<textarea id="evContent" onChange={this._onChange} value={this.state.input_evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
|
<textarea id="evContent" onChange={this._onChange} value={this.state.input_evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{this._buttons()}
|
{ this._buttons() }
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ class RoomStateExplorer extends React.Component {
|
|||||||
if (this.state.event) {
|
if (this.state.event) {
|
||||||
return <div className="mx_ViewSource">
|
return <div className="mx_ViewSource">
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
<pre>{JSON.stringify(this.state.event.event, null, 2)}</pre>
|
<pre>{ JSON.stringify(this.state.event.event, null, 2) }</pre>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_buttons">
|
<div className="mx_Dialog_buttons">
|
||||||
<button onClick={this.onBack}>{ _t('Back') }</button>
|
<button onClick={this.onBack}>{ _t('Back') }</button>
|
||||||
@ -237,7 +237,7 @@ class RoomStateExplorer extends React.Component {
|
|||||||
if (this.state.eventType === null) {
|
if (this.state.eventType === null) {
|
||||||
Object.keys(this.roomStateEvents).forEach((evType) => {
|
Object.keys(this.roomStateEvents).forEach((evType) => {
|
||||||
// Skip this entry if does not contain search query
|
// Skip this entry if does not contain search query
|
||||||
if (this.state.query && !evType.includes(this.state.query)) return;
|
if (this.state.query && !evType.toLowerCase().includes(this.state.query.toLowerCase())) return;
|
||||||
|
|
||||||
const stateGroup = this.roomStateEvents[evType];
|
const stateGroup = this.roomStateEvents[evType];
|
||||||
const stateKeys = Object.keys(stateGroup);
|
const stateKeys = Object.keys(stateGroup);
|
||||||
@ -258,7 +258,7 @@ class RoomStateExplorer extends React.Component {
|
|||||||
const stateGroup = this.roomStateEvents[evType];
|
const stateGroup = this.roomStateEvents[evType];
|
||||||
Object.keys(stateGroup).forEach((stateKey) => {
|
Object.keys(stateGroup).forEach((stateKey) => {
|
||||||
// Skip this entry if does not contain search query
|
// Skip this entry if does not contain search query
|
||||||
if (this.state.query && !stateKey.includes(this.state.query)) return;
|
if (this.state.query && !stateKey.toLowerCase().includes(this.state.query.toLowerCase())) return;
|
||||||
|
|
||||||
const ev = stateGroup[stateKey];
|
const ev = stateGroup[stateKey];
|
||||||
rows.push(<button className="mx_DevTools_RoomStateExplorer_button" key={stateKey}
|
rows.push(<button className="mx_DevTools_RoomStateExplorer_button" key={stateKey}
|
||||||
@ -271,7 +271,7 @@ class RoomStateExplorer extends React.Component {
|
|||||||
return <div>
|
return <div>
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
<input onChange={this.onQuery} placeholder={_t('Filter results')} size="64" className="mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query" value={this.state.query} />
|
<input onChange={this.onQuery} placeholder={_t('Filter results')} size="64" className="mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query" value={this.state.query} />
|
||||||
{rows}
|
{ rows }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_buttons">
|
<div className="mx_Dialog_buttons">
|
||||||
<button onClick={this.onBack}>{ _t('Back') }</button>
|
<button onClick={this.onBack}>{ _t('Back') }</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user