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 = () => ( 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 <List
pagination={<RoomDirectoryPagination />} pagination={<RoomDirectoryPagination />}
perPage={100} perPage={100}
@ -177,25 +170,21 @@ export const RoomDirectoryList = () => (
sortable={false} sortable={false}
label="resources.rooms.fields.name" label="resources.rooms.fields.name"
/> />
<TextField <TextField
source="room_id" source="room_id"
sortable={false} sortable={false}
label="resources.rooms.fields.room_id" label="resources.rooms.fields.room_id"
/> />
<TextField <TextField
source="canonical_alias" source="canonical_alias"
sortable={false} sortable={false}
label="resources.rooms.fields.canonical_alias" label="resources.rooms.fields.canonical_alias"
/> />
<TextField <TextField
source="topic" source="topic"
sortable={false} sortable={false}
label="resources.rooms.fields.topic" label="resources.rooms.fields.topic"
/> />
<NumberField <NumberField
source="num_joined_members" source="num_joined_members"
sortable={false} sortable={false}

View File

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

View File

@ -26,7 +26,7 @@ import {
} from "react-admin"; } from "react-admin";
import get from "lodash/get"; import get from "lodash/get";
import PropTypes from "prop-types"; 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 Box from "@mui/material/Box";
import FastForwardIcon from "@mui/icons-material/FastForward"; import FastForwardIcon from "@mui/icons-material/FastForward";
import HttpsIcon from "@mui/icons-material/Https"; import HttpsIcon from "@mui/icons-material/Https";
@ -318,38 +318,11 @@ const RoomBulkActionButtons = () => (
</Fragment> </Fragment>
); );
const RoomFilter = ({ ...props }) => { const RoomFilter = props => (
const translate = useTranslate(); <Filter {...props}>
return ( <SearchInput source="search_term" alwaysOn />
<Filter {...props}> </Filter>
<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 RoomNameField = props => { const RoomNameField = props => {
const { source } = props; const { source } = props;
@ -387,6 +360,7 @@ export const RoomList = () => (
<EncryptionField <EncryptionField
source="is_encrypted" source="is_encrypted"
sortBy="encryption" sortBy="encryption"
// DatagridConfigurable thorws an error with an icon in `label`
//label={<HttpsIcon />} //label={<HttpsIcon />}
/> />