From 4131f384061936a4e7227f8a2b2677e6f87b742f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 13 Nov 2023 14:07:04 -0500 Subject: [PATCH] Adds feedback to link copying --- src/webviews/apps/plus/patchDetails/components/gl-draft-details.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webviews/apps/plus/patchDetails/components/gl-draft-details.ts b/src/webviews/apps/plus/patchDetails/components/gl-draft-details.ts index 57c88ae..b54a711 100644 --- a/src/webviews/apps/plus/patchDetails/components/gl-draft-details.ts +++ b/src/webviews/apps/plus/patchDetails/components/gl-draft-details.ts @@ -86,6 +86,9 @@ export class GlDraftDetails extends GlTreeBase { @state() validityMessage?: string; + @state() + private _copiedLink: boolean = false; + get canSubmit() { return this.selectedPatches.length > 0; // return this.state.draft?.repoPath != null && this.state.draft?.baseRef != null; @@ -423,7 +426,7 @@ export class GlDraftDetails extends GlTreeBase { this.state?.draft?.draftType === 'cloud', () => html` - + Copy Link `, @@ -625,6 +628,8 @@ export class GlDraftDetails extends GlTreeBase { onCopyCloudLink() { this.fireEvent('gl-patch-details-copy-cloud-link', { draft: this.state.draft! }); + this._copiedLink = true; + setTimeout(() => (this._copiedLink = false), 1000); } onShareLocalPatch() {