Skip to content

Commit

Permalink
v0.3.6
Browse files Browse the repository at this point in the history
- Updated dev scripts
  • Loading branch information
DerGoogler committed Jun 26, 2024
1 parent eb82a25 commit 7c70276
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 159 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 0.3.5
# 0.3.6

- Fixed Magisk install issue
- Added MMAR V2 to the default repos
- Added MMAR V2 to the default repos
- CLI handles now invalid repos
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mmrl"
description = "MMRL comes now as command line interface, with multi module install support!"
version = "0.3.5"
version = "0.3.6"
edition = "2021"
author = "Der_Googler"

Expand All @@ -23,8 +23,8 @@ zip = "0.6.6"
serde_ini = "0.2.0"
regex = "1.10.2"
async-recursion = "1.0.5"
# openssl = { version = "0.10.45", features = ["vendored"] }
openssl = "0.10.45"
openssl = { version = "0.10.45", features = ["vendored"] }
# openssl = "0.10.45"
url = "2.2"
walkdir = "2.4.0"

Expand Down
9 changes: 1 addition & 8 deletions build-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ cat <<EOF >update.json
"version": "$VER",
"versionCode": "$VER_CODE",
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v$VER/mmrl-$VER-module-aarch64.zip",
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
}
EOF

cat <<EOF >system/usr/share/mmrl/config/mmrl/info.json
{
"version": "$VER",
"versionCode": "$VER_CODE",
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md",
"author": "$AUT",
"rustVersion": "$RUST_VER",
"buildDate": "$BUILD_DATE"
Expand Down
6 changes: 3 additions & 3 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=mmrl
name=MMRL CLI
version=0.3.5
versionCode=035
version=0.3.6
versionCode=036
author=Der_Googler
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-24 with Rust 1.78.0.
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-26 with Rust 1.78.0.
updateJson=https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/module/update.json
268 changes: 137 additions & 131 deletions module/system/usr/share/mmrl/config/mmrl/index.jsx
Original file line number Diff line number Diff line change
@@ -1,149 +1,155 @@
import React from "react"
import { Page, Toolbar } from "@mmrl/ui"
import { useActivity, useNativeFileStorage, useStrings } from "@mmrl/hooks"
import { withRequireNewVersion } from "@mmrl/hoc"
import {
ArrowBackIosRounded,
DeleteRounded,
AddRounded
} from "@mui/icons-material";
ArrowBackIosRounded,
DeleteRounded,
AddRounded
} from "@mui/icons-material"
import {
List,
ListItem,
ListItemText,
ListSubheader,
IconButton,
Card,
CardContent,
Typography,
Grid,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
TextField,
Button,
List,
ListItem,
ListItemText,
ListSubheader,
IconButton,
Card,
CardContent,
Typography,
Grid,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
TextField,
Button,
} from "@mui/material"

const info = include("info.json")
const info = require(path.resolve(__modpath, "update.json"))

export default () => {
const [repos, setRepos] = useNativeFileStorage("/data/adb/mmrl/repos.json", [
"https://magisk-modules-alt-repo.github.io/json-v2/json/modules.json",
"https://gr.dergoogler.com/gmr/json/modules.json"
], { loader: "json" })
const App = () => {
const [repos, setRepos] = useNativeFileStorage("/data/adb/mmrl/repos.json", [
"https://magisk-modules-alt-repo.github.io/json-v2/json/modules.json",
"https://gr.dergoogler.com/gmr/json/modules.json"
], { loader: "json" })

const { context } = useActivity()
const { strings } = useStrings()
const { context } = useActivity()
const { strings } = useStrings()


const [open, setOpen] = React.useState(false)
const [repoLink, setRepoLink] = React.useState("")
const handleDialogOpen = () => setOpen(true)
const handleDialogClose = () => { setOpen(false), setRepoLink("") }
const handleRepoLinkChange = (e) => setRepoLink(e.target.value)
const [open, setOpen] = React.useState(false)
const [repoLink, setRepoLink] = React.useState("")
const handleDialogOpen = () => setOpen(true)
const handleDialogClose = () => { setOpen(false), setRepoLink("") }
const handleRepoLinkChange = (e) => setRepoLink(e.target.value)


const renderToolbar = React.useCallback(() => {
return (
<Toolbar
modifier="noshadow"
sx={{
background: "#ba420e",
background: "linear-gradient(22deg, #a63012 0%, #fc9e58 100%)",
}}>
<Toolbar.Left>
<Toolbar.Button icon={ArrowBackIosRounded} onClick={context.popPage} />
</Toolbar.Left>
<Toolbar.Center>Command line interface config</Toolbar.Center>
<Toolbar.Right>
<Toolbar.Button icon={AddRounded} onClick={handleDialogOpen} />
</Toolbar.Right>
</Toolbar>
)
}, [])
const renderToolbar = React.useCallback(() => {
return (
<Toolbar
modifier="noshadow"
sx={{
background: "#ba420e",
background: "linear-gradient(22deg, #a63012 0%, #fc9e58 100%)",
}}>
<Toolbar.Left>
<Toolbar.Button icon={ArrowBackIosRounded} onClick={context.popPage} />
</Toolbar.Left>
<Toolbar.Center>Command line interface config</Toolbar.Center>
<Toolbar.Right>
<Toolbar.Button icon={AddRounded} onClick={handleDialogOpen} />
</Toolbar.Right>
</Toolbar>
)
}, [])


return (
<Page renderToolbar={renderToolbar}>
<Card sx={{ m: 1 }}>
<CardContent>
<Grid container rowSpacing={0} columnSpacing={0} fullWidth>
<Grid item xs={5}>
<Typography variant="caption">Author:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.author}</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Version:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.version} ({info.versionCode})</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Rust version:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.rustVersion}</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Build date:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.buildDate}</Typography>
</Grid>
</Grid>
</CardContent>
</Card>
return (
<Page renderToolbar={renderToolbar}>
<Card sx={{ m: 1 }}>
<CardContent>
<Grid container rowSpacing={0} columnSpacing={0} fullWidth>
<Grid item xs={5}>
<Typography variant="caption">Author:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.author}</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Version:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.version} ({info.versionCode})</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Rust version:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.rustVersion}</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">Build date:</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant="caption">{info.buildDate}</Typography>
</Grid>
</Grid>
</CardContent>
</Card>

