diff --git a/components/UserInterface/Button.vue b/components/Button.vue similarity index 100% rename from components/UserInterface/Button.vue rename to components/Button.vue diff --git a/components/Guild/ChannelEntry.vue b/components/Channel.vue similarity index 100% rename from components/Guild/ChannelEntry.vue rename to components/Channel.vue diff --git a/components/Popups/CropPopup.vue b/components/CropPopup.vue similarity index 100% rename from components/Popups/CropPopup.vue rename to components/CropPopup.vue diff --git a/components/Popups/InvitePopup.vue b/components/InvitePopup.vue similarity index 100% rename from components/Popups/InvitePopup.vue rename to components/InvitePopup.vue diff --git a/components/Popups/Loading.vue b/components/Loading.vue similarity index 100% rename from components/Popups/Loading.vue rename to components/Loading.vue diff --git a/components/Me/AddFriend.vue b/components/Me/AddFriend.vue deleted file mode 100644 index 49aa112..0000000 --- a/components/Me/AddFriend.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/Me/DirectMessagesSidebar.vue b/components/Me/DirectMessagesSidebar.vue deleted file mode 100644 index cfe07fd..0000000 --- a/components/Me/DirectMessagesSidebar.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/Me/FriendsList.vue b/components/Me/FriendsList.vue deleted file mode 100644 index 44c606f..0000000 --- a/components/Me/FriendsList.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/Member/MemberEntry.vue b/components/MemberEntry.vue similarity index 96% rename from components/Member/MemberEntry.vue rename to components/MemberEntry.vue index 1ea4170..ed4cd48 100644 --- a/components/Member/MemberEntry.vue +++ b/components/MemberEntry.vue @@ -10,6 +10,7 @@ diff --git a/components/UserArea.vue b/components/UserArea.vue new file mode 100644 index 0000000..d922c3f --- /dev/null +++ b/components/UserArea.vue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/components/UserInterface/VerticalSpacer.vue b/components/UserInterface/VerticalSpacer.vue deleted file mode 100644 index 8ac1bd6..0000000 --- a/components/UserInterface/VerticalSpacer.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/components/User/UserPopup.vue b/components/UserPopup.vue similarity index 100% rename from components/User/UserPopup.vue rename to components/UserPopup.vue diff --git a/composables/api.ts b/composables/api.ts index 11c2226..d2ca7a0 100644 --- a/composables/api.ts +++ b/composables/api.ts @@ -1,4 +1,4 @@ -import type { ChannelResponse, GuildMemberResponse, GuildResponse, MessageResponse, StatsResponse, UserResponse } from "~/types/interfaces"; +import type { ChannelResponse, GuildMemberResponse, GuildResponse, MessageResponse, StatsResponse } from "~/types/interfaces"; export const useApi = () => { async function fetchGuilds(): Promise { @@ -24,26 +24,14 @@ export const useApi = () => { async function fetchMember(guildId: string, memberId: string): Promise { return await fetchWithApi(`/guilds/${guildId}/members/${memberId}`); } - + async function fetchUsers() { return await fetchWithApi(`/users`); } - + async function fetchUser(userId: string) { return await fetchWithApi(`/users/${userId}`); } - - async function fetchFriends(): Promise { - return await fetchWithApi('/me/friends') - } - - async function addFriend(username: string): Promise { - return await fetchWithApi('/me/friends', { method: "POST", body: { username } }); - } - - async function removeFriend(userId: string): Promise { - return await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" }); - } async function fetchMessages(channelId: string, options?: { amount?: number, offset?: number }): Promise { return await fetchWithApi(`/channels/${channelId}/messages`, { query: { amount: options?.amount ?? 100, offset: options?.offset ?? 0 } }); @@ -71,9 +59,6 @@ export const useApi = () => { fetchMember, fetchUsers, fetchUser, - fetchFriends, - addFriend, - removeFriend, fetchMessages, fetchMessage, fetchInstanceStats, diff --git a/composables/auth.ts b/composables/auth.ts index e3a2fa2..ebe27de 100644 --- a/composables/auth.ts +++ b/composables/auth.ts @@ -106,7 +106,7 @@ export const useAuth = () => { } return { - clearAuth, + accessToken, register, login, logout, diff --git a/layouts/client.vue b/layouts/client.vue index de1e029..966e60a 100644 --- a/layouts/client.vue +++ b/layouts/client.vue @@ -10,7 +10,7 @@
- +
diff --git a/pages/index.vue b/pages/index.vue index cb5f57e..41deadf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,11 +1,23 @@ - - \ No newline at end of file diff --git a/pages/me/friends.vue b/pages/me/friends.vue deleted file mode 100644 index a0d0384..0000000 --- a/pages/me/friends.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/me/index.vue b/pages/me/index.vue deleted file mode 100644 index e875c56..0000000 --- a/pages/me/index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/servers/[serverId]/channels/[channelId].vue b/pages/servers/[serverId]/channels/[channelId].vue index e7ab32a..4873094 100644 --- a/pages/servers/[serverId]/channels/[channelId].vue +++ b/pages/servers/[serverId]/channels/[channelId].vue @@ -18,7 +18,7 @@
-
@@ -33,7 +33,6 @@