A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fix: change share link bundle dialog button to close after create, don't toast on copied (#14002)
shamoonbe4514967792
diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.htmlindex ee93c0fff..748463685 100644--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.html@@ -64,7 +64,7 @@<dt class="col-sm-4" i18n>Slug</dt><dd class="col-sm-8"><code>{{ createdBundle.slug }}</code></dd><dt class="col-sm-4" i18n>Link</dt>- <dd class="col-sm-8">+ <dd class="col-sm-8 position-relative"><label class="visually-hidden" for="shareBundleLink" i18n>Share link</label><div class="input-group input-group-sm"><input id="shareBundleLink" class="form-control" type="text" [value]="getShareUrl(createdBundle)" readonly>@@ -82,6 +82,7 @@<span class="visually-hidden" i18n>Copy link</span></button></div>+ <span class="badge bg-primary fade position-absolute top-50 end-0 translate-middle-y me-5 pe-none z-3" [class.show]="copied()" i18n>Copied!</span></dd><dt class="col-sm-4" i18n>Documents</dt><dd class="col-sm-8">{{ createdBundle.document_count }}</dd>diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.tsindex 3b7dae922..7d4013524 100644--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.spec.ts@@ -115,7 +115,7 @@ describe('ShareLinkBundleDialogComponent', () => {expect(copySpy).toHaveBeenCalledWith(component.getShareUrl(bundle))expect(component.copied()).toBe(true)- expect(toastService.showInfo).toHaveBeenCalled()+ expect(toastService.showInfo).not.toHaveBeenCalled()jest.advanceTimersByTime(3000)expect(component.copied()).toBe(false)diff --git a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.tsindex 7c3bf5fd9..1a80bc75f 100644--- a/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts+++ b/src-ui/src/app/components/common/share-link-bundle-dialog/share-link-bundle-dialog.component.ts@@ -17,7 +17,6 @@ import {} from 'src/app/data/share-link-bundle'import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'import { FileSizePipe } from 'src/app/pipes/file-size.pipe'-import { ToastService } from 'src/app/services/toast.service'import { environment } from 'src/environments/environment'import { ConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component'@@ -36,7 +35,6 @@ import { ConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.componeexport class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {private readonly formBuilder = inject(FormBuilder)private readonly clipboard = inject(Clipboard)- private readonly toastService = inject(ToastService)readonly documents = signal<Document[]>([])readonly selectionCount = signal(0)@@ -80,6 +78,7 @@ export class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {}this.buttonsEnabled.set(false)super.confirm()+ this.cancelBtnCaption = $localize`Close`}getShareUrl(bundle: ShareLinkBundleSummary): string {@@ -93,7 +92,6 @@ export class ShareLinkBundleDialogComponent extends ConfirmDialogComponent {const success = this.clipboard.copy(this.getShareUrl(bundle))if (success) {this.copied.set(true)- this.toastService.showInfo($localize`Share link copied to clipboard.`)setTimeout(() => {this.copied.set(false)}, 3000)