Compare commits
No commits in common. "15e5a21277f487174f66dcc6113edf2aae2265bd" and "a90f06218126547a1e3c681515895c8f0efbd3d3" have entirely different histories.
15e5a21277
...
a90f062181
11 changed files with 7 additions and 82 deletions
|
@ -1,38 +0,0 @@
|
||||||
<template>
|
|
||||||
<div id="friend-sidebar">
|
|
||||||
<div id="server-title">
|
|
||||||
<h3>Direct Messages</h3>
|
|
||||||
</div>
|
|
||||||
<verticalSpacer />
|
|
||||||
<div id="direct-message-list">
|
|
||||||
<UserEntry v-for="user of friends" :user="user" :name="user.display_name || user.username"
|
|
||||||
:href="`/me/${user.uuid}`"/>
|
|
||||||
<!-- <Channel v-for="channel of channels" :name="channel.name"
|
|
||||||
:uuid="channel.uuid" :current-uuid="(route.params.channelId as string)"
|
|
||||||
:href="`/servers/${route.params.serverId}/channels/${channel.uuid}`" /> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
const { fetchFriends } = useApi();
|
|
||||||
|
|
||||||
const friends = await fetchFriends()
|
|
||||||
|
|
||||||
console.log(friends)
|
|
||||||
|
|
||||||
definePageMeta({
|
|
||||||
layout: "client"
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#friend-sidebar {
|
|
||||||
padding-left: .5em;
|
|
||||||
padding-right: .5em;
|
|
||||||
border-right: 1px solid var(--padding-color);
|
|
||||||
background: var(--optional-channel-list-background);
|
|
||||||
background-color: var(--sidebar-background-color);
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,35 +0,0 @@
|
||||||
<template>
|
|
||||||
<NuxtLink class="user-item" :href="`/me/${user.uuid}`" tabindex="0">
|
|
||||||
<img v-if="props.user.avatar" class="user-avatar" :src="props.user.avatar" :alt="props.user.display_name ?? props.user.username" />
|
|
||||||
<Icon v-else class="user-avatar" name="lucide:user" />
|
|
||||||
<span class="user-display-name">{{ props.user.display_name || props.user.username }}</span>
|
|
||||||
</NuxtLink>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import type { UserResponse } from '~/types/interfaces';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
|
||||||
user: UserResponse
|
|
||||||
}>();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.user-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
margin-top: .5em;
|
|
||||||
margin-bottom: .5em;
|
|
||||||
gap: .5em;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-avatar {
|
|
||||||
width: 2.3em;
|
|
||||||
height: 2.3em;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<span class="spacer"></span>
|
<div id="user-panel">
|
||||||
|
HELLO!!
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -12,10 +14,7 @@ const props = defineProps<{
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.spacer {
|
#user-panel {
|
||||||
height: 0.2dvh;
|
width: 100%;
|
||||||
display: block;
|
|
||||||
margin: 0.8dvh 0.2dvw;
|
|
||||||
background-color: var(--padding-color);
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -61,8 +61,7 @@ export interface UserResponse {
|
||||||
pronouns: string | null,
|
pronouns: string | null,
|
||||||
about: string | null,
|
about: string | null,
|
||||||
email?: string,
|
email?: string,
|
||||||
email_verified?: boolean,
|
email_verified?: boolean
|
||||||
friends_since: string | null,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StatsResponse {
|
export interface StatsResponse {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue