Skip to content

Commit

Permalink
fix(admin): temporarily disable achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
esoadamo committed Aug 29, 2024
1 parent 841e565 commit fef63e5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<a class="nav-btn" [routerLink]="['/', routes.routes.admin._, routes.routes.admin.discussion]" routerLinkActive="active" (click)="hideFullMenu($event)">
{{'admin.navbar.discussion' | translate}}
</a>
<a class="nav-btn" [routerLink]="['/', routes.routes.admin._, routes.routes.admin.achievements]" routerLinkActive="active" (click)="hideFullMenu($event)">
{{'admin.navbar.achievement' | translate}}
</a>
<!-- <a class="nav-btn" [routerLink]="['/', routes.routes.admin._, routes.routes.admin.achievements]" routerLinkActive="active" (click)="hideFullMenu($event)">-->
<!-- {{'admin.navbar.achievement' | translate}}-->
<!-- </a>-->
<a *ngIf="userService.isAdmin$ | async" class="nav-btn" [routerLink]="['/', routes.routes.admin._, routes.routes.admin.instanceConfig]" routerLinkActive="active" (click)="hideFullMenu($event)">
{{'admin.navbar.instance-config' | translate}}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, OnInit, ChangeDetectionStrategy, OnDestroy } from '@angular/core';
import { IconService, RoutesService, UserService, WindowService } from '../../../services';
import {BehaviorSubject, combineLatest, Observable, Subscription, timer} from 'rxjs';
import {BehaviorSubject, combineLatest, Observable, Subscription} from 'rxjs';
import {filter, map, mergeMap} from 'rxjs/operators';
import { Router } from '@angular/router';
import { environment } from 'src/environments/environment';
Expand All @@ -26,6 +26,7 @@ export class AdminSidebarComponent implements OnInit, OnDestroy {
['waves/', 'Vlny'],
['execs/', 'Spuštění'],
['opravovani/', 'Opravování'],
['achievements/', 'Trofeje'],
]

constructor(
Expand All @@ -37,7 +38,7 @@ export class AdminSidebarComponent implements OnInit, OnDestroy {
) { }

ngOnInit(): void {
this._subs.push(this.userService.forceLogin$.pipe( // wait 3s to load auth status from cache
this._subs.push(this.userService.forceLogin$.pipe(
mergeMap(() => this.userService.isTester$),
filter((x) => !x)
).subscribe(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<div class="content">
<h2 class="title">{{'admin.achievements.title'|translate}}</h2>

<div class="alert alert-warning">
⚠️ WIP ⚠️
</div>

<button class="btn btn-outline-primary">{{'admin.achievements.new'|translate}}</button>

<ng-container *ngFor="let x of [{n: 'yearly', x: achievementsYearly$}, {n: 'persistent', x: achievementsPersistent$}]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ <h2 class="title">{{'admin.discussion.title'|translate}}</h2>

<ksi-admin-wave-selector [allowAll]="false" (waveFilter)="waveFilterSubj.next($event)"></ksi-admin-wave-selector>

<ksi-spinner [source]="threads$"></ksi-spinner>

<table class="table table-striped table-hover table-responsive-md threads" ksiTheme>
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2 class="title">{{'admin.root.title'|translate}}</h2>
<ksi-admin-section-card name="monitor"></ksi-admin-section-card>
<ksi-admin-section-card name="email"></ksi-admin-section-card>
<ksi-admin-section-card name="discussion"></ksi-admin-section-card>
<ksi-admin-section-card name="achievements"></ksi-admin-section-card>
<!-- <ksi-admin-section-card name="achievements"></ksi-admin-section-card>-->
<ksi-admin-section-card name="instance-config" *ngIf="userService.isAdmin$ | async"></ksi-admin-section-card>
</div>
</div>
Expand Down

0 comments on commit fef63e5

Please sign in to comment.