From 94556a26079eaa73673e50e735abf0ae82645619 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 11 Mar 2025 00:34:17 -0700 Subject: [PATCH] Tweak: add saved views hint to dashboard --- src-ui/messages.xlf | 15 +++++++++++---- .../components/dashboard/dashboard.component.html | 11 +++++++++++ .../dashboard/dashboard.component.spec.ts | 1 + .../components/dashboard/dashboard.component.ts | 4 ++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 2f6a515be..67e8be0fc 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -6185,32 +6185,39 @@ 43 + + Hint: saved views can be created from the documents list + + src/app/components/dashboard/dashboard.component.html + 42 + + Hello , welcome to src/app/components/dashboard/dashboard.component.ts - 57 + 61 Welcome to src/app/components/dashboard/dashboard.component.ts - 59 + 63 Dashboard updated src/app/components/dashboard/dashboard.component.ts - 90 + 94 Error updating dashboard src/app/components/dashboard/dashboard.component.ts - 93 + 97 diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html index 99c725802..c42fc82eb 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.html +++ b/src-ui/src/app/components/dashboard/dashboard.component.html @@ -34,6 +34,17 @@ } + @if (!settingsService.offerTour() && savedViewService.allViews.length === 0) { +
+
+
+
+

Hint: saved views can be created from the documents list

+
+
+
+
+ } @for (v of dashboardViews; track v.id) {
{ results: saved_views, }), dashboardViews: saved_views.filter((v) => v.show_on_dashboard), + allViews: saved_views, }, }, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.ts index 94637ba0f..5a0f6c69d 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.ts +++ b/src-ui/src/app/components/dashboard/dashboard.component.ts @@ -6,6 +6,8 @@ import { moveItemInArray, } from '@angular/cdk/drag-drop' import { Component } from '@angular/core' +import { RouterModule } from '@angular/router' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap' import { SavedView } from 'src/app/data/saved-view' import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' @@ -35,6 +37,8 @@ import { WelcomeWidgetComponent } from './widgets/welcome-widget/welcome-widget. IfPermissionsDirective, DragDropModule, TourNgBootstrapModule, + NgxBootstrapIconsModule, + RouterModule, ], }) export class DashboardComponent extends ComponentWithPermissions {