feat: 优化网页消息提醒样式

This commit is contained in:
mofeng-git
2026-05-01 21:46:32 +08:00
parent e51d243324
commit 52754c862b
12 changed files with 245 additions and 73 deletions

View File

@@ -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 {

View File

@@ -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)
}