|
1 | 1 | import Layout from "@components/Layout";
|
2 | 2 | import { useTheme } from "@hooks/useTheme";
|
3 |
| -import { Box, Button, Typography } from "@mui/material"; |
| 3 | +import { Box, Button, Card, Divider, Typography } from "@mui/material"; |
4 | 4 |
|
5 | 5 | const lnreaderPluginsRepo =
|
6 | 6 | "https://raw.githubusercontent.com/LNReader/lnreader-plugins/plugins/v3.0.0/.dist/plugins.min.json";
|
7 | 7 |
|
8 | 8 | export default function Plugins() {
|
9 | 9 | const theme = useTheme();
|
| 10 | + const isAndroid = /android/i.test(navigator.userAgent); |
| 11 | + |
10 | 12 | return (
|
11 | 13 | <Layout>
|
12 |
| - <Box sx={{ textAlign: "left", px: { xs: 2, sm: 8 } }}> |
| 14 | + <Box |
| 15 | + sx={{ |
| 16 | + textAlign: "left", |
| 17 | + px: { xs: 2, sm: 4, md: 16 }, |
| 18 | + maxWidth: 800, |
| 19 | + height: "100vh", |
| 20 | + }} |
| 21 | + > |
13 | 22 | <Typography variant="h4" sx={{ fontWeight: "600" }}>
|
14 | 23 | Plugins
|
15 | 24 | </Typography>
|
16 |
| - <Box sx={{ my: 2, textAlign: "center" }}> |
17 |
| - <Button |
18 |
| - variant="contained" |
| 25 | + <Typography sx={{ mt: 2 }}> |
| 26 | + By default, <b>LNReader</b> comes without any plugins. You can choose |
| 27 | + to read local content or include an external repository. |
| 28 | + </Typography> |
| 29 | + <Typography sx={{ mt: 2 }}> |
| 30 | + <b>LNReader</b> maintains only one official repository; any other |
| 31 | + repositories are unofficial and have no affiliation with us. |
| 32 | + </Typography> |
| 33 | + {isAndroid ? ( |
| 34 | + <Box sx={{ my: 2, textAlign: "center" }}> |
| 35 | + <Button |
| 36 | + variant="contained" |
| 37 | + sx={{ |
| 38 | + borderRadius: 12, |
| 39 | + background: theme.primaryContainer, |
| 40 | + color: theme.onPrimaryContainer, |
| 41 | + textTransform: "none", |
| 42 | + }} |
| 43 | + href={ |
| 44 | + "lnreader://repo/add?url=" + |
| 45 | + encodeURIComponent(lnreaderPluginsRepo) |
| 46 | + } |
| 47 | + > |
| 48 | + Add repository |
| 49 | + </Button> |
| 50 | + <Typography sx={{ mt: 2 }}> |
| 51 | + Requires <b>LNReader 2.0.0</b> or newer. |
| 52 | + </Typography> |
| 53 | + </Box> |
| 54 | + ) : ( |
| 55 | + <Card |
19 | 56 | sx={{
|
20 |
| - borderRadius: 12, |
21 |
| - background: theme.primary, |
22 |
| - color: theme.onPrimary, |
23 |
| - textTransform: "none", |
| 57 | + bgcolor: theme.tertiaryContainer, |
| 58 | + my: 2, |
| 59 | + p: 2, |
| 60 | + borderRadius: 2, |
24 | 61 | }}
|
25 |
| - href={ |
26 |
| - "lnreader://repo/add?url=" + |
27 |
| - encodeURIComponent(lnreaderPluginsRepo) |
28 |
| - } |
29 | 62 | >
|
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 |
| 63 | + <Typography sx={{ mb: 2, fontWeight: "600" }}> |
| 64 | + Unsupported operating system |
37 | 65 | </Typography>
|
38 |
| - <Typography>or newer.</Typography> |
39 |
| - </Box> |
40 |
| - </Box> |
| 66 | + <Typography sx={{ fontSize: 16 }}> |
| 67 | + <b>LNReader</b> is an <b>Android app</b> only. Use an{" "} |
| 68 | + <b>Android</b> device with <b>LNReader</b> installed to add this |
| 69 | + extension repo. |
| 70 | + </Typography> |
| 71 | + </Card> |
| 72 | + )} |
| 73 | + <Divider /> |
41 | 74 | </Box>
|
42 | 75 | </Layout>
|
43 | 76 | );
|
|
0 commit comments