Skip to content

Commit

Permalink
Fixed README, added a vercel.json file, added ellipsis on Dashboard Text
Browse files Browse the repository at this point in the history
  • Loading branch information
fowled committed Apr 19, 2024
1 parent af77b9e commit 2f67426
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 14 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![Client](https://github.com/addmango/mango/actions/workflows/client.yml/badge.svg)](https://github.com/addmango/mango/actions/workflows/client.yml)
[![Server](https://github.com/addmango/mango/actions/workflows/server.yml/badge.svg)](https://github.com/addmango/mango/actions/workflows/server.yml)
![status](https://img.shields.io/badge/status-active-success)
![users](https://img.shields.io/badge/dynamic/json?color=blueviolet&label=users&query=users&url=https%3A%2F%2Fapi.mango.bot%2Fstats)
![servers](https://img.shields.io/badge/dynamic/json?color=ff69b4&label=servers&query=guilds&url=https%3A%2F%2Fapi.mango.bot%2Fstats)
![users](https://img.shields.io/badge/dynamic/json?color=blueviolet&label=users&query=users&url=https%3A%2F%2Fapi.bot.fowled.dev%2Fstats)
![servers](https://img.shields.io/badge/dynamic/json?color=ff69b4&label=servers&query=guilds&url=https%3A%2F%2Fapi.bot.fowled.dev%2Fstats)
![stars](https://img.shields.io/github/stars/addmango/mango)
![rating](https://img.shields.io/badge/rating-4.8%2F5-orange)

Expand Down
4 changes: 2 additions & 2 deletions website/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { router } from "main";
const user = session.value?.user;
const navigation = [
{ name: "Features", link: "/" },
{ name: "Features", link: "/#features" },
{ name: "Support server", link: "https://discord.gg/9aT626ABdq" },
{ name: "Organization", link: "https://github.com/addmango" },
{ name: "Repository", link: "https://github.com/fowled/mango" },
{ name: "Upvote", link: "https://top.gg/bot/497443144632238090" },
];
Expand Down
42 changes: 32 additions & 10 deletions website/src/routes/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function refreshGuildsList(silent: boolean) {
if (toRaw(guilds.value).toString() !== mutualGuildsFromAPI.toString()) {
guilds.value = mutualGuildsFromAPI;
await supabase.auth.updateUser({ data: { guilds: mutualGuildsFromAPI } });
}
Expand All @@ -47,14 +47,31 @@ console.log(guilds);
<Navbar />

<section id="dashboard" class="dark:text-white container mx-auto text-center my-12">
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl">{{guilds.length > 0 ? "Select a server to get started!" : "Add Mango to a server you manage!" }}</p>

<ul v-if="guilds.length > 0" class="flex flex-wrap flex-col sm:flex-row justify-center mx-auto sm:gap-x-12 my-14 sm:space-x-4 space-x-0 sm:space-y-0">
<router-link v-for="guild in guilds" :to="`manage/${guild.id}`" class="transition transform sm:hover:-translate-y-1 space-y-4">
<img alt="guild's icon" class="w-48 h-48 mx-auto rounded-full" :src="guild.icon ? `https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png?size=256` : '/assets/discord_default.png'" />
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl">
{{ guilds.length > 0 ? "Select a server to get started!" : "Add Mango to a server you manage!" }}
</p>

<ul
v-if="guilds.length > 0"
class="flex flex-wrap flex-col sm:flex-row justify-center mx-auto sm:gap-x-12 my-14 sm:space-x-4 space-x-0 sm:space-y-0"
>
<router-link
v-for="guild in guilds"
:to="`manage/${guild.id}`"
class="transition transform sm:hover:-translate-y-1 space-y-4"
>
<img
alt="guild's icon"
class="w-48 h-48 mx-auto rounded-full"
:src="
guild.icon
? `https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png?size=256`
: '/assets/discord_default.png'
"
/>

<div class="text-lg leading-6 font-medium space-y-1">
<h3>{{ guild.name }}</h3>
<h3 class="max-w-[175px] text-ellipsis whitespace-nowrap overflow-hidden">{{ guild.name }}</h3>

<p class="text-indigo-600">Configure server</p>
</div>
Expand All @@ -64,16 +81,21 @@ console.log(guilds);
<div class="my-14 max-w-fit mx-auto" v-else>
<a href="https://go.fowled.club/mango" class="space-y-4 transition transform sm:hover:-translate-y-1">
<img alt="guild's icon" class="w-48 h-48 mx-auto rounded-full" src="/assets/discord_default.png" />

<div class="text-lg leading-6 font-medium space-y-1">
<h3>Add Mango</h3>

<p class="text-indigo-600">To configure</p>
</div>
</a>
</div>

<button v-if="guilds.length > 0" @click="refreshGuildsList(false)" :class="loading && 'cursor-not-allowed !bg-blue-700 hover:!bg-blue-800 focus:!ring-blue-300'" class="text-white bg-green-600 hover:bg-green-700 focus:ring-green-300 focus:ring-4 font-medium rounded-lg text-sm px-5 py-3 text-center md:mr-0">
<button
v-if="guilds.length > 0"
@click="refreshGuildsList(false)"
:class="loading && 'cursor-not-allowed !bg-blue-700 hover:!bg-blue-800 focus:!ring-blue-300'"
class="text-white bg-green-600 hover:bg-green-700 focus:ring-green-300 focus:ring-4 font-medium rounded-lg text-sm px-5 py-3 text-center md:mr-0"
>
{{ loading ? "⌛ Fetching..." : "🔄 Refresh" }}
</button>
</section>
Expand Down
1 change: 1 addition & 0 deletions website/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }] }

0 comments on commit 2f67426

Please sign in to comment.