<List subheader={<ListSubheader>Installed repositories</ListSubheader>}>
{repos.map((repo) => {
const handleDelete = () => {
setRepos((rep) => rep.filter((remv) => remv != repo))
}
return (
<ListItem secondaryAction={
<IconButton edge="end" onClick={handleDelete}>
<DeleteRounded />
</IconButton>
}>
<ListItemText primary={repo} />
</ListItem>
)
})}
</List>
<List subheader={<ListSubheader>Installed repositories</ListSubheader>}>
{repos.map((repo) => {
const handleDelete = () => {
setRepos((rep) => rep.filter((remv) => remv != repo))
}
return (
<ListItem secondaryAction={
<IconButton edge="end" onClick={handleDelete}>
<DeleteRounded />
</IconButton>
}>
<ListItemText primary={repo} />
</ListItem>
)
})}
</List>


<Dialog open={open} onClose={handleDialogOpen}>
<DialogTitle>{strings("add_repository")}</DialogTitle>
<DialogContent>
<DialogContentText>{strings("add_repository_description")}</DialogContentText>
<TextField
autoFocus
name="repo_link"
fullWidth
margin="dense"
type="text"
label={"Modules link"}
value={repoLink}
variant="outlined"
onChange={handleRepoLinkChange}
/>
</DialogContent>
<DialogActions>
<Button onClick={handleDialogClose}>{strings("cancel")}</Button>
<Button
onClick={() => {
if (!repos.some((r) => r === repoLink)) {
setRepos((p) => [...p, repoLink])
handleDialogClose()
}
}}>
{strings("add")}
</Button>
</DialogActions>
</Dialog>
</Page>
)
}
<Dialog open={open} onClose={handleDialogOpen}>
<DialogTitle>{strings("add_repository")}</DialogTitle>
<DialogContent>
<DialogContentText>{strings("add_repository_description")}</DialogContentText>
<TextField
autoFocus
name="repo_link"
fullWidth
margin="dense"
type="text"
label={"Modules link"}
value={repoLink}
variant="outlined"
onChange={handleRepoLinkChange}
/>
</DialogContent>
<DialogActions>
<Button onClick={handleDialogClose}>{strings("cancel")}</Button>
<Button
onClick={() => {
if (!repos.some((r) => r === repoLink)) {
setRepos((p) => [...p, repoLink])
handleDialogClose()
}
}}>
{strings("add")}
</Button>
</DialogActions>
</Dialog>
</Page>
)
}

export default withRequireNewVersion({
versionCode: 21918,
component: App,
});
7 changes: 0 additions & 7 deletions module/system/usr/share/mmrl/config/mmrl/info.json

This file was deleted.

11 changes: 7 additions & 4 deletions module/update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"version": "0.3.5",
"versionCode": "035",
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.5/mmrl-0.3.5-module-aarch64.zip",
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
"version": "0.3.6",
"versionCode": "036",
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.6/mmrl-0.3.6-module-aarch64.zip",
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md",
"author": "Der_Googler",
"rustVersion": "1.78.0",
"buildDate": "2024-06-26"
}

0 comments on commit 7c70276

Please sign in to comment.