refactor: remove success notifications from api action wrappers and websocket connection

This commit is contained in:
mmacierzanka committed 2026-09-13 16:04:35 +02:00
1 parent 2513aa2b28
commit 76f63057bc
7 files changed
+15 -32

No files matched your search

-9
View File
@@ -1,6 +1,5 @@
import { onUnmounted, ref } from 'vue'
import type { BotStatus } from '@/types/status'
import { useToasts } from '@/composables/useToasts'
import { getGuildId, setGuildId } from '@/api/client'
const RECONNECT_DELAY_MS = 3000
@@ -13,13 +12,10 @@ const pendingTracks = ref<{ id: string; guildId: string; title: string }[]>([])
let socket: WebSocket | null = null
let reconnectTimer: number | null = null
let connectedOnce = false
let subscribers = 0
/** Jedno połączenie WebSocket na aplikację, niezależnie od liczby komponentów. */
export function useBotStatus() {
const { notify } = useToasts()
function open() {
const scheme = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
const guild = getGuildId()
@@ -30,11 +26,6 @@ export function useBotStatus() {
currentSocket.onopen = () => {
connected.value = true
notify(
connectedOnce ? 'Połączenie WebSocket przywrócone (Live)!' : 'WebSocket zsynchronizowany (Live)!',
'success',
)
connectedOnce = true
}
currentSocket.onmessage = (event) => {