mirror of
https://github.com/Awesome-Technologies/synapse-admin.git
synced 2025-09-02 15:58:23 +02:00
Compare commits
No commits in common. "master" and "0.11.0" have entirely different histories.
2
.github/workflows/edge_ghpage.yml
vendored
2
.github/workflows/edge_ghpage.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
yarn build --base=/synapse-admin
|
yarn build --base=/synapse-admin
|
||||||
|
|
||||||
- name: Deploy 🚀
|
- name: Deploy 🚀
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
uses: JamesIves/github-pages-deploy-action@v4.6.8
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
branch: gh-pages
|
||||||
folder: dist
|
folder: dist
|
||||||
|
2
.github/workflows/github-release.yml
vendored
2
.github/workflows/github-release.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
version=`git describe --dirty --tags || echo unknown`
|
version=`git describe --dirty --tags || echo unknown`
|
||||||
cp -r dist synapse-admin-$version
|
cp -r dist synapse-admin-$version
|
||||||
tar chvzf dist/synapse-admin-$version.tar.gz synapse-admin-$version
|
tar chvzf dist/synapse-admin-$version.tar.gz synapse-admin-$version
|
||||||
- uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
|
- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
||||||
with:
|
with:
|
||||||
files: dist/*.tar.gz
|
files: dist/*.tar.gz
|
||||||
env:
|
env:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Builder
|
# Builder
|
||||||
FROM node:lts AS builder
|
FROM node:lts as builder
|
||||||
LABEL org.opencontainers.image.url=https://github.com/Awesome-Technologies/synapse-admin org.opencontainers.image.source=https://github.com/Awesome-Technologies/synapse-admin
|
LABEL org.opencontainers.image.url=https://github.com/Awesome-Technologies/synapse-admin org.opencontainers.image.source=https://github.com/Awesome-Technologies/synapse-admin
|
||||||
# Base path for synapse admin
|
# Base path for synapse admin
|
||||||
ARG BASE_PATH=./
|
ARG BASE_PATH=./
|
||||||
|
@ -2,7 +2,7 @@ import type { JestConfigWithTsJest } from "ts-jest";
|
|||||||
|
|
||||||
const config: JestConfigWithTsJest = {
|
const config: JestConfigWithTsJest = {
|
||||||
preset: "ts-jest",
|
preset: "ts-jest",
|
||||||
testEnvironment: "jest-fixed-jsdom",
|
testEnvironment: "jsdom",
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
coveragePathIgnorePatterns: ["node_modules", "dist"],
|
coveragePathIgnorePatterns: ["node_modules", "dist"],
|
||||||
coverageDirectory: "<rootDir>/coverage/",
|
coverageDirectory: "<rootDir>/coverage/",
|
||||||
|
32
package.json
32
package.json
@ -13,8 +13,7 @@
|
|||||||
"packageManager": "yarn@4.4.1",
|
"packageManager": "yarn@4.4.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.7.0",
|
"@eslint/js": "^9.7.0",
|
||||||
"@mui/system": "^7.1.0",
|
"@mui/utils": "^6.1.3",
|
||||||
"@mui/utils": "^7.1.0",
|
|
||||||
"@testing-library/dom": "^10.4.0",
|
"@testing-library/dom": "^10.4.0",
|
||||||
"@testing-library/jest-dom": "^6.0.0",
|
"@testing-library/jest-dom": "^6.0.0",
|
||||||
"@testing-library/react": "^16.0.0",
|
"@testing-library/react": "^16.0.0",
|
||||||
@ -37,42 +36,41 @@
|
|||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"jest-fetch-mock": "^3.0.3",
|
"jest-fetch-mock": "^3.0.3",
|
||||||
"jest-fixed-jsdom": "^0.0.9",
|
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"react-test-renderer": "^18.3.1",
|
"react-test-renderer": "^18.3.1",
|
||||||
"ts-jest": "^29.3.4",
|
"ts-jest": "^29.2.3",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.4.5",
|
||||||
"typescript-eslint": "^8.32.1",
|
"typescript-eslint": "^8.32.0",
|
||||||
"vite": "^6.3.5",
|
"vite": "^5.4.19",
|
||||||
"vite-plugin-version-mark": "^0.1.0"
|
"vite-plugin-version-mark": "^0.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.13.0",
|
||||||
"@emotion/styled": "^11.14.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
"@haleos/ra-language-german": "^1.0.0",
|
"@haleos/ra-language-german": "^1.0.0",
|
||||||
"@haxqer/ra-language-chinese": "^4.16.2",
|
"@haxqer/ra-language-chinese": "^4.16.2",
|
||||||
"@mui/icons-material": "^7.1.0",
|
"@mui/icons-material": "^5.16.4",
|
||||||
"@mui/material": "^7.1.0",
|
"@mui/material": "^5.16.4",
|
||||||
"@tanstack/react-query": "^5.59.12",
|
"@tanstack/react-query": "^5.59.12",
|
||||||
"history": "^5.3.0",
|
"history": "^5.3.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"papaparse": "^5.4.1",
|
"papaparse": "^5.4.1",
|
||||||
"query-string": "^7.1.3",
|
"query-string": "^7.1.3",
|
||||||
"ra-core": "^5.8.3",
|
"ra-core": "^5.2.3",
|
||||||
"ra-i18n-polyglot": "^5.8.3",
|
"ra-i18n-polyglot": "^5.2.3",
|
||||||
"ra-language-english": "^5.8.3",
|
"ra-language-english": "^5.2.3",
|
||||||
"ra-language-farsi": "^5.0.0",
|
"ra-language-farsi": "^5.0.0",
|
||||||
"ra-language-french": "^5.8.3",
|
"ra-language-french": "^5.2.3",
|
||||||
"ra-language-italian": "^3.13.1",
|
"ra-language-italian": "^3.13.1",
|
||||||
"ra-language-russian": "^4.14.2",
|
"ra-language-russian": "^4.14.2",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-admin": "^5.8.3",
|
"react-admin": "^5.2.3",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-hook-form": "^7.52.1",
|
"react-hook-form": "^7.52.1",
|
||||||
"react-is": "^18.3.1",
|
"react-is": "^18.3.1",
|
||||||
"react-router": "^7.6.1",
|
"react-router": "^6.28.1",
|
||||||
"react-router-dom": "^7.6.1"
|
"react-router-dom": "^6.28.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite serve",
|
"start": "vite serve",
|
||||||
|
63
src/App.tsx
63
src/App.tsx
@ -21,7 +21,6 @@ import userMediaStats from "./resources/user_media_statistics";
|
|||||||
import users from "./resources/users";
|
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";
|
||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
||||||
|
|
||||||
// TODO: Can we use lazy loading together with browser locale?
|
// TODO: Can we use lazy loading together with browser locale?
|
||||||
const messages = {
|
const messages = {
|
||||||
@ -46,40 +45,36 @@ const i18nProvider = polyglotI18nProvider(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
|
||||||
|
|
||||||
const App = () => (
|
const App = () => (
|
||||||
<QueryClientProvider client={queryClient}>
|
<Admin
|
||||||
<Admin
|
disableTelemetry
|
||||||
disableTelemetry
|
requireAuth
|
||||||
requireAuth
|
loginPage={LoginPage}
|
||||||
loginPage={LoginPage}
|
authProvider={authProvider}
|
||||||
authProvider={authProvider}
|
dataProvider={dataProvider}
|
||||||
dataProvider={dataProvider}
|
i18nProvider={i18nProvider}
|
||||||
i18nProvider={i18nProvider}
|
>
|
||||||
>
|
<CustomRoutes>
|
||||||
<CustomRoutes>
|
<Route path="/import_users" element={<ImportFeature />} />
|
||||||
<Route path="/import_users" element={<ImportFeature />} />
|
</CustomRoutes>
|
||||||
</CustomRoutes>
|
<Resource {...users} />
|
||||||
<Resource {...users} />
|
<Resource {...rooms} />
|
||||||
<Resource {...rooms} />
|
<Resource {...userMediaStats} />
|
||||||
<Resource {...userMediaStats} />
|
<Resource {...reports} />
|
||||||
<Resource {...reports} />
|
<Resource {...roomDirectory} />
|
||||||
<Resource {...roomDirectory} />
|
<Resource {...destinations} />
|
||||||
<Resource {...destinations} />
|
<Resource {...registrationToken} />
|
||||||
<Resource {...registrationToken} />
|
<Resource name="connections" />
|
||||||
<Resource name="connections" />
|
<Resource name="devices" />
|
||||||
<Resource name="devices" />
|
<Resource name="room_members" />
|
||||||
<Resource name="room_members" />
|
<Resource name="users_media" />
|
||||||
<Resource name="users_media" />
|
<Resource name="joined_rooms" />
|
||||||
<Resource name="joined_rooms" />
|
<Resource name="pushers" />
|
||||||
<Resource name="pushers" />
|
<Resource name="servernotices" />
|
||||||
<Resource name="servernotices" />
|
<Resource name="forward_extremities" />
|
||||||
<Resource name="forward_extremities" />
|
<Resource name="room_state" />
|
||||||
<Resource name="room_state" />
|
<Resource name="destination_rooms" />
|
||||||
<Resource name="destination_rooms" />
|
</Admin>
|
||||||
</Admin>
|
|
||||||
</QueryClientProvider>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
@ -5,13 +5,7 @@ import { createRoot } from "react-dom/client";
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
import { AppContext } from "./AppContext";
|
import { AppContext } from "./AppContext";
|
||||||
|
|
||||||
const baseUrl = import.meta.env.BASE_URL;
|
fetch(`${import.meta.env.BASE_URL}/config.json`)
|
||||||
const configJSON = "config.json";
|
|
||||||
// if import.meta.env.BASE_URL have a trailing slash, remove it
|
|
||||||
// load config.json from relative path if import.meta.env.BASE_URL is None or empty
|
|
||||||
const configJSONUrl = baseUrl ? `${baseUrl.replace(/\/$/, "")}/${configJSON}` : configJSON;
|
|
||||||
|
|
||||||
fetch(configJSONUrl)
|
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(props =>
|
.then(props =>
|
||||||
createRoot(document.getElementById("root")).render(
|
createRoot(document.getElementById("root")).render(
|
||||||
|
@ -80,6 +80,11 @@ const UserListActions = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UserListActions.defaultProps = {
|
||||||
|
selectedIds: [],
|
||||||
|
onUnselectItems: () => null,
|
||||||
|
};
|
||||||
|
|
||||||
const UserPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
const UserPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;
|
||||||
|
|
||||||
const userFilters = [
|
const userFilters = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user