From 0f4beb8d780c734906b680fadb1cf49486cc04c8 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Tue, 3 Nov 2026 17:02:02 -0500 Subject: [PATCH] Prepare Showcode 3.0 desktop integration and release notes --- app/assets/images/workspace-refresh.svg | 56 ++++ app/components/DesktopAppUpdateButton.vue | 71 +++++ app/components/DesktopTitlebar.vue | 26 +- app/components/FileDropdown.vue | 17 +- app/components/ModalChangelog.vue | 33 ++- app/components/ModalCustomBackground.vue | 7 +- app/components/ModalWhatsNew.vue | 67 +++++ app/components/Page.vue | 6 +- app/components/Preview.vue | 49 +++- app/components/ReleaseNotesContent.vue | 16 ++ app/components/Tab.vue | 24 +- app/composables/useClipboard.js | 19 +- app/composables/useConfirm.js | 11 + app/composables/useDesktop.js | 3 + app/composables/useElectronIpc.js | 3 + app/composables/useFileDialogs.js | 42 +++ app/composables/useHotkeys.js | 5 + app/composables/usePreferencesStore.js | 7 +- app/composables/useProjectStoreFactory.js | 14 +- app/composables/useProjectStores.js | 35 ++- app/composables/useWhatsNew.js | 74 ++++++ app/content/changelog.md | 25 ++ app/content/releases.js | 17 ++ app/content/releases/workspace-refresh.md | 11 + app/pages/index.vue | 250 +++++++++++++++--- package-lock.json | 4 +- package.json | 2 +- .../components/DesktopAppUpdateButton.test.js | 50 ++++ tests/components/Hotkeys.test.js | 19 ++ tests/components/ModalWhatsNew.test.js | 42 +++ tests/composables/useFileDialogs.test.js | 92 +++++++ tests/composables/usePreferencesStore.test.js | 4 +- tests/composables/useProjectStores.test.js | 64 ++++- tests/composables/useWhatsNew.test.js | 144 ++++++++++ 34 files changed, 1211 insertions(+), 98 deletions(-) create mode 100644 app/assets/images/workspace-refresh.svg create mode 100644 app/components/DesktopAppUpdateButton.vue create mode 100644 app/components/ModalWhatsNew.vue create mode 100644 app/components/ReleaseNotesContent.vue create mode 100644 app/composables/useConfirm.js create mode 100644 app/composables/useDesktop.js create mode 100644 app/composables/useElectronIpc.js create mode 100644 app/composables/useFileDialogs.js create mode 100644 app/composables/useWhatsNew.js create mode 100644 app/content/releases.js create mode 100644 app/content/releases/workspace-refresh.md create mode 100644 tests/components/DesktopAppUpdateButton.test.js create mode 100644 tests/components/ModalWhatsNew.test.js create mode 100644 tests/composables/useFileDialogs.test.js create mode 100644 tests/composables/useWhatsNew.test.js diff --git a/app/assets/images/workspace-refresh.svg b/app/assets/images/workspace-refresh.svg new file mode 100644 index 00000000..b00ef84d --- /dev/null +++ b/app/assets/images/workspace-refresh.svg @@ -0,0 +1,56 @@ + + + + + + Untitled Project + Canvas + Typography + Font size + Line height + + + + 1 + function + greet(name) { + 2 + return + `Hello, ${name}`; + 3 + } + + + + + greeting.js + + functiongreet(name) { + return`Hello, ${name}`; + } + + + + + + + W500 + H300 + 1620 + + + + + + + + + js100% + StyleThemesBackdrop + + + + + + + diff --git a/app/components/DesktopAppUpdateButton.vue b/app/components/DesktopAppUpdateButton.vue new file mode 100644 index 00000000..8e69e466 --- /dev/null +++ b/app/components/DesktopAppUpdateButton.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/components/DesktopTitlebar.vue b/app/components/DesktopTitlebar.vue index 7f7ec111..6e08e7b7 100644 --- a/app/components/DesktopTitlebar.vue +++ b/app/components/DesktopTitlebar.vue @@ -1,17 +1,29 @@ diff --git a/app/components/FileDropdown.vue b/app/components/FileDropdown.vue index df072a49..a11407ff 100644 --- a/app/components/FileDropdown.vue +++ b/app/components/FileDropdown.vue @@ -1,5 +1,16 @@ diff --git a/app/components/Page.vue b/app/components/Page.vue index 27952b75..7056b1d5 100644 --- a/app/components/Page.vue +++ b/app/components/Page.vue @@ -282,7 +282,11 @@ async function captureThumbnail() { await previewRef.value?.captureThumbnail(); } -defineExpose({ captureThumbnail }); +defineExpose({ + captureThumbnail, + exportImage: (method) => previewRef.value?.saveAs(method), + copyImage: () => previewRef.value?.copyToClipboard(), +}); watch( () => editors.value.length, diff --git a/app/components/Preview.vue b/app/components/Preview.vue index e41fd69e..49443dbb 100644 --- a/app/components/Preview.vue +++ b/app/components/Preview.vue @@ -80,7 +80,18 @@ v-tooltip="'Copy image'" @click="copyToClipboard" /> + diff --git a/app/components/Tab.vue b/app/components/Tab.vue index 96c70d26..3bbddd16 100644 --- a/app/components/Tab.vue +++ b/app/components/Tab.vue @@ -1,8 +1,10 @@