mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 00:30:02 +00:00
Release 1.3.2 (#74)
* Fixes #71 * [GH-61] Fix manual mapping leading to duplicates in DB * [GH-73] Fix Gameyfin only detecting PC games * Improve game title matching (#77) * Implement some filename suffix logic Removes some common file suffixes from files downloaded from for example itch.io. Also removes trailing/leading whitespace/-/_/./() and version numbers starting with a "v" like "v1.2.3". * Add edge cases for game titles (#76) * Fix SONAR code smells Co-authored-by: tr7zw <tr7zw@live.de> Co-authored-by: Pfuenzle <dark.leon64@gmail.com> * Validate some combinations of filename with added suffixes (#79) Also fixes a bug of not removing trailing empty []. * Improve test coverage (#70) * Implemented missing testcases for IgdbWrapper Refactored getPlatformBySlug to return Optional<> * Fixed SONAR findings * Implemented integration tests for the DB * Started implementing tests for controller * Finished GamesControllerTest * Added ImageControllerTest * Implemented LibraryControllerTest * Add LibraryManagementControllerTest * Updated some dependencies * Add DownloadServiceTest * Introduced "gameyfin.data" property to specify a folder for both cache and DB. De-facto removed "gameyfin.db" and "gameyfin.cache" properties Refactored file-system code to be cleaner and easier to test * Refactored filesystem code Implemented FilesystemServiceTest * Fix SONAR code smells * Implemented GameServiceTest * Implemented ImageServiceTest * Fix website scroll position when clicking on game covers in the library view (#94) Fixes #81 * Expansion panels are now not collapsing when last active filter is de-selected (#95) Fixes #86 --------- Co-authored-by: tr7zw <tr7zw@live.de> Co-authored-by: Pfuenzle <dark.leon64@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ const appRoutes: Routes = [
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(appRoutes)],
|
||||
imports: [RouterModule.forRoot(appRoutes, { scrollPositionRestoration: 'enabled' })],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
|
||||
@@ -56,11 +56,10 @@
|
||||
</mat-select>
|
||||
</mat-card>
|
||||
|
||||
<mat-expansion-panel [expanded]="offlineCoopFilterEnabled || onlineCoopFilterEnabled || lanSupportFilterEnabled">
|
||||
<mat-expansion-panel [expanded]="filterExpansionState.gamemodes">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="6px">
|
||||
<h3 class="filter-category-title">Gamemodes</h3>
|
||||
<mat-icon matTooltip="Filter may not work correctly, working on a fix" color="warn">error</mat-icon>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
@@ -77,7 +76,7 @@
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
|
||||
<mat-expansion-panel *ngIf="availableGenres.length > 0" [expanded]="activeGenreFilters.length > 0">
|
||||
<mat-expansion-panel *ngIf="availableGenres.length > 0" [expanded]="filterExpansionState.genres">
|
||||
<mat-expansion-panel-header>
|
||||
<h3 class="filter-category-title">Genres</h3>
|
||||
</mat-expansion-panel-header>
|
||||
@@ -89,7 +88,7 @@
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
|
||||
<mat-expansion-panel *ngIf="availableThemes.length > 0" [expanded]="activeThemeFilters.length > 0">
|
||||
<mat-expansion-panel *ngIf="availableThemes.length > 0" [expanded]="filterExpansionState.themes">
|
||||
<mat-expansion-panel-header>
|
||||
<h3 class="filter-category-title">Themes</h3>
|
||||
</mat-expansion-panel-header>
|
||||
@@ -102,7 +101,7 @@
|
||||
</mat-expansion-panel>
|
||||
|
||||
<mat-expansion-panel *ngIf="availablePlayerPerspectives.length > 0"
|
||||
[expanded]="activePlayerPerspectiveFilters.length > 0">
|
||||
[expanded]="filterExpansionState.playerPerspectives">
|
||||
<mat-expansion-panel-header>
|
||||
<h3 class="filter-category-title">Player Perspectives</h3>
|
||||
</mat-expansion-panel-header>
|
||||
@@ -115,7 +114,7 @@
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
|
||||
<mat-expansion-panel *ngIf="availablePlatforms.length > 0" [expanded]="activePlatformFilters.length > 0">
|
||||
<mat-expansion-panel *ngIf="availablePlatforms.length > 0" [expanded]="filterExpansionState.platforms">
|
||||
<mat-expansion-panel-header>
|
||||
<h3 class="filter-category-title">Platforms</h3>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {firstValueFrom, forkJoin, Observable} from "rxjs";
|
||||
import {SortDirection} from "@angular/material/sort";
|
||||
import {PlayerPerspectiveDto} from "../../models/dtos/PlayerPerspectiveDto";
|
||||
import {PlatformDto} from "../../models/dtos/PlatformDto";
|
||||
import {ActivatedRoute, ActivatedRouteSnapshot, Params, Router} from "@angular/router";
|
||||
import {ActivatedRoute, Params, Router} from "@angular/router";
|
||||
import {Location} from "@angular/common";
|
||||
|
||||
class SortOption {
|
||||
@@ -54,6 +54,7 @@ export class LibraryOverviewComponent implements AfterContentInit {
|
||||
activeGenreFilters: string[] = [];
|
||||
activePlayerPerspectiveFilters: string[] = [];
|
||||
activePlatformFilters: string[] = [];
|
||||
filterExpansionState: FilterExpansionState = {};
|
||||
|
||||
games: DetectedGameDto[] = [];
|
||||
availableGenres: GenreDto[] = [];
|
||||
@@ -102,6 +103,14 @@ export class LibraryOverviewComponent implements AfterContentInit {
|
||||
if (this.previousStateParams['playerPerspectives'] !== undefined) this.activePlayerPerspectiveFilters = this.matchSelectedFilters(this.availablePlayerPerspectives, this.previousStateParams['playerPerspectives']);
|
||||
if (this.previousStateParams['platforms'] !== undefined) this.activePlatformFilters = this.matchSelectedFilters(this.availablePlatforms, this.previousStateParams['platforms']);
|
||||
|
||||
this.filterExpansionState = {
|
||||
gamemodes: this.getActiveGameModesFilters().length > 0,
|
||||
genres: this.activeGenreFilters.length > 0,
|
||||
themes: this.activeThemeFilters.length > 0,
|
||||
playerPerspectives: this.activePlayerPerspectiveFilters.length > 0,
|
||||
platforms: this.activePlatformFilters.length > 0
|
||||
}
|
||||
|
||||
this.refreshLibraryView().then(() => this.loading = false);
|
||||
});
|
||||
}
|
||||
@@ -274,3 +283,11 @@ export class LibraryOverviewComponent implements AfterContentInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class FilterExpansionState {
|
||||
gamemodes?: boolean;
|
||||
genres?: boolean;
|
||||
themes?: boolean;
|
||||
playerPerspectives?: boolean;
|
||||
platforms?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user