mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-13 15:14:49 -06:00
Fix HTTPS validation in About and Settings modals
This commit is contained in:
parent
2667777ea1
commit
303ede0ba1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "evolution-manager",
|
||||
"version": "0.2.9",
|
||||
"version": "0.2.10",
|
||||
"main": "dist",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
@ -38,7 +38,7 @@
|
||||
segurança e privacidade, mantendo suas informações confidenciais e
|
||||
protegidas.
|
||||
</p>
|
||||
<v-alert v-if="!isHttps" color="info" class="mt-2" variant="tonal">
|
||||
<v-alert v-if="isHttps" color="info" class="mt-2" variant="tonal">
|
||||
Por conta de todo o processamento ser realizado no navegador, é
|
||||
necessário que o servidor da Evolution API seja acessado através de
|
||||
uma conexão segura (HTTPS).
|
||||
@ -67,7 +67,7 @@ export default {
|
||||
name: "SettingsModal",
|
||||
data: () => ({
|
||||
dialog: false,
|
||||
isHttps: !window.location.protocol === "https:",
|
||||
isHttps: window.location.protocol === "https:",
|
||||
}),
|
||||
methods: {
|
||||
open() {
|
||||
|
@ -137,7 +137,7 @@ export default {
|
||||
loading: false,
|
||||
error: false,
|
||||
AppStore: useAppStore(),
|
||||
isHttps: !window.location.protocol === "https:",
|
||||
isHttps: window.location.protocol === "https:",
|
||||
}),
|
||||
methods: {
|
||||
logout() {
|
||||
@ -186,7 +186,10 @@ export default {
|
||||
(v) =>
|
||||
new RegExp(`^(${!this.isHttps ? "http|" : ""}https)://`, "i").test(
|
||||
v
|
||||
) || (this.isHttps ? "URL inválida, use https" : "URL inválida"),
|
||||
) ||
|
||||
(this.isHttps
|
||||
? "URL inválida, ela deve começar com https"
|
||||
: "URL inválida, ela deve começar com http ou https"),
|
||||
];
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user