mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore: disable admin mode autolaunch limitation
This commit is contained in:
@@ -194,7 +194,7 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
label={t("Auto Launch")}
|
||||
extra={
|
||||
isAdminMode && (
|
||||
<Tooltip title={t("Administrator mode does not support auto launch")}>
|
||||
<Tooltip title={t("Administrator mode may not support auto launch")}>
|
||||
<WarningRounded sx={{ color: "warning.main", mr: 1 }} />
|
||||
</Tooltip>
|
||||
)
|
||||
@@ -206,14 +206,12 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
onCatch={onError}
|
||||
onFormat={onSwitchFormat}
|
||||
onChange={(e) => {
|
||||
// 在管理员模式下禁用更改
|
||||
if (isAdminMode) return;
|
||||
// 移除管理员模式检查提示
|
||||
onChangeData({ enable_auto_launch: e });
|
||||
}}
|
||||
onGuard={async (e) => {
|
||||
if (isAdminMode) {
|
||||
Notice.error(t("Administrator mode does not support auto launch"), 2000);
|
||||
return Promise.reject(new Error(t("Administrator mode does not support auto launch")));
|
||||
Notice.info(t("Administrator mode may not support auto launch"), 2000);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -230,7 +228,7 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Switch edge="end" disabled={isAdminMode} />
|
||||
<Switch edge="end" />
|
||||
</GuardState>
|
||||
</SettingItem>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user