From 1e6d43e2911239069b91cf04412bac3ec4cab6af Mon Sep 17 00:00:00 2001 From: Manuel Stahl Date: Fri, 7 Feb 2020 16:19:01 +0100 Subject: [PATCH] Add a room view Change-Id: I20056d997e7a94fd10d03e7d1a8051030ecf7ca4 --- src/App.js | 3 +++ src/components/rooms.js | 13 +++++++++++++ src/i18n/de.js | 9 +++++++++ src/i18n/en.js | 9 +++++++++ 4 files changed, 34 insertions(+) create mode 100644 src/components/rooms.js diff --git a/src/App.js b/src/App.js index 70b7f7b..ce37344 100644 --- a/src/App.js +++ b/src/App.js @@ -4,8 +4,10 @@ import polyglotI18nProvider from "ra-i18n-polyglot"; import authProvider from "./synapse/authProvider"; import dataProvider from "./synapse/dataProvider"; import { UserList, UserCreate, UserEdit } from "./components/users"; +import { RoomList } from "./components/rooms"; import LoginPage from "./components/LoginPage"; import UserIcon from "@material-ui/icons/Group"; +import { ViewListIcon as RoomIcon } from "@material-ui/icons/ViewList"; import germanMessages from "./i18n/de"; import englishMessages from "./i18n/en"; @@ -33,6 +35,7 @@ const App = () => ( edit={UserEdit} icon={UserIcon} /> + ); diff --git a/src/components/rooms.js b/src/components/rooms.js new file mode 100644 index 0000000..ba3bd8b --- /dev/null +++ b/src/components/rooms.js @@ -0,0 +1,13 @@ +import React from "react"; +import { Datagrid, List, TextField } from "react-admin"; + +export const RoomList = props => ( + + + + + + + + +); diff --git a/src/i18n/de.js b/src/i18n/de.js index 6536802..6626ae7 100644 --- a/src/i18n/de.js +++ b/src/i18n/de.js @@ -29,5 +29,14 @@ export default { password: "Passwort", }, }, + rooms: { + name: "Raum |||| Räume", + fields: { + room_id: "Raum-ID", + name: "Name", + canonical_alias: "Alias", + joined_members: "Mitglieder", + }, + }, }, }; diff --git a/src/i18n/en.js b/src/i18n/en.js index 16adfd7..0683213 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -29,5 +29,14 @@ export default { password: "Password", }, }, + rooms: { + name: "Room |||| Rooms", + fields: { + room_id: "Room-ID", + name: "Name", + canonical_alias: "Alias", + joined_members: "Members", + }, + }, }, };