chore: minor ui improvements

This commit is contained in:
liyasthomas
2021-12-18 19:51:57 +05:30
parent 76cbd99df8
commit 39d6b1bfeb
36 changed files with 169 additions and 180 deletions

View File

@@ -33,7 +33,7 @@
[[redirects]] [[redirects]]
from = "/careers" from = "/careers"
to = "https://hoppscotch.notion.site/3b9d5d5239a043bfb91701faabf5b8f0" to = "https://company.hoppscotch.io/careers"
status = 301 status = 301
force = true force = true
@@ -54,3 +54,9 @@
to = "https://github.com/hoppscotch/hoppscotch" to = "https://github.com/hoppscotch/hoppscotch"
status = 301 status = 301
force = true force = true
[[redirects]]
from = "/announcements"
to = "https://company.hoppscotch.io/announcements"
status = 301
force = true

View File

@@ -41,7 +41,7 @@
:label="$t('import.from_gist')" :label="$t('import.from_gist')"
@click.native=" @click.native="
() => { () => {
readCollectionGist readCollectionGist()
$refs.options.tippy().hide() $refs.options.tippy().hide()
} }
" "

View File

@@ -136,152 +136,103 @@
class="mb-4" class="mb-4"
/> />
</div> </div>
<div v-if="authType === 'basic'" class="border-b border-dividerLight flex"> <div v-else class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3"> <div class="border-r border-dividerLight w-2/3">
<div class="border-b border-dividerLight flex"> <div v-if="authType === 'basic'">
<SmartEnvInput <div class="border-b border-dividerLight flex">
v-model="basicUsername" <SmartEnvInput
:placeholder="$t('authorization.username')" v-model="basicUsername"
styles="bg-transparent flex flex-1 py-1 px-4" :placeholder="$t('authorization.username')"
/> styles="bg-transparent flex flex-1 py-1 px-4"
</div>
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="basicPassword"
:placeholder="$t('authorization.password')"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
</div>
<div
class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto"
>
<div class="text-secondaryLight pb-2">
{{ $t("helpers.authorization") }}
</div>
<SmartAnchor
class="link"
:label="`${$t('authorization.learn')} \xA0 →`"
to="https://docs.hoppscotch.io/features/authorization"
blank
/>
</div>
</div>
<div v-if="authType === 'bearer'" class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="bearerToken"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
</div>
<div
class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto"
>
<div class="text-secondaryLight pb-2">
{{ $t("helpers.authorization") }}
</div>
<SmartAnchor
class="link"
:label="`${$t('authorization.learn')} \xA0 →`"
to="https://docs.hoppscotch.io/features/authorization"
blank
/>
</div>
</div>
<div
v-if="authType === 'oauth-2'"
class="border-b border-dividerLight flex"
>
<div class="border-r border-dividerLight w-2/3">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="oauth2Token"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<HttpOAuth2Authorization />
</div>
<div
class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto"
>
<div class="text-secondaryLight pb-2">
{{ $t("helpers.authorization") }}
</div>
<SmartAnchor
class="link"
:label="`${$t('authorization.learn')} \xA0 →`"
to="https://docs.hoppscotch.io/features/authorization"
blank
/>
</div>
</div>
<div
v-if="authType === 'api-key'"
class="border-b border-dividerLight flex"
>
<div class="border-r border-dividerLight w-2/3">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="apiKey"
placeholder="Key"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="apiValue"
placeholder="Value"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<div class="border-b border-dividerLight flex items-center">
<label class="text-secondaryLight ml-4">
{{ $t("authorization.pass_key_by") }}
</label>
<tippy
ref="addToOptions"
interactive
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<span class="select-wrapper">
<ButtonSecondary
:label="addTo || $t('state.none')"
class="rounded-none ml-2 pr-8"
/>
</span>
</template>
<SmartItem
:icon="
addTo === 'Headers'
? 'radio_button_checked'
: 'radio_button_unchecked'
"
:label="'Headers'"
@click.native="
addTo = 'Headers'
$refs.addToOptions.tippy().hide()
"
/> />
<SmartItem </div>
:icon=" <div class="border-b border-dividerLight flex">
addTo === 'Query params' <SmartEnvInput
? 'radio_button_checked' v-model="basicPassword"
: 'radio_button_unchecked' :placeholder="$t('authorization.password')"
" styles="bg-transparent flex flex-1 py-1 px-4"
:label="'Query params'"
@click.native="
addTo = 'Query params'
$refs.addToOptions.tippy().hide()
"
/> />
</tippy> </div>
</div>
<div v-if="authType === 'bearer'">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="bearerToken"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
</div>
<div v-if="authType === 'oauth-2'">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="oauth2Token"
placeholder="Token"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<HttpOAuth2Authorization />
</div>
<div v-if="authType === 'api-key'">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="apiKey"
placeholder="Key"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="apiValue"
placeholder="Value"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
</div>
<div class="border-b border-dividerLight flex items-center">
<label class="text-secondaryLight ml-4">
{{ $t("authorization.pass_key_by") }}
</label>
<tippy
ref="addToOptions"
interactive
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<span class="select-wrapper">
<ButtonSecondary
:label="addTo || $t('state.none')"
class="rounded-none ml-2 pr-8"
/>
</span>
</template>
<SmartItem
:icon="
addTo === 'Headers'
? 'radio_button_checked'
: 'radio_button_unchecked'
"
:label="'Headers'"
@click.native="
addTo = 'Headers'
$refs.addToOptions.tippy().hide()
"
/>
<SmartItem
:icon="
addTo === 'Query params'
? 'radio_button_checked'
: 'radio_button_unchecked'
"
:label="'Query params'"
@click.native="
addTo = 'Query params'
$refs.addToOptions.tippy().hide()
"
/>
</tippy>
</div>
</div> </div>
</div> </div>
<div <div

