-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add style for deprecated fields. Toggle deprecated fields from …
…views.
- Loading branch information
Showing
16 changed files
with
228 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
databrowser/src/domain/datasets/ui/common/fieldsToggleStyles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <[email protected]> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
export const containerClasses = 'mt-3 hidden md:block w-[12.5%]'; | ||
export const wrapperClasses = | ||
'px-4 py-2 flex items-center gap-1 w-full justify-between flex-wrap lg:flex-nowrap'; |
46 changes: 46 additions & 0 deletions
46
databrowser/src/domain/datasets/ui/common/showDeprecatedFields/ShowDeprecatedFields.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<template> | ||
<div :class="[containerClasses, showDeprecated ? 'bg-deprecated/10' : '']"> | ||
<div :class="wrapperClasses"> | ||
<div | ||
class="truncate text-sm" | ||
:class="{ 'text-deprecated': showDeprecated }" | ||
> | ||
{{ t('datasets.detailView.showDeprecatedFields') }} | ||
</div> | ||
<ToggleCustom | ||
v-model="showDeprecated" | ||
:disabled="disabled" | ||
active-bg-class="bg-deprecated" | ||
active-border-class="border-deprecated" | ||
inactive-bg-class="bg-gray-400" | ||
inactive-border-class="border-gray-400" | ||
class="shrink-0" | ||
data-test="show-deprecated-fields" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue'; | ||
import { useI18n } from 'vue-i18n'; | ||
import ToggleCustom from '../../../../../components/toggle/ToggleCustom.vue'; | ||
import { containerClasses, wrapperClasses } from '../fieldsToggleStyles'; | ||
|
||
const { t } = useI18n(); | ||
|
||
const emit = defineEmits(['update:modelValue']); | ||
|
||
const props = defineProps<{ modelValue?: boolean; disabled?: boolean }>(); | ||
|
||
const showDeprecated = computed({ | ||
get: () => props.modelValue, | ||
set: (value) => emit('update:modelValue', value), | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.