diff --git a/dashboard/components/dialog/CreateSnapshot.vue b/dashboard/components/dialog/CreateSnapshot.vue index f6be51d..6bf63d8 100644 --- a/dashboard/components/dialog/CreateSnapshot.vue +++ b/dashboard/components/dialog/CreateSnapshot.vue @@ -36,7 +36,7 @@ function onColorChange() { const snapshotName = ref(""); -const { updateSnapshots } = useSnapshot(); +const { updateSnapshots, snapshot, snapshots } = useSnapshot(); const { createAlert } = useAlert() async function confirmSnapshot() { @@ -54,6 +54,9 @@ async function confirmSnapshot() { await updateSnapshots(); closeDialog(); createAlert('Snapshot created', 'Snapshot created successfully', 'far fa-circle-check', 5000); + const newSnapshot = snapshots.value.at(-1); + if (newSnapshot) snapshot.value = newSnapshot; + }