refactor(ui): improved empty state for env variables and response sections

This commit is contained in:
liyasthomas
2021-08-02 10:00:50 +05:30
parent 2ae2acc003
commit 8a268ee6de
3 changed files with 92 additions and 36 deletions

View File

@@ -88,6 +88,26 @@
/>
</div>
</div>
<div
v-if="vars.length === 0"
class="
flex flex-col
text-secondaryLight
p-4
items-center
justify-center
"
>
<i class="opacity-75 pb-2 material-icons">layers</i>
<span class="text-center pb-4">
{{ $t("environments_empty") }}
</span>
<ButtonSecondary
:label="$t('add_new')"
outline
@click.native="addEnvironmentVariable"
/>
</div>
</div>
</div>
</template>

View File

@@ -24,39 +24,41 @@
{{ environment.name }}
</span>
</span>
<tippy
ref="options"
interactive
tabindex="-1"
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('more')"
icon="more_vert"
<span>
<tippy
ref="options"
interactive
tabindex="-1"
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('more')"
icon="more_vert"
/>
</template>
<SmartItem
icon="create"
:label="$t('edit')"
@click.native="
$emit('edit-environment')
$refs.options.tippy().hide()
"
/>
</template>
<SmartItem
icon="create"
:label="$t('edit')"
@click.native="
$emit('edit-environment')
$refs.options.tippy().hide()
"
/>
<SmartItem
icon="delete"
color="red"
:label="$t('delete')"
@click.native="
confirmRemove = true
$refs.options.tippy().hide()
"
/>
</tippy>
<SmartItem
icon="delete"
color="red"
:label="$t('delete')"
@click.native="
confirmRemove = true
$refs.options.tippy().hide()
"
/>
</tippy>
</span>
<SmartConfirmModal
:show="confirmRemove"
:title="$t('are_you_sure_remove_environment')"