Skip to content

Commit

Permalink
QoL tweaks: Auto switch back to README, added download count, view on…
Browse files Browse the repository at this point in the history
… TS link.
  • Loading branch information
ebkr committed Mar 2, 2025
1 parent 70b4391 commit a28fe99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/v2/MarkdownRender.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ function captureClick(e: Event) {
margin: 0 0px 0 auto;
overflow-y: auto;
height: max(200px, 100%);
overscroll-behavior: contain;
}
</style>
12 changes: 10 additions & 2 deletions src/components/v2/OnlinePreviewPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import ThunderstoreDownloaderProvider, {
} from 'src/providers/ror2/downloading/ThunderstoreDownloaderProvider';
import ThunderstoreCombo from 'src/model/ThunderstoreCombo';
import { getVersionAsThunderstoreVersion } from 'src/r2mm/manager/PackageDexieStore';
import Link from 'components/Link.vue';
const store = useStore();
Expand Down Expand Up @@ -51,6 +52,7 @@ function fetchChangelog(modToLoad: ThunderstoreMod) {
}
function fetchAll(modToLoad: ThunderstoreMod) {
setActiveTab("README");
loadingPanel.value = true;
buildDependencies(modToLoad)
.then(value => dependencies.value = value)
Expand Down Expand Up @@ -88,7 +90,7 @@ function getReadableDate(date: string): string {
}
function getReadableCategories(mod: ThunderstoreMod) {
return mod.getCategories().join(", ");
return mod.getCategories().join(", ") || "None";
}
const markdownToRender = computed(() => {
Expand All @@ -105,9 +107,15 @@ const markdownToRender = computed(() => {
<div class="c-preview-panel">
<div class="c-preview-panel__header">
<h1 class="title">{{ mod.getName() }}</h1>
<h2 class="subtitle">By {{ mod.getOwner() }}</h2>
<h2 class="subtitle">
By {{ mod.getOwner() }}
</h2>
<p class='card-timestamp'><strong>Downloads:</strong> {{mod.getDownloadCount()}}</p>
<p class='card-timestamp'><strong>Last updated:</strong> {{getReadableDate(mod.getDateUpdated())}}</p>
<p class='card-timestamp'><strong>Categories:</strong> {{getReadableCategories(mod)}}</p>
<p class="card-timestamp">
<Link target="_blank" tag="a" :url="props.mod.getPackageUrl()">View on Thunderstore</Link>
</p>
<div class="margin-top">
<p class="description">{{ mod.getDescription() }}</p>
</div>
Expand Down

0 comments on commit a28fe99

Please sign in to comment.