2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-07-01 12:55:45 +03:00
|
|
|
<template>
|
2023-05-19 14:52:15 +03:00
|
|
|
<MkSpacer :contentMax="narrow ? 800 : 1100">
|
2022-12-28 06:19:56 +02:00
|
|
|
<div ref="rootEl" class="ftskorzw" :class="{ wide: !narrow }" style="container-type: inline-size;">
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="main _gaps">
|
2022-07-01 12:55:45 +03:00
|
|
|
<!-- TODO -->
|
2023-09-30 22:53:52 +03:00
|
|
|
<!-- <div class="punished" v-if="user.isSuspended"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSuspended }}</div> -->
|
|
|
|
<!-- <div class="punished" v-if="user.isSilenced"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSilenced }}</div> -->
|
2022-07-01 12:55:45 +03:00
|
|
|
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="profile _gaps">
|
2023-05-19 14:52:15 +03:00
|
|
|
<MkAccountMoved v-if="user.movedTo" :movedTo="user.movedTo"/>
|
2023-03-13 02:46:33 +02:00
|
|
|
<MkRemoteCaution v-if="user.host != null" :href="user.url ?? user.uri!" class="warn"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
|
2023-01-06 02:56:33 +02:00
|
|
|
<div :key="user.id" class="main _panel">
|
2022-07-01 12:55:45 +03:00
|
|
|
<div class="banner-container" :style="style">
|
|
|
|
<div ref="bannerEl" class="banner" :style="style"></div>
|
|
|
|
<div class="fade"></div>
|
|
|
|
<div class="title">
|
2023-02-08 13:07:19 +02:00
|
|
|
<MkUserName class="name" :user="user" :nowrap="true"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
<div class="bottom">
|
|
|
|
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
2023-09-30 22:53:52 +03:00
|
|
|
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ph-shield ph-bold ph-lg"></i></span>
|
|
|
|
<span v-if="user.isLocked" :title="i18n.ts.isLocked"><i class="ph-lock ph-bold ph-lg"></i></span>
|
2023-10-01 01:46:42 +03:00
|
|
|
<span v-if="user.isBot" :title="i18n.ts.isBot"><i class="ph-robot ph-bold ph-lg"></i></span>
|
2023-04-13 07:17:32 +03:00
|
|
|
<button v-if="!isEditingMemo && !memoDraft" class="_button add-note-button" @click="showMemoTextarea">
|
2023-09-30 22:53:52 +03:00
|
|
|
<i class="ph-pencil-line ph-bold pg-lg"/> {{ i18n.ts.addMemo }}
|
2023-04-13 07:17:32 +03:00
|
|
|
</button>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-20 16:24:26 +03:00
|
|
|
<span v-if="$i && $i.id != user.id && user.isFollowed" class="followed">{{ i18n.ts.followsYou }}</span>
|
2022-07-01 12:55:45 +03:00
|
|
|
<div v-if="$i" class="actions">
|
2023-09-30 22:53:52 +03:00
|
|
|
<button class="menu _button" @click="menu"><i class="ph-dots-three ph-bold ph-lg"></i></button>
|
2022-07-01 12:55:45 +03:00
|
|
|
<MkFollowButton v-if="$i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-16 07:18:11 +02:00
|
|
|
<MkAvatar class="avatar" :user="user" indicator/>
|
2022-07-01 12:55:45 +03:00
|
|
|
<div class="title">
|
2023-02-08 13:07:19 +02:00
|
|
|
<MkUserName :user="user" :nowrap="false" class="name"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
<div class="bottom">
|
|
|
|
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
2023-09-30 22:53:52 +03:00
|
|
|
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ph-shield ph-bold ph-lg"></i></span>
|
|
|
|
<span v-if="user.isLocked" :title="i18n.ts.isLocked"><i class="ph-lock ph-bold ph-lg"></i></span>
|
2023-10-01 01:46:42 +03:00
|
|
|
<span v-if="user.isBot" :title="i18n.ts.isBot"><i class="ph-robot ph-bold ph-lg"></i></span>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-06 03:51:06 +03:00
|
|
|
<div v-if="user.roles.length > 0" class="roles">
|
|
|
|
<span v-for="role in user.roles" :key="role.id" v-tooltip="role.description" class="role" :style="{ '--color': role.color }">
|
2023-06-24 01:51:44 +03:00
|
|
|
<MkA v-adaptive-bg :to="`/roles/${role.id}`">
|
|
|
|
<img v-if="role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="role.iconUrl"/>
|
|
|
|
{{ role.name }}
|
|
|
|
</MkA>
|
2023-05-06 03:51:06 +03:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="iAmModerator" class="moderationNote">
|
2023-05-19 14:52:15 +03:00
|
|
|
<MkTextarea v-if="editModerationNote || (moderationNote != null && moderationNote !== '')" v-model="moderationNote" manualSave>
|
2023-09-12 09:49:18 +03:00
|
|
|
<template #label>{{ i18n.ts.moderationNote }}</template>
|
2023-05-06 03:51:06 +03:00
|
|
|
</MkTextarea>
|
2023-05-09 08:28:27 +03:00
|
|
|
<div v-else>
|
2023-09-12 09:49:18 +03:00
|
|
|
<MkButton small @click="editModerationNote = true">{{ i18n.ts.addModerationNote }}</MkButton>
|
2023-05-09 08:28:27 +03:00
|
|
|
</div>
|
2023-05-06 03:51:06 +03:00
|
|
|
</div>
|
2023-04-13 07:17:32 +03:00
|
|
|
<div v-if="isEditingMemo || memoDraft" class="memo" :class="{'no-memo': !memoDraft}">
|
|
|
|
<div class="heading" v-text="i18n.ts.memo"/>
|
|
|
|
<textarea
|
|
|
|
ref="memoTextareaEl"
|
|
|
|
v-model="memoDraft"
|
|
|
|
rows="1"
|
|
|
|
@focus="isEditingMemo = true"
|
|
|
|
@blur="updateMemo"
|
|
|
|
@input="adjustMemoTextarea"
|
|
|
|
/>
|
|
|
|
</div>
|
2022-07-01 12:55:45 +03:00
|
|
|
<div class="description">
|
2023-01-15 23:06:28 +02:00
|
|
|
<MkOmit>
|
2023-05-17 05:42:50 +03:00
|
|
|
<Mfm v-if="user.description" :text="user.description" :isNote="false" :author="user" :i="$i"/>
|
2023-01-15 23:06:28 +02:00
|
|
|
<p v-else class="empty">{{ i18n.ts.noAccountDescription }}</p>
|
|
|
|
</MkOmit>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
|
|
|
<div class="fields system">
|
|
|
|
<dl v-if="user.location" class="field">
|
2023-10-01 01:46:42 +03:00
|
|
|
<dt class="name"><i class="ph-map-pin ph-bold ph-lg ti-fw"></i> {{ i18n.ts.location }}</dt>
|
2022-07-01 12:55:45 +03:00
|
|
|
<dd class="value">{{ user.location }}</dd>
|
|
|
|
</dl>
|
|
|
|
<dl v-if="user.birthday" class="field">
|
2023-10-01 01:46:42 +03:00
|
|
|
<dt class="name"><i class="ph-cake ph-bold ph-lg ti-fw"></i> {{ i18n.ts.birthday }}</dt>
|
2023-04-01 08:01:57 +03:00
|
|
|
<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ i18n.t('yearsOld', { age }) }})</dd>
|
2022-07-01 12:55:45 +03:00
|
|
|
</dl>
|
|
|
|
<dl class="field">
|
2023-10-01 01:46:42 +03:00
|
|
|
<dt class="name"><i class="ph-calendar ph-bold ph-lg ti-fw"></i> {{ i18n.ts.registeredDate }}</dt>
|
2023-01-01 10:11:33 +02:00
|
|
|
<dd class="value">{{ dateString(user.createdAt) }} (<MkTime :time="user.createdAt"/>)</dd>
|
2022-07-01 12:55:45 +03:00
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<div v-if="user.fields.length > 0" class="fields">
|
|
|
|
<dl v-for="(field, i) in user.fields" :key="i" class="field">
|
|
|
|
<dt class="name">
|
2022-12-29 03:14:44 +02:00
|
|
|
<Mfm :text="field.name" :plain="true" :colored="false"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
</dt>
|
|
|
|
<dd class="value">
|
2022-12-29 03:14:44 +02:00
|
|
|
<Mfm :text="field.value" :author="user" :i="$i" :colored="false"/>
|
2023-10-01 01:46:42 +03:00
|
|
|
<i v-if="user.verifiedLinks.includes(field.value)" v-tooltip:dialog="i18n.ts.verifiedLink" class="ph-seal-check ph-bold ph-lg" :class="$style.verifiedLink"></i>
|
2022-07-01 12:55:45 +03:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<div class="status">
|
2023-07-18 13:50:23 +03:00
|
|
|
<MkA :to="userPage(user)">
|
2022-07-01 12:55:45 +03:00
|
|
|
<b>{{ number(user.notesCount) }}</b>
|
2022-07-20 16:24:26 +03:00
|
|
|
<span>{{ i18n.ts.notes }}</span>
|
2022-07-01 12:55:45 +03:00
|
|
|
</MkA>
|
2023-07-18 13:50:23 +03:00
|
|
|
<MkA v-if="isFfVisibleForMe(user)" :to="userPage(user, 'following')">
|
2022-07-01 12:55:45 +03:00
|
|
|
<b>{{ number(user.followingCount) }}</b>
|
2022-07-20 16:24:26 +03:00
|
|
|
<span>{{ i18n.ts.following }}</span>
|
2022-07-01 12:55:45 +03:00
|
|
|
</MkA>
|
2023-07-18 13:50:23 +03:00
|
|
|
<MkA v-if="isFfVisibleForMe(user)" :to="userPage(user, 'followers')">
|
2022-07-01 12:55:45 +03:00
|
|
|
<b>{{ number(user.followersCount) }}</b>
|
2022-07-20 16:24:26 +03:00
|
|
|
<span>{{ i18n.ts.followers }}</span>
|
2022-07-01 12:55:45 +03:00
|
|
|
</MkA>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="contents _gaps">
|
|
|
|
<div v-if="user.pinnedNotes.length > 0" class="_gaps">
|
2023-03-31 08:14:30 +03:00
|
|
|
<MkNote v-for="note in user.pinnedNotes" :key="note.id" class="note _panel" :note="note" :pinned="true"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
2022-07-20 16:24:26 +03:00
|
|
|
<MkInfo v-else-if="$i && $i.id === user.id">{{ i18n.ts.userPagePinTip }}</MkInfo>
|
2022-07-01 12:55:45 +03:00
|
|
|
<template v-if="narrow">
|
|
|
|
<XPhotos :key="user.id" :user="user"/>
|
2023-01-06 06:40:17 +02:00
|
|
|
<XActivity :key="user.id" :user="user"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
</template>
|
2023-09-23 02:40:00 +03:00
|
|
|
<MkStickyContainer>
|
2023-09-23 02:44:30 +03:00
|
|
|
<template #header>
|
|
|
|
<MkTab v-model="noteview" :class="$style.tab">
|
|
|
|
<option :value="null">{{ i18n.ts.notes }}</option>
|
|
|
|
<option value="replies">{{ i18n.ts.notesAndReplies }}</option>
|
|
|
|
<option value="files">{{ i18n.ts.withFiles }}</option>
|
|
|
|
</MkTab>
|
|
|
|
</template>
|
|
|
|
<MkNotes v-if="!disableNotes" :class="$style.tl" :noGap="true" :pagination="pagination"/>
|
2023-09-23 02:40:00 +03:00
|
|
|
</MkStickyContainer>
|
2023-09-23 02:47:57 +03:00
|
|
|
</div>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
2023-01-06 06:40:17 +02:00
|
|
|
<div v-if="!narrow" class="sub _gaps" style="container-type: inline-size;">
|
2022-07-01 12:55:45 +03:00
|
|
|
<XPhotos :key="user.id" :user="user"/>
|
2023-01-06 06:40:17 +02:00
|
|
|
<XActivity :key="user.id" :user="user"/>
|
2023-09-22 18:47:33 +03:00
|
|
|
<XListenBrainz v-if="user.listenbrainz && listenbrainzdata" :key="user.id" :user="user"/>
|
2022-07-01 12:55:45 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MkSpacer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-04-13 07:17:32 +03:00
|
|
|
import { defineAsyncComponent, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
2023-09-04 07:33:38 +03:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-09-22 18:47:33 +03:00
|
|
|
import MkTab from '@/components/MkTab.vue';
|
2023-03-31 08:14:30 +03:00
|
|
|
import MkNote from '@/components/MkNote.vue';
|
2022-08-30 18:24:33 +03:00
|
|
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
2023-04-08 08:16:26 +03:00
|
|
|
import MkAccountMoved from '@/components/MkAccountMoved.vue';
|
2022-08-30 18:24:33 +03:00
|
|
|
import MkRemoteCaution from '@/components/MkRemoteCaution.vue';
|
2023-05-06 03:51:06 +03:00
|
|
|
import MkTextarea from '@/components/MkTextarea.vue';
|
2023-01-15 23:06:28 +02:00
|
|
|
import MkOmit from '@/components/MkOmit.vue';
|
2022-09-06 12:21:49 +03:00
|
|
|
import MkInfo from '@/components/MkInfo.vue';
|
2023-05-09 08:28:27 +03:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2023-09-19 10:37:43 +03:00
|
|
|
import { getScrollPosition } from '@/scripts/scroll.js';
|
|
|
|
import { getUserMenu } from '@/scripts/get-user-menu.js';
|
|
|
|
import number from '@/filters/number.js';
|
|
|
|
import { userPage } from '@/filters/user.js';
|
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { useRouter } from '@/router.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { $i, iAmModerator } from '@/account.js';
|
|
|
|
import { dateString } from '@/filters/date.js';
|
|
|
|
import { confetti } from '@/scripts/confetti.js';
|
2023-02-22 04:00:34 +02:00
|
|
|
import MkNotes from '@/components/MkNotes.vue';
|
2023-09-19 10:37:43 +03:00
|
|
|
import { api } from '@/os.js';
|
|
|
|
import { isFfVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
|
2023-09-22 18:47:33 +03:00
|
|
|
|
2023-09-15 08:28:29 +03:00
|
|
|
function calcAge(birthdate: string): number {
|
|
|
|
const date = new Date(birthdate);
|
|
|
|
const now = new Date();
|
|
|
|
|
|
|
|
let yearDiff = now.getFullYear() - date.getFullYear();
|
|
|
|
const monthDiff = now.getMonth() - date.getMonth();
|
|
|
|
const pastDate = now.getDate() < date.getDate();
|
|
|
|
|
|
|
|
if (monthDiff < 0 || (monthDiff === 0 && pastDate)) {
|
|
|
|
yearDiff--;
|
|
|
|
}
|
|
|
|
|
|
|
|
return yearDiff;
|
|
|
|
}
|
|
|
|
|
2022-07-01 12:55:45 +03:00
|
|
|
const XPhotos = defineAsyncComponent(() => import('./index.photos.vue'));
|
|
|
|
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
|
2023-09-22 04:57:24 +03:00
|
|
|
const XListenBrainz = defineAsyncComponent(() => import("./index.listenbrainz.vue"));
|
2022-07-01 12:55:45 +03:00
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{
|
2023-09-04 07:33:38 +03:00
|
|
|
user: Misskey.entities.UserDetailed;
|
2023-03-13 02:46:33 +02:00
|
|
|
/** Test only; MkNotes currently causes problems in vitest */
|
|
|
|
disableNotes: boolean;
|
2022-07-01 12:55:45 +03:00
|
|
|
}>(), {
|
2023-03-13 02:46:33 +02:00
|
|
|
disableNotes: false,
|
2022-07-01 12:55:45 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
let parallaxAnimationId = $ref<null | number>(null);
|
|
|
|
let narrow = $ref<null | boolean>(null);
|
|
|
|
let rootEl = $ref<null | HTMLElement>(null);
|
|
|
|
let bannerEl = $ref<null | HTMLElement>(null);
|
2023-04-13 07:17:32 +03:00
|
|
|
let memoTextareaEl = $ref<null | HTMLElement>(null);
|
|
|
|
let memoDraft = $ref(props.user.memo);
|
|
|
|
let isEditingMemo = $ref(false);
|
2023-05-06 03:51:06 +03:00
|
|
|
let moderationNote = $ref(props.user.moderationNote);
|
2023-05-09 08:28:27 +03:00
|
|
|
let editModerationNote = $ref(false);
|
2023-09-22 18:47:33 +03:00
|
|
|
let noteview = $ref<string | null>(null);
|
2023-05-06 03:51:06 +03:00
|
|
|
|
2023-09-22 04:31:59 +03:00
|
|
|
let listenbrainzdata = false;
|
|
|
|
if (props.user.listenbrainz) {
|
|
|
|
try {
|
|
|
|
const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, {
|
|
|
|
method: 'GET',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
},
|
|
|
|
});
|
|
|
|
const data = await response.json();
|
|
|
|
if (data.payload.listens && data.payload.listens.length !== 0) {
|
|
|
|
listenbrainzdata = true;
|
|
|
|
}
|
2023-09-22 04:57:24 +03:00
|
|
|
} catch (err) {
|
2023-09-22 04:31:59 +03:00
|
|
|
listenbrainzdata = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-06 03:51:06 +03:00
|
|
|
watch($$(moderationNote), async () => {
|
|
|
|
await os.api('admin/update-user-note', { userId: props.user.id, text: moderationNote });
|
|
|
|
});
|
2022-07-01 12:55:45 +03:00
|
|
|
|
2023-02-12 04:10:37 +02:00
|
|
|
const pagination = {
|
|
|
|
endpoint: 'users/notes' as const,
|
|
|
|
limit: 10,
|
|
|
|
params: computed(() => ({
|
|
|
|
userId: props.user.id,
|
2023-09-22 18:47:33 +03:00
|
|
|
includeReplies: noteview === 'replies' || noteview === 'files',
|
|
|
|
withFiles: noteview === 'files',
|
2023-02-12 04:10:37 +02:00
|
|
|
})),
|
|
|
|
};
|
|
|
|
|
2022-07-01 12:55:45 +03:00
|
|
|
const style = $computed(() => {
|
|
|
|
if (props.user.bannerUrl == null) return {};
|
|
|
|
return {
|
|
|
|
backgroundImage: `url(${ props.user.bannerUrl })`,
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
const age = $computed(() => {
|
|
|
|
return calcAge(props.user.birthday);
|
|
|
|
});
|
|
|
|
|
|
|
|
function menu(ev) {
|
2023-08-01 09:32:03 +03:00
|
|
|
const { menu, cleanup } = getUserMenu(props.user, router);
|
|
|
|
os.popupMenu(menu, ev.currentTarget ?? ev.target).finally(cleanup);
|
2022-07-01 12:55:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function parallaxLoop() {
|
|
|
|
parallaxAnimationId = window.requestAnimationFrame(parallaxLoop);
|
|
|
|
parallax();
|
|
|
|
}
|
|
|
|
|
|
|
|
function parallax() {
|
|
|
|
const banner = bannerEl as any;
|
|
|
|
if (banner == null) return;
|
|
|
|
|
|
|
|
const top = getScrollPosition(rootEl);
|
|
|
|
|
|
|
|
if (top < 0) return;
|
|
|
|
|
|
|
|
const z = 1.75; // 奥行き(小さいほど奥)
|
|
|
|
const pos = -(top / z);
|
|
|
|
banner.style.backgroundPosition = `center calc(50% - ${pos}px)`;
|
|
|
|
}
|
|
|
|
|
2023-04-13 07:17:32 +03:00
|
|
|
function showMemoTextarea() {
|
|
|
|
isEditingMemo = true;
|
|
|
|
nextTick(() => {
|
|
|
|
memoTextareaEl?.focus();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function adjustMemoTextarea() {
|
|
|
|
if (!memoTextareaEl) return;
|
|
|
|
memoTextareaEl.style.height = '0px';
|
|
|
|
memoTextareaEl.style.height = `${memoTextareaEl.scrollHeight}px`;
|
|
|
|
}
|
|
|
|
|
|
|
|
async function updateMemo() {
|
|
|
|
await api('users/update-memo', {
|
|
|
|
memo: memoDraft,
|
|
|
|
userId: props.user.id,
|
|
|
|
});
|
|
|
|
isEditingMemo = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
watch([props.user], () => {
|
|
|
|
memoDraft = props.user.memo;
|
|
|
|
});
|
|
|
|
|
2022-07-01 12:55:45 +03:00
|
|
|
onMounted(() => {
|
|
|
|
window.requestAnimationFrame(parallaxLoop);
|
|
|
|
narrow = rootEl!.clientWidth < 1000;
|
2023-01-06 06:25:49 +02:00
|
|
|
|
|
|
|
if (props.user.birthday) {
|
|
|
|
const m = new Date().getMonth() + 1;
|
|
|
|
const d = new Date().getDate();
|
|
|
|
const bm = parseInt(props.user.birthday.split('-')[1]);
|
|
|
|
const bd = parseInt(props.user.birthday.split('-')[2]);
|
|
|
|
if (m === bm && d === bd) {
|
2023-01-06 13:25:08 +02:00
|
|
|
confetti({
|
2023-01-12 14:02:26 +02:00
|
|
|
duration: 1000 * 4,
|
2023-01-06 13:25:08 +02:00
|
|
|
});
|
2023-01-06 06:25:49 +02:00
|
|
|
}
|
|
|
|
}
|
2023-04-13 07:17:32 +03:00
|
|
|
nextTick(() => {
|
|
|
|
adjustMemoTextarea();
|
|
|
|
});
|
2022-07-01 12:55:45 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
if (parallaxAnimationId) {
|
|
|
|
window.cancelAnimationFrame(parallaxAnimationId);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 11:29:39 +02:00
|
|
|
<style lang="scss" scoped>
|
2022-07-01 12:55:45 +03:00
|
|
|
.ftskorzw {
|
|
|
|
|
|
|
|
> .main {
|
|
|
|
|
|
|
|
> .punished {
|
|
|
|
font-size: 0.8em;
|
|
|
|
padding: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .profile {
|
|
|
|
|
|
|
|
> .main {
|
|
|
|
position: relative;
|
2023-01-02 05:15:26 +02:00
|
|
|
overflow: clip;
|
2022-07-01 12:55:45 +03:00
|
|
|
|
|
|
|
> .banner-container {
|
|
|
|
position: relative;
|
|
|
|
height: 250px;
|
2023-01-02 05:15:26 +02:00
|
|
|
overflow: clip;
|
2022-07-01 12:55:45 +03:00
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
|
|
|
|
> .banner {
|
|
|
|
height: 100%;
|
|
|
|
background-color: #4c5e6d;
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
box-shadow: 0 0 128px rgba(0, 0, 0, 0.5) inset;
|
|
|
|
will-change: background-position;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fade {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 78px;
|
|
|
|
background: linear-gradient(transparent, rgba(#000, 0.7));
|
|
|
|
}
|
|
|
|
|
|
|
|
> .followed {
|
|
|
|
position: absolute;
|
|
|
|
top: 12px;
|
|
|
|
left: 12px;
|
|
|
|
padding: 4px 8px;
|
|
|
|
color: #fff;
|
|
|
|
background: rgba(0, 0, 0, 0.7);
|
|
|
|
font-size: 0.7em;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .actions {
|
|
|
|
position: absolute;
|
|
|
|
top: 12px;
|
|
|
|
right: 12px;
|
|
|
|
-webkit-backdrop-filter: var(--blur, blur(8px));
|
|
|
|
backdrop-filter: var(--blur, blur(8px));
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
|
|
|
padding: 8px;
|
|
|
|
border-radius: 24px;
|
|
|
|
|
|
|
|
> .menu {
|
|
|
|
vertical-align: bottom;
|
|
|
|
height: 31px;
|
|
|
|
width: 31px;
|
|
|
|
color: #fff;
|
|
|
|
text-shadow: 0 0 8px #000;
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .koudoku {
|
|
|
|
margin-left: 4px;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 0 8px 154px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
> .name {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
line-height: 32px;
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 1.8em;
|
|
|
|
text-shadow: 0 0 8px #000;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .bottom {
|
|
|
|
> * {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 16px;
|
|
|
|
line-height: 20px;
|
|
|
|
opacity: 0.8;
|
|
|
|
|
|
|
|
&.username {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
2023-04-13 07:17:32 +03:00
|
|
|
|
|
|
|
> .add-note-button {
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
|
|
|
color: #fff;
|
|
|
|
-webkit-backdrop-filter: var(--blur, blur(8px));
|
|
|
|
backdrop-filter: var(--blur, blur(8px));
|
|
|
|
border-radius: 24px;
|
|
|
|
padding: 4px 8px;
|
|
|
|
font-size: 80%;
|
|
|
|
}
|
2022-07-01 12:55:45 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
display: none;
|
|
|
|
text-align: center;
|
|
|
|
padding: 50px 8px 16px 8px;
|
|
|
|
font-weight: bold;
|
|
|
|
border-bottom: solid 0.5px var(--divider);
|
|
|
|
|
|
|
|
> .bottom {
|
|
|
|
> * {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 8px;
|
|
|
|
opacity: 0.8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 170px;
|
|
|
|
left: 16px;
|
|
|
|
z-index: 2;
|
|
|
|
width: 120px;
|
|
|
|
height: 120px;
|
|
|
|
box-shadow: 1px 1px 3px rgba(#000, 0.2);
|
|
|
|
}
|
|
|
|
|
2023-01-13 05:07:24 +02:00
|
|
|
> .roles {
|
|
|
|
padding: 24px 24px 0 154px;
|
|
|
|
font-size: 0.95em;
|
2023-03-05 14:59:41 +02:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
gap: 8px;
|
2023-01-13 05:07:24 +02:00
|
|
|
|
|
|
|
> .role {
|
|
|
|
border: solid 1px var(--color, var(--divider));
|
|
|
|
border-radius: 999px;
|
|
|
|
margin-right: 4px;
|
|
|
|
padding: 3px 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-06 03:51:06 +03:00
|
|
|
> .moderationNote {
|
|
|
|
margin: 12px 24px 0 154px;
|
|
|
|
}
|
|
|
|
|
2023-04-13 07:17:32 +03:00
|
|
|
> .memo {
|
|
|
|
margin: 12px 24px 0 154px;
|
|
|
|
background: transparent;
|
|
|
|
color: var(--fg);
|
|
|
|
border: 1px solid var(--divider);
|
|
|
|
border-radius: 8px;
|
|
|
|
padding: 8px;
|
|
|
|
line-height: 0;
|
|
|
|
|
|
|
|
> .heading {
|
|
|
|
text-align: left;
|
|
|
|
color: var(--fgTransparent);
|
|
|
|
line-height: 1.5;
|
2023-05-06 03:53:09 +03:00
|
|
|
font-size: 85%;
|
2023-04-13 07:17:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
resize: none;
|
|
|
|
border: none;
|
|
|
|
outline: none;
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
min-height: 0;
|
|
|
|
line-height: 1.5;
|
|
|
|
color: var(--fg);
|
|
|
|
overflow: hidden;
|
|
|
|
background: transparent;
|
|
|
|
font-family: inherit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-01 12:55:45 +03:00
|
|
|
> .description {
|
|
|
|
padding: 24px 24px 24px 154px;
|
|
|
|
font-size: 0.95em;
|
|
|
|
|
|
|
|
> .empty {
|
|
|
|
margin: 0;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fields {
|
|
|
|
padding: 24px;
|
|
|
|
font-size: 0.9em;
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
|
|
|
|
> .field {
|
|
|
|
display: flex;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .name {
|
|
|
|
width: 30%;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .value {
|
|
|
|
width: 70%;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.system > .field > .name {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .status {
|
|
|
|
display: flex;
|
|
|
|
padding: 24px;
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
|
|
|
|
> a {
|
|
|
|
flex: 1;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> b {
|
|
|
|
display: block;
|
|
|
|
line-height: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> span {
|
|
|
|
font-size: 70%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .contents {
|
|
|
|
> .content {
|
|
|
|
margin-bottom: var(--margin);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.wide {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
> .main {
|
|
|
|
width: 100%;
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .sub {
|
|
|
|
max-width: 350px;
|
|
|
|
min-width: 350px;
|
|
|
|
margin-left: var(--margin);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-12-26 01:40:13 +02:00
|
|
|
|
|
|
|
@container (max-width: 500px) {
|
|
|
|
.ftskorzw {
|
|
|
|
> .main {
|
|
|
|
> .profile > .main {
|
|
|
|
> .banner-container {
|
|
|
|
height: 140px;
|
|
|
|
|
|
|
|
> .fade {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
top: 90px;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
width: 92px;
|
|
|
|
height: 92px;
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2023-01-13 05:07:24 +02:00
|
|
|
> .roles {
|
|
|
|
padding: 16px 16px 0 16px;
|
2023-03-05 14:59:41 +02:00
|
|
|
justify-content: center;
|
2023-01-13 05:07:24 +02:00
|
|
|
}
|
|
|
|
|
2023-05-06 03:51:06 +03:00
|
|
|
> .moderationNote {
|
|
|
|
margin: 16px 16px 0 16px;
|
|
|
|
}
|
|
|
|
|
2023-04-13 07:17:32 +03:00
|
|
|
> .memo {
|
|
|
|
margin: 16px 16px 0 16px;
|
|
|
|
}
|
|
|
|
|
2022-12-26 01:40:13 +02:00
|
|
|
> .description {
|
|
|
|
padding: 16px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fields {
|
|
|
|
padding: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .status {
|
|
|
|
padding: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .contents {
|
|
|
|
> .nav {
|
|
|
|
font-size: 80%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-01 12:55:45 +03:00
|
|
|
</style>
|
2023-02-12 10:42:34 +02:00
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.tl {
|
|
|
|
background: var(--bg);
|
2023-09-21 05:58:51 +03:00
|
|
|
border-radius: var(--radius);
|
|
|
|
overflow: clip;
|
|
|
|
}
|
|
|
|
|
2023-09-23 03:00:55 +03:00
|
|
|
.tab {
|
|
|
|
margin: calc(var(--margin) / 2) 0;
|
|
|
|
padding: calc(var(--margin) / 2) 0;
|
|
|
|
background: var(--bg);
|
2023-09-27 03:10:55 +03:00
|
|
|
border-radius: 8px;
|
2023-09-28 00:32:07 +03:00
|
|
|
> button {
|
|
|
|
border-radius: 8px;
|
|
|
|
margin-left: 0.4rem;
|
|
|
|
margin-right: 0.4rem;
|
|
|
|
}
|
2023-09-23 03:00:55 +03:00
|
|
|
}
|
|
|
|
|
2023-09-21 05:58:51 +03:00
|
|
|
.verifiedLink {
|
|
|
|
margin-left: 4px;
|
|
|
|
color: var(--success);
|
2023-02-12 10:42:34 +02:00
|
|
|
}
|
|
|
|
</style>
|