@@ -1,3 +1,4 @@
|
||||
import { createOperationKey } from '@/lib/operation-key';
|
||||
import { useForm, usePage, Link, router } from '@inertiajs/react';
|
||||
import {
|
||||
Frame,
|
||||
@@ -137,7 +138,7 @@ export default function Page(p: Props) {
|
||||
}
|
||||
function RoomPage(p: Props) {
|
||||
const { auth } = usePage<{ auth: { user: { id: number } } }>().props;
|
||||
const message = useForm({ body: '', client_key: crypto.randomUUID() });
|
||||
const message = useForm({ body: '', client_key: createOperationKey() });
|
||||
const agreement = useForm({
|
||||
version: p.room.version,
|
||||
action: 'record',
|
||||
@@ -195,7 +196,7 @@ function RoomPage(p: Props) {
|
||||
onSuccess: () => {
|
||||
message.setData({
|
||||
body: '',
|
||||
client_key: crypto.randomUUID(),
|
||||
client_key: createOperationKey(),
|
||||
});
|
||||
},
|
||||
},
|
||||
@@ -205,6 +206,7 @@ function RoomPage(p: Props) {
|
||||
<Field label="Mensagem privada">
|
||||
<textarea
|
||||
className={control}
|
||||
disabled={message.processing}
|
||||
value={message.data.body}
|
||||
onChange={(e) =>
|
||||
message.setData('body', e.target.value)
|
||||
@@ -231,6 +233,15 @@ function RoomPage(p: Props) {
|
||||
antimalware limpa e hash correspondente. Anexar não
|
||||
confirma autenticidade nem vigência.
|
||||
</p>
|
||||
<p
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
aria-label="Documentos disponíveis nesta sala"
|
||||
>
|
||||
{p.documents.length
|
||||
? `${p.documents.length} documento(s) disponível(is) para esta conta.`
|
||||
: 'Nenhum documento está autorizado para consulta por esta conta nesta sala.'}
|
||||
</p>
|
||||
{p.documents.map((d) => (
|
||||
<article key={d.id}>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user