mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
Merge branch 'develop' into redistributable
This commit is contained in:
@ -4,9 +4,10 @@
|
|||||||
v-for="(_, i) in amount"
|
v-for="(_, i) in amount"
|
||||||
:key="i"
|
:key="i"
|
||||||
:class="[
|
:class="[
|
||||||
carousel.currentSlide == i ? 'bg-blue-600 w-6' : 'bg-zinc-700 w-3',
|
carousel.currentSlide === i ? 'bg-blue-600 w-6' : 'bg-zinc-700 w-3',
|
||||||
'transition-all cursor-pointer h-2 rounded-full',
|
'transition-all cursor-pointer h-2 rounded-full',
|
||||||
]"
|
]"
|
||||||
|
@click="slideTo(i)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -18,8 +19,8 @@ const carousel = inject(injectCarousel)!;
|
|||||||
|
|
||||||
const amount = carousel.maxSlide - carousel.minSlide + 1;
|
const amount = carousel.maxSlide - carousel.minSlide + 1;
|
||||||
|
|
||||||
// function slideTo(index: number) {
|
function slideTo(index: number) {
|
||||||
// const offsetIndex = index + carousel.minSlide;
|
const offsetIndex = index + carousel.minSlide;
|
||||||
// carousel.nav.slideTo(offsetIndex);
|
carousel.nav.slideTo(offsetIndex);
|
||||||
// }
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -176,9 +176,12 @@
|
|||||||
active ? 'bg-zinc-900 outline-hidden' : '',
|
active ? 'bg-zinc-900 outline-hidden' : '',
|
||||||
'w-full text-left block px-4 py-2 text-sm',
|
'w-full text-left block px-4 py-2 text-sm',
|
||||||
]"
|
]"
|
||||||
@click="() => (currentSort = option.param)"
|
@click.prevent="handleSortClick(option, $event)"
|
||||||
>
|
>
|
||||||
{{ option.name }}
|
{{ option.name }}
|
||||||
|
<span v-if="currentSort === option.param">
|
||||||
|
{{ sortOrder === 'asc' ? '↑' : '↓' }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</div>
|
</div>
|
||||||
@ -298,7 +301,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="games?.length ?? 0 > 0"
|
v-if="games?.length ?? 0 > 0"
|
||||||
ref="product-grid"
|
ref="product-grid"
|
||||||
class="relative lg:col-span-4 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-7 gap-4"
|
class="relative lg:col-span-4 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 gap-4"
|
||||||
>
|
>
|
||||||
<!-- Your content -->
|
<!-- Your content -->
|
||||||
<GamePanel
|
<GamePanel
|
||||||
@ -397,8 +400,13 @@ const sorts: Array<StoreSortOption> = [
|
|||||||
name: "Recently Added",
|
name: "Recently Added",
|
||||||
param: "recent",
|
param: "recent",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Name",
|
||||||
|
param: "name",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
const currentSort = ref(sorts[0].param);
|
const currentSort = ref(sorts[0].param);
|
||||||
|
const sortOrder = ref<"asc" | "desc">("desc");
|
||||||
|
|
||||||
const options: Array<StoreFilterOption> = [
|
const options: Array<StoreFilterOption> = [
|
||||||
...(tags.length > 0
|
...(tags.length > 0
|
||||||
@ -474,7 +482,7 @@ async function updateGames(query: string, resetGames: boolean) {
|
|||||||
results: Array<SerializeObject<GameModel>>;
|
results: Array<SerializeObject<GameModel>>;
|
||||||
count: number;
|
count: number;
|
||||||
}>(
|
}>(
|
||||||
`/api/v1/store?take=50&skip=${resetGames ? 0 : games.value?.length || 0}&sort=${currentSort.value}${query ? "&" + query : ""}`,
|
`/api/v1/store?take=50&skip=${resetGames ? 0 : games.value?.length || 0}&sort=${currentSort.value}&order=${sortOrder.value}${query ? "&" + query : ""}`,
|
||||||
);
|
);
|
||||||
if (resetGames) {
|
if (resetGames) {
|
||||||
games.value = newValues.results;
|
games.value = newValues.results;
|
||||||
@ -491,6 +499,20 @@ watch(filterQuery, (newUrl) => {
|
|||||||
watch(currentSort, (_) => {
|
watch(currentSort, (_) => {
|
||||||
updateGames(filterQuery.value, true);
|
updateGames(filterQuery.value, true);
|
||||||
});
|
});
|
||||||
|
watch(sortOrder, (_) => {
|
||||||
|
updateGames(filterQuery.value, true);
|
||||||
|
});
|
||||||
|
|
||||||
await updateGames(filterQuery.value, true);
|
await updateGames(filterQuery.value, true);
|
||||||
</script>
|
|
||||||
|
function handleSortClick(option: StoreSortOption, event: MouseEvent) {
|
||||||
|
event.stopPropagation();
|
||||||
|
if (currentSort.value === option.param) {
|
||||||
|
sortOrder.value = sortOrder.value === 'asc' ? 'desc' : 'asc';
|
||||||
|
} else {
|
||||||
|
currentSort.value = option.param;
|
||||||
|
sortOrder.value = option.param === 'name' ? 'asc' : 'desc';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
{{ $t("store.images") }}
|
{{ $t("store.images") }}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<VueCarousel :items-to-show="1">
|
<VueCarousel :items-to-show="1" :wrap-around="true">
|
||||||
<VueSlide
|
<VueSlide
|
||||||
v-for="image in game.mImageCarouselObjectIds"
|
v-for="image in game.mImageCarouselObjectIds"
|
||||||
:key="image"
|
:key="image"
|
||||||
|
|||||||
@ -190,7 +190,7 @@
|
|||||||
{{ game.mShortDescription }}
|
{{ game.mShortDescription }}
|
||||||
</p>
|
</p>
|
||||||
<div class="mt-6 py-4 rounded">
|
<div class="mt-6 py-4 rounded">
|
||||||
<VueCarousel :items-to-show="1">
|
<VueCarousel :items-to-show="1" :wrap-around="true">
|
||||||
<VueSlide
|
<VueSlide
|
||||||
v-for="image in game.mImageCarouselObjectIds"
|
v-for="image in game.mImageCarouselObjectIds"
|
||||||
:key="image"
|
:key="image"
|
||||||
|
|||||||
@ -263,6 +263,7 @@ export default defineNuxtConfig({
|
|||||||
"https://www.giantbomb.com",
|
"https://www.giantbomb.com",
|
||||||
"https://images.pcgamingwiki.com",
|
"https://images.pcgamingwiki.com",
|
||||||
"https://images.igdb.com",
|
"https://images.igdb.com",
|
||||||
|
"https://*.steamstatic.com",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
strictTransportSecurity: false,
|
strictTransportSecurity: false,
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordapp/twemoji": "^16.0.1",
|
"@discordapp/twemoji": "^16.0.1",
|
||||||
"@drop-oss/droplet": "3.0.1",
|
"@drop-oss/droplet": "3.2.0",
|
||||||
"@headlessui/vue": "^1.7.23",
|
"@headlessui/vue": "^1.7.23",
|
||||||
"@heroicons/vue": "^2.1.5",
|
"@heroicons/vue": "^2.1.5",
|
||||||
"@nuxt/fonts": "^0.11.0",
|
"@nuxt/fonts": "^0.11.0",
|
||||||
@ -32,7 +32,7 @@
|
|||||||
"@vueuse/nuxt": "13.6.0",
|
"@vueuse/nuxt": "13.6.0",
|
||||||
"argon2": "^0.43.0",
|
"argon2": "^0.43.0",
|
||||||
"arktype": "^2.1.10",
|
"arktype": "^2.1.10",
|
||||||
"axios": "^1.7.7",
|
"axios": "^1.12.0",
|
||||||
"bcryptjs": "^3.0.2",
|
"bcryptjs": "^3.0.2",
|
||||||
"cheerio": "^1.0.0",
|
"cheerio": "^1.0.0",
|
||||||
"cookie-es": "^2.0.0",
|
"cookie-es": "^2.0.0",
|
||||||
|
|||||||
159
pnpm-lock.yaml
generated
159
pnpm-lock.yaml
generated
@ -12,8 +12,8 @@ importers:
|
|||||||
specifier: ^16.0.1
|
specifier: ^16.0.1
|
||||||
version: 16.0.1
|
version: 16.0.1
|
||||||
'@drop-oss/droplet':
|
'@drop-oss/droplet':
|
||||||
specifier: 3.0.1
|
specifier: 3.2.0
|
||||||
version: 3.0.1
|
version: 3.2.0
|
||||||
'@headlessui/vue':
|
'@headlessui/vue':
|
||||||
specifier: ^1.7.23
|
specifier: ^1.7.23
|
||||||
version: 1.7.23(vue@3.5.21(typescript@5.9.2))
|
version: 1.7.23(vue@3.5.21(typescript@5.9.2))
|
||||||
@ -45,7 +45,7 @@ importers:
|
|||||||
specifier: ^2.1.10
|
specifier: ^2.1.10
|
||||||
version: 2.1.22
|
version: 2.1.22
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.7.7
|
specifier: ^1.12.0
|
||||||
version: 1.12.2
|
version: 1.12.2
|
||||||
bcryptjs:
|
bcryptjs:
|
||||||
specifier: ^3.0.2
|
specifier: ^3.0.2
|
||||||
@ -387,74 +387,83 @@ packages:
|
|||||||
'@discordapp/twemoji@16.0.1':
|
'@discordapp/twemoji@16.0.1':
|
||||||
resolution: {integrity: sha512-figLiBWzjS5cyrAjLaGjM8AAaowO3qvK8rg5bA2dElB4qsaPMvBVlFDMO2d3x+nC1igt7kgWH4dvNmvvUHUF8w==}
|
resolution: {integrity: sha512-figLiBWzjS5cyrAjLaGjM8AAaowO3qvK8rg5bA2dElB4qsaPMvBVlFDMO2d3x+nC1igt7kgWH4dvNmvvUHUF8w==}
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-arm64@3.0.1':
|
'@drop-oss/droplet-darwin-arm64@3.2.0':
|
||||||
resolution: {integrity: sha512-LXe8vsXUBL96boI78H6oXpSaPVwF4cCwJ5l/QVtsOWMebNo6gk9wICDZ+5IoR/Ol32t1a1lk+DjbD1zeGenPxg==}
|
resolution: {integrity: sha512-dH/vRFxuLjOzYBBvDG140wKcx4LmFxBJ5iTjZrWzV641wiRjx8B38niWXuqZ2ZADkCL4muOvgRGFJ4W1N/j6jQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-universal@3.0.1':
|
'@drop-oss/droplet-darwin-universal@3.2.0':
|
||||||
resolution: {integrity: sha512-Mf2gjC24u6s8djV/3slZvwdr4+h0qBu2OYXBUSDfR4H/VJwV5TstnWVKF+U8d1hjmHE9eLO8elbGNnpQmSoTOQ==}
|
resolution: {integrity: sha512-k7Xhzs2mXrQcm3SLhLNDBkUaCWqtbQ6dyme1ubsG9PZEcvv25T//8CNVFEsHVZTKqj5nF41iSh4Wz1Qn6VxkVw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-x64@3.0.1':
|
'@drop-oss/droplet-darwin-x64@3.2.0':
|
||||||
resolution: {integrity: sha512-4IIDl/E+hzZ2Vt9m4FMPlZEXwj1EwE6qXyUidACK6TTFqpjLpsEHKuhv1FOxGyJ8qkvagtyPCc+cs1TxoZD6FA==}
|
resolution: {integrity: sha512-GvRwQrtcC1Dq6YyXxBGSFj+WasnIa1dk9t2lCaR9OQdh3qp2did21o2poo1Sgdjg+mI2lUdgZ6w0yXJlL1vl+A==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-arm64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-arm64-gnu@3.2.0':
|
||||||
resolution: {integrity: sha512-klGvlLf1xSMT3iYsIAaBbmbir1ZJWtcVyOMUlsfc1lkJ8mgyB+PrW4BsnYj7Pp4G34n7WsOChjC8TdJDBBuBWg==}
|
resolution: {integrity: sha512-ZqH0xTEeSeJF77vy8rZDxHEV8JMaN0khdg6ptpnbBfc56J5jt6wS3NlHK8M0ZVlDqqZnXMS1vUO0b6rfmQodKw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-arm64-musl@3.0.1':
|
'@drop-oss/droplet-linux-arm64-musl@3.2.0':
|
||||||
resolution: {integrity: sha512-oOjvGETlrJGC1RlNhUoVS9N89Rn/0DqBauVz3BBFjJTKSd5jU3/gLzwgmfkKDGVEU5lyGPAn2WQroiESEG9wdA==}
|
resolution: {integrity: sha512-TTw44PggYfp3RJkvNhXH89duuuvONEA8c8oRBCzCczRf3hDnbzCQLaB1UlnIlESsJZXXiFSDIBV2/0kkpB+Ukg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-riscv64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-riscv64-gnu@3.2.0':
|
||||||
resolution: {integrity: sha512-Zf3gUsWq9Hqb275MOi7PJDhmJz7Qa/Y1XMen880bxPaOeDFqFOoKUxUr2/qv1MYp6tT3zO27NprGsHirYWqsyA==}
|
resolution: {integrity: sha512-Ee/PfkoG8pm/9C3LFXJleIi5N8V5cK+44p+iDaneAo6gj5k67zYzuga3mJVswTgd3fncG1cw+xPqBl4PUWc1pg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-x64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-x64-gnu@3.2.0':
|
||||||
resolution: {integrity: sha512-sskblycJdtNJVnRHjPHhwHkQUfQNaDIWDzXOzEaBPOcDKqYA7od7VMDAseqBkrKDn7l8bBUtRXFAipdsO8hffw==}
|
resolution: {integrity: sha512-L2M/MEoe5Y74MTtzpEWHIvdyRSPLgM1WLzpb/xRNCWe8d6FcUFDgdMlbd6rDj5t4Q6JEzyMIHUciVRaYIv+ShA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-x64-musl@3.0.1':
|
'@drop-oss/droplet-linux-x64-musl@3.2.0':
|
||||||
resolution: {integrity: sha512-lh+1M6UAf5+ET1/ZEFRsB3shFHjkT/9Ql9akr/vyUue91TWPmP71meqVkCugWDhP6lxBt56jg2VVrJfmPAsK6w==}
|
resolution: {integrity: sha512-F/uQUAHWbhiiAtoyKHQHPgjG7jJd8pQX6sCgdf5ufCdwFLvHEdu9pO0qN+xpzaACceIKX4Vip0vUwQwEzYhAKA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@drop-oss/droplet-win32-arm64-msvc@3.0.1':
|
'@drop-oss/droplet-win32-arm64-msvc@3.2.0':
|
||||||
resolution: {integrity: sha512-caQDPoDNJyyJXUEijw+hGTy0wmCrW5efTqBwnvMcQ282EOilg1d5WeJ31pfEcuLYF4MK1t9uaLcG6jZ9YLtzEQ==}
|
resolution: {integrity: sha512-x7i1KKL8vQGcXbKIyH56LCEdQxLKNEk/KFjuD/YGrbBJ/+Q+fh46hLK+Sx4I/HzPHecd5g3xc2kVgO7+DgjhYA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@drop-oss/droplet-win32-x64-msvc@3.0.1':
|
'@drop-oss/droplet-win32-x64-msvc@3.2.0':
|
||||||
resolution: {integrity: sha512-bp8KwewF/T3JkVeJWkg86U3b0cGQD9i8k92x6HYPtnF5nLPAb2UIUEJgmYYFNPFe36RECBV7PIIG0ujdT1ELQw==}
|
resolution: {integrity: sha512-lC8a456IQ0ArzX40IlStolV4GIdl26xF9PikcuQ9r+n4VDqWSHb8A0Wwj87leU3QdoMu+Y2nlA1QHKgpVSEuoQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@drop-oss/droplet@3.0.1':
|
'@drop-oss/droplet@3.2.0':
|
||||||
resolution: {integrity: sha512-YhtgpwNqEHO8R03yf9Xb5LXuaLWkQvY+2lxOD1PwzpGI5V9PKlDE+x1IJBmdBF5bDPDGk9MxQidGtnYQuAEBEA==}
|
resolution: {integrity: sha512-+3zw3MPriMrj8HlKAq2VTlXEPOXN0homusjmQcBRzVx7GjtGvb5Y9YIHs16qfn8zdTEDi5twrtsUBQYkVjU2bQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
|
|
||||||
'@emnapi/core@1.5.0':
|
'@emnapi/core@1.4.5':
|
||||||
resolution: {integrity: sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==}
|
resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==}
|
||||||
|
|
||||||
'@emnapi/runtime@1.5.0':
|
'@emnapi/core@1.6.0':
|
||||||
resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==}
|
resolution: {integrity: sha512-zq/ay+9fNIJJtJiZxdTnXS20PllcYMX3OE23ESc4HK/bdYu3cOWYVhsOhVnXALfU/uqJIxn5NBPd9z4v+SfoSg==}
|
||||||
|
|
||||||
|
'@emnapi/runtime@1.4.5':
|
||||||
|
resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==}
|
||||||
|
|
||||||
|
'@emnapi/runtime@1.6.0':
|
||||||
|
resolution: {integrity: sha512-obtUmAHTMjll499P+D9A3axeJFlhdjOWdKUNs/U6QIGT7V5RjcUW1xToAzjvmgTSQhDbYn/NwfTRoJcQ2rNBxA==}
|
||||||
|
|
||||||
|
'@emnapi/wasi-threads@1.0.4':
|
||||||
|
resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==}
|
||||||
|
|
||||||
'@emnapi/wasi-threads@1.1.0':
|
'@emnapi/wasi-threads@1.1.0':
|
||||||
resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==}
|
resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==}
|
||||||
@ -851,8 +860,8 @@ packages:
|
|||||||
'@napi-rs/wasm-runtime@0.2.12':
|
'@napi-rs/wasm-runtime@0.2.12':
|
||||||
resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}
|
resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}
|
||||||
|
|
||||||
'@napi-rs/wasm-runtime@1.0.5':
|
'@napi-rs/wasm-runtime@1.0.7':
|
||||||
resolution: {integrity: sha512-TBr9Cf9onSAS2LQ2+QHx6XcC6h9+RIzJgbqG3++9TUZSH204AwEy5jg3BTQ0VATsyoGj4ee49tN/y6rvaOOtcg==}
|
resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==}
|
||||||
|
|
||||||
'@nodelib/fs.scandir@2.1.5':
|
'@nodelib/fs.scandir@2.1.5':
|
||||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||||
@ -1804,6 +1813,9 @@ packages:
|
|||||||
'@twemoji/parser@16.0.0':
|
'@twemoji/parser@16.0.0':
|
||||||
resolution: {integrity: sha512-jmuIjkp3OIaEemwMy3sArBwZSuZkRqmueGwRe2Zk4cFzbUJISFBJSZLDUUBNIgq3c+nY49ideYN2OiII6JUqwA==}
|
resolution: {integrity: sha512-jmuIjkp3OIaEemwMy3sArBwZSuZkRqmueGwRe2Zk4cFzbUJISFBJSZLDUUBNIgq3c+nY49ideYN2OiII6JUqwA==}
|
||||||
|
|
||||||
|
'@tybys/wasm-util@0.10.0':
|
||||||
|
resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==}
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||||
|
|
||||||
@ -5802,56 +5814,72 @@ snapshots:
|
|||||||
jsonfile: 5.0.0
|
jsonfile: 5.0.0
|
||||||
universalify: 0.1.2
|
universalify: 0.1.2
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-arm64@3.0.1':
|
'@drop-oss/droplet-darwin-arm64@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-universal@3.0.1':
|
'@drop-oss/droplet-darwin-universal@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-darwin-x64@3.0.1':
|
'@drop-oss/droplet-darwin-x64@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-arm64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-arm64-gnu@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-arm64-musl@3.0.1':
|
'@drop-oss/droplet-linux-arm64-musl@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-riscv64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-riscv64-gnu@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-x64-gnu@3.0.1':
|
'@drop-oss/droplet-linux-x64-gnu@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-linux-x64-musl@3.0.1':
|
'@drop-oss/droplet-linux-x64-musl@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-win32-arm64-msvc@3.0.1':
|
'@drop-oss/droplet-win32-arm64-msvc@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet-win32-x64-msvc@3.0.1':
|
'@drop-oss/droplet-win32-x64-msvc@3.2.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@drop-oss/droplet@3.0.1':
|
'@drop-oss/droplet@3.2.0':
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@drop-oss/droplet-darwin-arm64': 3.0.1
|
'@drop-oss/droplet-darwin-arm64': 3.2.0
|
||||||
'@drop-oss/droplet-darwin-universal': 3.0.1
|
'@drop-oss/droplet-darwin-universal': 3.2.0
|
||||||
'@drop-oss/droplet-darwin-x64': 3.0.1
|
'@drop-oss/droplet-darwin-x64': 3.2.0
|
||||||
'@drop-oss/droplet-linux-arm64-gnu': 3.0.1
|
'@drop-oss/droplet-linux-arm64-gnu': 3.2.0
|
||||||
'@drop-oss/droplet-linux-arm64-musl': 3.0.1
|
'@drop-oss/droplet-linux-arm64-musl': 3.2.0
|
||||||
'@drop-oss/droplet-linux-riscv64-gnu': 3.0.1
|
'@drop-oss/droplet-linux-riscv64-gnu': 3.2.0
|
||||||
'@drop-oss/droplet-linux-x64-gnu': 3.0.1
|
'@drop-oss/droplet-linux-x64-gnu': 3.2.0
|
||||||
'@drop-oss/droplet-linux-x64-musl': 3.0.1
|
'@drop-oss/droplet-linux-x64-musl': 3.2.0
|
||||||
'@drop-oss/droplet-win32-arm64-msvc': 3.0.1
|
'@drop-oss/droplet-win32-arm64-msvc': 3.2.0
|
||||||
'@drop-oss/droplet-win32-x64-msvc': 3.0.1
|
'@drop-oss/droplet-win32-x64-msvc': 3.2.0
|
||||||
|
|
||||||
'@emnapi/core@1.5.0':
|
'@emnapi/core@1.4.5':
|
||||||
|
dependencies:
|
||||||
|
'@emnapi/wasi-threads': 1.0.4
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@emnapi/core@1.6.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emnapi/wasi-threads': 1.1.0
|
'@emnapi/wasi-threads': 1.1.0
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@emnapi/runtime@1.5.0':
|
'@emnapi/runtime@1.4.5':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@emnapi/runtime@1.6.0':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@emnapi/wasi-threads@1.0.4':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
optional: true
|
optional: true
|
||||||
@ -6228,15 +6256,15 @@ snapshots:
|
|||||||
|
|
||||||
'@napi-rs/wasm-runtime@0.2.12':
|
'@napi-rs/wasm-runtime@0.2.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emnapi/core': 1.5.0
|
'@emnapi/core': 1.4.5
|
||||||
'@emnapi/runtime': 1.5.0
|
'@emnapi/runtime': 1.4.5
|
||||||
'@tybys/wasm-util': 0.10.1
|
'@tybys/wasm-util': 0.10.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@napi-rs/wasm-runtime@1.0.5':
|
'@napi-rs/wasm-runtime@1.0.7':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emnapi/core': 1.5.0
|
'@emnapi/core': 1.6.0
|
||||||
'@emnapi/runtime': 1.5.0
|
'@emnapi/runtime': 1.6.0
|
||||||
'@tybys/wasm-util': 0.10.1
|
'@tybys/wasm-util': 0.10.1
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
@ -6722,7 +6750,7 @@ snapshots:
|
|||||||
|
|
||||||
'@oxc-minify/binding-wasm32-wasi@0.87.0':
|
'@oxc-minify/binding-wasm32-wasi@0.87.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@napi-rs/wasm-runtime': 1.0.5
|
'@napi-rs/wasm-runtime': 1.0.7
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxc-minify/binding-win32-arm64-msvc@0.87.0':
|
'@oxc-minify/binding-win32-arm64-msvc@0.87.0':
|
||||||
@ -6807,7 +6835,7 @@ snapshots:
|
|||||||
|
|
||||||
'@oxc-parser/binding-wasm32-wasi@0.87.0':
|
'@oxc-parser/binding-wasm32-wasi@0.87.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@napi-rs/wasm-runtime': 1.0.5
|
'@napi-rs/wasm-runtime': 1.0.7
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxc-parser/binding-win32-arm64-msvc@0.70.0':
|
'@oxc-parser/binding-win32-arm64-msvc@0.70.0':
|
||||||
@ -6870,7 +6898,7 @@ snapshots:
|
|||||||
|
|
||||||
'@oxc-transform/binding-wasm32-wasi@0.87.0':
|
'@oxc-transform/binding-wasm32-wasi@0.87.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@napi-rs/wasm-runtime': 1.0.5
|
'@napi-rs/wasm-runtime': 1.0.7
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxc-transform/binding-win32-arm64-msvc@0.87.0':
|
'@oxc-transform/binding-win32-arm64-msvc@0.87.0':
|
||||||
@ -7258,6 +7286,11 @@ snapshots:
|
|||||||
|
|
||||||
'@twemoji/parser@16.0.0': {}
|
'@twemoji/parser@16.0.0': {}
|
||||||
|
|
||||||
|
'@tybys/wasm-util@0.10.0':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
|
- '@prisma/client'
|
||||||
|
- '@prisma/engines'
|
||||||
|
- '@tailwindcss/oxide'
|
||||||
- esbuild
|
- esbuild
|
||||||
|
- prisma
|
||||||
|
|
||||||
shamefullyHoist: true
|
shamefullyHoist: true
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
-- AlterEnum
|
||||||
|
ALTER TYPE "MetadataSource" ADD VALUE 'Steam';
|
||||||
|
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX "GameTag_name_idx";
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "GameTag_name_idx" ON "GameTag" USING GIST ("name" gist_trgm_ops(siglen=32));
|
||||||
@ -5,6 +5,7 @@ enum MetadataSource {
|
|||||||
IGDB
|
IGDB
|
||||||
Metacritic
|
Metacritic
|
||||||
OpenCritic
|
OpenCritic
|
||||||
|
Steam
|
||||||
}
|
}
|
||||||
|
|
||||||
model Game {
|
model Game {
|
||||||
|
|||||||
@ -17,7 +17,8 @@ const StoreRead = type({
|
|||||||
company: "string?",
|
company: "string?",
|
||||||
companyActions: "string = 'published,developed'",
|
companyActions: "string = 'published,developed'",
|
||||||
|
|
||||||
sort: "'default' | 'newest' | 'recent' = 'default'",
|
sort: "'default' | 'newest' | 'recent' | 'name' = 'default'",
|
||||||
|
order: "'asc' | 'desc' = 'desc'",
|
||||||
});
|
});
|
||||||
|
|
||||||
export default defineEventHandler(async (h3) => {
|
export default defineEventHandler(async (h3) => {
|
||||||
@ -101,10 +102,13 @@ export default defineEventHandler(async (h3) => {
|
|||||||
switch (options.sort) {
|
switch (options.sort) {
|
||||||
case "default":
|
case "default":
|
||||||
case "newest":
|
case "newest":
|
||||||
sort.mReleased = "desc";
|
sort.mReleased = options.order;
|
||||||
break;
|
break;
|
||||||
case "recent":
|
case "recent":
|
||||||
sort.created = "desc";
|
sort.created = options.order;
|
||||||
|
break;
|
||||||
|
case "name":
|
||||||
|
sort.mName = options.order;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,4 +123,4 @@ export default defineEventHandler(async (h3) => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return { results, count };
|
return { results, count };
|
||||||
});
|
});
|
||||||
1022
server/internal/metadata/steam.ts
Normal file
1022
server/internal/metadata/steam.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,11 +5,13 @@ import { GiantBombProvider } from "../internal/metadata/giantbomb";
|
|||||||
import { IGDBProvider } from "../internal/metadata/igdb";
|
import { IGDBProvider } from "../internal/metadata/igdb";
|
||||||
import { ManualMetadataProvider } from "../internal/metadata/manual";
|
import { ManualMetadataProvider } from "../internal/metadata/manual";
|
||||||
import { PCGamingWikiProvider } from "../internal/metadata/pcgamingwiki";
|
import { PCGamingWikiProvider } from "../internal/metadata/pcgamingwiki";
|
||||||
import { logger } from "~~/server/internal/logging";
|
import { logger } from "../internal/logging";
|
||||||
|
import { SteamProvider } from "../internal/metadata/steam";
|
||||||
|
|
||||||
export default defineNitroPlugin(async (_nitro) => {
|
export default defineNitroPlugin(async (_nitro) => {
|
||||||
const metadataProviders = [
|
const metadataProviders = [
|
||||||
GiantBombProvider,
|
GiantBombProvider,
|
||||||
|
SteamProvider,
|
||||||
PCGamingWikiProvider,
|
PCGamingWikiProvider,
|
||||||
IGDBProvider,
|
IGDBProvider,
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user