Add etke.cc to footer and package.json (#60)

* Add etke.cc to footer and package.json

* more links
This commit is contained in:
Borislav Pantaleev 2024-10-19 11:24:45 +03:00 committed by GitHub
parent 853d14c1ce
commit 26862fa708
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 9 deletions

View file

@ -120,13 +120,7 @@
</div> </div>
</div> </div>
<script type="module" src="/src/index.tsx"></script> <script type="module" src="/src/index.tsx"></script>
<footer <span id="js-version" style="display: none;"></span>
style="position: relative; z-index: 2; height: 2em; margin-top: 0; line-height: 2em; background-color: #eee; border: 0.5px solid #ddd">
<a id="copyright" href="https://github.com/etkecc/synapse-admin"
style="margin-left: 1em; color: #888; font-family: Roboto, Helvetica, Arial, sans-serif; font-weight: 100; font-size: 0.8em; text-decoration: none;">
Synapse-Admin <b><span id="version"></span></b> by Awesome Technologies Innovationslabor GmbH
</a>
</footer>
</body> </body>
<script>document.getElementById("version").textContent = __SYNAPSE_ADMIN_VERSION__</script> <script>document.getElementById("js-version").textContent = __SYNAPSE_ADMIN_VERSION__</script>
</html> </html>

View file

@ -3,7 +3,7 @@
"version": "0.10.3", "version": "0.10.3",
"description": "Admin GUI for the Matrix.org server Synapse", "description": "Admin GUI for the Matrix.org server Synapse",
"type": "module", "type": "module",
"author": "Awesome Technologies Innovationslabor GmbH", "author": "etke.cc (originally by Awesome Technologies Innovationslabor GmbH)",
"license": "Apache-2.0", "license": "Apache-2.0",
"homepage": ".", "homepage": ".",
"repository": { "repository": {

View file

@ -23,6 +23,7 @@ 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"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import Footer from "./components/Footer";
// TODO: Can we use lazy loading together with browser locale? // TODO: Can we use lazy loading together with browser locale?
const messages = { const messages = {
@ -81,6 +82,7 @@ const App = () => (
<Resource name="room_state" /> <Resource name="room_state" />
<Resource name="destination_rooms" /> <Resource name="destination_rooms" />
</Admin> </Admin>
<Footer />
</QueryClientProvider> </QueryClientProvider>
); );

40
src/components/Footer.tsx Normal file
View file

@ -0,0 +1,40 @@
import { Box, Link, Typography } from "@mui/material";
import { useEffect, useState } from "react";
const Footer = () => {
const [version, setVersion] = useState<string | null>(null);
useEffect(() => {
const version = document.getElementById("js-version")?.textContent;
if (version) {
setVersion(version);
}
}, []);
return (<Box
component="footer"
sx={{
position: 'fixed',
zIndex: 100,
bottom: 0,
width: '100%',
bgcolor: "#eee",
borderTop: '1px solid',
borderColor: '#ddd',
p: 1,
}}>
<Typography variant="body2">
<Link sx={{ color: "#888", textDecoration: 'none' }} href="https://github.com/etkecc/synapse-admin" target="_blank">
Synapse-Admin
</Link> <Link href={`https://github.com/etkecc/synapse-admin/releases/tag/`+version} target="_blank">
<span style={{ fontWeight: 'bold', color: "#000" }}>{version}</span>
</Link> <Link sx={{ color: "#888", textDecoration: 'none' }} href="https://etke.cc/?utm_source=synapse-admin&utm_medium=footer&utm_campaign=synapse-admin" target="_blank">
by etke.cc
</Link> <Link sx={{ color: "#888", textDecoration: 'none' }} href="https://github.com/awesome-technologies/synapse-admin" target="_blank">
(originally developed by Awesome Technologies Innovationslabor GmbH)
</Link>
</Typography>
</Box>
);
};
export default Footer;