feat: Add 'atas' (minutes/records) management feature, and implement various improvements across UI, backend logic, and authentication.
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
<script lang="ts">
|
||||
import { useQuery, useConvexClient } from 'convex-svelte';
|
||||
import { api } from '@sgse-app/backend/convex/_generated/api';
|
||||
import { voltarParaLista } from '$lib/stores/chatStore';
|
||||
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
|
||||
import MessageList from './MessageList.svelte';
|
||||
import MessageInput from './MessageInput.svelte';
|
||||
import UserStatusBadge from './UserStatusBadge.svelte';
|
||||
import UserAvatar from './UserAvatar.svelte';
|
||||
import ScheduleMessageModal from './ScheduleMessageModal.svelte';
|
||||
import SalaReuniaoManager from './SalaReuniaoManager.svelte';
|
||||
import CallWindow from '../call/CallWindow.svelte';
|
||||
import ErrorModal from '../ErrorModal.svelte';
|
||||
//import { getAvatarUrl } from '$lib/utils/avatarGenerator';
|
||||
import { browser } from '$app/environment';
|
||||
import { traduzirErro } from '$lib/utils/erroHelpers';
|
||||
import { useConvexClient, useQuery } from 'convex-svelte';
|
||||
import {
|
||||
Bell,
|
||||
X,
|
||||
ArrowLeft,
|
||||
Bell,
|
||||
Clock,
|
||||
LogOut,
|
||||
MoreVertical,
|
||||
Users,
|
||||
Clock,
|
||||
XCircle,
|
||||
Phone,
|
||||
Video
|
||||
Users,
|
||||
Video,
|
||||
X,
|
||||
XCircle
|
||||
} from 'lucide-svelte';
|
||||
//import { getAvatarUrl } from '$lib/utils/avatarGenerator';
|
||||
import { browser } from '$app/environment';
|
||||
import { voltarParaLista } from '$lib/stores/chatStore';
|
||||
import { traduzirErro } from '$lib/utils/erroHelpers';
|
||||
import CallWindow from '../call/CallWindow.svelte';
|
||||
import ErrorModal from '../ErrorModal.svelte';
|
||||
import MessageInput from './MessageInput.svelte';
|
||||
import MessageList from './MessageList.svelte';
|
||||
import SalaReuniaoManager from './SalaReuniaoManager.svelte';
|
||||
import ScheduleMessageModal from './ScheduleMessageModal.svelte';
|
||||
import UserAvatar from './UserAvatar.svelte';
|
||||
import UserStatusBadge from './UserStatusBadge.svelte';
|
||||
|
||||
//import { Bell, X, ArrowLeft, LogOut, MoreVertical, Users, Clock, XCircle } from 'lucide-svelte';
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
conversaId: string;
|
||||
}
|
||||
|
||||
let { conversaId }: Props = $props();
|
||||
const { conversaId }: Props = $props();
|
||||
|
||||
const client = useConvexClient();
|
||||
|
||||
// Token é passado automaticamente via interceptadores em +layout.svelte
|
||||
|
||||
let showScheduleModal = $state(false);
|
||||
let showSalaManager = $state(false);
|
||||
let showAdminMenu = $state(false);
|
||||
let showNotificacaoModal = $state(false);
|
||||
const showScheduleModal = $state(false);
|
||||
const showSalaManager = $state(false);
|
||||
const showAdminMenu = $state(false);
|
||||
const showNotificacaoModal = $state(false);
|
||||
let iniciandoChamada = $state(false);
|
||||
let chamadaAtiva = $state<Id<'chamadas'> | null>(null);
|
||||
|
||||
@@ -145,7 +145,10 @@
|
||||
}
|
||||
|
||||
// Funções para chamadas
|
||||
async function iniciarChamada(tipo: 'audio' | 'video', abrirEmNovaJanela: boolean = false): Promise<void> {
|
||||
async function iniciarChamada(
|
||||
tipo: 'audio' | 'video',
|
||||
abrirEmNovaJanela: boolean = false
|
||||
): Promise<void> {
|
||||
if (chamadaAtual) {
|
||||
errorTitle = 'Chamada já em andamento';
|
||||
errorMessage =
|
||||
@@ -167,19 +170,24 @@
|
||||
|
||||
// Se deve abrir em nova janela
|
||||
if (abrirEmNovaJanela && browser) {
|
||||
const { abrirCallWindowEmPopup, verificarSuportePopup } = await import('$lib/utils/callWindowManager');
|
||||
|
||||
const { abrirCallWindowEmPopup, verificarSuportePopup } = await import(
|
||||
'$lib/utils/callWindowManager'
|
||||
);
|
||||
|
||||
if (!verificarSuportePopup()) {
|
||||
errorTitle = 'Popups bloqueados';
|
||||
errorMessage = 'Seu navegador está bloqueando popups. Por favor, permita popups para este site e tente novamente.';
|
||||
errorMessage =
|
||||
'Seu navegador está bloqueando popups. Por favor, permita popups para este site e tente novamente.';
|
||||
errorInstructions = 'Verifique as configurações do seu navegador para permitir popups.';
|
||||
showErrorModal = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Buscar informações da chamada para obter roomName
|
||||
const chamadaInfo = await client.query(api.chamadas.obterChamada, { chamadaId });
|
||||
|
||||
const chamadaInfo = await client.query(api.chamadas.obterChamada, {
|
||||
chamadaId
|
||||
});
|
||||
|
||||
if (!chamadaInfo) {
|
||||
throw new Error('Chamada não encontrada');
|
||||
}
|
||||
@@ -372,7 +380,7 @@
|
||||
</button>
|
||||
<ul
|
||||
tabindex="0"
|
||||
class="dropdown-content menu bg-base-100 rounded-box z-[100] w-52 p-2 shadow-lg border border-base-300"
|
||||
class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-[100] w-52 border p-2 shadow-lg"
|
||||
>
|
||||
<li>
|
||||
<button
|
||||
@@ -418,7 +426,7 @@
|
||||
</button>
|
||||
<ul
|
||||
tabindex="0"
|
||||
class="dropdown-content menu bg-base-100 rounded-box z-[100] w-52 p-2 shadow-lg border border-base-300"
|
||||
class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-[100] w-52 border p-2 shadow-lg"
|
||||
>
|
||||
<li>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user