From 40acde468ea9b9fda09e0b6ec0451289607acac1 Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Tue, 11 Jun 2024 15:14:39 +0300 Subject: [PATCH] WIP: Undo system ref #719 --- src/assets/main.css | 18 +++++++++++++ src/components/ScaleControls.vue | 20 ++++++++++++++- src/stores/scale.ts | 32 +++++++++++++++++++++-- src/undo.ts | 44 ++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 src/undo.ts diff --git a/src/assets/main.css b/src/assets/main.css index 6ac709b6..63c0cae2 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -225,3 +225,21 @@ div.alert-box-danger { p.alert-message-danger { color: var(--color-alert-danger); } + +.undo, +.redo { + cursor: pointer; +} + +.undo.disabled, +.redo.disabled { + cursor: default; + color: var(--color-text-mute); +} + +.undo::after { + content: '↺'; +} +.redo::after { + content: '↻'; +} diff --git a/src/components/ScaleControls.vue b/src/components/ScaleControls.vue index 585d6314..f5c24833 100644 --- a/src/components/ScaleControls.vue +++ b/src/components/ScaleControls.vue @@ -115,7 +115,17 @@ defineExpose({ focus, clearPaletteInfo })
-

Scale data

+

+ Scale data + + +