View File

@@ -1,8 +1,11 @@
<template> <template>
<SmartModal v-if="show" :title="`${t('import.curl')}`" @close="hideModal"> <SmartModal v-if="show" :title="`${t('import.curl')}`" @close="hideModal">
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="h-46 px-2">
<div ref="curlEditor" class="border border-dividerLight rounded"></div> <div
ref="curlEditor"
class="border border-dividerLight h-full rounded"
></div>
</div> </div>
</template> </template>
<template #footer> <template #footer>

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="border-b border-dividerLight flex"> <div class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3"> <div class="border-r border-dividerLight w-2/3">
<div ref="preRrequestEditor"></div> <div ref="preRrequestEditor" class="h-full"></div>
</div> </div>
<div <div
class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto" class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto"

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="border-b border-dividerLight flex"> <div class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3"> <div class="border-r border-dividerLight w-2/3">
<div ref="testScriptEditor"></div> <div ref="testScriptEditor" class="h-full"></div>
</div> </div>
<div <div
class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto" class="bg-primary h-full top-upperTertiaryStickyFold min-w-46 max-w-1/3 p-4 z-9 sticky overflow-auto"

View File

@@ -68,13 +68,13 @@ export const baseTheme = EditorView.theme({
}, },
".cm-textfield": { ".cm-textfield": {
backgroundColor: "var(--primary-dark-color)", backgroundColor: "var(--primary-dark-color)",
color: "var(--secondary-light-color)", color: "var(--secondary-dark-color)",
borderColor: "var(--divider-light-color)", borderColor: "var(--divider-light-color)",
borderRadius: "3px", borderRadius: "3px",
}, },
".cm-button": { ".cm-button": {
backgroundColor: "var(--primary-dark-color)", backgroundColor: "var(--primary-dark-color)",
color: "var(--secondary-light-color)", color: "var(--secondary-dark-color)",
backgroundImage: "none", backgroundImage: "none",
border: "none", border: "none",
}, },

View File

@@ -96,7 +96,8 @@
"password": "Wagwoord", "password": "Wagwoord",
"token": "Teken", "token": "Teken",
"type": "Magtigingstipe", "type": "Magtigingstipe",
"username": "Gebruikersnaam" "username": "Gebruikersnaam",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Versameling geskep", "created": "Versameling geskep",

View File

@@ -96,7 +96,8 @@
"password": "كلمة المرور", "password": "كلمة المرور",
"token": "رمز", "token": "رمز",
"type": "نوع التفويض", "type": "نوع التفويض",
"username": "اسم المستخدم" "username": "اسم المستخدم",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "تم إنشاء المجموعة", "created": "تم إنشاء المجموعة",

View File

@@ -96,7 +96,8 @@
"password": "Contrasenya", "password": "Contrasenya",
"token": "Testimoni", "token": "Testimoni",
"type": "Tipus d'autorització", "type": "Tipus d'autorització",
"username": "Nom d'usuari" "username": "Nom d'usuari",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "S'ha creat la col·lecció", "created": "S'ha creat la col·lecció",

