feat: Supports setting multiple custom styles

This commit is contained in:
Gabe
2025-11-04 21:22:38 +08:00
parent 814ce4ca11
commit 2b910b2c47
17 changed files with 844 additions and 403 deletions

View File

@@ -1,4 +1,4 @@
import { DEFAULT_SUBRULES_LIST, DEFAULT_OW_RULE } from "../config";
import { DEFAULT_SUBRULES_LIST } from "../config";
import { useSetting } from "./Setting";
import { useCallback, useEffect, useMemo, useState } from "react";
import { loadOrFetchSubRules } from "../libs/subRules";
@@ -78,15 +78,3 @@ export function useSubRules() {
loading,
};
}
/**
* 覆写订阅规则
* @returns
*/
export function useOwSubRule() {
const { setting, updateChild } = useSetting();
const owSubrule = setting?.owSubrule || DEFAULT_OW_RULE;
const updateOwSubrule = updateChild("owSubrule");
return { owSubrule, updateOwSubrule };
}