refactor(ui): sort classes

This commit is contained in:
liyasthomas
2021-08-07 09:07:26 +05:30
parent d08f15430c
commit 8c60a4c032
45 changed files with 149 additions and 211 deletions

View File

@@ -105,7 +105,7 @@
- Choose theme: System (default), Light, Dark and Black - Choose theme: System (default), Light, Dark and Black
- Choose accent color: Green (default), Teal, Blue, Indigo, Purple, Yellow, Orange, Red and Pink - Choose accent color: Green (default), Teal, Blue, Indigo, Purple, Yellow, Orange, Red and Pink
- Toggle auto-scroll to response - Distraction free Zen mode
<p> <p>
<a href="https://hoppscotch.io"><img src="https://raw.githubusercontent.com/hoppscotch/hoppscotch/main/static/images/screenshots/banner_light.png" alt="Screenshot" width="100%"></a> <a href="https://hoppscotch.io"><img src="https://raw.githubusercontent.com/hoppscotch/hoppscotch/main/static/images/screenshots/banner_light.png" alt="Screenshot" width="100%"></a>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

View File

@@ -15,7 +15,7 @@
" "
> >
<h3 class="ml-4 heading">{{ $t("shortcuts") }}</h3> <h3 class="ml-4 heading">{{ $t("shortcuts") }}</h3>
<div> <div class="flex">
<ButtonSecondary to="/settings" icon="tune" /> <ButtonSecondary to="/settings" icon="tune" />
<ButtonSecondary icon="close" @click.native="close()" /> <ButtonSecondary icon="close" @click.native="close()" />
</div> </div>
@@ -24,7 +24,7 @@
<input <input
v-model="filterText" v-model="filterText"
type="search" type="search"
class="bg-primaryLight border-b border-dividerLight flex font-semibold font-mono w-full py-2 pr-2 pl-8 focus:outline-none truncate" class="bg-primaryLight border-b border-dividerLight flex font-semibold font-mono w-full py-2 pr-2 pl-8 truncate focus:outline-none"
:placeholder="$t('search')" :placeholder="$t('search')"
/> />
</div> --> </div> -->

View File

@@ -3,7 +3,7 @@
<transition v-if="show" name="fade" appear> <transition v-if="show" name="fade" appear>
<div class="inset-0 transition-opacity z-20 fixed" @keydown.esc="close()"> <div class="inset-0 transition-opacity z-20 fixed" @keydown.esc="close()">
<div <div
class="bg-primaryDark opacity-75 inset-0 absolute" class="bg-primaryDark opacity-90 inset-0 absolute"
tabindex="0" tabindex="0"
@click="close()" @click="close()"
></div> ></div>

View File

