Skip to content

Commit d49abeb

Browse files
authored
Merge pull request #17 from SwimResults/develop
v1.0.1
2 parents 08f025c + 16f7bba commit d49abeb

54 files changed

Lines changed: 448 additions & 54 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@ngx-translate/http-loader": "^7.0.0",
3131
"angular-oauth2-oidc": "^15.0.1",
3232
"rxjs": "~7.8.0",
33+
"safe-pipe": "^2.0.5-0",
3334
"tslib": "^2.3.0",
3435
"zone.js": "~0.12.0"
3536
},

src/app/app-routing.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {AuthComponent} from "./content/auth/auth.component";
1212
import {UserProfileComponent} from "./content/account";
1313
import {PageMeetingsComponent} from "./content/meetings";
1414
import {LogoutComponent} from "./content/auth/logout/logout.component";
15+
import {PageAdminEventComponent} from "./content/admin";
1516

1617

1718
const routes: Routes = [
@@ -21,7 +22,7 @@ const routes: Routes = [
2122
{ path: 'account/profile', component: UserProfileComponent },
2223
{ path: 'dashboard', component: PageDashboardGeneralComponent },
2324
{ path: 'calendar', component: CalendarComponent },
24-
{ path: 'meetings', redirectTo: '/meetings' },
25+
{ path: 'meetings', redirectTo: '/' },
2526
{ path: 'athlete', component: PageAthletesGeneralComponent },
2627
{ path: 'athlete/:entity_id', component: PageAthleteComponent },
2728
{ path: 'team', component: PageTeamsGeneralComponent },
@@ -30,7 +31,7 @@ const routes: Routes = [
3031
{
3132
path: 'm/:event',
3233
children: [
33-
{ path: "", component: PageDashboardEventComponent },
34+
{ path: "", redirectTo: 'dashboard', pathMatch: "full" },
3435
{ path: "dashboard", component: PageDashboardEventComponent },
3536
{ path: "live", component: PageLiveComponent },
3637
{ path: "event", component: PageEventsComponent },
@@ -41,6 +42,7 @@ const routes: Routes = [
4142
{ path: 'team/:entity_id', component: PageTeamComponent },
4243
{ path: "files", component: PageFilesComponent },
4344
{ path: "stats", component: PageStatsEventComponent },
45+
{ path: "admin", component: PageAdminEventComponent },
4446
]
4547
}
4648

src/app/app.component.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<div
2+
class="system-environment"
3+
*ngIf="showEnv"
4+
(click)="toggleEnv()"
5+
style="{{'background-color: ' + env_color}}"
6+
>
7+
<span class="env">{{environment | uppercase}}</span>
8+
</div>
19
<main [class]="'sidebar-' + sidebarState">
210
<sr-sidebar [class]="sidebarState"></sr-sidebar>
311
<div class="sidebar-hider" (click)="hideSidebar()"></div>

src/app/app.component.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ main {
5757
}
5858
}
5959

60+
.system-environment {
61+
position: fixed;
62+
width: 300px;
63+
rotate: -45deg;
64+
z-index: 1000;
65+
background-color: #00459d;
66+
color: white;
67+
text-align: center;
68+
font-weight: 1000;
69+
left: -104px;
70+
top: 34px;
71+
padding: 4px;
72+
}
73+
6074
@media only screen and (max-width: 1050px) {
6175
main {
6276
grid-template-columns: 0 40px minmax(1px,1440px) 40px;

src/app/app.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@ export class AppComponent implements OnDestroy {
2121

2222
build: string = "";
2323
showBuild: boolean = true;
24+
showEnv: boolean = true;
2425
sidebarState = "";
2526

2627
environment = environment.environment;
28+
env_color = environment.env_color;
2729

2830
constructor(
2931
private translateService: TranslateService,
3032
private menuService: SidebarMenuService,
3133
private routeService: RouteService
3234
) {
3335
this.showBuild = this.environment != 'productive'
36+
this.showEnv = this.environment != 'productive'
3437

3538
this.fetchBuild().then(r => {
3639
this.build = r;
@@ -76,6 +79,10 @@ export class AppComponent implements OnDestroy {
7679
this.showBuild = !this.showBuild;
7780
}
7881

82+
toggleEnv() {
83+
this.showEnv = !this.showEnv;
84+
}
85+
7986
hideSidebar() {
8087
this.menuService.setViewType("hidden");
8188
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
import { PageAdminEventComponent } from './pages';
4+
5+
6+
7+
@NgModule({
8+
declarations: [
9+
PageAdminEventComponent
10+
],
11+
imports: [
12+
CommonModule
13+
]
14+
})
15+
export class AdminModule { }

src/app/content/admin/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './pages';
2+
3+
export * from './admin.module';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './page-admin-event/page-admin-event.component';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dies ist ein geschützter Admin-Bereich, der eigentlich nicht geschützt wird.

0 commit comments

Comments
 (0)