refactor: conditionally render patcher release stream for Windows platform
This commit is contained in:
1 parent
a6495ea353
commit
a925548ae9
1 file changed
+55
-52
+55
-52
@@ -1425,59 +1425,62 @@
|
|||||||
onclick={browse_osu_installation}>Browse</Button
|
onclick={browse_osu_installation}>Browse</Button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
{#if $platform === 'windows'}
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<Label class="text-sm" for="setting-custom-cursor">patcher release stream</Label>
|
<Label class="text-sm" for="setting-custom-cursor">patcher release stream</Label>
|
||||||
<div class="text-muted-foreground text-xs">test different versions of the patcher</div>
|
<div class="text-muted-foreground text-xs">
|
||||||
</div>
|
test different versions of the patcher
|
||||||
<div class="flex flex-row w-full">
|
</div>
|
||||||
<Select.Root
|
</div>
|
||||||
type="single"
|
<div class="flex flex-row w-full">
|
||||||
bind:value={$launcherStream}
|
<Select.Root
|
||||||
onValueChange={async (newStream) => {
|
type="single"
|
||||||
const isNet8Installed = await hasNet8();
|
bind:value={$launcherStream}
|
||||||
if (!isNet8Installed) {
|
onValueChange={async (newStream) => {
|
||||||
launcherStream.set('stable');
|
const isNet8Installed = await hasNet8();
|
||||||
sileo.error({
|
if (!isNet8Installed) {
|
||||||
title: 'Hmm...',
|
launcherStream.set('stable');
|
||||||
description: '.NET 8.0 Desktop Runtime not found!',
|
sileo.error({
|
||||||
fill: '#181825',
|
title: 'Hmm...',
|
||||||
styles: {
|
description: '.NET 8.0 Desktop Runtime not found!',
|
||||||
description: 'text-center!',
|
fill: '#181825',
|
||||||
},
|
styles: {
|
||||||
button: {
|
description: 'text-center!',
|
||||||
title: 'Download .NET 8.0',
|
},
|
||||||
onClick: async () =>
|
button: {
|
||||||
await openURL(
|
title: 'Download .NET 8.0',
|
||||||
'https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-8.0.22-windows-x64-installer'
|
onClick: async () =>
|
||||||
),
|
await openURL(
|
||||||
},
|
'https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-8.0.22-windows-x64-installer'
|
||||||
});
|
),
|
||||||
return;
|
},
|
||||||
}
|
});
|
||||||
$userSettings.value('patcherStream').set(newStream);
|
return;
|
||||||
launcherStream.set(newStream);
|
}
|
||||||
await $userSettings.save();
|
$userSettings.value('patcherStream').set(newStream);
|
||||||
}}
|
launcherStream.set(newStream);
|
||||||
>
|
await $userSettings.save();
|
||||||
<Select.Trigger
|
}}
|
||||||
class="border-theme-800 bg-theme-950 !text-muted-foreground font-semibold"
|
|
||||||
>
|
>
|
||||||
<div class="flex flex-row items-center gap-2 font-normal text-foreground">
|
<Select.Trigger
|
||||||
{$launcherStream}
|
class="border-theme-800 bg-theme-950 !text-muted-foreground font-semibold"
|
||||||
</div>
|
>
|
||||||
</Select.Trigger>
|
<div class="flex flex-row items-center gap-2 font-normal text-foreground">
|
||||||
<Select.Content class="bg-theme-950 border border-theme-950 rounded-lg">
|
{$launcherStream}
|
||||||
{#each $launcherStreams as stream (stream)}
|
</div>
|
||||||
<Select.Item value={stream}>
|
</Select.Trigger>
|
||||||
<div class="flex flex-row gap-2 items-center">
|
<Select.Content class="bg-theme-950 border border-theme-950 rounded-lg">
|
||||||
{stream}
|
{#each $launcherStreams as stream (stream)}
|
||||||
</div>
|
<Select.Item value={stream}>
|
||||||
</Select.Item>
|
<div class="flex flex-row gap-2 items-center">
|
||||||
{/each}
|
{stream}
|
||||||
</Select.Content>
|
</div>
|
||||||
</Select.Root>
|
</Select.Item>
|
||||||
</div>
|
{/each}
|
||||||
|
</Select.Content>
|
||||||
|
</Select.Root>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if selectedView === 'login'}
|
{:else if selectedView === 'login'}
|
||||||
|
|||||||
Reference in new issue
Block a user