@@ -1,10 +1,8 @@
<template> <template>
<SmartModal v-if="show" @close="$emit('hide-modal')"> <SmartModal v-if="show" @close="$emit('hide-modal')">
<template #header> <template #header>
<h3 class="heading">{{ $t("new_folder") }}</h3> <h3 class="heading">{{ $t("folder.new") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("collection.edit") }}</h3> <h3 class="heading">{{ $t("collection.edit") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="$emit('hide-modal')"> <SmartModal v-if="show" @close="$emit('hide-modal')">
<template #header> <template #header>
<h3 class="heading">{{ $t("folder.edit") }}</h3> <h3 class="heading">{{ $t("folder.edit") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("edit_request") }}</h3> <h3 class="heading">{{ $t("edit_request") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -1,10 +1,8 @@
<template> <template>
<SmartModal v-if="show" @close="$emit('hide-modal')"> <SmartModal v-if="show" @close="$emit('hide-modal')">
<template #header> <template #header>
<h3 class="heading">{{ $t("new_folder") }}</h3> <h3 class="heading">{{ $t("folder.new") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -37,7 +37,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="create_new_folder" icon="create_new_folder"
:title="$t('folder.new')" :title="$t('folder.new')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native=" @click.native="
$emit('add-folder', { $emit('add-folder', {
path: `${collectionIndex}`, path: `${collectionIndex}`,

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("collection.edit") }}</h3> <h3 class="heading">{{ $t("collection.edit") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="$emit('hide-modal')"> <SmartModal v-if="show" @close="$emit('hide-modal')">
<template #header> <template #header>
<h3 class="heading">{{ $t("folder.edit") }}</h3> <h3 class="heading">{{ $t("folder.edit") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("edit_request") }}</h3> <h3 class="heading">{{ $t("edit_request") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -39,7 +39,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="create_new_folder" icon="create_new_folder"
:title="$t('folder.new')" :title="$t('folder.new')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native="$emit('add-folder', { folder, path: folderPath })" @click.native="$emit('add-folder', { folder, path: folderPath })"
/> />
<tippy ref="options" interactive trigger="click" theme="popover" arrow> <tippy ref="options" interactive trigger="click" theme="popover" arrow>

View File

@@ -46,7 +46,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="replay" icon="replay"
:title="$t('restore')" :title="$t('restore')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native="!doc ? selectRequest() : {}" @click.native="!doc ? selectRequest() : {}"
/> />
<tippy ref="options" interactive trigger="click" theme="popover" arrow> <tippy ref="options" interactive trigger="click" theme="popover" arrow>

View File

@@ -21,8 +21,8 @@
py-2 py-2
pr-2 pr-2
pl-9 pl-9
focus:outline-none
truncate truncate
focus:outline-none
" "
/> />
</div> </div>

View File

@@ -54,7 +54,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="create_new_folder" icon="create_new_folder"
:title="$t('folder.new')" :title="$t('folder.new')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native=" @click.native="
$emit('add-folder', { $emit('add-folder', {
folder: collection, folder: collection,

View File

@@ -39,7 +39,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="create_new_folder" icon="create_new_folder"
:title="$t('folder.new')" :title="$t('folder.new')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native="$emit('add-folder', { folder, path: folderPath })" @click.native="$emit('add-folder', { folder, path: folderPath })"
/> />
<tippy ref="options" interactive trigger="click" theme="popover" arrow> <tippy ref="options" interactive trigger="click" theme="popover" arrow>

View File

@@ -54,7 +54,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
icon="replay" icon="replay"
:title="$t('restore')" :title="$t('restore')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native="!doc ? selectRequest() : {}" @click.native="!doc ? selectRequest() : {}"
/> />
<tippy ref="options" interactive trigger="click" theme="popover" arrow> <tippy ref="options" interactive trigger="click" theme="popover" arrow>

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("new_environment") }}</h3> <h3 class="heading">{{ $t("new_environment") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("edit_environment") }}</h3> <h3 class="heading">{{ $t("edit_environment") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">
@@ -23,7 +21,7 @@
<label for="variableList" class="font-semibold px-4 pt-4 pb-4"> <label for="variableList" class="font-semibold px-4 pt-4 pb-4">
{{ $t("env_variable_list") }} {{ $t("env_variable_list") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title="$t('clear')" :title="$t('clear')"
@@ -77,7 +75,7 @@
:placeholder="$t('count.value', { count: index + 1 })" :placeholder="$t('count.value', { count: index + 1 })"
:name="'value' + index" :name="'value' + index"
/> />
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
id="variable" id="variable"
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" dialog @close="hideModal"> <SmartModal v-if="show" dialog @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("login_to_hoppscotch") }}</h3> <h3 class="heading">{{ $t("login_to_hoppscotch") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div v-if="mode === 'sign-in'" class="flex flex-col space-y-2"> <div v-if="mode === 'sign-in'" class="flex flex-col space-y-2">

View File

@@ -26,7 +26,7 @@
icon="delete" icon="delete"
color="red" color="red"
:title="$t('delete')" :title="$t('delete')"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
data-testid="delete_history_entry" data-testid="delete_history_entry"
@click.native="$emit('delete-entry')" @click.native="$emit('delete-entry')"
/> />
@@ -34,7 +34,7 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title="expand ? $t('hide.more') : $t('show.more')" :title="expand ? $t('hide.more') : $t('show.more')"
:icon="expand ? 'unfold_less' : 'unfold_more'" :icon="expand ? 'unfold_less' : 'unfold_more'"
class="group-hover:inline-flex hidden" class="hidden group-hover:inline-flex"
@click.native="expand = !expand" @click.native="expand = !expand"
/> />
<ButtonSecondary <ButtonSecondary
@@ -51,12 +51,18 @@
<span <span
v-for="(line, index) in query" v-for="(line, index) in query"
:key="`line-${index}`" :key="`line-${index}`"
class="cursor-pointer font-mono text-secondaryLight px-4 truncate" class="
cursor-pointer
font-mono
text-secondaryLight
px-4
whitespace-pre
truncate
"
data-testid="restore_history_entry" data-testid="restore_history_entry"
@click="$emit('use-entry')" @click="$emit('use-entry')"
>{{ line }}</span
> >
{{ line }}
</span>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -5,8 +5,8 @@
bg-primary bg-primary
border-b border-dividerLight border-b border-dividerLight
flex flex-1 flex flex-1
pl-4
top-upperSecondaryStickyFold top-upperSecondaryStickyFold
pl-4
z-10 z-10
sticky sticky
items-center items-center

View File

@@ -5,8 +5,8 @@
bg-primary bg-primary
border-b border-dividerLight border-b border-dividerLight
flex flex-1 flex flex-1
pl-4
top-upperSecondaryStickyFold top-upperSecondaryStickyFold
pl-4
z-10 z-10
sticky sticky
items-center items-center
@@ -103,42 +103,38 @@
}) })
" "
/> />
<div> <ButtonSecondary
<ButtonSecondary v-tippy="{ theme: 'tooltip' }"
v-tippy="{ theme: 'tooltip' }" :title="
:title=" header.hasOwnProperty('active')
header.hasOwnProperty('active') ? header.active
? header.active ? $t('action.turn_off')
? $t('action.turn_off') : $t('action.turn_on')
: $t('action.turn_on') : $t('action.turn_off')
: $t('action.turn_off') "
" :icon="
:icon=" header.hasOwnProperty('active')
header.hasOwnProperty('active') ? header.active
? header.active ? 'check_box'
? 'check_box' : 'check_box_outline_blank'
: 'check_box_outline_blank' : 'check_box'
: 'check_box' "
" color="green"
color="green" @click.native="
@click.native=" updateHeader(index, {
updateHeader(index, { key: header.key,
key: header.key, value: header.value,
value: header.value, active: header.hasOwnProperty('active') ? !header.active : false,
active: header.hasOwnProperty('active') ? !header.active : false, })
}) "
" />
/> <ButtonSecondary
</div> v-tippy="{ theme: 'tooltip' }"
<div> :title="$t('delete')"
<ButtonSecondary icon="delete"
v-tippy="{ theme: 'tooltip' }" color="red"
:title="$t('delete')" @click.native="deleteHeader(index)"
icon="delete" />
color="red"
@click.native="deleteHeader(index)"
/>
</div>
</div> </div>
<div <div
v-if="headers$.length === 0" v-if="headers$.length === 0"

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("import.curl") }}</h3> <h3 class="heading">{{ $t("import.curl") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -124,42 +124,38 @@
}) })
" "
/> />
<div> <ButtonSecondary
<ButtonSecondary v-tippy="{ theme: 'tooltip' }"
v-tippy="{ theme: 'tooltip' }" :title="
:title=" param.hasOwnProperty('active')
param.hasOwnProperty('active') ? param.active
? param.active ? $t('action.turn_off')
? $t('action.turn_off') : $t('action.turn_on')
: $t('action.turn_on') : $t('action.turn_off')
: $t('action.turn_off') "
" :icon="
:icon=" param.hasOwnProperty('active')
param.hasOwnProperty('active') ? param.active
? param.active ? 'check_box'
? 'check_box' : 'check_box_outline_blank'
: 'check_box_outline_blank' : 'check_box'
: 'check_box' "
" color="green"
color="green" @click.native="
@click.native=" updateParam(index, {
updateParam(index, { key: param.key,
key: param.key, value: param.value,
value: param.value, active: param.hasOwnProperty('active') ? !param.active : false,
active: param.hasOwnProperty('active') ? !param.active : false, })
}) "
" />
/> <ButtonSecondary
</div> v-tippy="{ theme: 'tooltip' }"
<div> :title="$t('delete')"
<ButtonSecondary icon="delete"
v-tippy="{ theme: 'tooltip' }" color="red"
:title="$t('delete')" @click.native="deleteParam(index)"
icon="delete" />
color="red"
@click.native="deleteParam(index)"
/>
</div>
</div> </div>
<div <div
v-if="params$.length === 0" v-if="params$.length === 0"

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("manage_token") }}</h3> <h3 class="heading">{{ $t("manage_token") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-1"> <div class="flex flex-1">

View File

@@ -15,7 +15,7 @@
<label for="body" class="font-semibold px-4"> <label for="body" class="font-semibold px-4">
{{ $t("response_body") }} {{ $t("response_body") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-if="response.body" v-if="response.body"
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"

View File

@@ -15,7 +15,7 @@
<label for="body" class="font-semibold px-4"> <label for="body" class="font-semibold px-4">
{{ $t("response_body") }} {{ $t("response_body") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-if="response.body" v-if="response.body"
ref="downloadResponse" ref="downloadResponse"

View File

@@ -15,7 +15,7 @@
<label for="body" class="font-semibold px-4"> <label for="body" class="font-semibold px-4">
{{ $t("response_body") }} {{ $t("response_body") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-if="response.body" v-if="response.body"
ref="downloadResponse" ref="downloadResponse"

View File

@@ -15,7 +15,7 @@
<label for="body" class="font-semibold px-4"> <label for="body" class="font-semibold px-4">
{{ $t("response_body") }} {{ $t("response_body") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-if="response.body" v-if="response.body"
ref="downloadResponse" ref="downloadResponse"

View File

@@ -15,7 +15,7 @@
<label for="body" class="font-semibold px-4"> <label for="body" class="font-semibold px-4">
{{ $t("response_body") }} {{ $t("response_body") }}
</label> </label>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-if="response.body" v-if="response.body"
ref="downloadResponse" ref="downloadResponse"

View File

@@ -96,7 +96,7 @@
name="message" name="message"
type="text" type="text"
/> />
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title=" :title="
@@ -121,7 +121,7 @@
" "
/> />
</div> </div>
<div> <div class="flex">
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')" :title="$t('delete')"

View File

@@ -2,9 +2,7 @@
<SmartModal v-if="show" @close="hideModal"> <SmartModal v-if="show" @close="hideModal">
<template #header> <template #header>
<h3 class="heading">{{ $t("modal.confirm") }}</h3> <h3 class="heading">{{ $t("modal.confirm") }}</h3>
<div> <ButtonSecondary icon="close" @click.native="hideModal" />
<ButtonSecondary icon="close" @click.native="hideModal" />
</div>
</template> </template>
<template #body> <template #body>
<div class="flex flex-col px-2"> <div class="flex flex-col px-2">

View File

@@ -9,7 +9,7 @@
> >
<transition name="fade" appear> <transition name="fade" appear>
<div <div
class="bg-primaryDark opacity-100 inset-0 transition fixed" class="bg-primaryDark opacity-90 inset-0 transition fixed"
@touchstart="!dialog ? close() : null" @touchstart="!dialog ? close() : null"
@touchend="!dialog ? close() : null" @touchend="!dialog ? close() : null"
@mouseup="!dialog ? close() : null" @mouseup="!dialog ? close() : null"
@@ -17,7 +17,7 @@
></div> ></div>
</transition> </transition>
<span <span
class="hidden sm:inline-block sm:align-middle sm:h-screen" class="hidden sm:h-screen sm:inline-block sm:align-middle"
aria-hidden="true" aria-hidden="true"
>&#8203;</span >&#8203;</span
> >
@@ -44,7 +44,7 @@
inline-block inline-block
align-bottom align-bottom
overflow-hidden overflow-hidden
sm:align-middle sm:max-w-md sm:max-w-md sm:align-middle
" "
> >
<div class="flex pl-2 items-center justify-between"> <div class="flex pl-2 items-center justify-between">

View File

@@ -21,13 +21,11 @@
<label for="memberList" class="font-semibold px-4 pt-4 pb-4"> <label for="memberList" class="font-semibold px-4 pt-4 pb-4">
{{ $t("team.members") }} {{ $t("team.members") }}
</label> </label>
<div> <ButtonSecondary
<ButtonSecondary icon="add"
icon="add" :label="$t('add.new')"
:label="$t('add.new')" @click.native="addTeamMember"
@click.native="addTeamMember" />
/>
</div>
</div> </div>
<div class="border-divider border rounded"> <div class="border-divider border rounded">
<div <div
@@ -106,16 +104,14 @@
/> />
</tippy> </tippy>
</span> </span>
<div> <ButtonSecondary
<ButtonSecondary id="member"
id="member" v-tippy="{ theme: 'tooltip' }"
v-tippy="{ theme: 'tooltip' }" :title="$t('delete')"
:title="$t('delete')" icon="delete"
icon="delete" color="red"
color="red" @click.native="removeExistingTeamMember(member.user.uid)"
@click.native="removeExistingTeamMember(member.user.uid)" />
/>
</div>
</div> </div>
<div <div
v-for="(member, index) in newMembers" v-for="(member, index) in newMembers"
@@ -193,16 +189,14 @@
/> />
</tippy> </tippy>
</span> </span>
<div> <ButtonSecondary
<ButtonSecondary id="member"
id="member" v-tippy="{ theme: 'tooltip' }"
v-tippy="{ theme: 'tooltip' }" :title="$t('delete')"
:title="$t('delete')" icon="delete"
icon="delete" color="red"
color="red" @click.native="removeTeamMember(index)"
@click.native="removeTeamMember(index)" />
/>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -17,9 +17,10 @@
<p v-if="$apollo.queries.myTeams.loading"> <p v-if="$apollo.queries.myTeams.loading">
{{ $t("loading") }} {{ $t("loading") }}
</p> </p>
<p v-if="myTeams.length === 0"> <div v-if="myTeams.length === 0" class="flex items-center">
<i class="material-icons">help_outline</i> {{ $t("team.create_new") }} <i class="mr-4 material-icons">help_outline</i>
</p> {{ $t("empty.teams") }}
</div>
<div <div
v-else v-else
class=" class="

View File

@@ -12,7 +12,6 @@ let analytics: firebase.analytics.Analytics | null
type SettingsCustomDimensions = { type SettingsCustomDimensions = {
usesProxy: boolean usesProxy: boolean
usesExtension: boolean usesExtension: boolean
usesScrollInto: boolean
syncCollections: boolean syncCollections: boolean
syncEnvironments: boolean syncEnvironments: boolean
syncHistory: boolean syncHistory: boolean
@@ -61,7 +60,6 @@ function initSettingsListeners() {
const conf: SettingsCustomDimensions = { const conf: SettingsCustomDimensions = {
usesProxy: settings.PROXY_ENABLED, usesProxy: settings.PROXY_ENABLED,
usesExtension: settings.EXTENSIONS_ENABLED, usesExtension: settings.EXTENSIONS_ENABLED,
usesScrollInto: settings.SCROLL_INTO_ENABLED,
syncCollections: settings.syncCollections, syncCollections: settings.syncCollections,
syncEnvironments: settings.syncEnvironments, syncEnvironments: settings.syncEnvironments,
syncHistory: settings.syncHistory, syncHistory: settings.syncHistory,

View File

@@ -36,7 +36,8 @@
"history": "History is empty", "history": "History is empty",
"headers": "Headers are empty", "headers": "Headers are empty",
"tests": "Tests are empty", "tests": "Tests are empty",
"schema": "Connect to a GraphQL endpoint" "schema": "Connect to a GraphQL endpoint",
"teams": "Teams are empty"
}, },
"count": { "count": {
"message": "Message {count}", "message": "Message {count}",
@@ -393,7 +394,6 @@
"login_success": "Successfully logged in", "login_success": "Successfully logged in",
"logout": "Logout", "logout": "Logout",
"account": "Account", "account": "Account",
"scrollInto_use_toggle": "Auto scroll",
"sync": "Sync", "sync": "Sync",
"syncHistory": "History", "syncHistory": "History",
"syncCollections": "Collections", "syncCollections": "Collections",

View File

@@ -46,7 +46,6 @@ export type SettingsType = {
syncHistory: boolean syncHistory: boolean
syncEnvironments: boolean syncEnvironments: boolean
SCROLL_INTO_ENABLED: boolean
PROXY_ENABLED: boolean PROXY_ENABLED: boolean
PROXY_URL: string PROXY_URL: string
PROXY_KEY: string PROXY_KEY: string
@@ -73,7 +72,6 @@ export const defaultSettings: SettingsType = {
syncHistory: true, syncHistory: true,
syncEnvironments: true, syncEnvironments: true,
SCROLL_INTO_ENABLED: true,
PROXY_ENABLED: false, PROXY_ENABLED: false,
PROXY_URL: "https://proxy.hoppscotch.io/", PROXY_URL: "https://proxy.hoppscotch.io/",
PROXY_KEY: "", PROXY_KEY: "",

View File

@@ -242,7 +242,7 @@
}) })
" "
/> />
<div> <span>
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title=" :title="
@@ -269,8 +269,8 @@
}) })
" "
/> />
</div> </span>
<div> <span>
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')" :title="$t('delete')"
@@ -278,7 +278,7 @@
color="red" color="red"
@click.native="removeRequestHeader(index)" @click.native="removeRequestHeader(index)"
/> />
</div> </span>
</div> </div>
<div <div
v-if="headers.length === 0" v-if="headers.length === 0"
@@ -637,7 +637,7 @@ import * as gql from "graphql"
import { commonHeaders } from "~/helpers/headers" import { commonHeaders } from "~/helpers/headers"
import { getPlatformSpecialKey } from "~/helpers/platformutils" import { getPlatformSpecialKey } from "~/helpers/platformutils"
import { getCurrentStrategyID, sendNetworkRequest } from "~/helpers/network" import { getCurrentStrategyID, sendNetworkRequest } from "~/helpers/network"
import { getSettingSubject, useSetting } from "~/newstore/settings" import { useSetting } from "~/newstore/settings"
import { addGraphqlHistoryEntry } from "~/newstore/history" import { addGraphqlHistoryEntry } from "~/newstore/history"
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics" import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
import { copyToClipboard } from "~/helpers/utils/clipboard" import { copyToClipboard } from "~/helpers/utils/clipboard"
@@ -676,11 +676,6 @@ export default defineComponent({
showSaveRequestModal: false, showSaveRequestModal: false,
} }
}, },
subscriptions() {
return {
SCROLL_INTO_ENABLED: getSettingSubject("SCROLL_INTO_ENABLED"),
}
},
head() { head() {
return { return {
title: `GraphQL • Hoppscotch`, title: `GraphQL • Hoppscotch`,
@@ -898,7 +893,7 @@ export default defineComponent({
const rootTypeName = this.resolveRootType(type).name const rootTypeName = this.resolveRootType(type).name
const target = document.getElementById(`type_${rootTypeName}`) const target = document.getElementById(`type_${rootTypeName}`)
if (target && this.SCROLL_INTO_ENABLED) { if (target) {
this.$refs.gqlTabs.$el this.$refs.gqlTabs.$el
.querySelector(".gqlTabs") .querySelector(".gqlTabs")
.scrollTo({ top: target.offsetTop, behavior: "smooth" }) .scrollTo({ top: target.offsetTop, behavior: "smooth" })
@@ -943,7 +938,6 @@ export default defineComponent({
this.$nuxt.$loading.start() this.$nuxt.$loading.start()
this.response = this.$t("loading") this.response = this.$t("loading")
if (this.SCROLL_INTO_ENABLED) this.scrollInto("response")
try { try {
const headers = {} const headers = {}
@@ -1176,7 +1170,6 @@ export default defineComponent({
this.$nuxt.$loading.start() this.$nuxt.$loading.start()
this.schema = this.$t("loading") this.schema = this.$t("loading")
if (this.SCROLL_INTO_ENABLED) this.scrollInto("schema")
try { try {
const query = JSON.stringify({ const query = JSON.stringify({
@@ -1308,11 +1301,6 @@ export default defineComponent({
}, },
}) })
}, },
scrollInto(view) {
this.$refs[view].$el.scrollIntoView({
behavior: "smooth",
})
},
updateQuery(updatedQuery) { updateQuery(updatedQuery) {
this.gqlQueryString = updatedQuery this.gqlQueryString = updatedQuery
}, },

View File

@@ -190,7 +190,6 @@ export default defineComponent({
null null
), ),
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"), RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"),
SCROLL_INTO_ENABLED: useSetting("SCROLL_INTO_ENABLED"),
PROXY_ENABLED: useSetting("PROXY_ENABLED"), PROXY_ENABLED: useSetting("PROXY_ENABLED"),
URL_EXCLUDES: useSetting("URL_EXCLUDES"), URL_EXCLUDES: useSetting("URL_EXCLUDES"),
EXPERIMENTAL_URL_BAR_ENABLED: useSetting("EXPERIMENTAL_URL_BAR_ENABLED"), EXPERIMENTAL_URL_BAR_ENABLED: useSetting("EXPERIMENTAL_URL_BAR_ENABLED"),

View File

@@ -164,14 +164,6 @@
>. >.
</div> </div>
<div class="space-y-4 mt-4"> <div class="space-y-4 mt-4">
<div class="flex items-center">
<SmartToggle
:on="SCROLL_INTO_ENABLED"
@change="toggleSetting('SCROLL_INTO_ENABLED')"
>
{{ $t("scrollInto_use_toggle") }}
</SmartToggle>
</div>
<div class="flex items-center"> <div class="flex items-center">
<SmartToggle <SmartToggle
:on="EXPERIMENTAL_URL_BAR_ENABLED" :on="EXPERIMENTAL_URL_BAR_ENABLED"
@@ -382,7 +374,6 @@ type SettingsType = typeof defaultSettings
export default defineComponent({ export default defineComponent({
setup() { setup() {
return { return {
SCROLL_INTO_ENABLED: useSetting("SCROLL_INTO_ENABLED"),
PROXY_ENABLED: useSetting("PROXY_ENABLED"), PROXY_ENABLED: useSetting("PROXY_ENABLED"),
PROXY_URL: useSetting("PROXY_URL"), PROXY_URL: useSetting("PROXY_URL"),
PROXY_KEY: useSetting("PROXY_KEY"), PROXY_KEY: useSetting("PROXY_KEY"),