* feat: init selecting paper+purpur on purchase flow Signed-off-by: Evan Song <theevansong@gmail.com> * feat: properly implement Paper/Purpur in Platform Signed-off-by: Evan Song <theevansong@gmail.com> * chore: correct wording Signed-off-by: Evan Song <theevansong@gmail.com> * feat: redo platform modal Signed-off-by: Evan Song <theevansong@gmail.com> * Switch to HCaptcha for Auth-related captchas (#2945) * Switch to HCaptcha for Auth-related captchas * run fmt * fix hcaptcha not loading * fix: more robust loader dropdown logic Signed-off-by: Evan Song <theevansong@gmail.com> * fix: handle "not yet supported" install err Signed-off-by: Evan Song <theevansong@gmail.com> * chore: fix icon kerfuffles Signed-off-by: Evan Song <theevansong@gmail.com> * chore: improve vanilla install modal title Signed-off-by: Evan Song <theevansong@gmail.com> * fix: spacing Signed-off-by: Evan Song <theevansong@gmail.com> * chore: improve no loader state Signed-off-by: Evan Song <theevansong@gmail.com> * fix: type error Signed-off-by: Evan Song <theevansong@gmail.com> * chore: adjust mod version modal title Signed-off-by: Evan Song <theevansong@gmail.com> * chore: adjust modpack warning copy Signed-off-by: Evan Song <theevansong@gmail.com> * feat: vanilla empty state in content page Signed-off-by: Evan Song <theevansong@gmail.com> * chore: adjust copy Signed-off-by: Evan Song <theevansong@gmail.com> * chore: update icon Signed-off-by: Evan Song <theevansong@gmail.com> * fix: loader type Signed-off-by: Evan Song <theevansong@gmail.com> * fix: loader type Signed-off-by: Evan Song <theevansong@gmail.com> * feat: always show dropdown if possible Signed-off-by: Evan Song <theevansong@gmail.com> * chore: improve spacing Signed-off-by: Evan Song <theevansong@gmail.com> * chore: appear disabled Signed-off-by: Evan Song <theevansong@gmail.com> * h Signed-off-by: Evan Song <theevansong@gmail.com> * chore: if reinstalling, show it on the modal title Signed-off-by: Evan Song <theevansong@gmail.com> * feat: put it in the dropdown, they said Signed-off-by: Evan Song <theevansong@gmail.com> * chore: adjust style Signed-off-by: Evan Song <theevansong@gmail.com> * chore: sort paper-purpur versions desc Signed-off-by: Evan Song <theevansong@gmail.com> * fix: do not consider backup limit in reinstall prompt Signed-off-by: Evan Song <theevansong@gmail.com> * feat: backup locking, plugin support * fix: content type error Signed-off-by: Evan Song <theevansong@gmail.com> * fix: casing Signed-off-by: Evan Song <theevansong@gmail.com> * fix: plugins pt 2 * feat: backups, mrpack * fix: type errors come on Signed-off-by: Evan Song <theevansong@gmail.com> * fix: spacing Signed-off-by: Evan Song <theevansong@gmail.com> * fix: type maxing * chore: show copy button on allocation rows Signed-off-by: Evan Song <theevansong@gmail.com> * feat: suspend improvement --------- Signed-off-by: Evan Song <theevansong@gmail.com> Co-authored-by: Evan Song <theevansong@gmail.com> Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: Evan Song <52982404+ferothefox@users.noreply.github.com>
91 lines
2.7 KiB
Vue
91 lines
2.7 KiB
Vue
<template>
|
|
<div class="flex w-full flex-col gap-1 rounded-2xl bg-table-alternateRow p-2">
|
|
<div
|
|
v-for="loader in vanillaLoaders"
|
|
:key="loader.name"
|
|
class="group relative flex items-center justify-between rounded-2xl p-2 pr-2.5 hover:bg-bg"
|
|
>
|
|
<UiServersLoaderSelectorCard
|
|
:loader="loader"
|
|
:is-current="isCurrentLoader(loader.name)"
|
|
:loader-version="data.loader_version"
|
|
:current-loader="data.loader"
|
|
@select="selectLoader"
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
<h2 class="mb-2 px-2 text-lg font-bold text-contrast">Mod loaders</h2>
|
|
<div class="flex w-full flex-col gap-1 rounded-2xl bg-table-alternateRow p-2">
|
|
<div
|
|
v-for="loader in modLoaders"
|
|
:key="loader.name"
|
|
class="group relative flex items-center justify-between rounded-2xl p-2 pr-2.5 hover:bg-bg"
|
|
>
|
|
<UiServersLoaderSelectorCard
|
|
:loader="loader"
|
|
:is-current="isCurrentLoader(loader.name)"
|
|
:loader-version="data.loader_version"
|
|
:current-loader="data.loader"
|
|
@select="selectLoader"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
<h2 class="mb-2 px-2 text-lg font-bold text-contrast">Plugin loaders</h2>
|
|
<div class="flex w-full flex-col gap-1 rounded-2xl bg-table-alternateRow p-2">
|
|
<div
|
|
v-for="loader in pluginLoaders"
|
|
:key="loader.name"
|
|
class="group relative flex items-center justify-between rounded-2xl p-2 pr-2.5 hover:bg-bg"
|
|
>
|
|
<UiServersLoaderSelectorCard
|
|
:loader="loader"
|
|
:is-current="isCurrentLoader(loader.name)"
|
|
:loader-version="data.loader_version"
|
|
:current-loader="data.loader"
|
|
@select="selectLoader"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps<{
|
|
data: {
|
|
loader: string | null;
|
|
loader_version: string | null;
|
|
};
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
(e: "selectLoader", loader: string): void;
|
|
}>();
|
|
|
|
const vanillaLoaders = [{ name: "Vanilla" as const, displayName: "Vanilla" }];
|
|
|
|
const modLoaders = [
|
|
{ name: "Fabric" as const, displayName: "Fabric" },
|
|
{ name: "Quilt" as const, displayName: "Quilt" },
|
|
{ name: "Forge" as const, displayName: "Forge" },
|
|
{ name: "NeoForge" as const, displayName: "NeoForge" },
|
|
];
|
|
|
|
const pluginLoaders = [
|
|
{ name: "Paper" as const, displayName: "Paper" },
|
|
{ name: "Purpur" as const, displayName: "Purpur" },
|
|
];
|
|
|
|
const isCurrentLoader = (loaderName: string) => {
|
|
return props.data.loader?.toLowerCase() === loaderName.toLowerCase();
|
|
};
|
|
|
|
const selectLoader = (loader: string) => {
|
|
emit("selectLoader", loader);
|
|
};
|
|
</script>
|