replace less variables

This commit is contained in:
2026-03-09 16:39:41 +01:00
parent 3fb2e8b341
commit 0b831e45d5
9 changed files with 22 additions and 48 deletions

View File

@@ -1,5 +1,3 @@
@import "../../../../../styles/styles";
.list-item {
padding: 5px 20px;
display: grid;
@@ -14,7 +12,7 @@
cursor: pointer;
&:hover {
background: @primary-color;
background: var(--primary-color);
color: #fff;
}
}

View File

@@ -40,21 +40,14 @@ export class ShowSongService {
public list = (showId: string): Promise<ShowSong[]> => firstValueFrom(this.list$(showId));
public async delete$(showId: string, showSongId: string, index: number): Promise<void> {
const [showSong, show] = await Promise.all([
this.read(showId, showSongId),
firstValueFrom(this.showService.read$(showId)),
]);
const [showSong, show] = await Promise.all([this.read(showId, showSongId), firstValueFrom(this.showService.read$(showId))]);
if (!show) return;
if (!showSong) return;
const order = [...show.order];
order.splice(index, 1);
await Promise.all([
this.showSongDataService.delete(showId, showSongId),
this.showService.update$(showId, {order}),
this.userService.decSongCount(showSong.songId),
]);
await Promise.all([this.showSongDataService.delete(showId, showSongId), this.showService.update$(showId, {order}), this.userService.decSongCount(showSong.songId)]);
}
public update$ = async (showId: string, songId: string, data: Partial<ShowSong>): Promise<void> => await this.showSongDataService.update$(showId, songId, data);

View File

@@ -30,11 +30,7 @@ export class ShowService {
() => this.showDataService.list$,
(user: User | null, shows: Show[]) => ({user, shows})
),
map(s =>
s.shows
.filter(show => !show.archived)
.filter(show => show.published || (show.owner === s.user?.id && !publishedOnly))
)
map(s => s.shows.filter(show => !show.archived).filter(show => show.published || (show.owner === s.user?.id && !publishedOnly)))
);
}