mirror of
https://github.com/RPCSX/rpcsx-ui.git
synced 2026-01-31 01:05:23 +01:00
Region
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="flex flex-row p-3 gap-3 text-sm rounded bg-neutral-700 hover:bg-neutral-600 shadow-sm">
|
||||
<img class="h-20 w-20" src={game.image} alt="{game.name} Icon" />
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-col text-left">
|
||||
<h1 class="font-bold">{game.name}</h1>
|
||||
<p>{game.publisher}</p>
|
||||
<p>{game.version}</p>
|
||||
@@ -20,5 +20,6 @@
|
||||
<div class="flex flex-col text-right">
|
||||
<p>{game.serial}</p>
|
||||
<p>{fileSize}</p>
|
||||
<p>{game.region.toString()}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,17 +2,34 @@ export class Game {
|
||||
name: string;
|
||||
image: string;
|
||||
publisher: string;
|
||||
region: Region;
|
||||
version: string;
|
||||
serial: string;
|
||||
// Size in bytes
|
||||
size: number;
|
||||
|
||||
constructor(name: string, image: string, publisher: string, version: string, serial: string, size: number) {
|
||||
constructor(name: string,
|
||||
image: string,
|
||||
publisher: string,
|
||||
region: Region,
|
||||
version: string,
|
||||
serial: string,
|
||||
size: number) {
|
||||
this.name = name;
|
||||
this.image = image;
|
||||
this.publisher = publisher;
|
||||
this.region = region;
|
||||
this.version = version;
|
||||
this.serial = serial;
|
||||
this.size = size;
|
||||
}
|
||||
}
|
||||
|
||||
export enum Region {
|
||||
USA = "USA",
|
||||
Europe = "Europe",
|
||||
Japan = "Japan",
|
||||
Asia = "Asia",
|
||||
World = "World",
|
||||
Unknown = "Unknown"
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import Header from "$components/Header.svelte";
|
||||
import Footer from "$components/Footer.svelte";
|
||||
import { Game } from "$models/Game";
|
||||
import { Game, Region } from "$models/Game";
|
||||
import GameLibrary from "$components/GameLibrary.svelte";
|
||||
|
||||
let sonicGame = new Game("Sonic Mania", "./icon0.png", "SEGA", "1.03", "CUSA07023", 197927919);
|
||||
let weAreDoomedGame = new Game("WE ARE DOOMED", "./icon1.png", "Vertex Pop Inc.", "1.00", "CUSA02394", 32903780);
|
||||
let sonicGame = new Game("Sonic Mania", "./icon0.png", "SEGA", Region.USA,"1.03", "CUSA07023", 197927919);
|
||||
let weAreDoomedGame = new Game("WE ARE DOOMED", "./icon1.png", "Vertex Pop Inc.", Region.Europe, "1.00", "CUSA02394", 32903780);
|
||||
let games = [sonicGame, weAreDoomedGame];
|
||||
let filteredGames: Game[] = [];
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
"$helpers/*": ["./src/helpers/*"],
|
||||
"$models/*": ["./src/models/*"],
|
||||
}
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user