View File

@@ -96,7 +96,8 @@
"password": "密码", "password": "密码",
"token": "令牌", "token": "令牌",
"type": "授权类型", "type": "授权类型",
"username": "用户名" "username": "用户名",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "组合已创建", "created": "组合已创建",

View File

@@ -96,7 +96,8 @@
"password": "Heslo", "password": "Heslo",
"token": "Žeton", "token": "Žeton",
"type": "Typ autorizace", "type": "Typ autorizace",
"username": "Uživatelské jméno" "username": "Uživatelské jméno",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Kolekce vytvořena", "created": "Kolekce vytvořena",

View File

@@ -96,7 +96,8 @@
"password": "Adgangskode", "password": "Adgangskode",
"token": "Polet", "token": "Polet",
"type": "Godkendelse Type", "type": "Godkendelse Type",
"username": "Brugernavn" "username": "Brugernavn",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Samlingen er oprettet", "created": "Samlingen er oprettet",

View File

@@ -96,7 +96,8 @@
"password": "Passwort", "password": "Passwort",
"token": "Token", "token": "Token",
"type": "Berechtigungstyp", "type": "Berechtigungstyp",
"username": "Nutzername" "username": "Nutzername",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Sammlung erstellt", "created": "Sammlung erstellt",

View File

@@ -96,7 +96,8 @@
"password": "Κωδικός πρόσβασης", "password": "Κωδικός πρόσβασης",
"token": "Ενδειξη", "token": "Ενδειξη",
"type": "Τύπος εξουσιοδότησης", "type": "Τύπος εξουσιοδότησης",
"username": "Όνομα χρήστη" "username": "Όνομα χρήστη",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Η συλλογή δημιουργήθηκε", "created": "Η συλλογή δημιουργήθηκε",

View File

@@ -96,7 +96,8 @@
"password": "Contraseña", "password": "Contraseña",
"token": "Token", "token": "Token",
"type": "Tipo de autorización", "type": "Tipo de autorización",
"username": "Nombre de usuario" "username": "Nombre de usuario",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Colección creada", "created": "Colección creada",

View File

@@ -96,7 +96,8 @@
"password": "Salasana", "password": "Salasana",
"token": "Token", "token": "Token",
"type": "Valtuustyyppi", "type": "Valtuustyyppi",
"username": "Käyttäjätunnus" "username": "Käyttäjätunnus",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Kokoelma luotu", "created": "Kokoelma luotu",

View File

@@ -96,7 +96,8 @@
"password": "Mot de passe", "password": "Mot de passe",
"token": "Jeton", "token": "Jeton",
"type": "Type d'autorisation", "type": "Type d'autorisation",
"username": "Nom d'utilisateur" "username": "Nom d'utilisateur",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Collection créée", "created": "Collection créée",

View File

@@ -96,7 +96,8 @@
"password": "סיסמה", "password": "סיסמה",
"token": "אֲסִימוֹן", "token": "אֲסִימוֹן",
"type": "סוג הרשאה", "type": "סוג הרשאה",
"username": "שם משתמש" "username": "שם משתמש",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "אוסף נוצר", "created": "אוסף נוצר",

View File

@@ -96,7 +96,8 @@
"password": "Jelszó", "password": "Jelszó",
"token": "Jelképes", "token": "Jelképes",
"type": "Engedélyezés típusa", "type": "Engedélyezés típusa",
"username": "Felhasználónév" "username": "Felhasználónév",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Gyűjtemény létrehozva", "created": "Gyűjtemény létrehozva",

View File

@@ -96,7 +96,8 @@
"password": "Password", "password": "Password",
"token": "Token", "token": "Token",
"type": "Tipo di autorizzazione", "type": "Tipo di autorizzazione",
"username": "Nome utente" "username": "Nome utente",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Raccolta creata", "created": "Raccolta creata",

View File

@@ -96,7 +96,8 @@
"password": "パスワード", "password": "パスワード",
"token": "トークン", "token": "トークン",
"type": "承認タイプ", "type": "承認タイプ",
"username": "ユーザー名" "username": "ユーザー名",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "コレクションが作成されました", "created": "コレクションが作成されました",

View File

@@ -96,7 +96,8 @@
"password": "비밀번호", "password": "비밀번호",
"token": "토큰", "token": "토큰",
"type": "인증 유형", "type": "인증 유형",
"username": "사용자 이름" "username": "사용자 이름",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "모음집 생성됨", "created": "모음집 생성됨",

