diff --git a/src/gql/home/mods.graphql b/src/gql/home/mods.graphql index b20d9582f..9ef635bd6 100644 --- a/src/gql/home/mods.graphql +++ b/src/gql/home/mods.graphql @@ -15,17 +15,14 @@ query GetMods($offset: Int!, $limit: Int!, $search: String, $order: Order, $orde alpha { id version - sml_version } beta { id version - sml_version } release { id version - sml_version } } compatibility { diff --git a/src/gql/mods/mod.graphql b/src/gql/mods/mod.graphql index 86a79f27c..1c857b51a 100644 --- a/src/gql/mods/mod.graphql +++ b/src/gql/mods/mod.graphql @@ -25,7 +25,6 @@ query GetMod($mod: String!) { } version created_at - sml_version game_version } beta { @@ -43,7 +42,6 @@ query GetMod($mod: String!) { } version created_at - sml_version game_version } release { @@ -61,7 +59,6 @@ query GetMod($mod: String!) { } version created_at - sml_version game_version } } diff --git a/src/gql/mods/versions.graphql b/src/gql/mods/versions.graphql index d292f5a27..8c5a05180 100644 --- a/src/gql/mods/versions.graphql +++ b/src/gql/mods/versions.graphql @@ -6,7 +6,6 @@ query GetModVersions($mod: ModID!, $limit: Int!, $offset: Int!) { id version stability - sml_version game_version downloads created_at diff --git a/src/gql/users/user.graphql b/src/gql/users/user.graphql index a75e8c5c0..f7d49eca3 100644 --- a/src/gql/users/user.graphql +++ b/src/gql/users/user.graphql @@ -17,17 +17,14 @@ query GetUser($user: UserID!) { alpha { id version - sml_version } beta { id version - sml_version } release { id version - sml_version } } compatibility { diff --git a/src/gql/versions/mod_version.graphql b/src/gql/versions/mod_version.graphql index fcd28b058..5c24ee76d 100644 --- a/src/gql/versions/mod_version.graphql +++ b/src/gql/versions/mod_version.graphql @@ -3,7 +3,6 @@ query GetModVersion($version: VersionID!) { id version stability - sml_version game_version downloads created_at diff --git a/src/lib/components/mods/ModCard.svelte b/src/lib/components/mods/ModCard.svelte index 9fb1e0012..5d924e4f3 100644 --- a/src/lib/components/mods/ModCard.svelte +++ b/src/lib/components/mods/ModCard.svelte @@ -13,9 +13,9 @@ 'id' | 'mod_reference' | 'name' | 'logo' | 'views' | 'downloads' | 'short_description' | 'compatibility' | 'tags' > & { latestVersions: { - alpha?: Maybe>; - beta?: Maybe>; - release?: Maybe>; + alpha?: Maybe>; + beta?: Maybe>; + release?: Maybe>; }; }; diff --git a/src/lib/components/mods/ModVersions.svelte b/src/lib/components/mods/ModVersions.svelte index ad4ef2501..ed84b51e8 100644 --- a/src/lib/components/mods/ModVersions.svelte +++ b/src/lib/components/mods/ModVersions.svelte @@ -50,7 +50,6 @@ {$t('version')} {$t('stability')} - SML {$t('version')} {$t('game-versions')} {$t('downloads')} {$t('upload-date')} @@ -62,7 +61,6 @@ toggleRow(version.id)}> {version.version} {version.stability} - {version.sml_version} {version.game_version} {prettyNumber(version.downloads)} {prettyDate(version.created_at)} @@ -141,7 +139,7 @@ {#if expandedVersions.has(version.id)} - +
{$t('size')}: {prettyBytes(version.size)}
{$t('hash')}: {version.hash}
diff --git a/src/lib/components/versions/VersionInfo.svelte b/src/lib/components/versions/VersionInfo.svelte index c2fba1574..430a1c698 100644 --- a/src/lib/components/versions/VersionInfo.svelte +++ b/src/lib/components/versions/VersionInfo.svelte @@ -3,10 +3,7 @@ import { prettyBytes, prettyDate, prettyNumber } from '$lib/utils/formatting'; import { getTranslate } from '@tolgee/svelte'; - export let version!: Pick< - Version, - 'created_at' | 'sml_version' | 'game_version' | 'size' | 'stability' | 'downloads' | 'hash' - >; + export let version!: Pick; export const { t } = getTranslate(); @@ -17,7 +14,6 @@

Info

{$t('entry.created-at')}: {prettyDate(version.created_at)}
{$t('downloads')}: {prettyNumber(version.downloads)}
- SML {$t('version')}: {version.sml_version}
{$t('game-versions')}: {version.game_version}
{$t('stability')}: {version.stability}
{$t('size')}: {prettyBytes(version.size)}
diff --git a/src/lib/utils/mod.ts b/src/lib/utils/mod.ts index 2ca7a218a..2772700e0 100644 --- a/src/lib/utils/mod.ts +++ b/src/lib/utils/mod.ts @@ -3,9 +3,9 @@ import minVersion from 'semver/ranges/min-version.js'; import type { Maybe, Version } from '$lib/generated'; export const modStatus = (latestVersions?: { - alpha?: Maybe>; - beta?: Maybe>; - release?: Maybe>; + alpha?: Maybe>; + beta?: Maybe>; + release?: Maybe>; }) => { if (!latestVersions) { return 'outdated'; @@ -14,10 +14,10 @@ export const modStatus = (latestVersions?: { let result: 'outdated' | 'own-risk' = 'outdated'; for (const releaseType of Object.keys(latestVersions)) { const version = latestVersions[releaseType]; - if (version && version.sml_version) { + if (version && version.game_version) { try { - if (satisfies(minVersion(version.sml_version), '>=3.0.0')) { - if (satisfies(minVersion(version.sml_version), '>=3.2.0')) { + if (satisfies(minVersion(version.game_version), '>=150216')) { + if (satisfies(minVersion(version.game_version), '>=173618')) { return undefined; } result = 'own-risk';