mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-07-30 19:11:44 +08:00
feat: 优化网页消息提醒样式
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
|
||||
import { ref, watch, type Ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
|
||||
export interface UseConfigPopoverOptions {
|
||||
/** Reactive open state from props */
|
||||
@@ -13,8 +11,6 @@ export interface UseConfigPopoverOptions {
|
||||
}
|
||||
|
||||
export function useConfigPopover(options: UseConfigPopoverOptions) {
|
||||
const { t } = useI18n()
|
||||
|
||||
const applying = ref(false)
|
||||
const loadingDevices = ref(false)
|
||||
|
||||
@@ -36,7 +32,6 @@ export function useConfigPopover(options: UseConfigPopoverOptions) {
|
||||
applying.value = true
|
||||
try {
|
||||
await applyFn()
|
||||
toast.success(t('config.applied'))
|
||||
} catch (e) {
|
||||
console.info('[ConfigPopover] Apply failed:', e)
|
||||
} finally {
|
||||
|
||||
@@ -43,12 +43,6 @@ export function useConsoleEvents(handlers: ConsoleEventHandlers) {
|
||||
}
|
||||
|
||||
function handleStreamReconnecting(data: { device: string; attempt: number }) {
|
||||
if (data.attempt === 1 || data.attempt % 5 === 0) {
|
||||
toast.info(t('console.deviceRecovering'), {
|
||||
description: t('console.deviceRecoveringDesc', { attempt: data.attempt }),
|
||||
duration: 3000,
|
||||
})
|
||||
}
|
||||
handlers.onStreamReconnecting?.(data)
|
||||
}
|
||||
|
||||
@@ -56,10 +50,6 @@ export function useConsoleEvents(handlers: ConsoleEventHandlers) {
|
||||
if (systemStore.stream) {
|
||||
systemStore.stream.online = true
|
||||
}
|
||||
toast.success(t('console.deviceRecovered'), {
|
||||
description: t('console.deviceRecoveredDesc'),
|
||||
duration: 3000,
|
||||
})
|
||||
handlers.onStreamRecovered?.(_data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user