fix: reviewers comments

This commit is contained in:
Björn Steinhagen
2026-01-28 12:40:53 +02:00
parent 2f05a709ec
commit f5bdcef23b
3 changed files with 70 additions and 15 deletions
+58
View File
@@ -0,0 +1,58 @@
<template>
<div class="p-0">
<slot name="activator" :toggle="toggleDialog"></slot>
<CommonDialog
v-model:open="showSettingsDialog"
:title="`Load Settings`"
fullscreen="none"
>
<ModelSettings
:expandable="false"
:default-settings="(store.receiveSettings as unknown as CardSetting[])"
:settings="props.settings"
@update:settings="updateSettings"
></ModelSettings>
<div class="mt-4 flex justify-end items-center space-x-2">
<FormButton size="sm" color="outline" @click="showSettingsDialog = false">
Cancel
</FormButton>
<FormButton size="sm" @click="saveSettings()">Save</FormButton>
</div>
</CommonDialog>
</div>
</template>
<script setup lang="ts">
import { useHostAppStore } from '~/store/hostApp'
import type { CardSetting } from '~/lib/models/card/setting'
const props = defineProps<{
settings?: CardSetting[]
modelCardId: string
}>()
const store = useHostAppStore()
const showSettingsDialog = ref(false)
const toggleDialog = () => {
showSettingsDialog.value = !showSettingsDialog.value
}
let newSettings: CardSetting[]
const updateSettings = (settings: CardSetting[]) => {
console.log('🔧 Settings updated in dialog:', settings)
newSettings = settings
}
const saveSettings = async () => {
console.log('💾 Saving settings and marking as expired')
await store.patchModel(props.modelCardId, {
settings: newSettings,
expired: true
})
console.log('✅ Settings saved, expired flag set to true')
showSettingsDialog.value = false
}
</script>
+12
View File
@@ -0,0 +1,12 @@
HOST=127.0.0.1
PORT=8082
NUXT_PUBLIC_MIXPANEL_TOKEN_ID=acd87c5a50b56df91a795e999812a3a4
NUXT_PUBLIC_MIXPANEL_API_HOST=https://analytics.speckle.systems
SPECKLE_ACCOUNT_ID=undefined
SPECKLE_TOKEN=undefined
SPECKLE_USER_ID=undefined
SPECKLE_URL=undefined
SPECKLE_SAMPLE_PROJECT_ID=undefined
SPECKLE_SAMPLE_MODEL_ID=undefined
-15
View File
@@ -67,14 +67,6 @@ export const failModelIngestionWithError = graphql(`
modelIngestionMutations {
failWithError(input: $input) {
id
statusData {
__typename
... on ModelIngestionFailedStatus {
status
errorReason
errorStacktrace
}
}
}
}
}
@@ -87,13 +79,6 @@ export const failModelIngestionWithCancel = graphql(`
modelIngestionMutations {
failWithCancel(input: $input) {
id
statusData {
__typename
... on ModelIngestionCancelledStatus {
status
cancellationMessage
}
}
}
}
}