Skip to content

Commit

Permalink
feat(marketing): add 'Manage your servers' button
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 30, 2024
1 parent 03dcf8a commit d681372
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions apps/frontend/src/pages/servers/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@
Start your own Minecraft server directly on Modrinth. Add thousands of mods and invite
your friends to play, without the hassle of setup.
</h2>
<div class="relative flex w-fit flex-row gap-8">
<ButtonStyled color="brand" size="large">
<nuxt-link class="w-fit" to="#plan"> Start your server </nuxt-link>
</ButtonStyled>
<div class="relative flex w-full flex-wrap items-center gap-8 sm:w-fit">
<div class="flex w-full gap-4 text-center sm:w-fit">
<ButtonStyled color="brand" size="large">
<nuxt-link class="w-full sm:w-fit" to="#plan"> Start your server </nuxt-link>
</ButtonStyled>
<ButtonStyled color="purple" size="large" v-if="hasServers">

Check warning on line 41 in apps/frontend/src/pages/servers/index.vue

View workflow job for this annotation

GitHub Actions / Build, Test, and Lint

Attribute "v-if" should go before "size"
<nuxt-link class="w-full sm:w-fit" to="/servers/manage">
Manage your servers
</nuxt-link>
</ButtonStyled>
</div>
<UiServersPoweredByPyro class="!mt-0" />
</div>

Expand Down Expand Up @@ -570,6 +577,15 @@ const typingSpeed = 75;
const deletingSpeed = 25;
const pauseTime = 2000;
const { data: hasServers } = await useAsyncData("ServerListCountCheck", async () => {
try {
const response = await usePyroFetch("servers");
return response.servers && response.servers.length > 0;
} catch {
return false;
}
});
const startTyping = () => {
const currentWord = words[currentWordIndex.value];
if (isDeleting.value) {
Expand Down

0 comments on commit d681372

Please sign in to comment.