Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="spinner-border spinner-border-sm text-secondary"></div>
<div class="spinner-border spinner-border-sm text-{{ color }}"></div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Component } from '@angular/core';
import { Component, Input } from '@angular/core';

@Component({
selector: 'tp-small-spinner',
templateUrl: './small-spinner.component.html'
})
export class SmallSpinnerComponent {}
export class SmallSpinnerComponent {
@Input()
public color: string = 'secondary';
}
5 changes: 1 addition & 4 deletions src/Turnierplan.App/Client/src/app/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ export const de = {
},
LandingPage: {
Title: 'Startseite',
Pages: {
Organizations: 'Organisationen'
},
Badges: {
OrganizationCount: 'Organisationen'
},
Expand Down Expand Up @@ -1477,7 +1474,7 @@ export const de = {
Error: 'Beim Laden der Release-Information von GitHub ist ein Fehler aufgetreten',
UpToDate: 'Die neuste Version <span class="fw-bold">{{version}}</span> ist installiert',
Outdated: 'Es ist eine neue Version verfügbar: <span class="fw-bold">{{version}}</span>',
ShowOnGitHub: 'Release auf GitHub öffnen'
ShowOnGitHub: 'Release auf GitHub anzeigen'
}
}
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@if (isInitializing) {
<div class="border rounded-3 p-3 d-flex flex-row align-items-center gap-2 updates-tile-loading">
<tp-small-spinner />
<tp-small-spinner [color]="'primary-emphasis'" />
<span [translate]="'Portal.UpdatesCheck.Loading'"></span>
</div>
} @else if (latestVersion === undefined) {
<div class="border rounded-3 p-3 d-flex flex-row align-items-center gap-2 updates-tile-error">
<i class="bi bi-x-lg text-danger"></i>
<i class="bi bi-x-circle text-danger"></i>
<span translate="Portal.UpdatesCheck.Error"></span>
</div>
} @else if (latestVersion === currentVersion) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<ng-container *tpLoadingState="loadingState">
<tp-page-frame [title]="'Portal.LandingPage.Title' | translate" [navigationTabs]="pages">
<ng-template #buttons>
<div class="mt-5 container">
<tp-updates-check />

<div class="d-flex flex-row flex-wrap align-items-center gap-2 mt-5">
<span class="fs-4 fw-bold" [translate]="'Portal.LandingPage.Title'"></span>
<div class="flex-grow-1"></div>
<tp-action-button
*tpIsAdministrator
[title]="'Portal.Administration.Title'"
Expand All @@ -14,11 +18,9 @@
[type]="'outline-success'"
[icon]="'plus-circle'"
[routerLink]="'create/organization'" />
</ng-template>
<ng-template *tpIsAdministrator #preContent>
<tp-updates-check />
</ng-template>
<ng-template #mainContent>
</div>

<div class="mt-4">
<div class="card">
@if (organizations.length === 0) {
<div class="card-body">
Expand Down Expand Up @@ -53,6 +55,6 @@
</div>
}
</div>
</ng-template>
</tp-page-frame>
</div>
</div>
</ng-container>
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { take } from 'rxjs';

import { PageFrameNavigationTab, PageFrameComponent } from '../../components/page-frame/page-frame.component';
import { LoadingState, LoadingStateDirective } from '../../directives/loading-state.directive';
import { TitleService } from '../../services/title.service';
import { IsAdministratorDirective } from '../../directives/is-administrator.directive';
import { ActionButtonComponent } from '../../components/action-button/action-button.component';
import { RouterLink } from '@angular/router';
import { IllustrationComponent } from '../../components/illustration/illustration.component';
import { TranslateDirective, TranslatePipe } from '@ngx-translate/core';
import { TranslateDirective } from '@ngx-translate/core';
import { BadgeComponent } from '../../components/badge/badge.component';
import { E2eDirective } from '../../../core/directives/e2e.directive';
import { UpdatesCheckComponent } from '../../components/updates-check/updates-check.component';
Expand All @@ -21,14 +20,12 @@ import { AllowCreateOrganizationDirective } from '../../directives/allow-create-
templateUrl: './landing-page.component.html',
imports: [
LoadingStateDirective,
PageFrameComponent,
IsAdministratorDirective,
ActionButtonComponent,
RouterLink,
IllustrationComponent,
TranslateDirective,
BadgeComponent,
TranslatePipe,
E2eDirective,
UpdatesCheckComponent,
AllowCreateOrganizationDirective
Expand All @@ -38,14 +35,6 @@ export class LandingPageComponent implements OnInit {
protected loadingState: LoadingState = { isLoading: true };
protected organizations: OrganizationDto[] = [];

protected pages: PageFrameNavigationTab[] = [
{
id: 0,
title: 'Portal.LandingPage.Pages.Organizations',
icon: 'bi-boxes'
}
];

constructor(
private readonly turnierplanApi: TurnierplanApi,
private readonly titleService: TitleService
Expand Down
Loading