mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-24 08:35:31 +03:00
Regroup source code
- components directory contains react components - pages directory contains all custom pages - resources directory contains everything that exports ResourceProps Change-Id: I5b9b68f67e232044fabf11810482873ce5b32053
This commit is contained in:
parent
ec0fc14b68
commit
fce6e03fc5
10 changed files with 21 additions and 21 deletions
16
src/App.tsx
16
src/App.tsx
|
@ -4,20 +4,20 @@ import polyglotI18nProvider from "ra-i18n-polyglot";
|
||||||
import { Admin, CustomRoutes, Resource, resolveBrowserLocale } from "react-admin";
|
import { Admin, CustomRoutes, Resource, resolveBrowserLocale } from "react-admin";
|
||||||
import { Route } from "react-router-dom";
|
import { Route } from "react-router-dom";
|
||||||
|
|
||||||
import reports from "./components/EventReports";
|
|
||||||
import { ImportFeature } from "./components/ImportFeature";
|
import { ImportFeature } from "./components/ImportFeature";
|
||||||
import LoginPage from "./components/LoginPage";
|
|
||||||
import registrationToken from "./components/RegistrationTokens";
|
|
||||||
import roomDirectory from "./components/RoomDirectory";
|
|
||||||
import destinations from "./components/destinations";
|
|
||||||
import rooms from "./components/rooms";
|
|
||||||
import userMediaStats from "./components/statistics";
|
|
||||||
import users from "./components/users";
|
|
||||||
import germanMessages from "./i18n/de";
|
import germanMessages from "./i18n/de";
|
||||||
import englishMessages from "./i18n/en";
|
import englishMessages from "./i18n/en";
|
||||||
import frenchMessages from "./i18n/fr";
|
import frenchMessages from "./i18n/fr";
|
||||||
import italianMessages from "./i18n/it";
|
import italianMessages from "./i18n/it";
|
||||||
import chineseMessages from "./i18n/zh";
|
import chineseMessages from "./i18n/zh";
|
||||||
|
import LoginPage from "./pages/LoginPage";
|
||||||
|
import destinations from "./resources/destinations";
|
||||||
|
import registrationToken from "./resources/registration_tokens";
|
||||||
|
import reports from "./resources/reports";
|
||||||
|
import roomDirectory from "./resources/room_directory";
|
||||||
|
import rooms from "./resources/rooms";
|
||||||
|
import userMediaStats from "./resources/user_media_statistics";
|
||||||
|
import users from "./resources/users";
|
||||||
import authProvider from "./synapse/authProvider";
|
import authProvider from "./synapse/authProvider";
|
||||||
import dataProvider from "./synapse/dataProvider";
|
import dataProvider from "./synapse/dataProvider";
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import {
|
||||||
useTranslate,
|
useTranslate,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
|
||||||
import { DATE_FORMAT } from "./date";
|
import { DATE_FORMAT } from "../components/date";
|
||||||
|
|
||||||
const DestinationPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
const DestinationPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
Toolbar,
|
Toolbar,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
|
||||||
import { DATE_FORMAT, dateFormatter, dateParser } from "./date";
|
import { DATE_FORMAT, dateFormatter, dateParser } from "../components/date";
|
||||||
|
|
||||||
const validateToken = [regex(/^[A-Za-z0-9._~-]{0,64}$/)];
|
const validateToken = [regex(/^[A-Za-z0-9._~-]{0,64}$/)];
|
||||||
const validateUsesAllowed = [number()];
|
const validateUsesAllowed = [number()];
|
|
@ -21,8 +21,8 @@ import {
|
||||||
useTranslate,
|
useTranslate,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
|
||||||
import { DATE_FORMAT } from "./date";
|
import { DATE_FORMAT } from "../components/date";
|
||||||
import { MXCField } from "./media";
|
import { MXCField } from "../components/media";
|
||||||
|
|
||||||
const ReportPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
const ReportPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import {
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
import { useMutation } from "react-query";
|
import { useMutation } from "react-query";
|
||||||
|
|
||||||
import AvatarField from "./AvatarField";
|
import AvatarField from "../components/AvatarField";
|
||||||
|
|
||||||
const RoomDirectoryPagination = () => <Pagination rowsPerPageOptions={[100, 500, 1000, 2000]} />;
|
const RoomDirectoryPagination = () => <Pagination rowsPerPageOptions={[100, 500, 1000, 2000]} />;
|
||||||
|
|
|
@ -43,8 +43,8 @@ import {
|
||||||
RoomDirectoryBulkPublishButton,
|
RoomDirectoryBulkPublishButton,
|
||||||
RoomDirectoryUnpublishButton,
|
RoomDirectoryUnpublishButton,
|
||||||
RoomDirectoryPublishButton,
|
RoomDirectoryPublishButton,
|
||||||
} from "./RoomDirectory";
|
} from "./room_directory";
|
||||||
import { DATE_FORMAT } from "./date";
|
import { DATE_FORMAT } from "../components/date";
|
||||||
|
|
||||||
const RoomPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
const RoomPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
useListContext,
|
useListContext,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
|
||||||
import { DeleteMediaButton } from "./media";
|
import { DeleteMediaButton } from "../components/media";
|
||||||
|
|
||||||
const ListActions = () => {
|
const ListActions = () => {
|
||||||
const { isLoading, total } = useListContext();
|
const { isLoading, total } = useListContext();
|
|
@ -50,11 +50,11 @@ import {
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import AvatarField from "./AvatarField";
|
import AvatarField from "../components/AvatarField";
|
||||||
import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices";
|
import { ServerNoticeButton, ServerNoticeBulkButton } from "../components/ServerNotices";
|
||||||
import { DATE_FORMAT } from "./date";
|
import { DATE_FORMAT } from "../components/date";
|
||||||
import { DeviceRemoveButton } from "./devices";
|
import { DeviceRemoveButton } from "../components/devices";
|
||||||
import { MediaIDField, ProtectMediaButton, QuarantineMediaButton } from "./media";
|
import { MediaIDField, ProtectMediaButton, QuarantineMediaButton } from "../components/media";
|
||||||
|
|
||||||
const choices_medium = [
|
const choices_medium = [
|
||||||
{ id: "email", name: "resources.users.email" },
|
{ id: "email", name: "resources.users.email" },
|
Loading…
Reference in a new issue