Skip to content

Commit

Permalink
Regroup source code
Browse files Browse the repository at this point in the history
- components directory contains react components
- pages directory contains all custom pages
- resources directory contains everything that exports ResourceProps

Change-Id: I5b9b68f67e232044fabf11810482873ce5b32053
  • Loading branch information
awesome-manuel committed Jul 9, 2024
1 parent ec0fc14 commit fce6e03
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import polyglotI18nProvider from "ra-i18n-polyglot";
import { Admin, CustomRoutes, Resource, resolveBrowserLocale } from "react-admin";
import { Route } from "react-router-dom";

import reports from "./components/EventReports";
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 englishMessages from "./i18n/en";
import frenchMessages from "./i18n/fr";
import italianMessages from "./i18n/it";
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 dataProvider from "./synapse/dataProvider";

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
useTranslate,
} from "react-admin";

import { DATE_FORMAT } from "./date";
import { DATE_FORMAT } from "../components/date";

const DestinationPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
Toolbar,
} 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 validateUsesAllowed = [number()];
Expand Down
4 changes: 2 additions & 2 deletions src/components/EventReports.tsx → src/resources/reports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
useTranslate,
} from "react-admin";

import { DATE_FORMAT } from "./date";
import { MXCField } from "./media";
import { DATE_FORMAT } from "../components/date";
import { MXCField } from "../components/media";

const ReportPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from "react-admin";
import { useMutation } from "react-query";

import AvatarField from "./AvatarField";
import AvatarField from "../components/AvatarField";

const RoomDirectoryPagination = () => <Pagination rowsPerPageOptions={[100, 500, 1000, 2000]} />;

Expand Down
4 changes: 2 additions & 2 deletions src/components/rooms.tsx → src/resources/rooms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import {
RoomDirectoryBulkPublishButton,
RoomDirectoryUnpublishButton,
RoomDirectoryPublishButton,
} from "./RoomDirectory";
import { DATE_FORMAT } from "./date";
} from "./room_directory";
import { DATE_FORMAT } from "../components/date";

const RoomPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
useListContext,
} from "react-admin";

import { DeleteMediaButton } from "./media";
import { DeleteMediaButton } from "../components/media";

const ListActions = () => {
const { isLoading, total } = useListContext();
Expand Down
10 changes: 5 additions & 5 deletions src/components/users.tsx → src/resources/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ import {
} from "react-admin";
import { Link } from "react-router-dom";

import AvatarField from "./AvatarField";
import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices";
import { DATE_FORMAT } from "./date";
import { DeviceRemoveButton } from "./devices";
import { MediaIDField, ProtectMediaButton, QuarantineMediaButton } from "./media";
import AvatarField from "../components/AvatarField";
import { ServerNoticeButton, ServerNoticeBulkButton } from "../components/ServerNotices";
import { DATE_FORMAT } from "../components/date";
import { DeviceRemoveButton } from "../components/devices";
import { MediaIDField, ProtectMediaButton, QuarantineMediaButton } from "../components/media";

const choices_medium = [
{ id: "email", name: "resources.users.email" },
Expand Down

0 comments on commit fce6e03

Please sign in to comment.