View File

@@ -96,7 +96,8 @@
"password": "Wachtwoord", "password": "Wachtwoord",
"token": "token", "token": "token",
"type": "Autorisatietype:", "type": "Autorisatietype:",
"username": "Gebruikersnaam" "username": "Gebruikersnaam",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Collectie gemaakt", "created": "Collectie gemaakt",

View File

@@ -96,7 +96,8 @@
"password": "Passord", "password": "Passord",
"token": "Nøkkel", "token": "Nøkkel",
"type": "Godkjenningstype", "type": "Godkjenningstype",
"username": "Brukernavn" "username": "Brukernavn",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Samlingen er opprettet", "created": "Samlingen er opprettet",

View File

@@ -96,7 +96,8 @@
"password": "Hasło", "password": "Hasło",
"token": "Token", "token": "Token",
"type": "Typ autoryzacji", "type": "Typ autoryzacji",
"username": "Nazwa użytkownika" "username": "Nazwa użytkownika",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Utworzono kolekcję", "created": "Utworzono kolekcję",

View File

@@ -96,7 +96,8 @@
"password": "Senha", "password": "Senha",
"token": "Símbolo", "token": "Símbolo",
"type": "Tipo de Autorização", "type": "Tipo de Autorização",
"username": "Nome do usuário" "username": "Nome do usuário",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Coleção criada", "created": "Coleção criada",

View File

@@ -96,7 +96,8 @@
"password": "Senha", "password": "Senha",
"token": "Símbolo", "token": "Símbolo",
"type": "Tipo de Autorização", "type": "Tipo de Autorização",
"username": "Nome do usuário" "username": "Nome do usuário",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Coleção criada", "created": "Coleção criada",

View File

@@ -96,7 +96,8 @@
"password": "Parola", "password": "Parola",
"token": "Jeton", "token": "Jeton",
"type": "Tipul de autorizare", "type": "Tipul de autorizare",
"username": "Nume de utilizator" "username": "Nume de utilizator",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Colecție creată", "created": "Colecție creată",

View File

@@ -96,7 +96,8 @@
"password": "Пароль", "password": "Пароль",
"token": "Токен", "token": "Токен",
"type": "Тип авторизации", "type": "Тип авторизации",
"username": "Имя пользователя" "username": "Имя пользователя",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Коллекция создана", "created": "Коллекция создана",

View File

@@ -96,7 +96,8 @@
"password": "Лозинка", "password": "Лозинка",
"token": "Токен", "token": "Токен",
"type": "Врста овлашћења", "type": "Врста овлашћења",
"username": "Корисничко име" "username": "Корисничко име",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Колекција је направљена", "created": "Колекција је направљена",

View File

@@ -96,7 +96,8 @@
"password": "Lösenord", "password": "Lösenord",
"token": "Tecken", "token": "Tecken",
"type": "Godkännande typ", "type": "Godkännande typ",
"username": "Användarnamn" "username": "Användarnamn",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Samlingen skapad", "created": "Samlingen skapad",

View File

@@ -96,7 +96,8 @@
"password": "Parola", "password": "Parola",
"token": "Jeton", "token": "Jeton",
"type": "Yetki Türü", "type": "Yetki Türü",
"username": "Kullanıcı adı" "username": "Kullanıcı adı",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Koleksiyon oluşturuldu", "created": "Koleksiyon oluşturuldu",

View File

@@ -96,7 +96,8 @@
"password": "密碼", "password": "密碼",
"token": "權杖", "token": "權杖",
"type": "授權類型", "type": "授權類型",
"username": "使用者名稱" "username": "使用者名稱",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "組合已建立", "created": "組合已建立",

View File

@@ -96,7 +96,8 @@
"password": "Пароль", "password": "Пароль",
"token": "Токен", "token": "Токен",
"type": "Тип авторизації", "type": "Тип авторизації",
"username": "Ім'я користувача" "username": "Ім'я користувача",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Колекція створена", "created": "Колекція створена",

View File

@@ -96,7 +96,8 @@
"password": "Mật khẩu", "password": "Mật khẩu",
"token": "Mã thông báo", "token": "Mã thông báo",
"type": "Loại ủy quyền", "type": "Loại ủy quyền",
"username": "tên tài khoản" "username": "tên tài khoản",
"pass_key_by": "Pass by"
}, },
"collection": { "collection": {
"created": "Bộ sưu tập đã được tạo", "created": "Bộ sưu tập đã được tạo",