куча говна
All checks were successful
Deploy / deploy (push) Successful in 4m32s

This commit is contained in:
Никита Круглицкий
2025-10-20 00:10:13 +06:00
parent 31460598ba
commit ec67be8aa6
50 changed files with 1616 additions and 1011 deletions

16
client/shared/chad-api.ts Normal file
View File

@@ -0,0 +1,16 @@
import { ToastEventBus } from 'primevue'
const instance = $fetch.create({
baseURL: process.env.API_BASE_URL || '/api',
credentials: 'include',
onResponseError({ response }) {
if (!import.meta.client)
return
const message = response._data.error || 'Something went wrong'
ToastEventBus.emit('add', { severity: 'error', summary: 'Error', detail: message, closable: false, life: 3000 })
},
})
export default instance

View File

@@ -1,12 +1,10 @@
export interface RemoteClient {
id: string
export interface ChadClient {
socketId: string
userId: string
username: string
}
export interface ChadClient extends RemoteClient {
isMe: boolean
displayName: string
inputMuted?: boolean
outputMuted?: boolean
}
export type UpdatedClient = Omit<ChadClient, 'id' | 'isMe'>
export type UpdatedClient = Omit<ChadClient, 'socketId' | 'userId' | 'isMe'>