mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-107] progress on the modal for creating and editing playlists
This commit is contained in:
@@ -1 +1,2 @@
|
||||
export type FieldRequired<T, K extends keyof T> = Partial<T> & Required<Pick<T, K>>; // All fields of T are optional except for K
|
||||
export type ObjectValues<T> = T[keyof T]; // All values of T
|
||||
|
||||
@@ -50,6 +50,7 @@ export abstract class MapItemComponentPropsMapper {
|
||||
diffs: MapItemComponentPropsMapper.extractMapDiffs({ rawMapInfo: map.rawInfo, songDetails: map.songDetails }),
|
||||
mapId: map.songDetails?.id,
|
||||
ranked: map.songDetails?.ranked,
|
||||
blRanked: map.songDetails?.rankedBL,
|
||||
autorId: map.songDetails?.uploader.id,
|
||||
likes: map.songDetails?.upVotes,
|
||||
createdAt: map.songDetails?.uploadedAt,
|
||||
@@ -69,6 +70,7 @@ export abstract class MapItemComponentPropsMapper {
|
||||
likes: map.stats.upvotes,
|
||||
mapId: map.id,
|
||||
ranked: map.ranked,
|
||||
blRanked: map.blRanked,
|
||||
title: map.name,
|
||||
songAutor: map.metadata.songAuthorName,
|
||||
diffs: MapItemComponentPropsMapper.extractMapDiffs({ bsvMap: map }),
|
||||
@@ -87,6 +89,7 @@ export abstract class MapItemComponentPropsMapper {
|
||||
likes: song.upVotes,
|
||||
mapId: song.id,
|
||||
ranked: song.ranked,
|
||||
blRanked: song.rankedBL,
|
||||
title: song.name,
|
||||
diffs: MapItemComponentPropsMapper.extractMapDiffs({ songDetails: song }),
|
||||
callBackParam: song
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ObjectValues } from "shared/helpers/type.helpers";
|
||||
import { SongDetailDiffCharactertistic, SongDiffName } from "./song-details-cache/song-details-cache.model";
|
||||
|
||||
export interface BsvMapDetail {
|
||||
@@ -13,6 +14,9 @@ export interface BsvMapDetail {
|
||||
name: string;
|
||||
qualified: boolean;
|
||||
ranked: boolean;
|
||||
blQualified: boolean
|
||||
blRanked: boolean
|
||||
declaredAi: ObjectValues<typeof BsvDeclaredAi>;
|
||||
stats: BsvMapStats;
|
||||
tags: MapTag[];
|
||||
updatedAt: BsvInstant;
|
||||
@@ -212,6 +216,14 @@ export enum MapSpecificity {
|
||||
|
||||
}
|
||||
|
||||
//[ Admin, Uploader, SageScore, None ]
|
||||
export const BsvDeclaredAi = {
|
||||
Admin: "Admin",
|
||||
Uploader: "Uploader",
|
||||
SageScore: "SageScore",
|
||||
None: "None"
|
||||
} as const;
|
||||
|
||||
export interface MapFilter {
|
||||
automapper?: boolean;
|
||||
chroma?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user