add clear all rules button
This commit is contained in:
@@ -47,6 +47,7 @@ import { syncShareRules } from "../../libs/sync";
|
||||
import { debounce } from "../../libs/utils";
|
||||
import { delSubRules, getSyncWithDefault } from "../../libs/storage";
|
||||
import OwSubRule from "./OwSubRule";
|
||||
import ClearAllIcon from "@mui/icons-material/ClearAll";
|
||||
|
||||
function RuleFields({ rule, rules, setShow, setKeyword }) {
|
||||
const initFormValues = rule || {
|
||||
@@ -570,6 +571,17 @@ function UserRules({ subRules }) {
|
||||
selectedUrl={selectedUrl}
|
||||
/>
|
||||
|
||||
<Button
|
||||
size="small"
|
||||
variant="outlined"
|
||||
onClick={() => {
|
||||
rules.clear();
|
||||
}}
|
||||
startIcon={<ClearAllIcon />}
|
||||
>
|
||||
{i18n("clear_all")}
|
||||
</Button>
|
||||
|
||||
<HelpButton />
|
||||
|
||||
<FormControlLabel
|
||||
|
||||
Reference in New Issue
Block a user