From 46b1732c24a3dfadc9951d19173e8e75326a2c00 Mon Sep 17 00:00:00 2001 From: Lightling Date: Thu, 30 May 2024 19:16:39 -0400 Subject: [PATCH] fix normalize.css applying a [hidden[ { display: hidden; } rule due to v-bind reflecting the hidden field --- projects/frontend/src/views/gallery/gallery-list.vue | 12 ++++++------ projects/frontend/src/views/project/project-list.vue | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/projects/frontend/src/views/gallery/gallery-list.vue b/projects/frontend/src/views/gallery/gallery-list.vue index ead9dad..6952b89 100644 --- a/projects/frontend/src/views/gallery/gallery-list.vue +++ b/projects/frontend/src/views/gallery/gallery-list.vue @@ -23,7 +23,7 @@ type GalleryDisplayedEntries = { [idOrTitle: string]: GalleryEntry & { /** * specifies whether the entry is hidden by the tags selected by a visitor */ - hidden?: boolean + isHidden?: boolean }} const props = defineProps<{ @@ -132,11 +132,11 @@ const onHideWarningsToggled = (event: Event) => { const onToggledTagsChanged = (tagsToggled: string[]) => { if (tagsToggled.length < 1) { Object.keys(entries.value).forEach(entryId => { - entries.value[entryId].hidden = false + entries.value[entryId].isHidden = false }) } else { Object.keys(entries.value).forEach(entryId => { - entries.value[entryId].hidden = !entries.value[entryId].tags?.some(own => tagsToggled.includes(own)) + entries.value[entryId].isHidden = !entries.value[entryId].tags?.some(own => tagsToggled.includes(own)) }) } } @@ -150,7 +150,7 @@ const resetTags = () => { filterPanelRef.value.resetTags() } Object.keys(entries.value).forEach(entryId => { - entries.value[entryId].hidden = false + entries.value[entryId].isHidden = false }) } @@ -203,8 +203,8 @@ onMounted(async () => { v-for='(entry, id) in entries' ) GalleryTile( - v-if='!entry.hidden || !config.removeFromView' - :class='{ hidden: entry.hidden && !config.removeFromView }' + v-if='!entry.isHidden || !config.removeFromView' + :class='{ hidden: entry.isHidden && !config.removeFromView }' :entry='entry' :id='id' :hideWarnings='hideWarnings' diff --git a/projects/frontend/src/views/project/project-list.vue b/projects/frontend/src/views/project/project-list.vue index fe3017a..7c0325a 100644 --- a/projects/frontend/src/views/project/project-list.vue +++ b/projects/frontend/src/views/project/project-list.vue @@ -21,7 +21,7 @@ import ProjectTile from './project-tile.vue' /** * specifies whether the entry is hidden by the tags selected by a visitor */ - hidden?: boolean + isHidden?: boolean }} const projectIds = ref([] as string[]) @@ -41,11 +41,11 @@ const projectViewPath = computed(() => `${currentRoute.path}/view`) const onToggledTagsChanged = (tagsToggled: string[]) => { if (tagsToggled.length < 1) { Object.keys(projects.value).forEach(entryId => { - projects.value[entryId].hidden = false + projects.value[entryId].isHidden = false }) } else { Object.keys(projects.value).forEach(entryId => { - projects.value[entryId].hidden = !projects.value[entryId].tags?.some(own => tagsToggled.includes(own)) + projects.value[entryId].isHidden = !projects.value[entryId].tags?.some(own => tagsToggled.includes(own)) }) } } @@ -72,9 +72,9 @@ onMounted(async () => { v-for='id in projectIds' ) ProjectTile( - v-if='!projects[id].hidden || !config.removeFromView' + v-if='!projects[id].isHidden || !config.removeFromView' v-bind='projects[id]' - :class='{ hidden: projects[id].hidden && !config.removeFromView }' + :class='{ hidden: projects[id].isHidden && !config.removeFromView }' :id='id' :viewPath='projectViewPath' :isInternal='true'