mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
active snapshot on creation
This commit is contained in:
@@ -36,7 +36,7 @@ function onColorChange() {
|
|||||||
|
|
||||||
const snapshotName = ref<string>("");
|
const snapshotName = ref<string>("");
|
||||||
|
|
||||||
const { updateSnapshots } = useSnapshot();
|
const { updateSnapshots, snapshot, snapshots } = useSnapshot();
|
||||||
const { createAlert } = useAlert()
|
const { createAlert } = useAlert()
|
||||||
|
|
||||||
async function confirmSnapshot() {
|
async function confirmSnapshot() {
|
||||||
@@ -54,6 +54,9 @@ async function confirmSnapshot() {
|
|||||||
await updateSnapshots();
|
await updateSnapshots();
|
||||||
closeDialog();
|
closeDialog();
|
||||||
createAlert('Snapshot created', 'Snapshot created successfully', 'far fa-circle-check', 5000);
|
createAlert('Snapshot created', 'Snapshot created successfully', 'far fa-circle-check', 5000);
|
||||||
|
const newSnapshot = snapshots.value.at(-1);
|
||||||
|
if (newSnapshot) snapshot.value = newSnapshot;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user