diff --git a/dashboard/src/components/app/Info.vue b/dashboard/src/components/app/Info.vue index fd66bc50b..15ac5b610 100644 --- a/dashboard/src/components/app/Info.vue +++ b/dashboard/src/components/app/Info.vue @@ -11,13 +11,9 @@ const appsModel = AppsModel.create(); const props = defineProps([ 'app' ]); const emit = defineEmits([ 'changed' ]); -const id = ref(''); -const upstreamVersion = ref(''); const notesTextarea = useTemplateRef('notesTextarea'); const showDoneChecklist = ref(false); const hasOldChecklist = ref(false); -const checklist = ref([]); -const manifest = ref({}); const editing = ref(false); const busy = ref(false); const placeholder = 'Add admin notes here...'; @@ -25,7 +21,7 @@ const noteContent = ref(''); const profile = inject('profile'); async function onAckChecklistItem(item, key) { - const [error] = await appsModel.ackChecklistItem(id.value, key, true); + const [error] = await appsModel.ackChecklistItem(props.app.id.value, key, true); if (error) return console.error(error); item.acknowledged = true; @@ -44,7 +40,7 @@ async function onSubmit() { return; } - const [error] = await appsModel.configure(id.value, 'notes', { notes: noteContent.value }); + const [error] = await appsModel.configure(props.app.id, 'notes', { notes: noteContent.value }); if (error) { busy.value = false; return console.error(error); @@ -68,13 +64,8 @@ function onDismiss() { } onMounted(() => { - const app = props.app; - manifest.value = app.manifest || {}; - id.value = app.id; - upstreamVersion.value = manifest.value.version || ''; - checklist.value = app.checklist; - hasOldChecklist.value = !!Object.keys(app.checklist).find((k) => { return app.checklist[k].acknowledged; }); - noteContent.value = app.notes === null ? app.manifest.postInstallMessage : app.notes; + hasOldChecklist.value = !!Object.keys(props.app.checklist).find((k) => { return props.app.checklist[k].acknowledged; }); + noteContent.value = props.app.notes === null ? props.app.manifest.postInstallMessage : props.app.notes; editing.value = false; busy.value = false; }); @@ -86,8 +77,8 @@ onMounted(() => {