-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4179cf5
commit 920dae6
Showing
9 changed files
with
146 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Module Blacklist Removal | ||
description: Issue template to request a blacklisted module removal | ||
title: '[MBL]: ' | ||
body: | ||
- type: input | ||
id: moduleid | ||
attributes: | ||
label: Module ID | ||
placeholder: mmrl_install_tools | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reason | ||
attributes: | ||
label: Reason why it should be removed | ||
validations: | ||
required: true | ||
- type: markdown | ||
attributes: | ||
value: >- | ||
This template was generated with [Issue Forms | ||
Creator](https://issue-forms-creator.netlify.app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import AntiFeatureListItem from "@Components/AntiFeatureListItem"; | ||
import Anchor from "@Components/dapi/Anchor"; | ||
import { Page } from "@Components/onsenui/Page"; | ||
import { Toolbar } from "@Components/onsenui/Toolbar"; | ||
import { useActivity } from "@Hooks/useActivity"; | ||
import { useStrings } from "@Hooks/useStrings"; | ||
import { BlacklistedModule, blacklistedModules } from "@Util/blacklisted-modules"; | ||
import { ExpandLess, ExpandMore } from "@mui/icons-material"; | ||
import { Collapse, List, ListItem, ListItemIcon, ListItemText } from "@mui/material"; | ||
import FlatList from "flatlist-react"; | ||
import React from "react"; | ||
|
||
interface BlacklistItemProps { | ||
module: BlacklistedModule; | ||
} | ||
|
||
function BlacklistItem({ module }: BlacklistItemProps) { | ||
const [open, setOpen] = React.useState(false); | ||
|
||
const handleClick = () => { | ||
setOpen((prev) => !prev); | ||
}; | ||
|
||
return ( | ||
<> | ||
<ListItem> | ||
<ListItemIcon onClick={handleClick}>{open ? <ExpandLess /> : <ExpandMore />}</ListItemIcon> | ||
|
||
<Anchor color="text.primary" href={module.source} noIcon> | ||
<ListItemText primary={module.id} secondary={module.source} /> | ||
</Anchor> | ||
</ListItem> | ||
<Collapse in={open} timeout="auto" unmountOnExit> | ||
<List disablePadding> | ||
{typeof module.antifeatures === "string" ? ( | ||
<AntiFeatureListItem sx={{ pl: 4 }} type={module.antifeatures} /> | ||
) : ( | ||
Array.isArray(module.antifeatures) && module.antifeatures.map((anti) => <AntiFeatureListItem sx={{ pl: 4 }} type={anti} />) | ||
)} | ||
</List> | ||
</Collapse> | ||
</> | ||
); | ||
} | ||
|
||
function ViewBlacklistedModulesActivity() { | ||
const { context } = useActivity(); | ||
const { strings } = useStrings(); | ||
|
||
const renderToolbar = () => { | ||
return ( | ||
<Toolbar modifier="noshadow"> | ||
<Toolbar.Left> | ||
<Toolbar.BackButton onClick={context.popPage} /> | ||
</Toolbar.Left> | ||
<Toolbar.Center>{strings("blacklisted_modules")}</Toolbar.Center> | ||
</Toolbar> | ||
); | ||
}; | ||
|
||
return ( | ||
<Page renderToolbar={renderToolbar}> | ||
<Page.RelativeContent zeroMargin> | ||
<List> | ||
<FlatList | ||
list={blacklistedModules} | ||
renderItem={(mod) => <BlacklistItem module={mod} />} | ||
renderOnScroll | ||
renderWhenEmpty={() => <></>} | ||
/> | ||
</List> | ||
</Page.RelativeContent> | ||
</Page> | ||
); | ||
} | ||
|
||
export default ViewBlacklistedModulesActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
export const blacklistedModules = { | ||
zygisksu: { | ||
export interface BlacklistedModule { | ||
id: string; | ||
source: string; | ||
hidden: boolean; | ||
antifeatures: Track["antifeatures"]; | ||
} | ||
|
||
export const blacklistedModules: BlacklistedModule[] = [ | ||
{ | ||
id: "zygisksu", | ||
source: "https://github.com/Dr-TSNG/ZygiskNext", | ||
hidden: false, | ||
antifeatures: ["Obfuscation", "NoSourceSince"], | ||
}, | ||
}; | ||
{ | ||
id: "ATWEAKER", | ||
source: "https://github.com/C0d3h01/AndroidTweaker", | ||
hidden: false, | ||
antifeatures: ["NoSourceSince"], | ||
}, | ||
]; |