chore: minor ui improvements (#3274)

This commit is contained in:
Liyas Thomas
2023-08-22 22:22:43 +05:30
committed by GitHub
parent ac60843183
commit 008eb6b77b
20 changed files with 42 additions and 42 deletions

View File

@@ -18,13 +18,18 @@
:horizontal="COLUMN_LAYOUT" :horizontal="COLUMN_LAYOUT"
@resize="setPaneEvent($event, 'horizontal')" @resize="setPaneEvent($event, 'horizontal')"
> >
<Pane :size="PANE_MAIN_TOP_SIZE" class="flex flex-col !overflow-auto"> <Pane
:size="PANE_MAIN_TOP_SIZE"
class="flex flex-col !overflow-auto"
min-size="25"
>
<slot name="primary" /> <slot name="primary" />
</Pane> </Pane>
<Pane <Pane
v-if="hasSecondary" v-if="hasSecondary"
:size="PANE_MAIN_BOTTOM_SIZE" :size="PANE_MAIN_BOTTOM_SIZE"
class="flex flex-col !overflow-auto" class="flex flex-col !overflow-auto"
min-size="25"
> >
<slot name="secondary" /> <slot name="secondary" />
</Pane> </Pane>
@@ -33,7 +38,7 @@
<Pane <Pane
v-if="SIDEBAR && hasSidebar" v-if="SIDEBAR && hasSidebar"
:size="PANE_SIDEBAR_SIZE" :size="PANE_SIDEBAR_SIZE"
min-size="20" min-size="25"
class="flex flex-col !overflow-auto bg-primaryContrast" class="flex flex-col !overflow-auto bg-primaryContrast"
> >
<slot name="sidebar" /> <slot name="sidebar" />
@@ -78,10 +83,10 @@ type PaneEvent = {
size: number size: number
} }
const PANE_MAIN_SIZE = ref(74) const PANE_MAIN_SIZE = ref(70)
const PANE_SIDEBAR_SIZE = ref(26) const PANE_SIDEBAR_SIZE = ref(30)
const PANE_MAIN_TOP_SIZE = ref(42) const PANE_MAIN_TOP_SIZE = ref(35)
const PANE_MAIN_BOTTOM_SIZE = ref(58) const PANE_MAIN_BOTTOM_SIZE = ref(65)
if (!COLUMN_LAYOUT.value) { if (!COLUMN_LAYOUT.value) {
PANE_MAIN_TOP_SIZE.value = 50 PANE_MAIN_TOP_SIZE.value = 50

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="flex flex-col items-center justify-center text-secondaryLight"> <div class="flex flex-col items-center justify-center text-secondaryLight">
<div class="flex pb-4 my-4 space-x-2"> <div class="flex mb-4 space-x-2">
<div class="flex flex-col items-end space-y-4 text-right"> <div class="flex flex-col items-end space-y-4 text-right">
<span class="flex items-center flex-1"> <span class="flex items-center flex-1">
{{ t("shortcut.request.send_request") }} {{ t("shortcut.request.send_request") }}

View File

@@ -81,7 +81,6 @@
<HoppButtonSecondary <HoppButtonSecondary
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
class="mb-4"
@click="addEnvironmentVariable" @click="addEnvironmentVariable"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -42,7 +42,6 @@
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
outline outline
class="mb-4"
@click="displayModalAdd(true)" @click="displayModalAdd(true)"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -86,13 +86,11 @@
disabled disabled
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
class="mb-4"
/> />
<HoppButtonSecondary <HoppButtonSecondary
v-else v-else
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
class="mb-4"
@click="addEnvironmentVariable" @click="addEnvironmentVariable"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -54,7 +54,6 @@
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
disabled disabled
filled filled
class="mb-4"
:icon="IconPlus" :icon="IconPlus"
:title="t('team.no_access')" :title="t('team.no_access')"
:label="t('action.new')" :label="t('action.new')"
@@ -64,7 +63,6 @@
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
outline outline
class="mb-4"
@click="displayModalAdd(true)" @click="displayModalAdd(true)"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -127,7 +127,6 @@
blank blank
:icon="IconExternalLink" :icon="IconExternalLink"
reverse reverse
class="mb-4"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>
<div v-else class="flex flex-1 border-b border-dividerLight"> <div v-else class="flex flex-1 border-b border-dividerLight">

View File

@@ -166,7 +166,6 @@
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
:icon="IconPlus" :icon="IconPlus"
class="mb-4"
@click="addHeader" @click="addHeader"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -126,7 +126,6 @@
blank blank
:icon="IconExternalLink" :icon="IconExternalLink"
reverse reverse
class="mb-4"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>
<div v-else class="flex flex-1 border-b border-dividerLight"> <div v-else class="flex flex-1 border-b border-dividerLight">

View File

@@ -117,7 +117,6 @@
blank blank
:icon="IconExternalLink" :icon="IconExternalLink"
reverse reverse
class="mb-4"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>
</div> </div>

View File

@@ -162,7 +162,6 @@
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
filled filled
:icon="IconPlus" :icon="IconPlus"
class="mb-4"
@click="addBodyParam" @click="addBodyParam"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -213,7 +213,6 @@
filled filled
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
:icon="IconPlus" :icon="IconPlus"
class="mb-4"
@click="addHeader" @click="addHeader"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -161,7 +161,6 @@
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
:icon="IconPlus" :icon="IconPlus"
filled filled
class="mb-4"
@click="addParam" @click="addParam"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -153,7 +153,6 @@
filled filled
:label="`${t('add.new')}`" :label="`${t('add.new')}`"
:icon="IconPlus" :icon="IconPlus"
class="mb-4"
@click="addUrlEncodedParam" @click="addUrlEncodedParam"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -71,7 +71,7 @@ const cursorTooltipField = (aggregateEnvs: AggregateEnvironment[]) =>
const selectedEnvType = getSelectedEnvironmentType() const selectedEnvType = getSelectedEnvironmentType()
const envTypeIcon = `<span class="inline-flex -my-2 -mx-0.5 opacity-65 items-center text-base font-icon">${ const envTypeIcon = `<span class="inline-flex items-center opacity-65 -mx-0.5 text-base font-icon">${
selectedEnvType === "TEAM_ENV" ? "group" : "person" selectedEnvType === "TEAM_ENV" ? "group" : "person"
}</span>` }</span>`
@@ -88,7 +88,7 @@ const cursorTooltipField = (aggregateEnvs: AggregateEnvironment[]) =>
variableName: parsedEnvKey, variableName: parsedEnvKey,
}) })
}) })
editIcon.innerHTML = `<span class="inline-flex items-center px-1 -mx-1 -my-2 text-base font-icon">edit</span>` editIcon.innerHTML = `<span class="inline-flex items-center px-1 -mx-1 text-base font-icon">edit</span>`
tooltip.appendChild(editIcon) tooltip.appendChild(editIcon)
} }

