remove not needed code

This commit is contained in:
dklimpel 2023-02-04 17:23:15 +01:00
parent 24a6b66203
commit c6fd5cf301
3 changed files with 9 additions and 47 deletions

View File

@ -149,13 +149,6 @@ const RoomDirectoryListActions = () => (
);
export const RoomDirectoryList = () => (
/*
const filter = roomDirectoryFilters;
const roomIdFilter = filter && filter.room_id ? true : false;
const topicFilter = filter && filter.topic ? true : false;
const canonicalAliasFilter = filter && filter.canonical_alias ? true : false;
*/
<List
pagination={<RoomDirectoryPagination />}
perPage={100}
@ -177,25 +170,21 @@ export const RoomDirectoryList = () => (
sortable={false}
label="resources.rooms.fields.name"
/>
<TextField
source="room_id"
sortable={false}
label="resources.rooms.fields.room_id"
/>
<TextField
source="canonical_alias"
sortable={false}
label="resources.rooms.fields.canonical_alias"
/>
<TextField
source="topic"
sortable={false}
label="resources.rooms.fields.topic"
/>
<NumberField
source="num_joined_members"
sortable={false}

View File

@ -41,7 +41,7 @@ const destinationRowStyle = (record, index) => ({
backgroundColor: record.retry_last_ts > 0 ? "#ffcccc" : "white",
});
const DestinationFilter = ({ ...props }) => {
const DestinationFilter = props => {
return (
<Filter {...props}>
<SearchInput source="destination" alwaysOn />
@ -105,10 +105,9 @@ const DestinationTitle = props => {
);
};
export const DestinationList = props => {
export const DestinationList = () => {
return (
<List
{...props}
filters={<DestinationFilter />}
pagination={<DestinationPagination />}
sort={{ field: "destination", order: "ASC" }}

View File

@ -26,7 +26,7 @@ import {
} from "react-admin";
import get from "lodash/get";
import PropTypes from "prop-types";
import { Tooltip, Typography, Chip } from "@mui/material";
import { Tooltip, Typography } from "@mui/material";
import Box from "@mui/material/Box";
import FastForwardIcon from "@mui/icons-material/FastForward";
import HttpsIcon from "@mui/icons-material/Https";
@ -318,38 +318,11 @@ const RoomBulkActionButtons = () => (
</Fragment>
);
const RoomFilter = ({ ...props }) => {
const translate = useTranslate();
return (
<Filter {...props}>
<SearchInput source="search_term" alwaysOn />
<Chip
label={translate("resources.rooms.fields.joined_local_members")}
source="joined_local_members"
defaultValue={false}
sx={{ marginBottom: "8px" }}
/>
<Chip
label={translate("resources.rooms.fields.state_events")}
source="state_events"
defaultValue={false}
sx={{ marginBottom: "8px" }}
/>
<Chip
label={translate("resources.rooms.fields.version")}
source="version"
defaultValue={false}
sx={{ marginBottom: "8px" }}
/>
<Chip
label={translate("resources.rooms.fields.federatable")}
source="federatable"
defaultValue={false}
sx={{ marginBottom: "8px" }}
/>
</Filter>
);
};
const RoomFilter = props => (
<Filter {...props}>
<SearchInput source="search_term" alwaysOn />
</Filter>
);
const RoomNameField = props => {
const { source } = props;
@ -387,6 +360,7 @@ export const RoomList = () => (
<EncryptionField
source="is_encrypted"
sortBy="encryption"
// DatagridConfigurable thorws an error with an icon in `label`
//label={<HttpsIcon />}
/>