feat: rename some occurrences of guild back to server

This commit is contained in:
SauceyRed 2025-05-31 14:38:49 +02:00
parent 4eeb3a8c2a
commit aa710e0a4d
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7
6 changed files with 14 additions and 14 deletions

View file

@ -20,7 +20,7 @@ const route = useRoute();
async function generateInvite(): Promise<void> { async function generateInvite(): Promise<void> {
const createdInvite: InviteResponse | undefined = await fetchWithApi( const createdInvite: InviteResponse | undefined = await fetchWithApi(
`/guilds/${route.params.guildId}/invites`, `/guilds/${route.params.serverId}/invites`,
{ method: "POST", body: { custom_id: "oijewfoiewf" } } { method: "POST", body: { custom_id: "oijewfoiewf" } }
); );

View file

@ -10,8 +10,8 @@
<NuxtLink id="home-button" href="/"> <NuxtLink id="home-button" href="/">
<Icon name="lucide:house" class="white" size="2rem" /> <Icon name="lucide:house" class="white" size="2rem" />
</NuxtLink> </NuxtLink>
<div id="guilds-list"> <div id="servers-list">
<NuxtLink v-for="guild of guilds" :href="`/guilds/${guild.uuid}`"> <NuxtLink v-for="guild of guilds" :href="`/servers/${guild.uuid}`">
<Icon name="lucide:server" class="white" size="2rem" /> <Icon name="lucide:server" class="white" size="2rem" />
</NuxtLink> </NuxtLink>
</div> </div>
@ -169,7 +169,7 @@ const members = [
padding-bottom: 1dvh; padding-bottom: 1dvh;
} }
#guilds-list { #servers-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1dvh; gap: 1dvh;

View file

@ -5,7 +5,7 @@
<h3> <h3>
{{ server?.name }} {{ server?.name }}
<span> <span>
<button @click="showServerSettings"> <button @click="showGuildSettings">
<Icon name="lucide:settings" /> <Icon name="lucide:settings" />
</button> </button>
</span> </span>
@ -20,7 +20,7 @@
<div id="channels-list"> <div id="channels-list">
<Channel v-for="channel of channels" :name="channel.name" <Channel v-for="channel of channels" :name="channel.name"
:uuid="channel.uuid" :current-uuid="(route.params.channelId as string)" :uuid="channel.uuid" :current-uuid="(route.params.channelId as string)"
:href="`/guilds/${route.params.serverId}/channels/${channel.uuid}`" /> :href="`/servers/${route.params.serverId}/channels/${channel.uuid}`" />
</div> </div>
</div> </div>
<MessageArea :channel-url="channelUrlPath" /> <MessageArea :channel-url="channelUrlPath" />
@ -102,10 +102,10 @@ const members = [
onMounted(async () => { onMounted(async () => {
console.log("channelid: set loading to true"); console.log("channelid: set loading to true");
const serverUrl = `guilds/${route.params.serverId}`; const guildUrl = `guilds/${route.params.serverId}`;
server.value = await fetchWithApi(serverUrl); server.value = await fetchWithApi(guildUrl);
channels.value = await fetchWithApi(`${serverUrl}/channels`); channels.value = await fetchWithApi(`${guildUrl}/channels`);
console.log("channels:", channels.value); console.log("channels:", channels.value);
channel.value = await fetchWithApi(route.path); channel.value = await fetchWithApi(route.path);
console.log("channel:", channel.value); console.log("channel:", channel.value);
@ -114,7 +114,7 @@ onMounted(async () => {
console.log("channelid: set loading to false"); console.log("channelid: set loading to false");
}); });
function showServerSettings() { } function showGuildSettings() { }
function toggleInvitePopup(e: Event) { function toggleInvitePopup(e: Event) {
e.preventDefault(); e.preventDefault();

View file

@ -5,7 +5,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
const guild = await fetchWithApi(`/guilds/${useRoute().params.guildId}`); const guild = await fetchWithApi(`/guilds/${useRoute().params.serverId}`);
console.log("guild:", guild); console.log("guild:", guild);
</script> </script>

View file

@ -1,6 +1,6 @@
import type { UserResponse } from "~/types/interfaces" import type { UserResponse } from "~/types/interfaces"
export default async (guildId: string, memberId: string): Promise<UserResponse> => { export default async (serverId: string, memberId: string): Promise<UserResponse> => {
const user = await fetchWithApi(`/guilds/${guildId}/members/${memberId}`) as UserResponse; const user = await fetchWithApi(`/guilds/${serverId}/members/${memberId}`) as UserResponse;
return user; return user;
} }

View file

@ -1,6 +1,6 @@
import type { UserResponse } from "~/types/interfaces" import type { UserResponse } from "~/types/interfaces"
export default async (guildId: string, userId: string): Promise<UserResponse> => { export default async (serverId: string, userId: string): Promise<UserResponse> => {
const user = await fetchWithApi(`/users/${userId}`) as UserResponse; const user = await fetchWithApi(`/users/${userId}`) as UserResponse;
return user; return user;
} }