From 7199977cac517d595e426113a5cee738073a4fcd Mon Sep 17 00:00:00 2001 From: Prospector Date: Sun, 10 Nov 2024 18:27:03 -0800 Subject: [PATCH] Fix recursion issues with content page --- apps/app-frontend/src/pages/instance/Mods.vue | 26 ++++++++---------- packages/ui/src/components/base/Checkbox.vue | 2 +- .../components/content/ContentListItem.vue | 6 ++++- .../components/content/ContentListPanel.vue | 27 ++++++++++++------- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/apps/app-frontend/src/pages/instance/Mods.vue b/apps/app-frontend/src/pages/instance/Mods.vue index 181a84dbd..b6991b84f 100644 --- a/apps/app-frontend/src/pages/instance/Mods.vue +++ b/apps/app-frontend/src/pages/instance/Mods.vue @@ -83,8 +83,8 @@ @@ -179,11 +179,6 @@ - - - | null>(null) - const props = defineProps({ instance: { type: Object, @@ -613,7 +608,8 @@ const canUpdatePack = computed(() => { const exportModal = ref(null) const projects = ref([]) -const selectedProjects = computed(() => projects.value.filter((x) => contentList.value ? contentList.value.selected.includes(x.file_name) : [])) +const selectedFiles = ref([]) +const selectedProjects = computed(() => projects.value.filter((x) => selectedFiles.value.includes(x.file_name))) const selectionMap = ref(new Map()) diff --git a/packages/ui/src/components/base/Checkbox.vue b/packages/ui/src/components/base/Checkbox.vue index e6d414051..61b9728d6 100644 --- a/packages/ui/src/components/base/Checkbox.vue +++ b/packages/ui/src/components/base/Checkbox.vue @@ -33,7 +33,7 @@ const emit = defineEmits<{ const props = withDefaults( defineProps<{ - label: string + label?: string disabled?: boolean description: string modelValue: boolean diff --git a/packages/ui/src/components/content/ContentListItem.vue b/packages/ui/src/components/content/ContentListItem.vue index 72c71c176..473a129b3 100644 --- a/packages/ui/src/components/content/ContentListItem.vue +++ b/packages/ui/src/components/content/ContentListItem.vue @@ -38,19 +38,23 @@ export interface ContentItem { withDefaults(defineProps<{ item: ContentItem locked?: boolean + last?: boolean }>(), { locked: false, + last: false, }) const model = defineModel()