From f80276cd57049c55534cf7b4003b7175e665ff9d Mon Sep 17 00:00:00 2001 From: lcdr Date: Sat, 4 Nov 2023 11:08:37 +0100 Subject: [PATCH] Use SQL query API in item spotlight page --- .../whats-cool-items.component.html | 31 ++++++++++++++----- .../whats-cool-items.component.ts | 26 ++-------------- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/app/objects/whats-cool-items/whats-cool-items.component.html b/src/app/objects/whats-cool-items/whats-cool-items.component.html index 878cca0..b3a3410 100644 --- a/src/app/objects/whats-cool-items/whats-cool-items.component.html +++ b/src/app/objects/whats-cool-items/whats-cool-items.component.html @@ -4,23 +4,38 @@

What's cool: Item Spotlight

-
- +
+ -
+

No Feature Gate

Feature Gate

-
+
- + -
{{(loc(item.id) | async).description}}
+
{{row.description}}
- Loadingℓ + Loading… -
\ No newline at end of file +
diff --git a/src/app/objects/whats-cool-items/whats-cool-items.component.ts b/src/app/objects/whats-cool-items/whats-cool-items.component.ts index 78c7efa..a9d5205 100644 --- a/src/app/objects/whats-cool-items/whats-cool-items.component.ts +++ b/src/app/objects/whats-cool-items/whats-cool-items.component.ts @@ -1,30 +1,8 @@ -import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { DB_WhatsCoolItemSpotlight } from '../../../defs/cdclient'; -import { Locale_WhatsCoolItemSpotlight } from '../../../defs/locale'; -import { LuCoreDataService } from '../../util/services/lu-core-data.service'; +import { Component } from '@angular/core'; @Component({ selector: 'lux-whats-cool-items', templateUrl: './whats-cool-items.component.html', styleUrls: ['./whats-cool-items.component.css'] }) -export class WhatsCoolItemsComponent implements OnInit { - - $list: Observable; - $loc: Observable<{ [key: string]: Locale_WhatsCoolItemSpotlight }>; - - constructor(private luCoreData: LuCoreDataService) { } - - ngOnInit(): void { - const TABLE = "WhatsCoolItemSpotlight"; - this.$list = this.luCoreData.getTableEntry(TABLE, 'all'); - this.$loc = this.luCoreData.getLocaleSubtree(TABLE); - } - - loc(key: number): Observable { - return this.$loc.pipe(map(x => { return x[String(key)]; })); - } - -} +export class WhatsCoolItemsComponent {}