Skip to content

Commit

Permalink
Improve dataset header visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
gappc committed Jan 16, 2025
1 parent f5b53bc commit 369609b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
5 changes: 2 additions & 3 deletions databrowser/src/domain/datasets/ui/header/DatasetHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<header class="flex flex-wrap items-center py-2 text-xs md:py-0">
<header class="flex flex-wrap items-center py-2 gap-2">
<!-- Dataset title -->
<div
class="flex items-center justify-between"
Expand Down Expand Up @@ -35,7 +35,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
:picked="source"
:class="{
'animate-pulse rounded outline outline-green-500': !hasConfig,
'mr-2': true,
}"
@picked-change="changeSource($event)"
/>
Expand Down Expand Up @@ -65,7 +64,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<TagCustom
v-if="source === 'generated'"
:text="t('datasets.header.viewGeneratedConfig')"
class="ml-1"
size="xs"
type="yellow"
has-dot
Expand Down Expand Up @@ -106,6 +104,7 @@ import InputSearch from '../../../../components/input/InputSearch.vue';
import SelectCustom from '../../../../components/select/SelectCustom.vue';
import {
GroupSelectOption,
SelectSize,
SelectValue,
} from '../../../../components/select/types';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<PopoverCustom>
<template #trigger>
<PopoverCustomButton
class="mr-2 flex size-9 items-center justify-center border"
class="flex size-9 items-center justify-center border"
:class="buttonClasses"
>
<IconInfo class="stroke-current text-dialog" />
Expand Down
36 changes: 17 additions & 19 deletions databrowser/src/domain/datasets/ui/header/DatasetHeaderOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@ SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<div
class="pointer-events-all inset-0"
:class="{
'fixed z-50 bg-dialog/60 md:static md:bg-transparent': active,
}"
@click="$emit('overlayClick')"
></div>
<div>
<div
class="pointer-events-all inset-0"
:class="{
'fixed z-50 bg-dialog/60 md:static md:bg-transparent': active,
}"
@click="$emit('overlayClick')"
></div>

<div
:class="{
'inset-x-0 top-0 z-[60] bg-white max-md:absolute': active,
'px-2 py-3': padded,
}"
@click.stop="null"
>
<slot></slot>
<div
:class="{
'absolute inset-x-0 top-0 z-[60] bg-white p-2': active,
}"
@click.stop="null"
>
<slot></slot>
</div>
</div>
</template>

<script setup lang="ts">
defineProps<{
active?: boolean;
padded?: boolean;
}>();
defineProps<{ active?: boolean }>();

defineEmits(['overlayClick']);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<template>
<ButtonCustom
variant="ghost"
class="flex h-9 w-12 items-center justify-center border-none bg-gray-50 !px-0 md:hidden"
:size="Size.xs"
class="flex h-9 w-10 items-center justify-center bg-gray-50 md:hidden"
@click="emit('open', true)"
>
<IconSearch />
Expand All @@ -16,6 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later

<script setup lang="ts">
import ButtonCustom from '../../../../components/button/ButtonCustom.vue';
import { Size } from '../../../../components/button/types';
import IconSearch from '../../../../components/svg/IconSearch.vue';

const emit = defineEmits(['open']);
Expand Down

0 comments on commit 369609b

Please sign in to comment.