feat: add allow auto update option for profiles and update UI components

This commit is contained in:
Tunglies
2025-10-18 17:03:12 +08:00
parent 98725bbecf
commit c2d7bf296a
7 changed files with 37 additions and 2 deletions

View File

@@ -377,6 +377,17 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
</StyledBox>
)}
/>
<Controller
name="option.allow_auto_update"
control={control}
render={({ field }) => (
<StyledBox>
<InputLabel>{t("Allow Auto Update")}</InputLabel>
<Switch checked={field.value} {...field} color="primary" />
</StyledBox>
)}
/>
</>
)}
</BaseDialog>

View File

@@ -706,5 +706,6 @@
"Selected profiles deleted successfully": "Selected profiles deleted successfully",
"Prefer System Titlebar": "Prefer System Titlebar",
"App Log Max Size": "App Log Max Size",
"App Log Max Count": "App Log Max Count"
"App Log Max Count": "App Log Max Count",
"Allow Auto Update": "Allow Auto Update"
}

View File

@@ -706,5 +706,6 @@
"Selected profiles deleted successfully": "选中的订阅已成功删除",
"Prefer System Titlebar": "优先使用系统标题栏",
"App Log Max Size": "应用日志最大大小",
"App Log Max Count": "应用日志最大数量"
"App Log Max Count": "应用日志最大数量",
"Allow Auto Update": "允许自动更新"
}

View File

@@ -270,6 +270,7 @@ interface IProfileOption {
update_interval?: number;
timeout_seconds?: number;
danger_accept_invalid_certs?: boolean;
allow_auto_update?: boolean;
merge?: string;
script?: string;
rules?: string;