diff --git a/CHANGELOG.md b/CHANGELOG.md index ee1c95fab..1f4927ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ ## v3.0.0 (_11-03-2024_) -- Highlight: [EmulatorJS player](https://github.com/rommapp/romm/wiki/EmulatorJS-Player): Play retro games in your web browser +- Highlight: [EmulatorJS player](https://docs.romm.app/latest/Platforms-and-Players/EmulatorJS-Player): Play retro games in your web browser - Highlight: Saves and states: Upload/downlaod game saves, and play them with EmulatorJS - Highlight: More metadata: Extracts more information from IGDB, like release date, genres, related games, etc. - Highlight: New license: Now licensed under AGPL-3.0 to promote community contributions diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8060e2c59..41b6cea00 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Please note that this project adheres to the Contributor Covenant [code of condu ## Contributing to the Wiki -If you would like to contribute to the project's [documentation](https://github.com/rommapp/romm/wiki), open a pull request against [the wiki repo](https://github.com/rommapp/wiki). We welcome any contributions that help improve the documentation (new pages, updates, or corrections). +If you would like to contribute to the project's [documentation](https://docs.romm.app), open a pull request against [the docs repo](https://github.com/rommapp/docs). We welcome any contributions that help improve the documentation (new pages, updates, or corrections). ## Adding Translations diff --git a/README.md b/README.md index 9bc6f0564..2fbdcd36b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ RomM (ROM Manager) allows you to scan, enrich, browse and play your game collect ## Features -- Scans your existing games library and enhances it with metadata from [IGDB][igdb-api] and [MobyGames][mobygames-api] +- Scans your existing games library and enhances it with metadata from [IGDB][igdb-api], [Screenscraper][screenscraper-api] and [MobyGames][mobygames-api] - Supports a large number of **[platforms][platform-support]** - Play games directly from the browser using [EmulatorJS][wiki-emulatorjs] and RuffleRS - Share your library with friends while [limiting access and permissions][wiki-authentication] @@ -272,6 +272,7 @@ Here are a few projects that we think you might like: [igdb-api]: https://api-docs.igdb.com/#account-creation +[screenscraper-api]: https://www.screenscraper.fr/membreinscription.php [mobygames-api]: https://www.mobygames.com/info/api/ [big-bear-casaos]: https://github.com/bigbeartechworld/big-bear-casaos [kubernetes-helm-chart]: https://artifacthub.io/packages/helm/crystalnet/romm diff --git a/backend/endpoints/rom.py b/backend/endpoints/rom.py index 2e66e8e49..8248bc966 100644 --- a/backend/endpoints/rom.py +++ b/backend/endpoints/rom.py @@ -121,7 +121,7 @@ def get_roms( platform_id: int | None = None, collection_id: int | None = None, virtual_collection_id: str | None = None, - search_term: str = "", + search_term: str | None = None, limit: int | None = None, offset: int | None = None, order_by: str = "name", @@ -151,7 +151,7 @@ def get_roms( platform_id=platform_id, collection_id=collection_id, virtual_collection_id=virtual_collection_id, - search_term=search_term.lower(), + search_term=search_term, order_by=order_by.lower(), order_dir=order_dir.lower(), limit=limit, @@ -164,8 +164,6 @@ def get_roms( collection_id=collection_id, virtual_collection_id=virtual_collection_id, search_term=search_term, - order_by=order_by, - order_dir=order_dir, limit=limit, offset=offset, ) @@ -296,7 +294,9 @@ async def get_rom_content( ZipResponse: Returns a response for nginx to serve a Zip file for multi-part roms """ - current_username = request.user.username if request.user else "unknown" + current_username = ( + request.user.username if request.user.is_authenticated else "unknown" + ) rom = db_rom_handler.get_rom(id) if not rom: diff --git a/backend/handler/database/firmware_handler.py b/backend/handler/database/firmware_handler.py index a02e2b7a4..e81c23adf 100644 --- a/backend/handler/database/firmware_handler.py +++ b/backend/handler/database/firmware_handler.py @@ -29,11 +29,12 @@ class DBFirmwareHandler(DBBaseHandler): platform_id: int | None = None, session: Session = None, ) -> Sequence[Firmware]: - return session.scalars( - select(Firmware) - .filter_by(platform_id=platform_id) - .order_by(Firmware.file_name.asc()) - ).all() + query = select(Firmware).order_by(Firmware.file_name.asc()) + + if platform_id: + query = query.filter_by(platform_id=platform_id) + + return session.scalars(query).all() @begin_session def get_firmware_by_filename( diff --git a/backend/handler/database/roms_handler.py b/backend/handler/database/roms_handler.py index 148930fc3..b2589b979 100644 --- a/backend/handler/database/roms_handler.py +++ b/backend/handler/database/roms_handler.py @@ -57,7 +57,7 @@ class DBRomsHandler(DBBaseHandler): platform_id: int | None, collection_id: int | None, virtual_collection_id: str | None, - search_term: str, + search_term: str | None, session: Session, ): if platform_id: @@ -82,7 +82,7 @@ class DBRomsHandler(DBBaseHandler): if v_collection: data = data.filter(Rom.id.in_(v_collection.rom_ids)) - if search_term: + if search_term is not None: data = data.filter( or_( Rom.fs_name.ilike(f"%{search_term}%"), @@ -126,7 +126,7 @@ class DBRomsHandler(DBBaseHandler): platform_id: int | None = None, collection_id: int | None = None, virtual_collection_id: str | None = None, - search_term: str = "", + search_term: str | None = None, order_by: str = "name", order_dir: str = "asc", limit: int | None = None, @@ -265,9 +265,7 @@ class DBRomsHandler(DBBaseHandler): platform_id: int | None = None, collection_id: int | None = None, virtual_collection_id: str | None = None, - search_term: str = "", - order_by: str = "name", - order_dir: str = "asc", + search_term: str | None = None, limit: int | None = None, offset: int | None = None, query: Query = None, diff --git a/backend/handler/metadata/ss_handler.py b/backend/handler/metadata/ss_handler.py index 5a8742628..0e469c6c0 100644 --- a/backend/handler/metadata/ss_handler.py +++ b/backend/handler/metadata/ss_handler.py @@ -738,7 +738,7 @@ SLUG_TO_SS_ID: dict[str, SlugToSSId] = { "mac": {"id": 146, "name": "Mac OS"}, # IGDB "ngage": {"id": 30, "name": "N-Gage"}, "nes": {"id": 3, "name": "NES"}, - "famicom": {"id": 3, "name": "NES"}, + "fds": {"id": 106, "name": "Famicom"}, "neo-geo": {"id": 142, "name": "Neo-Geo"}, "neogeoaes": {"id": 142, "name": "Neo-Geo"}, # IGDB "neogeomvs": {"id": 68, "name": "Neo-Geo MVS"}, # IGDB diff --git a/examples/docker-compose.example.yml b/examples/docker-compose.example.yml index 0e43eef60..cd039b8b6 100644 --- a/examples/docker-compose.example.yml +++ b/examples/docker-compose.example.yml @@ -17,9 +17,11 @@ services: - DB_PASSWD= # Should match MARIADB_PASSWORD in mariadb - ROMM_AUTH_SECRET_KEY= # Generate a key with `openssl rand -hex 32` - IGDB_CLIENT_ID= # Generate an ID and SECRET in IGDB - - IGDB_CLIENT_SECRET= # https://api-docs.igdb.com/#account-creation - - MOBYGAMES_API_KEY= # https://www.mobygames.com/info/api/ - - STEAMGRIDDB_API_KEY= # https://github.com/rommapp/romm/wiki/Generate-API-Keys#steamgriddb + - IGDB_CLIENT_SECRET= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#igdb + - MOBYGAMES_API_KEY= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#mobygames + - STEAMGRIDDB_API_KEY= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#steamgriddb + - SCREENSCRAPER_USER= # Use your ScreenScraper username and password + - SCREENSCRAPER_PASSWORD= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#screenscraper volumes: - romm_resources:/romm/resources # Resources fetched from IGDB (covers, screenshots, etc.) - romm_redis_data:/redis-data # Cached data for background tasks diff --git a/frontend/assets/platforms/systematic/nintendo-64dd.svg b/frontend/assets/platforms/systematic/64dd.svg similarity index 100% rename from frontend/assets/platforms/systematic/nintendo-64dd.svg rename to frontend/assets/platforms/systematic/64dd.svg diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 99fdbb645..8fc6cf616 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -16,7 +16,7 @@ "lodash": "^4.17.21", "md-editor-v3": "^5.3.2", "mitt": "^3.0.1", - "nanoid": "^5.1.2", + "nanoid": "^5.1.3", "pinia": "^3.0.1", "qrcode": "^1.5.4", "semver": "^7.6.2", @@ -31,22 +31,22 @@ "@eslint/js": "^9.21.0", "@types/eslint__js": "^9.14.0", "@types/js-cookie": "^3.0.6", - "@types/lodash": "^4.17.15", + "@types/lodash": "^4.17.16", "@types/node": "^22.13.8", "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.8", "@vitejs/plugin-vue": "^5.2.1", "@vue/tsconfig": "^0.7.0", - "eslint": "^9.21.0", + "eslint": "^9.22.0", "eslint-plugin-vue": "^9.26.0", "globals": "^16.0.0", "openapi-typescript-codegen": "^0.29.0", "typescript": "^5.7.3", - "typescript-eslint": "^8.25.0", + "typescript-eslint": "^8.26.0", "vite": "^6.1.1", "vite-plugin-pwa": "^0.21.1", "vite-plugin-vuetify": "^2.0.4", - "vue-tsc": "^2.1.10" + "vue-tsc": "^2.2.8" }, "engines": { "node": "18" @@ -2330,6 +2330,16 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/config-helpers": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.1.0.tgz", + "integrity": "sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/core": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", @@ -2412,9 +2422,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", - "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", + "version": "9.22.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.22.0.tgz", + "integrity": "sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==", "dev": true, "license": "MIT", "engines": { @@ -3194,10 +3204,11 @@ "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==" }, "node_modules/@types/lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==", - "dev": true + "version": "4.17.16", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.16.tgz", + "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==", + "dev": true, + "license": "MIT" }, "node_modules/@types/markdown-it": { "version": "14.1.2", @@ -3251,17 +3262,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", - "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz", + "integrity": "sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/type-utils": "8.25.0", - "@typescript-eslint/utils": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/type-utils": "8.26.0", + "@typescript-eslint/utils": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3277,20 +3288,20 @@ "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", - "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.26.0.tgz", + "integrity": "sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4" }, "engines": { @@ -3302,18 +3313,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", - "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0" + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3324,14 +3335,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", - "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.26.0.tgz", + "integrity": "sha512-ruk0RNChLKz3zKGn2LwXuVoeBcUMh+jaqzN461uMMdxy5H9epZqIBtYj7UiPXRuOpaALXGbmRuZQhmwHhaS04Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/utils": "8.26.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -3344,13 +3355,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", - "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", "dev": true, "license": "MIT", "engines": { @@ -3362,14 +3373,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", - "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.26.0.tgz", + "integrity": "sha512-tiJ1Hvy/V/oMVRTbEOIeemA2XoylimlDQ03CgPPNaHYZbpsc78Hmngnt+WXZfJX1pjQ711V7g0H7cSJThGYfPQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3385,7 +3396,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -3415,16 +3426,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", - "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-2L2tU3FVwhvU14LndnQCA2frYC8JnPDVKyQtWFPf8IYFMt/ykEN1bPolNhNbCVgOmdzTlWdusCTKA/9nKrf8Ig==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0" + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3435,17 +3446,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", - "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/types": "8.26.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3564,6 +3575,7 @@ "resolved": "https://registry.npmjs.org/@vue/compiler-vue2/-/compiler-vue2-2.7.16.tgz", "integrity": "sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==", "dev": true, + "license": "MIT", "dependencies": { "de-indent": "^1.0.2", "he": "^1.2.0" @@ -3599,16 +3611,17 @@ } }, "node_modules/@vue/language-core": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.2.0.tgz", - "integrity": "sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.2.8.tgz", + "integrity": "sha512-rrzB0wPGBvcwaSNRriVWdNAbHQWSf0NlGqgKHK5mEkXpefjUlVRP62u03KvwZpvKVjRnBIQ/Lwre+Mx9N6juUQ==", "dev": true, + "license": "MIT", "dependencies": { "@volar/language-core": "~2.4.11", "@vue/compiler-dom": "^3.5.0", "@vue/compiler-vue2": "^2.7.16", "@vue/shared": "^3.5.0", - "alien-signals": "^0.4.9", + "alien-signals": "^1.0.3", "minimatch": "^9.0.3", "muggle-string": "^0.4.1", "path-browserify": "^1.0.1" @@ -3627,6 +3640,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -3636,6 +3650,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3762,10 +3777,11 @@ } }, "node_modules/alien-signals": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-0.4.14.tgz", - "integrity": "sha512-itUAVzhczTmP2U5yX67xVpsbbOiquusbWVyA9N+sy6+r6YVbFkahXvNCeEPWEOMhwDYwbVbGHFkVL03N9I5g+Q==", - "dev": true + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-1.0.4.tgz", + "integrity": "sha512-DJqqQD3XcsaQcQ1s+iE2jDUZmmQpXwHiR6fCAim/w87luaW+vmLY8fMlrdkmRwzaFXhkxf3rqPCR59tKVv1MDw==", + "dev": true, + "license": "MIT" }, "node_modules/ansi-regex": { "version": "5.0.1", @@ -4352,7 +4368,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/debug": { "version": "4.4.0", @@ -4717,18 +4734,19 @@ } }, "node_modules/eslint": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", - "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", + "version": "9.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.22.0.tgz", + "integrity": "sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.2", + "@eslint/config-helpers": "^0.1.0", "@eslint/core": "^0.12.0", "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "9.21.0", + "@eslint/js": "9.22.0", "@eslint/plugin-kit": "^0.2.7", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -4740,7 +4758,7 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", + "eslint-scope": "^8.3.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.5.0", @@ -4854,9 +4872,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5527,6 +5545,7 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } @@ -6408,12 +6427,13 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nanoid": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.2.tgz", - "integrity": "sha512-b+CiXQCNMUGe0Ri64S9SXFcP9hogjAJ2Rd6GdVxhPLRm7mhGaM7VgOvCAJ1ZshfHbqVDI3uqTI5C8/GaKuLI7g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.3.tgz", + "integrity": "sha512-zAbEOEr7u2CbxwoMRlz/pNSpRP0FdAU4pRaYunCdEezWohXFs+a0Xw7RfkKaezMsmSM1vttcLthJtwRnVtOfHQ==", "funding": [ { "type": "github", @@ -7886,15 +7906,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.25.0.tgz", - "integrity": "sha512-TxRdQQLH4g7JkoFlYG3caW5v1S6kEkz8rqt80iQJZUYPq1zD1Ra7HfQBJJ88ABRaMvHAXnwRvRB4V+6sQ9xN5Q==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.26.0.tgz", + "integrity": "sha512-PtVz9nAnuNJuAVeUFvwztjuUgSnJInODAUx47VDwWPXzd5vismPOtPtt83tzNXyOjVQbPRp786D6WFW/M2koIA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.25.0", - "@typescript-eslint/parser": "8.25.0", - "@typescript-eslint/utils": "8.25.0" + "@typescript-eslint/eslint-plugin": "8.26.0", + "@typescript-eslint/parser": "8.26.0", + "@typescript-eslint/utils": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7905,7 +7925,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/uc.micro": { @@ -8272,13 +8292,14 @@ } }, "node_modules/vue-tsc": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.2.0.tgz", - "integrity": "sha512-gtmM1sUuJ8aSb0KoAFmK9yMxb8TxjewmxqTJ1aKphD5Cbu0rULFY6+UQT51zW7SpUcenfPUuflKyVwyx9Qdnxg==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.2.8.tgz", + "integrity": "sha512-jBYKBNFADTN+L+MdesNX/TB3XuDSyaWynKMDgR+yCSln0GQ9Tfb7JS2lr46s2LiFUT1WsmfWsSvIElyxzOPqcQ==", "dev": true, + "license": "MIT", "dependencies": { "@volar/typescript": "~2.4.11", - "@vue/language-core": "2.2.0" + "@vue/language-core": "2.2.8" }, "bin": { "vue-tsc": "bin/vue-tsc.js" diff --git a/frontend/package.json b/frontend/package.json index 7c0bf620b..172892699 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,7 +34,7 @@ "lodash": "^4.17.21", "md-editor-v3": "^5.3.2", "mitt": "^3.0.1", - "nanoid": "^5.1.2", + "nanoid": "^5.1.3", "pinia": "^3.0.1", "qrcode": "^1.5.4", "semver": "^7.6.2", @@ -49,22 +49,22 @@ "@eslint/js": "^9.21.0", "@types/eslint__js": "^9.14.0", "@types/js-cookie": "^3.0.6", - "@types/lodash": "^4.17.15", + "@types/lodash": "^4.17.16", "@types/node": "^22.13.8", "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.8", "@vitejs/plugin-vue": "^5.2.1", "@vue/tsconfig": "^0.7.0", - "eslint": "^9.21.0", + "eslint": "^9.22.0", "eslint-plugin-vue": "^9.26.0", "globals": "^16.0.0", "openapi-typescript-codegen": "^0.29.0", "typescript": "^5.7.3", - "typescript-eslint": "^8.25.0", + "typescript-eslint": "^8.26.0", "vite": "^6.1.1", "vite-plugin-pwa": "^0.21.1", "vite-plugin-vuetify": "^2.0.4", - "vue-tsc": "^2.1.10" + "vue-tsc": "^2.2.8" }, "engines": { "node": "18" diff --git a/frontend/src/components/Details/Info/GameInfo.vue b/frontend/src/components/Details/Info/GameInfo.vue index 011e2bbfd..13bc18227 100644 --- a/frontend/src/components/Details/Info/GameInfo.vue +++ b/frontend/src/components/Details/Info/GameInfo.vue @@ -29,9 +29,8 @@ const filters = [ // Functions function onFilterClick(filter: FilterType, value: string) { router.push({ - name: "platform", - params: { platform: props.rom.platform_id }, - query: { filter, value }, + name: "search", + query: { search: "", filter, value }, }); } diff --git a/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue b/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue index d570322db..92827295a 100644 --- a/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue +++ b/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue @@ -19,7 +19,7 @@ const galleryFilterStore = storeGalleryFilter(); const { searchText } = storeToRefs(galleryFilterStore); function fetchRoms() { - if (searchText.value) { + if (searchText.value !== null) { gettingRoms.value = true; const inputElement = document.getElementById("search-text-field"); inputElement?.blur(); diff --git a/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue b/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue index 45cc62f87..a2483aa97 100644 --- a/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue +++ b/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/locales/ja_JP/collection.json b/frontend/src/locales/ja_JP/collection.json new file mode 100644 index 000000000..00720fe82 --- /dev/null +++ b/frontend/src/locales/ja_JP/collection.json @@ -0,0 +1,16 @@ +{ + "search-collection": "コレクションを検索", + "add-collection": "コレクションに追加", + "edit-collection": "コレクションを編集", + "name": "名前", + "description": "説明", + "owner": "所有者", + "public": "公開", + "public-desc": "公開(全員表示可)", + "private": "非公開", + "private-desc": "非公開(自分だけ表示)", + "danger-zone": "危険", + "delete-collection": "コレクションを削除", + "removing-collection-1": "RomMからコレクションを削除します", + "removing-collection-2": "よろしいですか?" +} diff --git a/frontend/src/locales/ja_JP/common.json b/frontend/src/locales/ja_JP/common.json new file mode 100644 index 000000000..09f0b8548 --- /dev/null +++ b/frontend/src/locales/ja_JP/common.json @@ -0,0 +1,36 @@ +{ + "platform": "プラットフォーム", + "platforms": "プラットフォームs", + "platforms-n": "{n} プラットフォーム | {n} プラットフォームs", + "firmware": "ファームウェア", + "core": "コア", + "games-n": "{n} げーム | {n} ゲーム", + "collection": "コレクション", + "collections": "コレクション", + "virtual-collection": "自動生成コレクション", + "virtual-collections": "自動生成コレクション", + "save": "セーブ", + "saves": "セーブ", + "saves-n": "{n} セーブ | {n} セーブ", + "state": "ステートセーブ", + "states": "ステートセーブ", + "states-n": "{n} ステートセーブ | {n} ステートセーブ", + "screenshots-n": "{n} スクリーンショット | {n} スクリーンショット", + "size-on-disk": "ディスク上のサイズ", + "search": "検索", + "filter": "フィルタ", + "add": "追加", + "upload": "アップロード", + "edit": "編集", + "cancel": "キャンセル", + "confirm": "確定", + "apply": "適用", + "update": "アップデート", + "create": "作成", + "profile": "プロファイル", + "user-interface": "ユーザーインターフェイス", + "library-management": "ライブラリ管理", + "administration": "管理者メニュー", + "logout": "ログアウト", + "name": "名前" +} diff --git a/frontend/src/locales/ja_JP/emptyStates.json b/frontend/src/locales/ja_JP/emptyStates.json new file mode 100644 index 000000000..54236d32d --- /dev/null +++ b/frontend/src/locales/ja_JP/emptyStates.json @@ -0,0 +1,5 @@ +{ + "404-title": "Page not found", + "404-subtitle": "The page you are looking for does not exist", + "search-for-games": "Search for games across all platforms" +} diff --git a/frontend/src/locales/ja_JP/home.json b/frontend/src/locales/ja_JP/home.json new file mode 100644 index 000000000..83a05c5d7 --- /dev/null +++ b/frontend/src/locales/ja_JP/home.json @@ -0,0 +1,4 @@ +{ + "recently-added": "最近追加", + "continue-playing": "プレイを継続" +} diff --git a/frontend/src/locales/ja_JP/login.json b/frontend/src/locales/ja_JP/login.json new file mode 100644 index 000000000..c226fa2e8 --- /dev/null +++ b/frontend/src/locales/ja_JP/login.json @@ -0,0 +1,7 @@ +{ + "username": "ユーザ名", + "password": "パスワード", + "login": "ログイン", + "login-oidc": "Login with {oidc}", + "or": "or" +} diff --git a/frontend/src/locales/ja_JP/platform.json b/frontend/src/locales/ja_JP/platform.json new file mode 100644 index 000000000..59878fe06 --- /dev/null +++ b/frontend/src/locales/ja_JP/platform.json @@ -0,0 +1,32 @@ +{ + "search-platform": "プラットフォームを検索", + "upload-roms": "Romをアップロード", + "filesystem-folder-name": "ファイルシステム参照先", + "category": "カテゴリ", + "generation": "生成", + "family": "ファミリー", + "settings": "設定", + "cover-style": "カバースタイル", + "old-squared-cases": "正方形パッケージ", + "danger-zone": "危険", + "delete-platform": "プラットフォームの削除", + "removing-platform-1": "RomMからプラットフォームを削除しようとしています", + "removing-platform-2": "] よろしいですか?", + "show-firmwares": "ファームウェア/BIOSを表示", + "filter-gallery": "ギャラリーをフィルタ", + "show-unmatched": "非該当を表示", + "show-matched": "該当を表示", + "show-favourites": "お気に入りを表示", + "show-duplicates": "重複を表示", + "genre": "ジャンル", + "genres": "ジャンル", + "franchise": "フランチャイズ", + "collection": "コレクション", + "company": "会社", + "age-rating": "レーティング", + "status": "ステータス", + "reset-filters": "フィルタをリセット", + "active-multi-select": "複数選択を有効化", + "change-view": "表示を変更", + "no-firmware-found": "ファームウェアが見つかりません" +} diff --git a/frontend/src/locales/ja_JP/play.json b/frontend/src/locales/ja_JP/play.json new file mode 100644 index 000000000..b359b4ef7 --- /dev/null +++ b/frontend/src/locales/ja_JP/play.json @@ -0,0 +1,7 @@ +{ + "full-screen": "全画面", + "play": "プレイ", + "reset-session": "セッションをリセット", + "back-to-game-details": "ゲーム詳細へ戻る", + "back-to-gallery": "ギャラリーへ戻る" +} diff --git a/frontend/src/locales/ja_JP/rom.json b/frontend/src/locales/ja_JP/rom.json new file mode 100644 index 000000000..917c7fb0e --- /dev/null +++ b/frontend/src/locales/ja_JP/rom.json @@ -0,0 +1,59 @@ +{ + "manual-match": "手動マッチ", + "by": "by", + "results-found": "検索結果", + "select-cover-image": "カバー画像を選択", + "rename-file-part1": "ファイル名を {source} に変更", + "rename-file-part2": "ファイル名が変更されます", + "rename-file-part3": "元", + "rename-file-part4": "変更後", + "rename-file-part5": "ファイル名タグは変更されません", + "no-metadata-source": "メタデータ検索が無効です", + "remove-from-playing": "プレイ中から削除", + "edit-rom": "編集", + "refresh-metadata": "メタデータを更新", + "filename": "ファイル名", + "foldername": "フォルダ名", + "summary": "結果", + "unmatch-rom": "検索結果無し", + "add-to-fav": "お気に入りに追加", + "remove-from-fav": "お気に入りから削除", + "add-to-collection": "コレクションに追加", + "remove-from-collection": "コレクションから削除", + "adding-to-collection-part1": "コレクションにrom", + "adding-to-collection-part2": "を追加しています", + "removing-from-collection-part1": "コレクションからrom", + "removing-from-collection-part2": "を削除しています", + "delete-rom": "削除", + "copy-link": "ダウンロードリンクをコピー", + "cant-copy-link": "クリップボードへのコピー失敗 手動でコピーしてください", + "details": "詳細", + "manual": "ユーザーマニュアル", + "personal": "個人", + "version": "バージョン", + "default": "デフォルト", + "set-as-default": "romをデフォルトに設定", + "file": "ファイル", + "files": "ファイル", + "info": "詳細", + "size": "サイズ", + "tags": "タグ", + "genres": "ジャンル", + "franchises": "フランチャイズ", + "collections": "コレクション", + "companies": "会社", + "age-rating": "レーティング", + "no-saves-found": "セーブが見つかりません", + "no-states-found": "ステートセーブが見つかりません", + "status": "ステータス", + "backlogged": "未処理", + "now-playing": "プレイ中", + "hidden": "非表示", + "rating": "レーティング", + "difficulty": "難易度", + "completion": "完了度", + "my-notes": "メモ", + "public-notes": "公開メモ", + "additional-content": "追加コンテンツ", + "related-content": "関連コンテンツ" +} diff --git a/frontend/src/locales/ja_JP/scan.json b/frontend/src/locales/ja_JP/scan.json new file mode 100644 index 000000000..7da5193bb --- /dev/null +++ b/frontend/src/locales/ja_JP/scan.json @@ -0,0 +1,26 @@ +{ + "scan": "スキャン", + "abort": "中止", + "manage-library": "ライブラリを編集", + "metadata-sources": "メタデータ取得元", + "api-key-missing": "API keyが見つからないか誤っています", + "scan-options": "スキャンオプション", + "select-one-source": "アートワークやメタデータを使用したい場合は少なくとも1つのソースを選択してください", + "new-platforms": "新規プラットフォーム", + "new-platforms-desc": "新規プラットフォームのみを検索 (最速)", + "quick-scan": "クイックスキャン", + "quick-scan-desc": "新規ファイルのみを検索", + "unidentified-games": "未識別ゲーム", + "unidentified-games-desc": "メタデータが存在しないファイルのみを検索", + "hashes": "ハッシュ値の再計算", + "hashes-desc": "全ファイルのハッシュ値を再計算します", + "partial-metadata": "部分的なメタデータ", + "partial-metadata-desc": "メタデータが部分的に一致するゲームをスキャン", + "complete-rescan": "完全再スキャン", + "complete-rescan-desc": "全てのプラットフォームとファイルを再スキャン (最遅)", + "no-new-roms": "新規・変更されたromはありません", + "platforms-scanned-n": "プラットフォーム: {n} スキャン済み", + "platforms-scanned-with-details": "プラットフォーム: {n_platforms} スキャン済み 新規: {n_added_platforms} 識別済み: {n_identified_platforms}", + "roms-scanned-n": "Rom: {n} スキャン済み", + "roms-scanned-with-details": "Rom: {n_roms} スキャン済み 新規: {n_added_roms} 識別済み: {n_identified_roms}" +} diff --git a/frontend/src/locales/ja_JP/settings.json b/frontend/src/locales/ja_JP/settings.json new file mode 100644 index 000000000..482b66fd9 --- /dev/null +++ b/frontend/src/locales/ja_JP/settings.json @@ -0,0 +1,55 @@ +{ + "username": "ユーザ名", + "password": "パスワード", + "role": "役割", + "language": "言語", + "theme": "テーマ", + "theme-auto": "オート", + "theme-dark": "ダーク", + "theme-light": "ライト", + "interface": "インターフェイス", + "home": "ホーム", + "gallery": "ギャラリー", + "show-recently-added": "最近追加されたromを表示", + "show-recently-added-desc": "ホームに最近追加されたromセクションを表示", + "recently-added-as-grid": "最近追加されたromをグリッドで表示", + "recently-added-as-grid-desc": "ホームの最近追加されたromをグリッドで表示", + "show-continue-playing": "プレイを継続を表示", + "show-continue-playing-desc": "ホームにプレイを継続を表示", + "continue-playing-as-grid": "プレイを継続をグリッドで表示", + "continue-playing-as-grid-desc": "ホームのプレイを継続をグリッドで表示", + "show-platforms": "プラットフォームを表示", + "show-platforms-desc": "ホームにプラットフォームを表示", + "show-platforms-as-grid": "プラットフォームをグリッドで表示", + "show-platforms-as-grid-desc": "ホームのプラットフォームをグリッドで表示", + "show-collections": "コレクションを表示", + "show-collections-desc": "ホームにコレクションを表示", + "show-collections-as-grid": "コレクションをグリッドで表示", + "show-collections-as-grid-desc": "ホームのコレクションをグリッドで表示", + "show-virtual-collections": "自動生成されたコレクションを表示", + "show-virtual-collections-desc": "ホームに自動生成されたコレクションを表示", + "virtual-collection-type": "バーチャルコレクションタイプ (romのグループ化方法)", + "group-roms": "romグループ", + "group-roms-desc": "同じバージョンのromをギャラリーでグループ化する", + "show-siblings": "系列を表示", + "show-siblings-desc": "\"Group roms\" オプションが有効な場合、キャラリーに系列数を表示", + "show-regions": "リージョンを表示", + "show-regions-desc": "ギャラリーにリージョンを表示", + "show-languages": "言語を表示", + "show-languages-desc": "ギャラリーに言語を表示", + "show-status": "ステータを表示", + "show-status-desc": "ギャラリーにステータスアイコンを表示 (未プレイ, プレイ中, 完了済, その他)", + "platforms-bindings": "プラットフォーム割当", + "platforms-versions": "プラットフォームバージョン", + "excluded": "除外", + "excluded-single-rom-files": "単一ファイル", + "excluded-single-rom-extensions": "単一拡張子", + "excluded-multi-rom-files": "複数ファイル", + "excluded-multi-rom-parts-files": "複数拡張子", + "excluded-multi-rom-parts-extensions": "複数ファイルの拡張子", + "folder-name": "フォルダ名", + "romm-platform": "RomM プラットフォーム", + "platform-version": "プラットフォームバージョン", + "main-platform": "メインプラットフォーム", + "join-discord": "Join to our discord" +} diff --git a/frontend/src/services/api/rom.ts b/frontend/src/services/api/rom.ts index d25f15071..dfc66ceee 100644 --- a/frontend/src/services/api/rom.ts +++ b/frontend/src/services/api/rom.ts @@ -59,7 +59,7 @@ async function getRoms({ platformId = null, collectionId = null, virtualCollectionId = null, - searchTerm = "", + searchTerm = null, orderBy = "name", orderDir = "asc", }: { diff --git a/frontend/src/stores/galleryFilter.ts b/frontend/src/stores/galleryFilter.ts index ac0c02af8..b9142d192 100644 --- a/frontend/src/stores/galleryFilter.ts +++ b/frontend/src/stores/galleryFilter.ts @@ -1,5 +1,5 @@ import type { PlatformSchema } from "@/__generated__"; -import { normalizeString, romStatusMap } from "@/utils"; +import { romStatusMap } from "@/utils"; import { defineStore } from "pinia"; export type Platform = PlatformSchema; @@ -19,8 +19,8 @@ export type FilterType = (typeof filters)[number]; const defaultFilterState = { activeFilterDrawer: false, - searchText: "", - filterText: "", + searchText: null as string | null, + filterText: null as string | null, filters: filters, filterPlatforms: [] as Platform[], filterGenres: [] as string[], @@ -118,8 +118,7 @@ export default defineStore("galleryFilter", { }, isFiltered() { return Boolean( - normalizeString(this.filterText).trim() != "" || - this.filterUnmatched || + this.filterUnmatched || this.filterMatched || this.filterFavourites || this.filterDuplicates || diff --git a/frontend/src/stores/language.ts b/frontend/src/stores/language.ts index 200f084e1..552b4e1c6 100644 --- a/frontend/src/stores/language.ts +++ b/frontend/src/stores/language.ts @@ -13,6 +13,7 @@ const defaultLanguageState = { { value: "es_ES", name: "Español (España)" }, { value: "zh_CN", name: "简体中文 (中国)" }, { value: "ko_KR", name: "한국어 (대한민국)" }, + { value: "ja_JP", name: "日本語 (日本)" }, ].sort((a, b) => a.name.localeCompare(b.name)), }; diff --git a/frontend/src/stores/roms.ts b/frontend/src/stores/roms.ts index 90fe11727..4788403dc 100644 --- a/frontend/src/stores/roms.ts +++ b/frontend/src/stores/roms.ts @@ -8,7 +8,7 @@ import storeGalleryFilter from "@/stores/galleryFilter"; import { type Platform } from "@/stores/platforms"; import type { ExtractPiniaStoreType } from "@/types"; import { getStatusKeyForText } from "@/utils"; -import { groupBy, isNull, uniqBy } from "lodash"; +import { groupBy, isNull, isUndefined, uniqBy } from "lodash"; import { nanoid } from "nanoid"; import { defineStore } from "pinia"; @@ -157,7 +157,7 @@ export default defineStore("roms", { // Filter roms by gallery filter store state setFiltered(roms: SimpleRom[], galleryFilter: GalleryFilterStore) { this._filteredIDs = new Set(roms.map((rom) => rom.id)); - if (galleryFilter.filterText) { + if (galleryFilter.filterText !== null) { this._filterText(galleryFilter.filterText); } if (galleryFilter.filterUnmatched) { @@ -372,7 +372,7 @@ export default defineStore("roms", { this.lastSelectedIndex = -1; }, isSimpleRom(rom: SimpleRom | SearchRomSchema): rom is SimpleRom { - return (rom as SimpleRom).id !== undefined; + return !isNull(rom.id) && !isUndefined(rom.id); }, }, }); diff --git a/frontend/src/utils/indexdb-monitor.ts b/frontend/src/utils/indexdb-monitor.ts index 50bdc96be..b40079a3b 100644 --- a/frontend/src/utils/indexdb-monitor.ts +++ b/frontend/src/utils/indexdb-monitor.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { isEqual } from "lodash"; interface DBSnapshot { timestamp: Date; @@ -117,20 +118,22 @@ export default async function createIndexedDBDiffMonitor( // Check for added or modified keys for (const [key, newValue] of Object.entries(newStoreData)) { const oldValue = oldStoreData[key]; - if (oldValue === undefined) { + if ( + // The store is empty or the key is new + oldValue === undefined || + // The save timestamp has changed + (oldValue.timestamp && + oldValue.timestamp.getTime() !== newValue.timestamp.getTime()) || + // The state array length has changed + (oldValue.length && oldValue.length !== newValue.length) || + // The state array content has changed + (oldValue.length && !isEqual(oldValue, newValue)) + ) { newChanges.push({ timestamp: newSnapshot.timestamp, store: storeName, key, type: "added", - newValue, - }); - } else if (JSON.stringify(oldValue) !== JSON.stringify(newValue)) { - newChanges.push({ - timestamp: newSnapshot.timestamp, - store: storeName, - key, - type: "modified", oldValue, newValue, }); diff --git a/frontend/src/views/Gallery/Collection.vue b/frontend/src/views/Gallery/Collection.vue index fb1139d89..71437a2d7 100644 --- a/frontend/src/views/Gallery/Collection.vue +++ b/frontend/src/views/Gallery/Collection.vue @@ -42,7 +42,6 @@ const noCollectionError = ref(false); const router = useRouter(); let timeout: ReturnType; const emitter = inject>("emitter"); -emitter?.on("filter", onFilterChange); // Functions async function fetchRoms() { @@ -87,11 +86,6 @@ async function fetchRoms() { } } -async function onFilterChange() { - romsStore.setFiltered(allRoms.value, galleryFilterStore); - emitter?.emit("updateDataTablePages", null); -} - function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) { let index = filteredRoms.value.indexOf(emitData.rom); if ( @@ -358,7 +352,7 @@ onBeforeUnmount(() => { diff --git a/frontend/src/views/Gallery/Platform.vue b/frontend/src/views/Gallery/Platform.vue index 48ad717fa..278cffc56 100644 --- a/frontend/src/views/Gallery/Platform.vue +++ b/frontend/src/views/Gallery/Platform.vue @@ -41,7 +41,6 @@ const noPlatformError = ref(false); const router = useRouter(); let timeout: ReturnType; const emitter = inject>("emitter"); -emitter?.on("filter", onFilterChange); // Functions async function fetchRoms() { @@ -80,11 +79,6 @@ async function fetchRoms() { } } -async function onFilterChange() { - romsStore.setFiltered(allRoms.value, galleryFilterStore); - emitter?.emit("updateDataTablePages", null); -} - function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) { let index = filteredRoms.value.indexOf(emitData.rom); if ( @@ -170,15 +164,6 @@ function resetGallery() { itemsShown.value = itemsPerBatch.value; } -const filterToSetFilter: Record = { - genres: galleryFilterStore.setSelectedFilterGenre, - franchises: galleryFilterStore.setSelectedFilterFranchise, - meta_collections: galleryFilterStore.setSelectedFilterCollection, - companies: galleryFilterStore.setSelectedFilterCompany, - age_ratings: galleryFilterStore.setSelectedFilterAgeRating, - status: galleryFilterStore.setSelectedFilterStatus, -}; - onMounted(async () => { const routePlatformId = Number(route.params.platform); currentCollection.value = null; @@ -203,15 +188,6 @@ onMounted(async () => { await fetchRoms(); } - // Check for query params to set filters - if (route.query.filter && route.query.value) { - const filter = route.query.filter as FilterType; - const value = route.query.value as string; - filterToSetFilter[filter](value); - onFilterChange(); // Update the UI - router.replace({ query: {} }); // Clear query params - } - window.addEventListener("wheel", onScroll); window.addEventListener("scroll", onScroll); window.addEventListener("touchmove", onScroll); @@ -315,7 +291,7 @@ onBeforeUnmount(() => { diff --git a/frontend/src/views/Gallery/Search.vue b/frontend/src/views/Gallery/Search.vue index 47dd35115..e74ca5c9e 100644 --- a/frontend/src/views/Gallery/Search.vue +++ b/frontend/src/views/Gallery/Search.vue @@ -9,12 +9,10 @@ import GameDataTable from "@/components/common/Game/Table.vue"; import storeGalleryFilter from "@/stores/galleryFilter"; import storeGalleryView from "@/stores/galleryView"; import storeRoms, { type SimpleRom } from "@/stores/roms"; -import type { Events } from "@/types/emitter"; -import type { Emitter } from "mitt"; import { views } from "@/utils"; import { ROUTES } from "@/plugins/router"; import { storeToRefs } from "pinia"; -import { inject, onBeforeUnmount, onMounted, ref } from "vue"; +import { onBeforeUnmount, onMounted, ref } from "vue"; import { useRouter } from "vue-router"; // Props @@ -38,53 +36,6 @@ const { const itemsShown = ref(itemsPerBatch.value); let timeout: ReturnType; -const emitter = inject>("emitter"); -emitter?.on("filter", onFilterChange); - -// Functions -function setFilters() { - galleryFilterStore.setFilterGenres([ - ...new Set( - romsStore.filteredRoms - .flatMap((rom) => rom.genres.map((genre) => genre)) - .sort(), - ), - ]); - galleryFilterStore.setFilterFranchises([ - ...new Set( - romsStore.filteredRoms - .flatMap((rom) => rom.franchises.map((franchise) => franchise)) - .sort(), - ), - ]); - galleryFilterStore.setFilterCompanies([ - ...new Set( - romsStore.filteredRoms - .flatMap((rom) => rom.companies.map((company) => company)) - .sort(), - ), - ]); - galleryFilterStore.setFilterCollections([ - ...new Set( - romsStore.filteredRoms - .flatMap((rom) => rom.meta_collections.map((collection) => collection)) - .sort(), - ), - ]); - galleryFilterStore.setFilterAgeRatings([ - ...new Set( - romsStore.filteredRoms - .flatMap((rom) => rom.age_ratings.map((ageRating) => ageRating)) - .sort(), - ), - ]); -} - -async function onFilterChange() { - romsStore.setFiltered(allRoms.value, galleryFilterStore); - emitter?.emit("updateDataTablePages", null); -} - function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) { let index = filteredRoms.value.indexOf(emitData.rom); if ( @@ -152,7 +103,6 @@ function onScroll() { itemsShown.value < filteredRoms.value.length ) { itemsShown.value = itemsShown.value + itemsPerBatch.value; - setFilters(); galleryViewStore.scroll = scrollHeight; } }, 100); @@ -235,9 +185,7 @@ onBeforeUnmount(() => { diff --git a/frontend/src/views/Player/EmulatorJS/Base.vue b/frontend/src/views/Player/EmulatorJS/Base.vue index a8b2c3a86..df9c85c5f 100644 --- a/frontend/src/views/Player/EmulatorJS/Base.vue +++ b/frontend/src/views/Player/EmulatorJS/Base.vue @@ -3,14 +3,12 @@ import type { FirmwareSchema, SaveSchema, StateSchema } from "@/__generated__"; import RomListItem from "@/components/common/Game/ListItem.vue"; import firmwareApi from "@/services/api/firmware"; import romApi from "@/services/api/rom"; -import storeGalleryView from "@/stores/galleryView"; import storeAuth from "@/stores/auth"; import type { DetailedRom } from "@/stores/roms"; import { formatBytes, formatTimestamp, getSupportedEJSCores } from "@/utils"; import { ROUTES } from "@/plugins/router"; import Player from "@/views/Player/EmulatorJS/Player.vue"; import { isNull } from "lodash"; -import { storeToRefs } from "pinia"; import { onMounted, ref } from "vue"; import { useRoute } from "vue-router"; import { useI18n } from "vue-i18n"; @@ -20,8 +18,6 @@ const EMULATORJS_VERSION = "4.2.1"; // Props const { t } = useI18n(); const route = useRoute(); -const galleryViewStore = storeGalleryView(); -const { defaultAspectRatioScreenshot } = storeToRefs(galleryViewStore); const auth = storeAuth(); const rom = ref(null); const firmwareOptions = ref([]); @@ -128,14 +124,13 @@ onMounted(async () => { { - - - + { cols="12" :sm="gameRunning ? 12 : 7" :xl="gameRunning ? 12 : 9" + class="ml-2" > { + + diff --git a/frontend/src/views/Player/EmulatorJS/Player.vue b/frontend/src/views/Player/EmulatorJS/Player.vue index 6d92152d2..f7879cb54 100644 --- a/frontend/src/views/Player/EmulatorJS/Player.vue +++ b/frontend/src/views/Player/EmulatorJS/Player.vue @@ -289,13 +289,9 @@ window.EJS_onGameStart = async () => { stateApi .updateState({ state: stateRef.value, - file: new File( - [change.newValue.contents], - stateRef.value.file_name, - { - type: "application/octet-stream", - }, - ), + file: new File([change.newValue], stateRef.value.file_name, { + type: "application/octet-stream", + }), }) .then(({ data }) => { stateRef.value = data; @@ -307,7 +303,7 @@ window.EJS_onGameStart = async () => { rom: romRef.value, emulator: window.EJS_core, states: [ - new File([change.newValue.contents], buildStateName(), { + new File([change.newValue], buildStateName(), { type: "application/octet-stream", }), ], diff --git a/frontend/src/views/Player/RuffleRS/Base.vue b/frontend/src/views/Player/RuffleRS/Base.vue index d1872d5c2..2fb1271b1 100644 --- a/frontend/src/views/Player/RuffleRS/Base.vue +++ b/frontend/src/views/Player/RuffleRS/Base.vue @@ -1,12 +1,10 @@