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
Generated
+2 -2
View File
@@ -7409,8 +7409,8 @@ dependencies = [
[[package]]
name = "tauri-plugin-mihomo"
version = "0.5.2"
source = "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#2b2c88d38a982196cbbd8b93bca3453c8e52bce6"
version = "0.5.3"
source = "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#bfbf02b5105c4b24bfda5de809a658dee9447d1b"
dependencies = [
"base64 0.22.1",
"bytes",
+5 -5
View File
@@ -130,7 +130,7 @@ importers:
version: 7.0.0
tauri-plugin-mihomo-api:
specifier: github:clash-verge-rev/tauri-plugin-mihomo
version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/2b2c88d38a982196cbbd8b93bca3453c8e52bce6
version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/bfbf02b5105c4b24bfda5de809a658dee9447d1b
types-pac:
specifier: ^1.0.3
version: 1.0.3
@@ -3360,9 +3360,9 @@ packages:
resolution: {integrity: sha512-dzGK0boVlC4W5QFuQN1EFSl3bIDYsk7Tj40U6eIBnK2k/8ml7TZ5agbI5j5+qnoVcAA+rNtBml8SEiLxZpNqRQ==}
engines: {node: '>=18'}
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/2b2c88d38a982196cbbd8b93bca3453c8e52bce6:
resolution: {gitHosted: true, tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/2b2c88d38a982196cbbd8b93bca3453c8e52bce6}
version: 0.5.2
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/bfbf02b5105c4b24bfda5de809a658dee9447d1b:
resolution: {gitHosted: true, integrity: sha512-Qb8WBzSbTPRIy0qYWMBPolqEgPAGhpz8jUO2DJQQ1lPY2jGKc/mZF/ybIllUnNERIbPeSVs9u/AKPA6IDyJE4Q==, tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/bfbf02b5105c4b24bfda5de809a658dee9447d1b}
version: 0.5.3
terser@5.48.0:
resolution: {integrity: sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==}
@@ -7049,7 +7049,7 @@ snapshots:
minizlib: 3.1.0
yallist: 5.0.0
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/2b2c88d38a982196cbbd8b93bca3453c8e52bce6:
tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/bfbf02b5105c4b24bfda5de809a658dee9447d1b:
dependencies:
'@tauri-apps/api': 2.11.0
+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 })
}}
>
+1 -1
View File
@@ -51,7 +51,7 @@ export const useLogData = () => {
const queryClient = useQueryClient()
const [clashLog] = useClashLog()
const enableLog = clashLog.enable
const logLevel = clashLog.logLevel
const logLevel = clashLog.logLevel.toUpperCase() as LogLevel
const allowedTypes = LOG_LEVEL_FILTERS[logLevel] ?? DEFAULT_LOG_TYPES
const hasLoadedInitialLogsRef = useRef(false)