fix: validate empty endpoints before sending request - resolved #1968

This commit is contained in:
liyasthomas
2021-11-23 20:01:45 +05:30
parent fdf12a24ed
commit afa750e409
31 changed files with 36 additions and 3 deletions

View File

@@ -288,6 +288,11 @@ watch(loading, () => {
})
const newSendRequest = async () => {
if (newEndpoint.value === "" || /^\s+$/.test(newEndpoint.value)) {
toast.error(`${t("empty.endpoint")}`)
return
}
loading.value = true
// Double calling is because the function returns a TaskEither than should be executed
@@ -387,9 +392,7 @@ const copyShareLink = (shareLink: string) => {
} else {
copyLinkIcon.value = "check"
copyToClipboard(`https://hopp.sh/r${shareLink}`)
toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyLinkIcon.value = "copy"), 2000)
}
}

View File

@@ -138,6 +138,7 @@
"collection": "Versameling is leeg",
"collections": "Versamelings is leeg",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Omgewings is leeg",
"folder": "Vouer is leeg",
"headers": "Hierdie versoek bevat geen opskrifte nie",

View File

@@ -138,6 +138,7 @@
"collection": "المجموعة فارغة",
"collections": "المجموعات فارغة",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "البيئات فارغة",
"folder": "مجلد فارغ",
"headers": "لا يحتوي هذا الطلب على أية رؤوس",

View File

@@ -138,6 +138,7 @@
"collection": "La col·lecció està buida",
"collections": "Les col·leccions estan buides",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Els entorns estan buits",
"folder": "La carpeta està buida",
"headers": "Aquesta sol·licitud no té cap capçalera",

View File

@@ -138,6 +138,7 @@
"collection": "组合为空",
"collections": "组合为空",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "环境为空",
"folder": "文件夹为空",
"headers": "该请求没有任何请求头",

View File

@@ -138,6 +138,7 @@
"collection": "Sbírka je prázdná",
"collections": "Sbírky jsou prázdné",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Prostředí je prázdné",
"folder": "Složka je prázdná",
"headers": "Tento požadavek nemá žádná záhlaví",

View File

@@ -138,6 +138,7 @@
"collection": "Samlingen er tom",
"collections": "Samlinger er tomme",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Miljøer er tomme",
"folder": "Mappen er tom",
"headers": "Denne anmodning har ingen overskrifter",

View File

@@ -138,6 +138,7 @@
"collection": "Sammlung ist leer",
"collections": "Sammlungen sind leer",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Umgebungen sind leer",
"folder": "Der Ordner ist leer",
"headers": "Diese Anfrage hat keine Header",

View File

@@ -138,6 +138,7 @@
"collection": "Η συλλογή είναι άδεια",
"collections": "Οι συλλογές είναι άδειες",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Τα περιβάλλοντα είναι άδεια",
"folder": "Ο φάκελος είναι άδειος",
"headers": "Αυτό το αίτημα δεν έχει κεφαλίδες",

View File

@@ -138,6 +138,7 @@
"collection": "Collection is empty",
"collections": "Collections are empty",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Environments are empty",
"folder": "Folder is empty",
"headers": "This request does not have any headers",

View File

@@ -138,6 +138,7 @@
"collection": "La colección está vacía",
"collections": "Las colecciones están vacías",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Los entornos están vacíos",
"folder": "La carpeta está vacía",
"headers": "Esta petición no tiene encabezados",

View File

@@ -138,6 +138,7 @@
"collection": "Kokoelma on tyhjä",
"collections": "Kokoelmat ovat tyhjiä",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Ympäristöt ovat tyhjiä",
"folder": "Kansio on tyhjä",
"headers": "Tässä pyynnössä ei ole otsikoita",

View File

@@ -138,6 +138,7 @@
"collection": "La collection est vide",
"collections": "Les collections sont vides",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Les environnements sont vides",
"folder": "Le dossier est vide",
"headers": "Cette requête n'a pas d'en-tête",

View File

@@ -138,6 +138,7 @@
"collection": "האוסף ריק",
"collections": "האוספים ריקים",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "הסביבה ריקה",
"folder": "התיקייה ריקה",
"headers": "לבקשה זו אין כותרות",

View File

@@ -138,6 +138,7 @@
"collection": "A gyűjtemény üres",
"collections": "A gyűjtemények üresek",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "A környezet üres",
"folder": "A mappa üres",
"headers": "Ennek a kérésnek nincs fejléce",

