Show local co-op icon in details page

This commit is contained in:
redphx
2025-01-03 19:49:40 +07:00
parent 68b29ecb50
commit 6448a00271
8 changed files with 73 additions and 18 deletions

View File

@@ -10,6 +10,7 @@ import iconDisplay from "@assets/svg/display.svg" with { type: "text" };
import iconEye from "@assets/svg/eye.svg" with { type: "text" };
import iconEyeSlash from "@assets/svg/eye-slash.svg" with { type: "text" };
import iconHome from "@assets/svg/home.svg" with { type: "text" };
import iconLocalCoOp from "@assets/svg/local-co-op.svg" with { type: "text" };
import iconNativeMkb from "@assets/svg/native-mkb.svg" with { type: "text" };
import iconNew from "@assets/svg/new.svg" with { type: "text" };
import iconPencil from "@assets/svg/pencil-simple-line.svg" with { type: "text" };
@@ -52,6 +53,7 @@ export const BxIcon = {
EYE: iconEye,
EYE_SLASH: iconEyeSlash,
HOME: iconHome,
LOCAL_CO_OP: iconLocalCoOp,
NATIVE_MKB: iconNativeMkb,
NEW: iconNew,
MANAGE: iconPencil,

View File

@@ -123,7 +123,7 @@ export function productTitleToSlug(title: string): string {
export function parseDetailsPath(path: string) {
const matches = /\/games\/(?<titleSlug>[^\/]+)\/(?<productId>\w+)/.exec(path);
if (!matches?.groups) {
return;
return {};
}
const titleSlug = matches.groups.titleSlug!.replaceAll('\%' + '7C', '-');