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]]
from = "/careers"
to = "https://hoppscotch.notion.site/3b9d5d5239a043bfb91701faabf5b8f0"
to = "https://company.hoppscotch.io/careers"
status = 301
force = true
@@ -54,3 +54,9 @@
to = "https://github.com/hoppscotch/hoppscotch"
status = 301
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')"
@click.native="
() => {
readCollectionGist
readCollectionGist()
$refs.options.tippy().hide()
}
"

View File

@@ -136,152 +136,103 @@
class="mb-4"
/>
</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-b border-dividerLight flex">
<SmartEnvInput
v-model="basicUsername"
: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()
"
<div v-if="authType === 'basic'">
<div class="border-b border-dividerLight flex">
<SmartEnvInput
v-model="basicUsername"
:placeholder="$t('authorization.username')"
styles="bg-transparent flex flex-1 py-1 px-4"
/>
<SmartItem
:icon="
addTo === 'Query params'
? 'radio_button_checked'
: 'radio_button_unchecked'
"
:label="'Query params'"
@click.native="
addTo = 'Query params'
$refs.addToOptions.tippy().hide()
"
</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"
/>
</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

View File

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

View File

@@ -31,7 +31,7 @@
</div>
<div class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3">
<div ref="preRrequestEditor"></div>
<div ref="preRrequestEditor" class="h-full"></div>
</div>
<div
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 class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3">
<div ref="testScriptEditor"></div>
<div ref="testScriptEditor" class="h-full"></div>
</div>
<div
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": {
backgroundColor: "var(--primary-dark-color)",
color: "var(--secondary-light-color)",
color: "var(--secondary-dark-color)",
borderColor: "var(--divider-light-color)",
borderRadius: "3px",
},
".cm-button": {
backgroundColor: "var(--primary-dark-color)",
color: "var(--secondary-light-color)",
color: "var(--secondary-dark-color)",
backgroundImage: "none",
border: "none",
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -96,7 +96,8 @@
"password": "Mật khẩu",
"token": "Mã thông báo",
"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": {
"created": "Bộ sưu tập đã được tạo",