From a7ac715499fdf3f15a736f68af4bf5a78454742f Mon Sep 17 00:00:00 2001 From: Mo Date: Wed, 7 Dec 2022 20:34:17 -0600 Subject: [PATCH] feat: Moments will now create a link with the current open note, so you can look back on what you were working on during a moment --- packages/web/CHANGELOG.md | 4 ++-- .../javascripts/Controllers/Moments/MomentsService.ts | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index a15dc4c16..4ef05a2ce 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -13,8 +13,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* Fixed issue about note UUID not being selectable in menu ([5a0c005](https://github.com/standardnotes/app/commit/5a0c005e8c0373e2f47fa613fc5bfec0e84cdb37)) -* Fixed workspace menu item rename issue ([45cdab6](https://github.com/standardnotes/app/commit/45cdab6f6c0416e0a01a66e4b4983ff0a52c1afc)) +* Fixed issue where note UUID was not selectable in context menu ([5a0c005](https://github.com/standardnotes/app/commit/5a0c005e8c0373e2f47fa613fc5bfec0e84cdb37)) +* Fixed issue where workspaces could not be renamed ([45cdab6](https://github.com/standardnotes/app/commit/45cdab6f6c0416e0a01a66e4b4983ff0a52c1afc)) # [3.121.0](https://github.com/standardnotes/app/compare/@standardnotes/web@3.120.3...@standardnotes/web@3.121.0) (2022-12-07) diff --git a/packages/web/src/javascripts/Controllers/Moments/MomentsService.ts b/packages/web/src/javascripts/Controllers/Moments/MomentsService.ts index 67eda5350..51df0c4f2 100644 --- a/packages/web/src/javascripts/Controllers/Moments/MomentsService.ts +++ b/packages/web/src/javascripts/Controllers/Moments/MomentsService.ts @@ -121,9 +121,13 @@ export class MomentsService extends AbstractViewController { const uploadedFile = await this.filesController.uploadNewFile(file) - const defaultTag = this.getDefaultTag() - if (defaultTag && uploadedFile) { - void this.application.linkingController.linkItems(uploadedFile, defaultTag) + if (uploadedFile) { + void this.application.linkingController.linkItemToSelectedItem(uploadedFile) + + const defaultTag = this.getDefaultTag() + if (defaultTag) { + void this.application.linkingController.linkItems(uploadedFile, defaultTag) + } } stopCameraStream(canvas, video, stream)