fix: update mihomo plugin log handling

This commit is contained in:
Tunglies
2026-06-18 19:18:10 +08:00
parent 42c9e19465
commit fd8c852698
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import { invoke } from '@tauri-apps/api/core'
import { useLockFn } from 'ahooks'
import { useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { updateGeo } from 'tauri-plugin-mihomo-api'
import { updateGeo, type LogLevel } from 'tauri-plugin-mihomo-api'
import { DialogRef, Switch, TooltipIcon } from '@/components/base'
import { useClash } from '@/hooks/use-clash'
@@ -191,7 +191,7 @@ const SettingClash = ({ onError }: Props) => {
onFormat={(e: any) => e.target.value}
onChange={(e) => onChangeData({ 'log-level': e })}
onGuard={(e) => {
setClashLog((pre) => ({ ...pre!, logLevel: e }))
setClashLog((pre) => ({ ...pre!, logLevel: e.toUpperCase() as LogLevel }))
return patchClash({ 'log-level': e })
}}
>