chore: prepend new added rules

This commit is contained in:
MystiPanda 2024-07-24 14:25:06 +08:00
parent 88d98517c8
commit 624eb2a2ba
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -723,7 +723,7 @@ export const GroupsEditorViewer = (props: Props) => {
throw new Error(t("Group Name Already Exists"));
}
}
setPrependSeq([...prependSeq, formIns.getValues()]);
setPrependSeq([formIns.getValues(), ...prependSeq]);
} catch (err: any) {
Notice.error(err.message || err.toString());
}

View File

@ -276,7 +276,7 @@ export const ProxiesEditorViewer = (props: Props) => {
startIcon={<VerticalAlignTopRounded />}
onClick={() => {
let proxies = handleParse();
setPrependSeq([...prependSeq, ...proxies]);
setPrependSeq([...proxies, ...prependSeq]);
}}
>
{t("Prepend Proxy")}

View File

@ -543,7 +543,7 @@ export const RulesEditorViewer = (props: Props) => {
try {
let raw = validateRule();
if (prependSeq.includes(raw)) return;
setPrependSeq([...prependSeq, raw]);
setPrependSeq([raw, ...prependSeq]);
} catch (err: any) {
Notice.error(err.message || err.toString());
}