mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-13 15:14:49 -06:00
full translate of settings tab
This commit is contained in:
parent
b75a794ec3
commit
19aff45664
@ -36,9 +36,9 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(url) => {
|
(url) => {
|
||||||
if (!url) return 'URL é obrigatório';
|
if (!url) return this.$t('required', { field: 'URL' });
|
||||||
if (!url.startsWith('http'))
|
if (!url.startsWith('http'))
|
||||||
return 'URL deve começar com http ou https';
|
return this.$t('httpHttps', { field: 'URL' });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="chatwootData.account_id"
|
v-model="chatwootData.account_id"
|
||||||
label="ID da conta"
|
:label="$t('chatwoot.account_id')"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
@ -56,7 +56,10 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(account_id) => {
|
(account_id) => {
|
||||||
if (!account_id) return 'ID da conta é obrigatório';
|
if (!account_id)
|
||||||
|
return this.$t('required', {
|
||||||
|
field: this.$t('chatwoot.account_id'),
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -65,7 +68,7 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="chatwootData.token"
|
v-model="chatwootData.token"
|
||||||
label="Token da conta"
|
:label="$t('chatwoot.token')"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
@ -73,7 +76,10 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(token) => {
|
(token) => {
|
||||||
if (!token) return 'Token é obrigatório';
|
if (!token)
|
||||||
|
return this.$t('required', {
|
||||||
|
field: this.$t('chatwoot.token'),
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -90,27 +96,23 @@
|
|||||||
density="compact"
|
density="compact"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>Assinar mensagens</span>
|
<span>{{ $t("chatwoot.signMsg") }}</span>
|
||||||
<HelpTooltip>
|
<HelpTooltip> {{ $t("chatwoot.signMsgHelp") }} </HelpTooltip>
|
||||||
Adiciona o nome do atendente na primeira linha da mensagem
|
|
||||||
</HelpTooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="chatwootData.reopen_conversation"
|
v-model="chatwootData.reopen_conversation"
|
||||||
label="Reabrir conversa"
|
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
density="compact"
|
density="compact"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>Reabrir conversa</span>
|
<span>{{ $t("chatwoot.reopenConversation") }}</span>
|
||||||
<HelpTooltip>
|
<HelpTooltip>
|
||||||
Reabre a conversa do cliente quando ele inicia uma nova
|
{{ $t("chatwoot.reopenConversationHelp") }}
|
||||||
conversa em vez de criar uma nova conversa
|
|
||||||
</HelpTooltip>
|
</HelpTooltip>
|
||||||
</template>
|
</template>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
@ -119,16 +121,15 @@
|
|||||||
<div>
|
<div>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="chatwootData.conversation_pending"
|
v-model="chatwootData.conversation_pending"
|
||||||
label="Conversa pendente"
|
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
density="compact"
|
density="compact"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>Iniciar conversas como pendente</span>
|
<span>{{ $t("chatwoot.conversationPending") }}</span>
|
||||||
<HelpTooltip>
|
<HelpTooltip>
|
||||||
Inicia a conversa como pendente ao invés de aberta
|
{{ $t("chatwoot.conversationPendingHelp") }}
|
||||||
</HelpTooltip>
|
</HelpTooltip>
|
||||||
</template>
|
</template>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
@ -137,11 +138,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="chatwootData.auto_create"
|
v-model="chatwootData.auto_create"
|
||||||
label="Conversa pendente"
|
|
||||||
:disabled="loading || !AppStore.versionSatisfies('>=1.6.0')"
|
:disabled="loading || !AppStore.versionSatisfies('>=1.6.0')"
|
||||||
:hint="
|
:hint="
|
||||||
!AppStore.versionSatisfies('>=1.6.0')
|
!AppStore.versionSatisfies('>=1.6.0')
|
||||||
? 'Disponível a partir da versão 1.6.0'
|
? $t('version.availableFrom', { version: '1.6.0' })
|
||||||
: undefined
|
: undefined
|
||||||
"
|
"
|
||||||
:persistent-hint="!AppStore.versionSatisfies('>=1.6.0')"
|
:persistent-hint="!AppStore.versionSatisfies('>=1.6.0')"
|
||||||
@ -150,10 +150,8 @@
|
|||||||
density="compact"
|
density="compact"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>Criar Caixa de Entrada</span>
|
<span>{{ $t("chatwoot.autoCreate") }}</span>
|
||||||
<HelpTooltip>
|
<HelpTooltip>{{ $t("chatwoot.autoCreateHelp") }}</HelpTooltip>
|
||||||
Cria automaticamente a caixa de entrada no Chatwoot
|
|
||||||
</HelpTooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card variant="outlined" :loading="loading">
|
<v-card variant="outlined" :loading="loading">
|
||||||
<v-card-title class="d-flex align-center" @click="toggleExpanded" style="cursor: pointer" v-ripple>
|
<v-card-title
|
||||||
|
class="d-flex align-center"
|
||||||
|
@click="toggleExpanded"
|
||||||
|
style="cursor: pointer"
|
||||||
|
v-ripple
|
||||||
|
>
|
||||||
<v-icon start>mdi-cellphone-cog</v-icon>
|
<v-icon start>mdi-cellphone-cog</v-icon>
|
||||||
Comportamento
|
{{ $t("options.title") }}
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn
|
<v-btn
|
||||||
@ -27,7 +32,7 @@
|
|||||||
class="flex-grow-0 flex-shrink-0"
|
class="flex-grow-0 flex-shrink-0"
|
||||||
v-model="optionsData.reject_call"
|
v-model="optionsData.reject_call"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Rejeitar chamadas"
|
:label="$t('options.rejectCall')"
|
||||||
hide-details
|
hide-details
|
||||||
density="compact"
|
density="compact"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
@ -35,7 +40,7 @@
|
|||||||
class="flex-grow-1 flex-shrink-0"
|
class="flex-grow-1 flex-shrink-0"
|
||||||
v-model="optionsData.msg_call"
|
v-model="optionsData.msg_call"
|
||||||
:disabled="loading || !optionsData.reject_call"
|
:disabled="loading || !optionsData.reject_call"
|
||||||
label="Mensagem de rejeição"
|
:label="$t('options.msgCall')"
|
||||||
hide-details
|
hide-details
|
||||||
style="min-width: 200px"
|
style="min-width: 200px"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
@ -45,7 +50,7 @@
|
|||||||
class="flex-grow-0"
|
class="flex-grow-0"
|
||||||
v-model="optionsData.groups_ignore"
|
v-model="optionsData.groups_ignore"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Ignorar grupos"
|
:label="$t('options.groupsIgnore')"
|
||||||
hide-details
|
hide-details
|
||||||
density="compact"
|
density="compact"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
@ -54,7 +59,7 @@
|
|||||||
class="flex-grow-0"
|
class="flex-grow-0"
|
||||||
v-model="optionsData.always_online"
|
v-model="optionsData.always_online"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Sempre online"
|
:label="$t('options.alwaysOnline')"
|
||||||
hide-details
|
hide-details
|
||||||
density="compact"
|
density="compact"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
@ -63,7 +68,7 @@
|
|||||||
class="flex-grow-0"
|
class="flex-grow-0"
|
||||||
v-model="optionsData.read_messages"
|
v-model="optionsData.read_messages"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Marcar mensagens como lidas"
|
:label="$t('options.readMessages')"
|
||||||
hide-details
|
hide-details
|
||||||
density="compact"
|
density="compact"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
@ -72,7 +77,7 @@
|
|||||||
class="flex-grow-0"
|
class="flex-grow-0"
|
||||||
v-model="optionsData.read_status"
|
v-model="optionsData.read_status"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Marcar status como visto"
|
:label="$t('options.readStatus')"
|
||||||
hide-details
|
hide-details
|
||||||
density="compact"
|
density="compact"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
@ -91,7 +96,7 @@
|
|||||||
@click="saveOptions"
|
@click="saveOptions"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
>
|
>
|
||||||
Salvar
|
{{ $t("save") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
@ -101,14 +106,13 @@
|
|||||||
import instanceController from "@/services/instanceController";
|
import instanceController from "@/services/instanceController";
|
||||||
|
|
||||||
const defaultOptions = () => ({
|
const defaultOptions = () => ({
|
||||||
reject_call: false,
|
reject_call: false,
|
||||||
msg_call: "",
|
msg_call: "",
|
||||||
groups_ignore: false,
|
groups_ignore: false,
|
||||||
always_online: false,
|
always_online: false,
|
||||||
read_messages: false,
|
read_messages: false,
|
||||||
read_status: false,
|
read_status: false,
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "InstanceOptions",
|
name: "InstanceOptions",
|
||||||
@ -154,7 +158,10 @@ export default {
|
|||||||
this.instance.instance.instanceName,
|
this.instance.instance.instanceName,
|
||||||
this.optionsData
|
this.optionsData
|
||||||
);
|
);
|
||||||
this.defaultOptionsData = Object.assign(defaultOptions(), this.optionsData);
|
this.defaultOptionsData = Object.assign(
|
||||||
|
defaultOptions(),
|
||||||
|
this.optionsData
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = e.message?.message || e.message || e;
|
this.error = e.message?.message || e.message || e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card variant="outlined" :loading="loading">
|
<v-card variant="outlined" :loading="loading">
|
||||||
<v-card-title class="d-flex align-center" @click="toggleExpanded" style="cursor: pointer" v-ripple>
|
<v-card-title
|
||||||
|
class="d-flex align-center"
|
||||||
|
@click="toggleExpanded"
|
||||||
|
style="cursor: pointer"
|
||||||
|
v-ripple
|
||||||
|
>
|
||||||
<v-icon start>mdi-rabbit</v-icon>
|
<v-icon start>mdi-rabbit</v-icon>
|
||||||
RabbitMQ
|
RabbitMQ
|
||||||
|
|
||||||
@ -22,8 +27,7 @@
|
|||||||
</v-alert>
|
</v-alert>
|
||||||
|
|
||||||
<v-alert type="info" class="mb-3">
|
<v-alert type="info" class="mb-3">
|
||||||
O RabbitMQ é utilizado pela API para o enfileiramento das notificações.
|
{{ $t("rabbitmq.info") }}
|
||||||
Ele NÃO é utilizado para o envio de mensagens.
|
|
||||||
</v-alert>
|
</v-alert>
|
||||||
|
|
||||||
<v-form v-model="valid">
|
<v-form v-model="valid">
|
||||||
@ -31,7 +35,7 @@
|
|||||||
:items="rabbitmqEventsType"
|
:items="rabbitmqEventsType"
|
||||||
v-model="rabbitmqData.events"
|
v-model="rabbitmqData.events"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Eventos"
|
:label="$t('events')"
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
multiple
|
multiple
|
||||||
@ -44,7 +48,7 @@
|
|||||||
<v-card-actions v-if="expanded">
|
<v-card-actions v-if="expanded">
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="rabbitmqData.enabled"
|
v-model="rabbitmqData.enabled"
|
||||||
label="Habilitado"
|
:label="$t('enabled')"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
@ -60,8 +64,8 @@
|
|||||||
@click="saveRabbitmq"
|
@click="saveRabbitmq"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
>
|
>
|
||||||
Salvar
|
{{ $t("save") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(url) => {
|
(url) => {
|
||||||
if (!url) return 'URL é obrigatório';
|
if (!url) return $t('required', { field: 'URL' });
|
||||||
if (!url.startsWith('http'))
|
if (!url.startsWith('http'))
|
||||||
return 'URL deve começar com http ou https';
|
return $t('httpHttps', { field: 'URL' });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -48,16 +48,17 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="typebotData.typebot"
|
v-model="typebotData.typebot"
|
||||||
label="Nome do fluxo do Typebot"
|
:label="$t('typebot.typebot')"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
hide-details="auto"
|
hide-details="auto"
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
hint="O nome do fluxo do Typebot que será utilizado"
|
:hint="$t('typebot.typebotHelp')"
|
||||||
:rules="[
|
:rules="[
|
||||||
(account_id) => {
|
(account_id) => {
|
||||||
if (!account_id) return 'Typebot é obrigatório';
|
if (!account_id)
|
||||||
|
return $t('required', { field: $t('typebot.typebot') });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -66,18 +67,20 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="typebotData.keyword_finish"
|
v-model="typebotData.keyword_finish"
|
||||||
label="Palavra-chave de finalização"
|
:label="$t('typebot.keywordFinish')"
|
||||||
placeholder="#SAIR"
|
placeholder="#SAIR"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
hide-details="auto"
|
hide-details="auto"
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
hint="Palavra-chave para finalizar o fluxo"
|
:hint="$t('typebot.keywordFinishHelp')"
|
||||||
:rules="[
|
:rules="[
|
||||||
(token) => {
|
(token) => {
|
||||||
if (!token)
|
if (!token)
|
||||||
return 'Palavra-chave de finalização é obrigatório';
|
return $t('required', {
|
||||||
|
field: $t('typebot.keywordFinish'),
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -89,19 +92,19 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="typebotData.expire"
|
v-model="typebotData.expire"
|
||||||
label="Tempo de expiração (em minutos)"
|
:label="$t('typebot.expire')"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
hide-details="auto"
|
hide-details="auto"
|
||||||
hint="Tempo para encerrar a sessão caso não haja interação"
|
:hint="$t('typebot.expireHelp')"
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(v) => {
|
(v) => {
|
||||||
if (v === '' || v === undefined)
|
if (v === '' || v === undefined)
|
||||||
return 'Tempo de expiração é obrigatório';
|
return $t('required', { field: $t('typebot.expire') });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -110,10 +113,12 @@
|
|||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="typebotData.delay_message"
|
v-model="typebotData.delay_message"
|
||||||
label="Tempo de atraso da mensagem (em milisegundos)"
|
:label="`${$t('typebot.delayMessage')} (${$t(
|
||||||
|
'typebot.delayMessageUnit'
|
||||||
|
)})`"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
:hint="`Tempo de simulação de digitação - ${
|
:hint="`${$t('typebot.delayMessageHelp')} - ${
|
||||||
typebotData.delay_message
|
typebotData.delay_message
|
||||||
}ms = ${(typebotData.delay_message / 1000)
|
}ms = ${(typebotData.delay_message / 1000)
|
||||||
.toFixed(1)
|
.toFixed(1)
|
||||||
@ -126,7 +131,9 @@
|
|||||||
:rules="[
|
:rules="[
|
||||||
(token) => {
|
(token) => {
|
||||||
if (token == null || token < 0)
|
if (token == null || token < 0)
|
||||||
return 'Palavra-chave de finalização é obrigatório';
|
return $t('required', {
|
||||||
|
field: $t('typebot.delayMessage'),
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -136,7 +143,7 @@
|
|||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="typebotData.unknown_message"
|
v-model="typebotData.unknown_message"
|
||||||
label="Mensagem de desconhecido"
|
:label="$t('typebot.unknownMessage')"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
@ -144,7 +151,8 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(token) => {
|
(token) => {
|
||||||
if (!token) return 'Mensagem de desconhecido é obrigatório';
|
if (!token)
|
||||||
|
return $t('required', { field: $t('typebot.unknownMessage') });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -154,13 +162,12 @@
|
|||||||
<v-checkbox
|
<v-checkbox
|
||||||
class="flex-shrink-1"
|
class="flex-shrink-1"
|
||||||
v-model="typebotData.listening_from_me"
|
v-model="typebotData.listening_from_me"
|
||||||
label="Ouvir mensagens enviadas por mim"
|
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>Ouvir mensagens enviadas por mim</span>
|
<span>{{ $t("typebot.listeningFromMe") }}</span>
|
||||||
<HelpTooltip>
|
<HelpTooltip>
|
||||||
Envia as mensagens enviadas por você para o fluxo do Typebot
|
{{ $t("typebot.listeningFromMeHelp") }}
|
||||||
</HelpTooltip>
|
</HelpTooltip>
|
||||||
</template>
|
</template>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
@ -170,7 +177,7 @@
|
|||||||
<v-card-actions v-if="expanded">
|
<v-card-actions v-if="expanded">
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="typebotData.enabled"
|
v-model="typebotData.enabled"
|
||||||
label="Habilitado"
|
:label="$t('enabled')"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
@ -182,9 +189,7 @@
|
|||||||
@click="openTypebotSessions"
|
@click="openTypebotSessions"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
ver {{ typebotData.sessions.length }} sess{{
|
{{ $t("typebot.session.btn", { count: typebotData.sessions.length }) }}
|
||||||
typebotData.sessions.length != 1 ? "ões" : "ão"
|
|
||||||
}}
|
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
@ -199,7 +204,7 @@
|
|||||||
@click="saveTypebot"
|
@click="saveTypebot"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
>
|
>
|
||||||
Salvar
|
{{ $t("save") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
class="mb-3"
|
class="mb-3"
|
||||||
:rules="[
|
:rules="[
|
||||||
(url) => {
|
(url) => {
|
||||||
if (!url) return 'URL é obrigatório';
|
if (!url) return this.$t('required', { field: 'URL' });
|
||||||
if (!url.startsWith('http'))
|
if (!url.startsWith('http'))
|
||||||
return 'URL deve começar com http ou https';
|
return this.$t('httpHttps', { field: 'URL' });
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
:items="webhookEventsType"
|
:items="webhookEventsType"
|
||||||
v-model="webhookData.events"
|
v-model="webhookData.events"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Eventos"
|
:label="$t('events')"
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
multiple
|
multiple
|
||||||
@ -72,11 +72,17 @@
|
|||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="webhookData.webhook_by_events"
|
v-model="webhookData.webhook_by_events"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Webhook por eventos"
|
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
density="compact"
|
density="compact"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:label>
|
||||||
|
<span>{{ $t("webhook.byEvents") }}</span>
|
||||||
|
<HelpTooltip>
|
||||||
|
{{ $t("webhook.byEventsHelp") }}
|
||||||
|
</HelpTooltip>
|
||||||
|
</template>
|
||||||
|
</v-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</v-form>
|
</v-form>
|
||||||
@ -84,7 +90,7 @@
|
|||||||
<v-card-actions v-if="expanded">
|
<v-card-actions v-if="expanded">
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="webhookData.enabled"
|
v-model="webhookData.enabled"
|
||||||
label="Habilitado"
|
:label="$t('enabled')"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
@ -100,7 +106,7 @@
|
|||||||
@click="saveWebhook"
|
@click="saveWebhook"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
>
|
>
|
||||||
Salvar
|
{{ $t("save") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
@ -165,7 +171,7 @@ export default {
|
|||||||
toggleExpanded() {
|
toggleExpanded() {
|
||||||
if (this.loading) return;
|
if (this.loading) return;
|
||||||
this.expanded = !this.expanded;
|
this.expanded = !this.expanded;
|
||||||
},
|
},
|
||||||
async saveWebhook() {
|
async saveWebhook() {
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
:items="websocketEventsType"
|
:items="websocketEventsType"
|
||||||
v-model="websocketData.events"
|
v-model="websocketData.events"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
label="Eventos"
|
:label="$t('events')"
|
||||||
hide-details
|
hide-details
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
multiple
|
multiple
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<v-card-actions v-if="expanded">
|
<v-card-actions v-if="expanded">
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="websocketData.enabled"
|
v-model="websocketData.enabled"
|
||||||
label="Habilitado"
|
:label="$t('enabled')"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
hide-details
|
hide-details
|
||||||
@ -59,7 +59,7 @@
|
|||||||
@click="saveWebsocket"
|
@click="saveWebsocket"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
>
|
>
|
||||||
Salvar
|
{{ $t("save") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
@ -98,9 +98,9 @@
|
|||||||
@click="save(conect)"
|
@click="save(conect)"
|
||||||
>
|
>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title>{{
|
<v-list-item-title>
|
||||||
conect.host.replace(/https?:\/\//, "")
|
{{ conect.host.replace(/https?:\/\//, "") }}
|
||||||
}}</v-list-item-title>
|
</v-list-item-title>
|
||||||
|
|
||||||
<!-- <v-list-item-subtitle>
|
<!-- <v-list-item-subtitle>
|
||||||
{{ connection.globalApiKey.slice(0, 10) }}...
|
{{ connection.globalApiKey.slice(0, 10) }}...
|
||||||
@ -216,10 +216,7 @@ export default {
|
|||||||
(v) =>
|
(v) =>
|
||||||
new RegExp(`^(${!this.isHttps ? "http|" : ""}https)://`, "i").test(
|
new RegExp(`^(${!this.isHttps ? "http|" : ""}https)://`, "i").test(
|
||||||
v
|
v
|
||||||
) ||
|
) || this.$t(this.isHttps ? "https" : "httpHttps", { field: "URL" }),
|
||||||
(this.isHttps
|
|
||||||
? "URL inválida, ela deve começar com https"
|
|
||||||
: "URL inválida, ela deve começar com http ou https"),
|
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<v-dialog v-model="dialog" max-width="850px" scrollable>
|
<v-dialog v-model="dialog" max-width="850px" scrollable>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title class="d-flex align-center">
|
<v-card-title class="d-flex align-center">
|
||||||
Sessões do Typebot
|
{{ $t("typebot.session.title") }}
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<h3>{{ sessions.length }}</h3>
|
<h3>{{ sessions.length }}</h3>
|
||||||
<v-btn
|
<v-btn
|
||||||
@ -21,7 +21,7 @@
|
|||||||
:headers="headers"
|
:headers="headers"
|
||||||
:items="sessions"
|
:items="sessions"
|
||||||
:no-data-text="
|
:no-data-text="
|
||||||
loading ? 'Carregando...' : 'Nenhuma sessão encontrada'
|
loading ? `${$t('loading')}...` : $t('typebot.session.noData')
|
||||||
"
|
"
|
||||||
:rows-per-page-items="[10, 25, 50, 100]"
|
:rows-per-page-items="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<template v-slot:item.status="{ item }">
|
<template v-slot:item.status="{ item }">
|
||||||
<v-chip :color="item.status.color" label size="small">
|
<v-chip :color="item.status.color" label size="small">
|
||||||
<v-icon start>{{ item.status.icon }}</v-icon>
|
<v-icon start>{{ item.status.icon }}</v-icon>
|
||||||
{{ item.status.text }}
|
{{ $t(`typebot.status.${item.status.id}`) }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.variables="{ item }">
|
<template v-slot:item.variables="{ item }">
|
||||||
@ -114,7 +114,7 @@
|
|||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn text @click="dialog = false" :disabled="loading || loadingInner">
|
<v-btn text @click="dialog = false" :disabled="loading || loadingInner">
|
||||||
Fechar
|
{{ $t("close") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
@ -127,19 +127,30 @@ import typebotStatus from "@/helpers/mappers/typebotStatus";
|
|||||||
import instanceController from "@/services/instanceController";
|
import instanceController from "@/services/instanceController";
|
||||||
export default {
|
export default {
|
||||||
name: "SettingsModal",
|
name: "SettingsModal",
|
||||||
data: () => ({
|
data() {
|
||||||
dialog: false,
|
return {
|
||||||
typebotStatus,
|
dialog: false,
|
||||||
headers: [
|
typebotStatus,
|
||||||
{ title: "Número", value: "remoteJid" },
|
headers: [
|
||||||
{ title: "Status", value: "status" },
|
{ title: "Whatsapp", value: "remoteJid" },
|
||||||
{ title: "Variáveis", value: "variables" },
|
{ title: "Status", value: "status" },
|
||||||
{ title: "Iniciada em", value: "createdAt" },
|
{
|
||||||
{ title: "Última mensagem", value: "updateAt" },
|
title: this.$t("typebot.session.headers.variables"),
|
||||||
{ title: "", value: "actions" },
|
value: "variables",
|
||||||
],
|
},
|
||||||
loadingInner: false,
|
{
|
||||||
}),
|
title: this.$t("typebot.session.headers.createdAt"),
|
||||||
|
value: "createdAt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t("typebot.session.headers.updateAt"),
|
||||||
|
value: "updateAt",
|
||||||
|
},
|
||||||
|
{ title: "", value: "actions" },
|
||||||
|
],
|
||||||
|
loadingInner: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.dialog = true;
|
this.dialog = true;
|
||||||
|
@ -11,11 +11,20 @@ export default {
|
|||||||
refresh: "Refresh",
|
refresh: "Refresh",
|
||||||
disconnect: "Disconnect",
|
disconnect: "Disconnect",
|
||||||
sure: "Sure?",
|
sure: "Sure?",
|
||||||
|
save: "Save",
|
||||||
instance: "Instance | Instances",
|
instance: "Instance | Instances",
|
||||||
search: "Search",
|
search: "Search",
|
||||||
loading: "Loading",
|
loading: "Loading",
|
||||||
noInstances: "No instances found",
|
noInstances: "No instances found",
|
||||||
unknown: "Unknown",
|
unknown: "Unknown",
|
||||||
|
required: "{field} is required",
|
||||||
|
https: "{field} must start with https://",
|
||||||
|
httpHttps: "{field} must start with http:// or https://",
|
||||||
|
enabled: "Enabled",
|
||||||
|
events: "Events",
|
||||||
|
version: {
|
||||||
|
availableFrom: "Available from version {version}",
|
||||||
|
},
|
||||||
status: {
|
status: {
|
||||||
close: "Disconnected",
|
close: "Disconnected",
|
||||||
connecting: "Connecting",
|
connecting: "Connecting",
|
||||||
@ -43,5 +52,63 @@ export default {
|
|||||||
connectPhone: {
|
connectPhone: {
|
||||||
title: "Phone not connected",
|
title: "Phone not connected",
|
||||||
apiGenericError: "Could not load QR Code, if the error persists, restart the API and try again."
|
apiGenericError: "Could not load QR Code, if the error persists, restart the API and try again."
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
title: "Behavior",
|
||||||
|
rejectCall: "Reject call",
|
||||||
|
msgCall: "Rejection message",
|
||||||
|
groupsIgnore: "Ignore groups",
|
||||||
|
alwaysOnline: "Always online",
|
||||||
|
readMessages: "Mark messages as read",
|
||||||
|
readStatus: "Mark status as seen",
|
||||||
|
},
|
||||||
|
webhook: {
|
||||||
|
byEvents: "Webhook by events",
|
||||||
|
byEventsHelp: "Adds the event name at the end of the URL (ex: /webhook/event_name )",
|
||||||
|
},
|
||||||
|
rabbitmq: {
|
||||||
|
info: "RabbitMQ is used by the API to queue notifications. It is NOT used to send messages."
|
||||||
|
},
|
||||||
|
chatwoot: {
|
||||||
|
account_id: "Account ID",
|
||||||
|
token: "Account Token",
|
||||||
|
signMsg: "Sign messages",
|
||||||
|
signMsgHelp: "Adds the agent name at the first line of the message",
|
||||||
|
reopenConversation: "Reopen conversation",
|
||||||
|
reopenConversationHelp: "Reopens the customer's conversation when he starts a new conversation instead of creating a new conversation",
|
||||||
|
conversationPending: "Start conversation as pending",
|
||||||
|
conversationPendingHelp: "Starts the conversation as pending instead of open",
|
||||||
|
autoCreate: "Create Inbox",
|
||||||
|
autoCreateHelp: "Creates the inbox in Chatwoot if it doesn't exist",
|
||||||
|
},
|
||||||
|
typebot: {
|
||||||
|
typebot: "Typebot flow name",
|
||||||
|
typebotHelp: "The name of the Typebot flow to be used",
|
||||||
|
keywordFinish: "Finish keyword",
|
||||||
|
keywordFinishHelp: "Keyword to finish the flow",
|
||||||
|
expire: "Expiration time (in minutes)",
|
||||||
|
expireHelp: "Time to end the session if there is no interaction",
|
||||||
|
delayMessage: "Message typing time",
|
||||||
|
delayMessageUnit: "in milliseconds",
|
||||||
|
delayMessageHelp: "Typing simulation time",
|
||||||
|
unknownMessage: "Unknown message format",
|
||||||
|
unknownMessageHelp: "Message sent when the message format is not recognized",
|
||||||
|
listeningFromMe: "Listen to messages sent by me",
|
||||||
|
listeningFromMeHelp: "Sends the messages sent by you to the Typebot flow",
|
||||||
|
session: {
|
||||||
|
title: "Typebot sessions",
|
||||||
|
btn: "See 0 sessions | See one session | See {count} sessions",
|
||||||
|
noData: "No sessions found",
|
||||||
|
headers: {
|
||||||
|
variable: "Variables",
|
||||||
|
createdAt: "Started at",
|
||||||
|
updatedAt: "Last message",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
opened: "Open",
|
||||||
|
paused: "Paused",
|
||||||
|
closed: "Closed",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,11 +11,20 @@ export default {
|
|||||||
refresh: "Atualizar",
|
refresh: "Atualizar",
|
||||||
disconnect: "Desconectar",
|
disconnect: "Desconectar",
|
||||||
sure: "Tem certeza?",
|
sure: "Tem certeza?",
|
||||||
|
save: "Salvar",
|
||||||
instance: "Instância | Instâncias",
|
instance: "Instância | Instâncias",
|
||||||
search: "Pesquisar",
|
search: "Pesquisar",
|
||||||
loading: "Carregando",
|
loading: "Carregando",
|
||||||
noInstances: "Nenhuma instância encontrada",
|
noInstances: "Nenhuma instância encontrada",
|
||||||
unknown: "Desconhecido",
|
unknown: "Desconhecido",
|
||||||
|
required: "{field} é obrigatório",
|
||||||
|
https: "{field} deve começar com https://",
|
||||||
|
httpHttps: "{field} deve começar com http:// ou https://",
|
||||||
|
enabled: "Habilitado",
|
||||||
|
events: "Eventos",
|
||||||
|
version: {
|
||||||
|
availableFrom: "Disponível a partir da versão {version}",
|
||||||
|
},
|
||||||
status: {
|
status: {
|
||||||
close: "Desconectado",
|
close: "Desconectado",
|
||||||
connecting: "Conectando",
|
connecting: "Conectando",
|
||||||
@ -43,5 +52,63 @@ export default {
|
|||||||
connectPhone: {
|
connectPhone: {
|
||||||
title: "Telefone não conectado",
|
title: "Telefone não conectado",
|
||||||
apiGenericError: "Não foi possível carregar o QR Code, se o erro persistir, reinicie a API e tente novamente."
|
apiGenericError: "Não foi possível carregar o QR Code, se o erro persistir, reinicie a API e tente novamente."
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
title: "Comportamento",
|
||||||
|
rejectCall: "Rejeitar chamada",
|
||||||
|
msgCall: "Mensagem de rejeição",
|
||||||
|
groupsIgnore: "Ignorar grupos",
|
||||||
|
alwaysOnline: "Sempre online",
|
||||||
|
readMessages: "Marcar mensagens como lidas",
|
||||||
|
readStatus: "Marcar status como visto",
|
||||||
|
},
|
||||||
|
webhook: {
|
||||||
|
byEvents: "Webhook por eventos",
|
||||||
|
byEventsHelp: "Adiciona o nome do evento no final da URL (ex: /webhook/event_name )",
|
||||||
|
},
|
||||||
|
rabbitmq: {
|
||||||
|
info: "O RabbitMQ é utilizado pela API para o enfileiramento das notificações. Ele NÃO é utilizado para o envio de mensagens."
|
||||||
|
},
|
||||||
|
chatwoot: {
|
||||||
|
account_id: "ID da conta",
|
||||||
|
token: "Token da conta",
|
||||||
|
signMsg: "Assinar mensagens",
|
||||||
|
signMsgHelp: "Adiciona o nome do atendente na primeira linha da mensagem",
|
||||||
|
reopenConversation: "Reabrir conversa",
|
||||||
|
reopenConversationHelp: "Reabre a conversa do cliente quando ele inicia uma nova conversa em vez de criar uma nova conversa",
|
||||||
|
conversationPending: "Iniciar conversa como pendente",
|
||||||
|
conversationPendingHelp: "Inicia a conversa como pendente ao invés de aberta",
|
||||||
|
autoCreate: "Criar Caixa de Entrada",
|
||||||
|
autoCreateHelp: "Cria a caixa de entrada no Chatwoot caso ela não exista",
|
||||||
|
},
|
||||||
|
typebot: {
|
||||||
|
typebot: "Nome do fluxo do Typebot",
|
||||||
|
typebotHelp: "O nome do fluxo do Typebot que será utilizado",
|
||||||
|
keywordFinish: "Palavra-chave de finalização",
|
||||||
|
keywordFinishHelp: "Palavra-chave para finalizar o fluxo",
|
||||||
|
expire: "Tempo de expiração (em minutos)",
|
||||||
|
expireHelp: "Tempo para encerrar a sessão caso não haja interação",
|
||||||
|
delayMessage: "Tempo de digitação da mensagem",
|
||||||
|
delayMessageUnit: "em milisegundos",
|
||||||
|
delayMessageHelp: "Tempo de simulação de digitação",
|
||||||
|
unknownMessage: "Mensagem formato desconhecido",
|
||||||
|
unknownMessageHelp: "Mensagem enviada quando o formato da mensagem não é reconhecido",
|
||||||
|
listeningFromMe: "Ouvir mensagens enviadas por mim",
|
||||||
|
listeningFromMeHelp: "Envia as mensagens enviadas por você para o fluxo do Typebot",
|
||||||
|
session: {
|
||||||
|
title: "Sessões do Typebot",
|
||||||
|
btn: "Ver 0 sessões | Ver uma sessão | Ver {count} sessões",
|
||||||
|
noData: "Nenhuma sessão encontrada",
|
||||||
|
headers: {
|
||||||
|
variables: "Variáveis",
|
||||||
|
createdAt: "Iniciada em",
|
||||||
|
updatedAt: "Última mensagem",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
opened: "Aberto",
|
||||||
|
paused: "Pausado",
|
||||||
|
closed: "Fechado",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user