Skip to content

Commit 26e9065

Browse files
committed
fix: allow all devices to add plugin repo
1 parent 4bb6b6d commit 26e9065

File tree

1 file changed

+18
-39
lines changed

1 file changed

+18
-39
lines changed

src/routes/plugins/index.tsx

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import Layout from "@components/Layout";
22
import Page from "@components/Page";
33
import { useTheme } from "@hooks/useTheme";
4-
import { Box, Button, Card, Divider, Typography } from "@mui/material";
4+
import { Box, Button, Divider, Typography } from "@mui/material";
55

66
const lnreaderPluginsRepo =
77
"https://raw.githubusercontent.com/LNReader/lnreader-plugins/plugins/v3.0.0/.dist/plugins.min.json";
88

99
export default function Plugins() {
1010
const theme = useTheme();
11-
const isAndroid = /android/i.test(navigator.userAgent);
1211

1312
return (
1413
<Layout>
@@ -24,46 +23,26 @@ export default function Plugins() {
2423
<b>LNReader</b> maintains only one official repository; any other
2524
repositories are unofficial and have no affiliation with us.
2625
</Typography>
27-
{isAndroid ? (
28-
<Box sx={{ my: 2, textAlign: "center" }}>
29-
<Button
30-
variant="contained"
31-
sx={{
32-
borderRadius: 12,
33-
background: theme.primaryContainer,
34-
color: theme.onPrimaryContainer,
35-
textTransform: "none",
36-
}}
37-
href={
38-
"lnreader://repo/add?url=" +
39-
encodeURIComponent(lnreaderPluginsRepo)
40-
}
41-
>
42-
Add repository
43-
</Button>
44-
<Typography sx={{ mt: 2 }}>
45-
Requires <b>LNReader 2.0.0</b> or newer.
46-
</Typography>
47-
</Box>
48-
) : (
49-
<Card
26+
<Box sx={{ my: 2, textAlign: "center" }}>
27+
<Button
28+
variant="contained"
5029
sx={{
51-
bgcolor: theme.tertiaryContainer,
52-
my: 2,
53-
p: 2,
54-
borderRadius: 2,
30+
borderRadius: 12,
31+
background: theme.primaryContainer,
32+
color: theme.onPrimaryContainer,
33+
textTransform: "none",
5534
}}
35+
href={
36+
"lnreader://repo/add?url=" +
37+
encodeURIComponent(lnreaderPluginsRepo)
38+
}
5639
>
57-
<Typography sx={{ mb: 2, fontWeight: "600" }}>
58-
Unsupported operating system
59-
</Typography>
60-
<Typography sx={{ fontSize: 16 }}>
61-
<b>LNReader</b> is an <b>Android app</b> only. Use an{" "}
62-
<b>Android</b> device with <b>LNReader</b> installed to add
63-
this extension repo.
64-
</Typography>
65-
</Card>
66-
)}
40+
Add repository
41+
</Button>
42+
<Typography sx={{ mt: 2 }}>
43+
Requires <b>LNReader 2.0.0</b> or newer.
44+
</Typography>
45+
</Box>
6746
<Divider />
6847
</Box>
6948
}

0 commit comments

Comments
 (0)