A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Enhancement: welcome widget visual tweaks (#13794)
shamoon5090ffe39e8e
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.htmlindex ffc3381ad..1e759d9f6 100644--- a/src-ui/src/app/components/app-frame/app-frame.component.html+++ b/src-ui/src/app/components/app-frame/app-frame.component.html@@ -10,16 +10,12 @@tourAnchor="tour.intro">@if (!hasCustomBranding) {<pngx-logo extra_classes="navbar-official-logo px-1" height="2.4rem"></pngx-logo>- <svg class="brand-mark brand-mark-slim d-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" width="1.5em" height="1.5em" fill="currentColor">- <path d="M341,949.1c-6.9-20.3-20.7-61.2-21.9-61-199.6-88.9-182.5-229.8-134.3-347.5,30,137.2,268.8,148.9,146.2,336-.9,2.2,10,27.8,19.5,51.3,22.7-51.9,58.6-115.5,55.8-120.8C178,398.7,724.9,299,807.1,18.5c83,251.5,53.1,659.8-377.4,814.9-2,1.4-63.5,148.6-66.9,150.2-.2-2.1-33.2,2.9-30.1-8.7,1.6-7,4.8-16.2,8.2-25.6h0v-.2h.1ZM323.1,846.2c48.3-71.9-12.7-120.8-56.9-152.2,81.2,107.4,66.4,120.8,56.9,152.2h0Z"/>- </svg>+ <pngx-brand-mark class="brand-mark brand-mark-slim d-none"></pngx-brand-mark>} @else {@if (customAppLogo) {<img class="brand-logo" [src]="customAppLogo" alt="" />} @else {- <svg class="brand-mark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" width="1.5em" height="1.5em" fill="currentColor">- <path d="M341,949.1c-6.9-20.3-20.7-61.2-21.9-61-199.6-88.9-182.5-229.8-134.3-347.5,30,137.2,268.8,148.9,146.2,336-.9,2.2,10,27.8,19.5,51.3,22.7-51.9,58.6-115.5,55.8-120.8C178,398.7,724.9,299,807.1,18.5c83,251.5,53.1,659.8-377.4,814.9-2,1.4-63.5,148.6-66.9,150.2-.2-2.1-33.2,2.9-30.1-8.7,1.6-7,4.8-16.2,8.2-25.6h0v-.2h.1ZM323.1,846.2c48.3-71.9-12.7-120.8-56.9-152.2,81.2,107.4,66.4,120.8,56.9,152.2h0Z"/>- </svg>+ <pngx-brand-mark class="brand-mark"></pngx-brand-mark>}<div class="brand-copy ms-2 text-truncate" [class.d-md-none]="slimSidebarEnabled"><span class="brand-title text-truncate">{{ appTitle }}</span>diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.tsindex c5fc93e61..2548c217b 100644--- a/src-ui/src/app/components/app-frame/app-frame.component.ts+++ b/src-ui/src/app/components/app-frame/app-frame.component.ts@@ -45,6 +45,7 @@ import { TasksService } from 'src/app/services/tasks.service'import { ToastService } from 'src/app/services/toast.service'import { environment } from 'src/environments/environment'import { ChatComponent } from '../chat/chat/chat.component'+import { BrandMarkComponent } from '../common/logo/brand-mark/brand-mark.component'import { LogoComponent } from '../common/logo/logo.component'import { ProfileEditDialogComponent } from '../common/profile-edit-dialog/profile-edit-dialog.component'import { DocumentDetailComponent } from '../document-detail/document-detail.component'@@ -61,6 +62,7 @@ const SCROLL_THRESHOLD = 16imports: [GlobalSearchComponent,LogoComponent,+ BrandMarkComponent,DocumentTitlePipe,IfPermissionsDirective,ToastsDropdownComponent,diff --git a/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.html b/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.htmlnew file mode 100644index 000000000..246fa32d6--- /dev/null+++ b/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.html@@ -0,0 +1,3 @@+<svg class="w-100 h-100 d-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" fill="currentColor" aria-hidden="true">+ <path d="M341,949.1c-6.9-20.3-20.7-61.2-21.9-61-199.6-88.9-182.5-229.8-134.3-347.5,30,137.2,268.8,148.9,146.2,336-.9,2.2,10,27.8,19.5,51.3,22.7-51.9,58.6-115.5,55.8-120.8C178,398.7,724.9,299,807.1,18.5c83,251.5,53.1,659.8-377.4,814.9-2,1.4-63.5,148.6-66.9,150.2-.2-2.1-33.2,2.9-30.1-8.7,1.6-7,4.8-16.2,8.2-25.6h0v-.2h.1ZM323.1,846.2c48.3-71.9-12.7-120.8-56.9-152.2,81.2,107.4,66.4,120.8,56.9,152.2h0Z"/>+</svg>diff --git a/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.ts b/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.tsnew file mode 100644index 000000000..41144c62e--- /dev/null+++ b/src-ui/src/app/components/common/logo/brand-mark/brand-mark.component.ts@@ -0,0 +1,14 @@+import { Component, input } from '@angular/core'++@Component({+ selector: 'pngx-brand-mark',+ templateUrl: './brand-mark.component.html',+ host: {+ '[style.width]': 'width()',+ '[style.height]': 'height()',+ },+})+export class BrandMarkComponent {+ readonly width = input<string>(null)+ readonly height = input<string>(null)+}diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.htmlindex 63532813f..ee0b4486f 100644--- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html@@ -1,10 +1,18 @@-<ngb-alert class="pe-3" type="primary" [dismissible]="true" (closed)="dismiss.emit(true)">- <h4 class="alert-heading"><ng-container i18n>Paperless-ngx is running!</ng-container> 🎉</h4>- <p i18n>You're ready to start uploading documents! Explore the various features of this web app on your own, or start a quick tour using the button below.</p>- <p i18n>More detail on how to use and configure Paperless-ngx is always available in the <a href="https://docs.paperless-ngx.com" target="_blank">documentation</a>.</p>- <hr>- <div class="d-flex align-items-end">- <p class="lead fs-6 m-0"><em i18n>Thanks for being a part of the Paperless-ngx community!</em></p>- <button class="btn btn-primary ms-auto flex-shrink-0" (click)="tourService.start()"><ng-container i18n>Start the tour</ng-container> →</button>+<ngb-alert class="welcome-widget bg-light shadow-sm pe-3 position-relative overflow-hidden" type="primary" [dismissible]="true" (closed)="dismiss.emit(true)">+ <pngx-brand-mark class="welcome-watermark d-none d-md-block position-absolute top-50 translate-middle-y text-primary pe-none" width="26rem" height="26rem"></pngx-brand-mark>+ <div class="d-flex align-items-start gap-3 gap-md-4 position-relative">+ <pngx-brand-mark class="d-none d-sm-block flex-shrink-0 text-primary" width="3rem" height="3rem"></pngx-brand-mark>+ <div class="flex-grow-1">+ <h4 class="alert-heading text-primary fw-semibold"><ng-container i18n>Paperless-ngx is running!</ng-container> 🎉</h4>+ <div class="welcome-copy text-dark">+ <p i18n>You're ready to start uploading documents! Explore the various features of this web app on your own, or start a quick tour using the button below.</p>+ <p class="mb-0" i18n>More detail on how to use and configure Paperless-ngx is always available in the <a href="https://docs.paperless-ngx.com" target="_blank">documentation</a>.</p>+ </div>+ <hr class="opacity-100">+ <div class="d-flex flex-column flex-sm-row align-items-sm-center gap-3">+ <p class="m-0 text-secondary"><em i18n>Thanks for being a part of the Paperless-ngx community!</em></p>+ <button class="btn btn-primary ms-sm-auto flex-shrink-0 align-self-start align-self-sm-auto" (click)="tourService.start()"><ng-container i18n>Start the tour</ng-container> →</button>+ </div>+ </div></div></ngb-alert>diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.scss b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.scssindex e69de29bb..117bdb42c 100644--- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.scss+++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.scss@@ -0,0 +1,16 @@+.welcome-widget {+ border-color: color-mix(in srgb, var(--bs-primary) 50%, transparent);++ hr {+ border-top-color: color-mix(in srgb, var(--bs-primary) 25%, transparent);+ }+}++.welcome-copy {+ max-width: 68ch;+}++.welcome-watermark {+ right: -6rem;+ opacity: .07;+}diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.tsindex 7bcc160f3..834e729c7 100644--- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts+++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts@@ -1,12 +1,13 @@import { Component, EventEmitter, Output, inject } from '@angular/core'import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'import { TourService } from 'ngx-ui-tour-ng-bootstrap'+import { BrandMarkComponent } from '../../../common/logo/brand-mark/brand-mark.component'@Component({selector: 'pngx-welcome-widget',templateUrl: './welcome-widget.component.html',styleUrls: ['./welcome-widget.component.scss'],- imports: [NgbAlertModule],+ imports: [NgbAlertModule, BrandMarkComponent],})export class WelcomeWidgetComponent {readonly tourService = inject(TourService)