Skip to content

Commit

Permalink
feat: remove mod stability info from display (due to be replaced)
Browse files Browse the repository at this point in the history
bug: causes no Latest Version to display on mods with no `release` stability versions
  • Loading branch information
budak7273 committed Sep 16, 2024
1 parent bdb832a commit 9953330
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
7 changes: 2 additions & 5 deletions src/lib/components/mods/ModLatestVersions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
};
const stabilities = {
release: 'new_releases',
beta: 'warning',
alpha: 'report'
release: 'new_releases'
};
export let latestVersions!: ILatestVersions;
Expand All @@ -44,8 +42,7 @@
<a
href="{base}/mod/{modId}/version/{latestVersions[stability].id}/"
class="text-yellow-500 underline"
title="Click to view patch notes for this version"
>Version {latestVersions[stability].version} ({stability})</a>
title="Click to view patch notes for this version">Version {latestVersions[stability].version}</a>
<div>{prettyDate(latestVersions[stability].created_at)}</div>
</div>
<div class="text-1xl col-span-3 h-auto w-auto p-2.5">
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/mods/ModVersions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<thead>
<tr>
<th>{$t('version')}</th>
<th>{$t('stability')}</th>
<th>{$t('game-versions')}</th>
<th>{$t('downloads')}</th>
<th>{$t('upload-date')}</th>
Expand All @@ -60,7 +59,6 @@
{#each $versions.data.getMod.versions as version}
<tr on:click={() => toggleRow(version.id)}>
<td>{version.version}</td>
<td>{version.stability}</td>
<td>{version.game_version}</td>
<td>{prettyNumber(version.downloads)}</td>
<td>{prettyDate(version.created_at)}</td>
Expand Down
14 changes: 0 additions & 14 deletions src/lib/components/versions/VersionForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,6 @@

<form use:form>
<div class="grid grid-flow-row gap-6">
<div class="grid grid-flow-row gap-2">
<label class="label">
<span>{$t('stability')} *</span>
<select class="select" bind:value={$data.stability}>
<option value="alpha">Alpha</option>
<option value="beta">Beta</option>
<option value="release">Release</option>
</select>
</label>
<ValidationMessage for="stability" let:messages={message}>
<span class="validation-message">{message || ''}</span>
</ValidationMessage>
</div>

{#if !editing}
<div class="grid grid-flow-row gap-2">
<label for="file">{$t('file')} *</label>
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/versions/VersionInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { prettyBytes, prettyDate, prettyNumber } from '$lib/utils/formatting';
import { getTranslate } from '@tolgee/svelte';
export let version!: Pick<Version, 'created_at' | 'game_version' | 'size' | 'stability' | 'downloads' | 'hash'>;
export let version!: Pick<Version, 'created_at' | 'game_version' | 'size' | 'downloads' | 'hash'>;
export const { t } = getTranslate();
</script>
Expand All @@ -15,7 +15,6 @@
<span><strong>{$t('entry.created-at')}:</strong> {prettyDate(version.created_at)}</span><br />
<span><strong>{$t('downloads')}:</strong> {prettyNumber(version.downloads)}</span><br />
<span><strong>{$t('game-versions')}:</strong> {version.game_version}</span><br />
<span><strong>{$t('stability')}:</strong> {version.stability}</span><br />
<span><strong>{$t('size')}:</strong> {prettyBytes(version.size)}</span><br />
<span><strong>{$t('hash')}:</strong> {version.hash}</span>
</div>
Expand Down

0 comments on commit 9953330

Please sign in to comment.