use app-loading component in several pages
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -13,10 +13,11 @@
|
||||
</header>
|
||||
|
||||
@if (loading()) {
|
||||
<div class="loading-state">
|
||||
<mat-spinner diameter="42"></mat-spinner>
|
||||
<p>Bookmarks werden geladen …</p>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Bookmarks werden geladen …"
|
||||
icon="bookmarks"
|
||||
[size]="60"
|
||||
[diameter]="60" />
|
||||
} @else if (persons().length) {
|
||||
<section class="person-grid" aria-label="Gespeicherte Personen">
|
||||
@for (person of persons(); track person.id) {
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.loading-state,
|
||||
.empty-state {
|
||||
display: flex;
|
||||
min-height: 320px;
|
||||
|
||||
@@ -2,12 +2,12 @@ import { CommonModule } from '@angular/common';
|
||||
import { Component, DestroyRef, inject, signal } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { catchError, forkJoin, map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { CustomAuthor, PersonsService } from '../../api';
|
||||
import { BookmarkService } from '../../shared/services/bookmark.service';
|
||||
import { PersonCardComponent } from '../person-card/person-card.component';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
|
||||
const PERSON_INCLUDE_TAGS =
|
||||
'display_name,works_count,cited_by_count,summary_stats,ids,' +
|
||||
@@ -17,12 +17,7 @@ const PERSON_INCLUDE_TAGS =
|
||||
@Component({
|
||||
selector: 'app-bookmarks',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
PersonCardComponent,
|
||||
],
|
||||
imports: [CommonModule, MatIconModule, PersonCardComponent, LoadingComponent],
|
||||
templateUrl: './bookmarks.component.html',
|
||||
styleUrl: './bookmarks.component.scss',
|
||||
})
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
<mat-dialog-content>
|
||||
@if (runsLoading() && runs().length === 0) {
|
||||
<div class="runs-loading">
|
||||
<mat-progress-spinner
|
||||
diameter="24"
|
||||
mode="indeterminate"></mat-progress-spinner>
|
||||
<span>Läufe werden geladen …</span>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Läufe werden geladen …"
|
||||
icon="history"
|
||||
[size]="48"
|
||||
[diameter]="48" />
|
||||
} @else if (runsError()) {
|
||||
<p class="logs-error">{{ runsError() }}</p>
|
||||
} @else if (runs().length === 0) {
|
||||
@@ -79,12 +78,11 @@
|
||||
|
||||
<div #logsPanel class="logs-panel" (scroll)="onLogsScroll()">
|
||||
@if (loading() && !logs()) {
|
||||
<div class="logs-loading">
|
||||
<mat-progress-spinner
|
||||
diameter="20"
|
||||
mode="indeterminate"></mat-progress-spinner>
|
||||
<span>Logs werden geladen …</span>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Logs werden geladen …"
|
||||
icon="description"
|
||||
[size]="48"
|
||||
[diameter]="48" />
|
||||
} @else {
|
||||
<pre>{{ logs() }}</pre>
|
||||
}
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.runs-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 120px;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.logs-error {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
@@ -93,18 +85,6 @@
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.logs-loading {
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.logs-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.run-select {
|
||||
|
||||
@@ -18,11 +18,11 @@ import {
|
||||
} from '@angular/material/dialog';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { finalize, timer } from 'rxjs';
|
||||
import { BackgroundJobsService, BackgroundJobTask, JobRun } from '../../../api';
|
||||
import { LoadingComponent } from '../../../shared/ui/loading/loading.component';
|
||||
import {
|
||||
formatRunDuration,
|
||||
formatRunElapsed,
|
||||
@@ -42,9 +42,9 @@ export interface JobLogsDialogData {
|
||||
MatDialogModule,
|
||||
MatFormFieldModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatSelectModule,
|
||||
MatTooltipModule,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './job-logs-dialog.component.html',
|
||||
styleUrl: './job-logs-dialog.component.scss',
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
</button>
|
||||
|
||||
@if (loading) {
|
||||
<div class="state">
|
||||
<mat-spinner diameter="42"></mat-spinner>
|
||||
<p>Nachricht wird geladen...</p>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Nachricht wird geladen..."
|
||||
icon="newspaper"
|
||||
[size]="60"
|
||||
[diameter]="60" />
|
||||
} @else if (notFound || !article) {
|
||||
<div class="state error-state">
|
||||
<mat-icon>search_off</mat-icon>
|
||||
|
||||
@@ -11,13 +11,13 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||
|
||||
import { WorksService } from '../../api';
|
||||
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
|
||||
interface MentionedPerson {
|
||||
name: string;
|
||||
@@ -52,9 +52,9 @@ interface NewsArticleDetail {
|
||||
imports: [
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatTooltipModule,
|
||||
RouterLink,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './news-detail.component.html',
|
||||
styleUrl: './news-detail.component.scss',
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
</button>
|
||||
|
||||
@if (loading) {
|
||||
<div class="state">
|
||||
<mat-spinner diameter="42"></mat-spinner>
|
||||
<p>Patent wird geladen...</p>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Patent wird geladen..."
|
||||
icon="workspace_premium"
|
||||
[size]="60"
|
||||
[diameter]="60" />
|
||||
} @else if (notFound || !patent) {
|
||||
<div class="state error-state">
|
||||
<mat-icon>search_off</mat-icon>
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Component, DestroyRef, OnInit, inject } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { finalize } from 'rxjs';
|
||||
|
||||
@@ -15,6 +14,7 @@ import {
|
||||
classificationSectionColor,
|
||||
topicHierarchyColor,
|
||||
} from '../../resolvers/utils/topic-colors';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import {
|
||||
ClassificationCard,
|
||||
ClassificationSystem,
|
||||
@@ -32,9 +32,9 @@ import {
|
||||
imports: [
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
RouterLink,
|
||||
TopicChipComponent,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './patent-detail.component.html',
|
||||
styleUrl: './patent-detail.component.scss',
|
||||
|
||||
+5
-4
@@ -1,8 +1,9 @@
|
||||
@if (loading) {
|
||||
<div class="state state-loading" aria-live="polite">
|
||||
<mat-spinner diameter="36"></mat-spinner>
|
||||
<span>Verbindungen zu Unternehmen werden geladen ...</span>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Verbindungen zu Unternehmen werden geladen ..."
|
||||
icon="business"
|
||||
[size]="60"
|
||||
[diameter]="60" />
|
||||
} @else if (error) {
|
||||
<div class="state state-error">
|
||||
Verbindungen zu Unternehmen konnten nicht geladen werden.
|
||||
|
||||
+2
-2
@@ -14,7 +14,6 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
} from '../../api';
|
||||
import { PersonDataResolved } from '../../resolvers/person.resolver';
|
||||
import { ChartThemeService } from '../../shared/services/chart-theme.service';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
|
||||
interface RoleLegendItem {
|
||||
role: string;
|
||||
@@ -44,7 +44,6 @@ interface GraphSymbols {
|
||||
selector: 'app-person-company-connections',
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatProgressSpinnerModule,
|
||||
NgxEchartsDirective,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
@@ -52,6 +51,7 @@ interface GraphSymbols {
|
||||
MatTooltipModule,
|
||||
MatTooltip,
|
||||
RouterModule,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './person-company-connections.component.html',
|
||||
styleUrl: './person-company-connections.component.scss',
|
||||
|
||||
@@ -24,9 +24,12 @@
|
||||
</app-topic-legend>
|
||||
<div class="interest-tags">
|
||||
@if (loading()) {
|
||||
<div class="interest-state interest-state-loading" aria-live="polite">
|
||||
<mat-spinner diameter="36"></mat-spinner>
|
||||
<span>Themen werden geladen ...</span>
|
||||
<div aria-live="polite">
|
||||
<app-loading
|
||||
text="Themen werden geladen ..."
|
||||
icon="interests"
|
||||
[size]="48"
|
||||
[diameter]="48" />
|
||||
</div>
|
||||
} @else if (tags().length > 0) {
|
||||
@for (tag of tags(); track tag.label) {
|
||||
|
||||
@@ -58,25 +58,3 @@
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.interest-state {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 90px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.interest-card-loading .interest-state {
|
||||
min-height: 48px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.interest-state-loading {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@ import {
|
||||
} from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
import { TopicCount } from '../../api';
|
||||
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
|
||||
import { TopicLegendComponent } from '../../shared/ui/topic-legend/topic-legend.component';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
|
||||
import {
|
||||
buildTopicLegendGroups,
|
||||
@@ -52,9 +52,9 @@ const MAX_TAGS = 5;
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
TopicChipComponent,
|
||||
TopicLegendComponent,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './person-interesting.component.html',
|
||||
styleUrl: './person-interesting.component.scss',
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
</button>
|
||||
|
||||
@if (loading) {
|
||||
<div class="state">
|
||||
<mat-spinner diameter="42"></mat-spinner>
|
||||
<p>Publikation wird geladen...</p>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Publikation wird geladen..."
|
||||
icon="menu_book"
|
||||
[size]="60"
|
||||
[diameter]="60" />
|
||||
} @else if (notFound || !publication) {
|
||||
<div class="state error-state">
|
||||
<mat-icon>search_off</mat-icon>
|
||||
|
||||
@@ -5,7 +5,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import {
|
||||
@@ -18,6 +17,7 @@ import {
|
||||
} from '../../api';
|
||||
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
|
||||
import { CountryFlagComponent } from '../../shared/ui/country-flag/country-flag.component';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
|
||||
import { WorkTypePipe } from '../../shared/pipes/work-type.pipe';
|
||||
import { LanguageCodePipe } from '../../shared/pipes/language-code.pipe';
|
||||
@@ -43,7 +43,6 @@ interface InstitutionDetail {
|
||||
DecimalPipe,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatTooltipModule,
|
||||
RouterLink,
|
||||
TopicChipComponent,
|
||||
@@ -52,6 +51,7 @@ interface InstitutionDetail {
|
||||
WorkPrimaryCategoryPipe,
|
||||
ResearchProfileComponent,
|
||||
CountryFlagComponent,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './publication-detail.component.html',
|
||||
styleUrl: './publication-detail.component.scss',
|
||||
|
||||
@@ -45,10 +45,11 @@
|
||||
</div>
|
||||
}
|
||||
@if (loading()) {
|
||||
<div class="loading-state">
|
||||
<mat-spinner diameter="24"></mat-spinner>
|
||||
<span>Lade Themen...</span>
|
||||
</div>
|
||||
<app-loading
|
||||
text="Lade Themen..."
|
||||
icon="folder_open"
|
||||
[size]="48"
|
||||
[diameter]="48" />
|
||||
} @else {
|
||||
@if (searchQuery()) {
|
||||
<!-- Flat Search Results Mode -->
|
||||
|
||||
@@ -11,16 +11,6 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.loading-state {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 16px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Flat Search Results Styles */
|
||||
.search-results {
|
||||
display: flex;
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Component, input, model, output, OnInit, signal } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TopicsService } from '../../api/api/topics.service';
|
||||
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { combineLatest, of } from 'rxjs';
|
||||
import { toObservable } from '@angular/core/rxjs-interop';
|
||||
import {
|
||||
@@ -50,9 +50,9 @@ interface FlatTopic {
|
||||
CommonModule,
|
||||
MatCheckboxModule,
|
||||
MatIconModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatRadioModule,
|
||||
MatTooltipModule,
|
||||
LoadingComponent,
|
||||
],
|
||||
templateUrl: './topic-hierarchy.component.html',
|
||||
styleUrl: './topic-hierarchy.component.scss',
|
||||
|
||||
Reference in New Issue
Block a user