Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

Commit 4334f5f

Browse files
committed
feat: style fixes and store button now uses in-app
1 parent ba1c11f commit 4334f5f

3 files changed

Lines changed: 36 additions & 26 deletions

File tree

main/components/GameOptions/Launch.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
</span>
130130
</li>
131131
</ListboxOption>
132-
<span v-else class="italic text-zinc-400 py-2 pr-9 pl-3"
133-
>No auto-discovered layers.</span
132+
<li v-else class="italic text-zinc-400 py-2 pr-9 pl-3"
133+
>No auto-discovered layers.</li
134134
>
135135
<h1 class="text-white text-sm font-semibold bg-zinc-900 py-2 px-2">
136136
Manually added
@@ -170,8 +170,8 @@
170170
</span>
171171
</li>
172172
</ListboxOption>
173-
<span v-else class="italic text-zinc-400 py-2 pr-9 pl-3"
174-
>No manually added layers.</span
173+
<li v-else class="italic text-zinc-400 py-2 pr-9 pl-3"
174+
>No manually added layers.</li
175175
>
176176
</ListboxOptions>
177177
</transition>

main/pages/library/[id]/index.vue

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,18 @@
3535
@resume="() => resumeDownload()"
3636
:status="status"
3737
/>
38-
<a
39-
:href="remoteUrl"
40-
target="_blank"
41-
type="button"
38+
<NuxtLink
4239
class="transition-transform duration-300 hover:scale-105 active:scale-95 inline-flex items-center rounded-md bg-zinc-800/50 px-6 font-semibold text-white shadow-xl backdrop-blur-sm hover:bg-zinc-800/80 uppercase font-display"
40+
:to="{
41+
path: '/store',
42+
query: {
43+
gameId: game.id,
44+
},
45+
}"
4346
>
4447
<BuildingStorefrontIcon class="mr-2 size-5" aria-hidden="true" />
4548
Store
46-
</a>
49+
</NuxtLink>
4750
</div>
4851
</div>
4952

@@ -171,7 +174,11 @@
171174
</div>
172175

173176
<div class="space-y-6">
174-
<div v-if="versionOptions && versionOptions.length > 0 && currentVersionOption">
177+
<div
178+
v-if="
179+
versionOptions && versionOptions.length > 0 && currentVersionOption
180+
"
181+
>
175182
<Listbox as="div" v-model="installVersionIndex">
176183
<ListboxLabel class="block text-sm/6 font-medium text-zinc-100"
177184
>Version</ListboxLabel
@@ -188,7 +195,7 @@
188195
on
189196
{{ currentVersionOption.platform }} ({{
190197
formatKilobytes(
191-
currentVersionOption.size.installSize / 1024
198+
currentVersionOption.size.installSize / 1024,
192199
)
193200
}}B)</span
194201
>
@@ -233,7 +240,8 @@
233240
>{{ version.displayName || version.versionPath }} on
234241
{{ version.platform }} ({{
235242
formatKilobytes(
236-
versionOptions[installVersionIndex].size.installSize / 1024
243+
versionOptions[installVersionIndex].size
244+
.installSize / 1024,
237245
)
238246
}}B)</span
239247
>
@@ -314,8 +322,7 @@
314322
</div>
315323
<ul role="list" class="mt-2 divide-y divide-white/5">
316324
<li
317-
v-for="content in currentVersionOption
318-
.requiredContent"
325+
v-for="content in currentVersionOption.requiredContent"
319326
:key="content.versionId"
320327
:class="[
321328
!installDepsDisabled[content.versionId]
@@ -577,7 +584,7 @@ const mediaUrls = await Promise.all(
577584
game.value.mImageCarouselObjectIds.map(async (v) => {
578585
const src = await useObject(v);
579586
return src;
580-
})
587+
}),
581588
);
582589
583590
const htmlDescription = micromark(game.value.mDescription);
@@ -611,7 +618,9 @@ const installVersionIndex = ref(0);
611618
const installDir = ref(0);
612619
const installDepsDisabled = ref<{ [key: string]: boolean }>({});
613620
614-
const currentVersionOption = computed(() => versionOptions.value?.[installVersionIndex.value]);
621+
const currentVersionOption = computed(
622+
() => versionOptions.value?.[installVersionIndex.value],
623+
);
615624
async function install() {
616625
try {
617626
if (!versionOptions.value) throw new Error("Versions have not been loaded");
@@ -661,7 +670,7 @@ async function launch() {
661670
try {
662671
const fetchedLaunchOptions = await invoke<Array<{ name: string }>>(
663672
"get_launch_options",
664-
{ id: game.value.id }
673+
{ id: game.value.id },
665674
);
666675
if (fetchedLaunchOptions.length == 1) {
667676
await launchIndex(0);
@@ -676,7 +685,7 @@ async function launch() {
676685
description: `Drop failed to launch "${game.value.mName}": ${e}`,
677686
buttonText: "Close",
678687
},
679-
(e, c) => c()
688+
(e, c) => c(),
680689
);
681690
console.error(e);
682691
}
@@ -707,7 +716,7 @@ async function launchIndex(index: number) {
707716
description: `Drop failed to launch "${game.value.mName}": ${e}`,
708717
buttonText: "Close",
709718
},
710-
(e, c) => c()
719+
(e, c) => c(),
711720
);
712721
}
713722
}
@@ -731,7 +740,7 @@ async function kill() {
731740
description: `Drop failed to stop "${game.value.mName}": ${e}`,
732741
buttonText: "Close",
733742
},
734-
(e, c) => c()
743+
(e, c) => c(),
735744
);
736745
console.error(e);
737746
}

main/pages/store/index.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
<iframe :src="convertedStoreUrl" class="grow w-full h-full" />
33
</template>
44
<script setup lang="ts">
5-
import {
6-
ArrowTopRightOnSquareIcon,
7-
BuildingStorefrontIcon,
8-
} from "@heroicons/vue/20/solid";
9-
import { convertFileSrc, invoke } from "@tauri-apps/api/core";
5+
import { convertFileSrc } from "@tauri-apps/api/core";
106
11-
const convertedStoreUrl = convertFileSrc("store", "server");
7+
const route = useRoute();
8+
9+
const customRoute = route.query.gameId?.toString();
10+
11+
// This is necessary because convertFileSrc encodes the URI
12+
const convertedStoreUrl = convertFileSrc(`dummyvalue`, "server").replace("dummyvalue", `store/${customRoute}`);
1213
</script>

0 commit comments

Comments
 (0)