refactor: polish environment selector (#3260)
This commit is contained in:
@@ -190,10 +190,11 @@ a {
|
|||||||
@apply border-solid border-dividerDark;
|
@apply border-solid border-dividerDark;
|
||||||
@apply rounded;
|
@apply rounded;
|
||||||
@apply shadow-lg;
|
@apply shadow-lg;
|
||||||
|
@apply max-w-[45vw] #{!important};
|
||||||
|
|
||||||
.tippy-content {
|
.tippy-content {
|
||||||
@apply flex flex-col;
|
@apply flex flex-col;
|
||||||
@apply max-h-56;
|
@apply max-h-[45vh];
|
||||||
@apply items-stretch;
|
@apply items-stretch;
|
||||||
@apply overflow-y-auto;
|
@apply overflow-y-auto;
|
||||||
@apply text-secondary text-body;
|
@apply text-secondary text-body;
|
||||||
@@ -201,6 +202,10 @@ a {
|
|||||||
@apply leading-normal;
|
@apply leading-normal;
|
||||||
@apply focus:outline-none;
|
@apply focus:outline-none;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
|
||||||
|
& > span {
|
||||||
|
@apply block #{!important};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tippy-svg-arrow {
|
.tippy-svg-arrow {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span
|
<span
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
:title="`${t('environment.select')}`"
|
:title="`${t('environment.select')}`"
|
||||||
class="bg-transparent border-b border-dividerLight select-wrapper"
|
class="select-wrapper"
|
||||||
>
|
>
|
||||||
<HoppButtonSecondary
|
<HoppButtonSecondary
|
||||||
:icon="IconLayers"
|
:icon="IconLayers"
|
||||||
@@ -50,7 +50,11 @@
|
|||||||
/>
|
/>
|
||||||
<HoppSmartTabs
|
<HoppSmartTabs
|
||||||
v-model="selectedEnvTab"
|
v-model="selectedEnvTab"
|
||||||
styles="sticky overflow-x-auto my-2 border border-divider rounded flex-shrink-0 z-0 top-0 bg-primary"
|
:styles="`sticky overflow-x-auto my-2 border border-divider rounded flex-shrink-0 z-0 top-0 bg-primary ${
|
||||||
|
!isTeamSelected || workspace.type === 'personal'
|
||||||
|
? 'bg-primaryLight'
|
||||||
|
: ''
|
||||||
|
}`"
|
||||||
render-inactive-tabs
|
render-inactive-tabs
|
||||||
>
|
>
|
||||||
<HoppSmartTab
|
<HoppSmartTab
|
||||||
@@ -189,12 +193,12 @@
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-2 flex flex-col flex-1 space-y-2 pl-4">
|
<div class="my-2 flex flex-col flex-1 space-y-2 pl-4 pr-2">
|
||||||
<div class="flex flex-1 space-x-4">
|
<div class="flex flex-1 space-x-4">
|
||||||
<span class="w-20 truncate text-tiny font-semibold">
|
<span class="w-1/4 min-w-32 truncate text-tiny font-semibold">
|
||||||
{{ t("environment.name") }}
|
{{ t("environment.name") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="w-36 truncate text-tiny font-semibold">
|
<span class="w-full min-w-32 truncate text-tiny font-semibold">
|
||||||
{{ t("environment.value") }}
|
{{ t("environment.value") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -203,10 +207,10 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="flex flex-1 space-x-4"
|
class="flex flex-1 space-x-4"
|
||||||
>
|
>
|
||||||
<span class="text-secondaryLight w-20 truncate">
|
<span class="text-secondaryLight w-1/4 min-w-32 truncate">
|
||||||
{{ variable.key }}
|
{{ variable.key }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-secondaryLight w-36 truncate">
|
<span class="text-secondaryLight w-full min-w-32 truncate">
|
||||||
{{ variable.value }}
|
{{ variable.value }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -215,15 +219,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="sticky top-0 font-semibold truncate flex items-center justify-between text-secondaryDark bg-primary border border-divider rounded pl-4"
|
class="sticky top-0 mt-2 font-semibold truncate flex items-center justify-between text-secondaryDark bg-primary border border-divider rounded pl-4"
|
||||||
:class="{
|
:class="{
|
||||||
'py-2 pr-4': !selectedEnv.variables,
|
'bg-primaryLight': !selectedEnv.variables,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ t("environment.list") }}
|
{{ t("environment.list") }}
|
||||||
<HoppButtonSecondary
|
<HoppButtonSecondary
|
||||||
v-if="selectedEnv.variables"
|
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
|
:disabled="!selectedEnv.variables"
|
||||||
:title="t('action.edit')"
|
:title="t('action.edit')"
|
||||||
:icon="IconEdit"
|
:icon="IconEdit"
|
||||||
@click="
|
@click="
|
||||||
@@ -240,12 +244,12 @@
|
|||||||
>
|
>
|
||||||
{{ t("environment.no_active_environment") }}
|
{{ t("environment.no_active_environment") }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="my-2 flex flex-col flex-1 space-y-2 pl-4">
|
<div v-else class="my-2 flex flex-col flex-1 space-y-2 pl-4 pr-2">
|
||||||
<div class="flex flex-1 space-x-4">
|
<div class="flex flex-1 space-x-4">
|
||||||
<span class="w-20 truncate text-tiny font-semibold">
|
<span class="w-1/4 min-w-32 truncate text-tiny font-semibold">
|
||||||
{{ t("environment.name") }}
|
{{ t("environment.name") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="w-36 truncate text-tiny font-semibold">
|
<span class="w-full min-w-32 truncate text-tiny font-semibold">
|
||||||
{{ t("environment.value") }}
|
{{ t("environment.value") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,10 +258,10 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="flex flex-1 space-x-4"
|
class="flex flex-1 space-x-4"
|
||||||
>
|
>
|
||||||
<span class="text-secondaryLight w-20 truncate">
|
<span class="text-secondaryLight w-1/4 min-w-32 truncate">
|
||||||
{{ variable.key }}
|
{{ variable.key }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-secondaryLight w-36 truncate">
|
<span class="text-secondaryLight w-full min-w-32 truncate">
|
||||||
{{ variable.value }}
|
{{ variable.value }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -190,10 +190,11 @@ a {
|
|||||||
@apply border-solid border-dividerDark;
|
@apply border-solid border-dividerDark;
|
||||||
@apply rounded;
|
@apply rounded;
|
||||||
@apply shadow-lg;
|
@apply shadow-lg;
|
||||||
|
@apply max-w-[45vw] #{!important};
|
||||||
|
|
||||||
.tippy-content {
|
.tippy-content {
|
||||||
@apply flex flex-col;
|
@apply flex flex-col;
|
||||||
@apply max-h-56;
|
@apply max-h-[45vh];
|
||||||
@apply items-stretch;
|
@apply items-stretch;
|
||||||
@apply overflow-y-auto;
|
@apply overflow-y-auto;
|
||||||
@apply text-secondary text-body;
|
@apply text-secondary text-body;
|
||||||
@@ -201,6 +202,10 @@ a {
|
|||||||
@apply leading-normal;
|
@apply leading-normal;
|
||||||
@apply focus:outline-none;
|
@apply focus:outline-none;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
|
||||||
|
& > span {
|
||||||
|
@apply block #{!important};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tippy-svg-arrow {
|
.tippy-svg-arrow {
|
||||||
|
|||||||
@@ -190,10 +190,11 @@ a {
|
|||||||
@apply border-solid border-dividerDark;
|
@apply border-solid border-dividerDark;
|
||||||
@apply rounded;
|
@apply rounded;
|
||||||
@apply shadow-lg;
|
@apply shadow-lg;
|
||||||
|
@apply max-w-[45vw] #{!important};
|
||||||
|
|
||||||
.tippy-content {
|
.tippy-content {
|
||||||
@apply flex flex-col;
|
@apply flex flex-col;
|
||||||
@apply max-h-56;
|
@apply max-h-[45vh];
|
||||||
@apply items-stretch;
|
@apply items-stretch;
|
||||||
@apply overflow-y-auto;
|
@apply overflow-y-auto;
|
||||||
@apply text-secondary text-body;
|
@apply text-secondary text-body;
|
||||||
@@ -201,6 +202,10 @@ a {
|
|||||||
@apply leading-normal;
|
@apply leading-normal;
|
||||||
@apply focus:outline-none;
|
@apply focus:outline-none;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
|
||||||
|
& > span {
|
||||||
|
@apply block #{!important};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tippy-svg-arrow {
|
.tippy-svg-arrow {
|
||||||
|
|||||||
Reference in New Issue
Block a user