diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.html b/webapp/src/app/modules/keywords-search/keywords-search.component.html index e313d794..b136c30d 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.html +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.html @@ -11,7 +11,10 @@ + [formControl]="form.controls.urlInput" + (keydown.enter)=" + onExtractKeywordsClick(); $event.preventDefault() + " /> @@ -117,12 +112,14 @@ (change)="onViewToggleChange($event.value)" aria-label="Keyword Ansicht wählen"> text_fields Extrahierte Keywords account_tree @@ -143,63 +140,27 @@ - } @else { - -
- } -
- +
+ +
- - - - @if (keywords.length > 0) { -
- @for ( - keyword of keywords; - track keyword.llm_keyword.keyword - ) { - - - } -
- } @else { -

{{ emptyText }}

- } -
- - -
- @if (manualKeywords().length > 0) { - @for ( - keyword of manualKeywords(); - track keyword.llm_keyword.keyword - ) { -
+ + + @if (keywords.length > 0) { +
+ @for ( + keyword of keywords; + track keyword.llm_keyword.keyword + ) { - + } +
+ } @else { +

{{ emptyText }}

+ } +
+ + +
+ @if (manualKeywords().length > 0) { + @for ( + keyword of manualKeywords(); + track keyword.llm_keyword.keyword + ) { +
+ + + +
+ } + } @else { +

Nichts hinzugefügt

+ } + @if (loadingNewKeyword()) { +
+ + +
} - } @else { -

Nichts hinzugefügt

- } - @if (loadingNewKeyword()) { -
- - - -
- } -
-
+
+ - - @if (!isMobile()) { -
-
-
- Breite Keywords + + @if (!isMobile()) { +
+
+
+ Breite Keywords +
+
+ Coarse Keywords +
+
+ Fine Keywords +
+
+ Eigene Keywords +
-
- Coarse Keywords -
-
- Fine Keywords -
-
- Eigene Keywords + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ } @else { + + + + + Breit + {{ + broadKeywords().length + }} + +
+ +
+
-
-
- -
+ + + Coarse + {{ + coarseKeywords().length + }} + +
+ +
+
-
- -
+ + + Fine + {{ fineKeywords().length }} + +
+ +
+
-
- -
+ + + Eigene + {{ + manualKeywords().length + }} + +
+ +
+
+ + } -
- -
-
-
- } @else { - - - - - Breit - {{ broadKeywords().length }} - -
- -
-
- - - - Coarse - {{ coarseKeywords().length }} - -
- -
-
- - - - Fine - {{ fineKeywords().length }} - -
- -
-
- - - - Eigene - {{ manualKeywords().length }} - -
- -
-
-
+ + @if (sourceContent().length > 0) { + + + + Quellentext: {{ sourceUrl() }} + +
{{ sourceContent() }}
+
+ } + + } @else { + @if (isExtracting()) { + } - - - @if (sourceContent().length > 0) { - - - - Quellentext: {{ sourceUrl() }} - -
{{ sourceContent() }}
-
- } - + } -
+ @if (isExtracting() && keywordsExist()) { +
{{ statusMessage() }}
+ } +
+ } + @if (keywordsExist()) {
} - - - @if (showVisualization() && selectedKeywords().length > 0) { -
- -
- }
+ + @if (showVisualization() && selectedKeywords().length > 0) { +
+ +
+ }
diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.scss b/webapp/src/app/modules/keywords-search/keywords-search.component.scss index 15e6e6c5..8d102102 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.scss +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.scss @@ -192,6 +192,7 @@ mat-button-toggle-group { .keyword-card { background-color: var(--sg-background); padding: 0.5rem; + border: 0; .mat-card-header { padding: 0 0 0.5rem 0; @@ -557,50 +558,62 @@ mat-button-toggle-group { PROGRESS BAR ============================================================ */ .progress-container { - margin-top: 1rem; - padding: 0.5rem 0; + min-height: 500px; + margin-top: 0.5rem; + position: relative; + padding: 1rem; + background: var(--sg-surface); + border-radius: 4px; - mat-progress-bar { - position: relative; - overflow: hidden; - - ::ng-deep .mat-progress-bar-fill::after { - background-color: #2196f3; - } - - &::after { - content: ''; - position: absolute; - inset: 0; - pointer-events: none; - background: linear-gradient( - 105deg, - transparent 0%, - rgba(5, 65, 230, 0.4) 100%, - transparent 0% - ); - animation: shimmer 2s ease-in-out infinite; - } + &.loading { + border-color: transparent; } - .status-message { - margin-top: 0.5rem; - font-size: 0.9rem; - color: var(--sg-text-secondary); - text-align: center; - font-weight: 500; + &.loading::before { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + padding: 2px; + + background: linear-gradient( + 90deg, + transparent 0%, + transparent 35%, + #2196f3 50%, + transparent 65%, + transparent 100% + ); + + background-size: 200% 100%; + animation: border-loading 1.5s linear infinite; + + -webkit-mask: + linear-gradient(#fff 0 0) content-box, + linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + + pointer-events: none; } } - -@keyframes shimmer { - 0% { - transform: translateX(-100%); +.status-message { + align-self: center; + margin-top: 0.5rem; + font-size: 0.9rem; + color: var(--sg-text-secondary); + text-align: center; + font-weight: 500; +} +@keyframes border-loading { + from { + background-position: 200% 0; } - 100% { - transform: translateX(100%); + + to { + background-position: -200% 0; } } - /* ============================================================ ACCESSIBILITY ============================================================ */ diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.ts b/webapp/src/app/modules/keywords-search/keywords-search.component.ts index a4442326..4cd4f59e 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.ts +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.ts @@ -23,7 +23,7 @@ import { KeywordsTopicsRequest } from '../../api/model/keywordsTopicsRequest'; import { KeywordEntryWithTopic } from '../../api/model/keywordEntryWithTopic'; import { TopicAutocompleteComponent } from '../../shared/ui/topic-autocomplete/topic-autocomplete.component'; import { UniTrendParentComponent } from '../university-ranking/uni-trend-parent/uni-trend-parent.component'; - +import { LoadingComponent } from '../../shared/ui/loading/loading.component'; import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component'; import { TopicLegendComponent } from '../../shared/ui/topic-legend/topic-legend.component'; import { Topic } from '../../api/model/topic'; @@ -70,6 +70,7 @@ type KeywordView = 'llm' | 'topic'; MatTooltipModule, A11yModule, NgTemplateOutlet, + LoadingComponent, ], templateUrl: './keywords-search.component.html', styleUrl: './keywords-search.component.scss',