Skip to content

Commit b3f1a6f

Browse files
committed
add repo button
1 parent 878ee21 commit b3f1a6f

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

src/routes/plugins/index.tsx

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,44 @@
11
import Layout from "@components/Layout";
2-
import { Typography } from "@mui/material";
2+
import { useTheme } from "@hooks/useTheme";
3+
import { Box, Button, Typography } from "@mui/material";
4+
5+
const lnreaderPluginsRepo =
6+
"https://raw.githubusercontent.com/LNReader/lnreader-plugins/plugins/v3.0.0/.dist/plugins.min.json";
37

48
export default function Plugins() {
9+
const theme = useTheme();
510
return (
611
<Layout>
7-
<Typography>Plugins</Typography>
12+
<Box sx={{ textAlign: "left", px: { xs: 2, sm: 8 } }}>
13+
<Typography variant="h4" sx={{ fontWeight: "600" }}>
14+
Plugins
15+
</Typography>
16+
<Box sx={{ my: 2, textAlign: "center" }}>
17+
<Button
18+
variant="contained"
19+
sx={{
20+
borderRadius: 12,
21+
background: theme.primary,
22+
color: theme.onPrimary,
23+
textTransform: "none",
24+
}}
25+
href={
26+
"lnreader://repo/add?url=" +
27+
encodeURIComponent(lnreaderPluginsRepo)
28+
}
29+
>
30+
Add repository
31+
</Button>
32+
<Box sx={{ display: "flex", justifyContent: "center", mt: 2 }}>
33+
<Typography>Requires </Typography>
34+
<Typography sx={{ fontWeight: "600", mx: 1 }}>
35+
{" "}
36+
LNReader 2.0.0
37+
</Typography>
38+
<Typography>or newer.</Typography>
39+
</Box>
40+
</Box>
41+
</Box>
842
</Layout>
943
);
1044
}

0 commit comments

Comments
 (0)