Skip to content

Commit 26862fa

Browse files
authored
Add etke.cc to footer and package.json (#60)
* Add etke.cc to footer and package.json * more links
1 parent 853d14c commit 26862fa

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed

index.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,7 @@
120120
</div>
121121
</div>
122122
<script type="module" src="/src/index.tsx"></script>
123-
<footer
124-
style="position: relative; z-index: 2; height: 2em; margin-top: 0; line-height: 2em; background-color: #eee; border: 0.5px solid #ddd">
125-
<a id="copyright" href="https://github.com/etkecc/synapse-admin"
126-
style="margin-left: 1em; color: #888; font-family: Roboto, Helvetica, Arial, sans-serif; font-weight: 100; font-size: 0.8em; text-decoration: none;">
127-
Synapse-Admin <b><span id="version"></span></b> by Awesome Technologies Innovationslabor GmbH
128-
</a>
129-
</footer>
123+
<span id="js-version" style="display: none;"></span>
130124
</body>
131-
<script>document.getElementById("version").textContent = __SYNAPSE_ADMIN_VERSION__</script>
125+
<script>document.getElementById("js-version").textContent = __SYNAPSE_ADMIN_VERSION__</script>
132126
</html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.10.3",
44
"description": "Admin GUI for the Matrix.org server Synapse",
55
"type": "module",
6-
"author": "Awesome Technologies Innovationslabor GmbH",
6+
"author": "etke.cc (originally by Awesome Technologies Innovationslabor GmbH)",
77
"license": "Apache-2.0",
88
"homepage": ".",
99
"repository": {

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import users from "./resources/users";
2323
import authProvider from "./synapse/authProvider";
2424
import dataProvider from "./synapse/dataProvider";
2525
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
26+
import Footer from "./components/Footer";
2627

2728
// TODO: Can we use lazy loading together with browser locale?
2829
const messages = {
@@ -81,6 +82,7 @@ const App = () => (
8182
<Resource name="room_state" />
8283
<Resource name="destination_rooms" />
8384
</Admin>
85+
<Footer />
8486
</QueryClientProvider>
8587
);
8688

src/components/Footer.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { Box, Link, Typography } from "@mui/material";
2+
import { useEffect, useState } from "react";
3+
4+
const Footer = () => {
5+
const [version, setVersion] = useState<string | null>(null);
6+
useEffect(() => {
7+
const version = document.getElementById("js-version")?.textContent;
8+
if (version) {
9+
setVersion(version);
10+
}
11+
}, []);
12+
13+
return (<Box
14+
component="footer"
15+
sx={{
16+
position: 'fixed',
17+
zIndex: 100,
18+
bottom: 0,
19+
width: '100%',
20+
bgcolor: "#eee",
21+
borderTop: '1px solid',
22+
borderColor: '#ddd',
23+
p: 1,
24+
}}>
25+
<Typography variant="body2">
26+
<Link sx={{ color: "#888", textDecoration: 'none' }} href="https://github.com/etkecc/synapse-admin" target="_blank">
27+
Synapse-Admin
28+
</Link> <Link href={`https://github.com/etkecc/synapse-admin/releases/tag/`+version} target="_blank">
29+
<span style={{ fontWeight: 'bold', color: "#000" }}>{version}</span>
30+
</Link> <Link sx={{ color: "#888", textDecoration: 'none' }} href="https://etke.cc/?utm_source=synapse-admin&utm_medium=footer&utm_campaign=synapse-admin" target="_blank">
31+
by etke.cc
32+
</Link> <Link sx={{ color: "#888", textDecoration: 'none' }} href="https://github.com/awesome-technologies/synapse-admin" target="_blank">
33+
(originally developed by Awesome Technologies Innovationslabor GmbH)
34+
</Link>
35+
</Typography>
36+
</Box>
37+
);
38+
};
39+
40+
export default Footer;

0 commit comments

Comments
 (0)