View File

@@ -16,7 +16,6 @@
> >
<HoppButtonPrimary <HoppButtonPrimary
:label="t('auth.login')" :label="t('auth.login')"
class="mb-4"
@click="invokeAction('modals.login.toggle')" @click="invokeAction('modals.login.toggle')"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>

View File

@@ -203,7 +203,6 @@
blank blank
:icon="IconExternalLink" :icon="IconExternalLink"
reverse reverse
class="mb-4"
/> />
</HoppSmartPlaceholder> </HoppSmartPlaceholder>
<div <div

View File

@@ -44,7 +44,6 @@
</h3> </h3>
<span class="flex items-center"> <span class="flex items-center">
<slot name="actions"></slot> <slot name="actions"></slot>
<kbd class="mr-2 shortcut-key">ESC</kbd>
<HoppButtonSecondary <HoppButtonSecondary
v-if="dimissible" v-if="dimissible"
v-tippy="{ theme: 'tooltip', delay: [500, 20] }" v-tippy="{ theme: 'tooltip', delay: [500, 20] }"
@@ -109,21 +108,22 @@ const { t, onModalOpen, onModalClose } =
withDefaults( withDefaults(
defineProps<{ defineProps<{
dialog: boolean, dialog: boolean
title: string, title: string
dimissible: boolean, dimissible: boolean
placement: string, placement: string
fullWidth: boolean, fullWidth: boolean
styles: string, styles: string
closeText: string | null, closeText: string | null
}>(), { }>(),
{
dialog: false, dialog: false,
title: "", title: "",
dimissible: true, dimissible: true,
placement: "top", placement: "top",
fullWidth: false, fullWidth: false,
styles: "sm:max-w-lg", styles: "sm:max-w-lg",
closeText: null closeText: null,
} }
) )

View File

@@ -4,7 +4,7 @@
v-if="src" v-if="src"
:src="src" :src="src"
loading="lazy" loading="lazy"
class="inline-flex flex-col object-contain object-center my-4" class="inline-flex flex-col object-contain object-center mb-4"
:class="large ? 'w-32 h-32' : 'w-16 h-16'" :class="large ? 'w-32 h-32' : 'w-16 h-16'"
:alt="alt" :alt="alt"
/> />

View File

@@ -1,17 +1,28 @@
<template> <template>
<div> <div>
<Transition name="fade" appear> <Transition name="fade" appear>
<div v-if="show" class="fixed inset-0 z-20 transition-opacity" @keydown.esc="close()"> <div
<div class="absolute inset-0 bg-primaryLight opacity-90 focus:outline-none" tabindex="0" @click="close()"></div> v-if="show"
class="fixed inset-0 z-20 transition-opacity"
@keydown.esc="close()"
>
<div
class="absolute inset-0 bg-primaryLight opacity-90 focus:outline-none"
tabindex="0"
@click="close()"
></div>
</div> </div>
</Transition> </Transition>
<Transition name="slide" appear> <Transition name="slide" appear>
<aside v-if="show" <aside
class="fixed top-0 right-0 z-30 flex flex-col h-full max-w-full overflow-auto border-l shadow-xl border-dividerDark bg-primary w-96"> v-if="show"
<div class="flex items-center justify-between p-2 border-b border-dividerLight"> class="fixed top-0 right-0 z-30 flex flex-col h-full max-w-full overflow-auto border-l shadow-xl border-dividerDark bg-primary w-96"
>
<div
class="flex items-center justify-between p-2 border-b border-dividerLight"
>
<h3 class="ml-4 heading">{{ title }}</h3> <h3 class="ml-4 heading">{{ title }}</h3>
<span class="flex items-center"> <span class="flex items-center">
<kbd class="mr-2 shortcut-key">ESC</kbd>
<HoppButtonSecondary :icon="IconX" @click="close()" /> <HoppButtonSecondary :icon="IconX" @click="close()" />
</span> </span>
</div> </div>