View File

@@ -138,6 +138,7 @@
"collection": "La raccolta è vuota",
"collections": "Le raccolte sono vuote",
"documentation": "Connetti ad un endpoint GraphQL per mostrare la documentazione",
"endpoint": "Endpoint cannot be empty",
"environments": "Gli ambienti sono vuoti",
"folder": "La cartella è vuota",
"headers": "Questa richiesta non ha intestazioni",

View File

@@ -138,6 +138,7 @@
"collection": "コレクションは空です",
"collections": "コレクションは空です",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "環境は空です",
"folder": "フォルダが空です",
"headers": "このリクエストにはヘッダーがありません",

View File

@@ -138,6 +138,7 @@
"collection": "모음집이 비어 있습니다.",
"collections": "모음집이 비어 있습니다.",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "환경이 비어 있습니다.",
"folder": "폴더가 비어 있습니다.",
"headers": "이 요청에는 헤더가 없습니다.",

View File

@@ -138,6 +138,7 @@
"collection": "Collectie is leeg",
"collections": "Collecties zijn leeg",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Omgevingen zijn leeg",
"folder": "Map is leeg",
"headers": "Dit verzoek heeft geen headers",

View File

@@ -138,6 +138,7 @@
"collection": "Samlingen er tom",
"collections": "Samlingene er tomme",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Miljøer er tomme",
"folder": "Mappen er tom",
"headers": "Denne forespørselen har ingen overskrifter",

View File

@@ -138,6 +138,7 @@
"collection": "Kolekcja jest pusta",
"collections": "Kolekcje są puste",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Środowiska są puste",
"folder": "Folder jest pusty",
"headers": "To żądanie nie ma żadnych nagłówków",

View File

@@ -138,6 +138,7 @@
"collection": "Coleção está vazia",
"collections": "Coleções estão vazias",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Ambientes estão vazios",
"folder": "Pasta está vazia",
"headers": "Esta solicitação não possui cabeçalhos",

View File

@@ -138,6 +138,7 @@
"collection": "Coleção está vazia",
"collections": "Coleções estão vazias",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Ambientes estão vazios",
"folder": "Pasta está vazia",
"headers": "Esta solicitação não possui cabeçalhos",

View File

@@ -138,6 +138,7 @@
"collection": "Colecția este goală",
"collections": "Colecțiile sunt goale",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Mediile sunt goale",
"folder": "Dosarul este gol",
"headers": "Această solicitare nu are anteturi",

View File

@@ -138,6 +138,7 @@
"collection": "Коллекция пуста",
"collections": "Коллекции пустые",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Окружения пусты",
"folder": "Папка пуста",
"headers": "У этого запроса нет заголовков",

View File

@@ -138,6 +138,7 @@
"collection": "Збирка је празна",
"collections": "Збирке су празне",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Окружења су празна",
"folder": "Мапа је празна",
"headers": "Овај захтев нема заглавља",

View File

@@ -138,6 +138,7 @@
"collection": "Samlingen är tom",
"collections": "Samlingar är tomma",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Miljöer är tomma",
"folder": "Mappen är tom",
"headers": "Denna begäran har inga rubriker",

View File

@@ -138,6 +138,7 @@
"collection": "Koleksiyon boş",
"collections": "Koleksiyonlar boş",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Ortamlar boş",
"folder": "Klasör boş",
"headers": "Bu isteğin herhangi bir başlığı yok",

View File

@@ -138,6 +138,7 @@
"collection": "組合為空",
"collections": "組合為空",
"documentation": "連接至 GraphQL 端點以檢視文檔",
"endpoint": "Endpoint cannot be empty",
"environments": "環境為空",
"folder": "資料夾為空",
"headers": "該請求沒有任何請求頭",

View File

@@ -138,6 +138,7 @@
"collection": "Колекція порожня",
"collections": "Колекції порожні",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Середовища порожні",
"folder": "Папка порожня",
"headers": "Цей запит не має заголовків",

View File

@@ -138,6 +138,7 @@
"collection": "Bộ sưu tập trống",
"collections": "Bộ sưu tập trống",
"documentation": "Connect to a GraphQL endpoint to view documentation",
"endpoint": "Endpoint cannot be empty",
"environments": "Môi trường trống",
"folder": "Tệp này rỗng",
"headers": "Yêu cầu này không có bất kỳ tiêu đề nào",