Merge remote-tracking branch 'misskey-dev/develop' into develop
# Conflicts: # package.json
This commit is contained in:
commit
94a7eca882
249 changed files with 6467 additions and 8437 deletions
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { version } from '@/config';
|
||||
import * as os from '@/os';
|
||||
|
|
@ -44,7 +44,7 @@ const props = withDefaults(defineProps<{
|
|||
|
||||
let loaded = $ref(false);
|
||||
let serverIsDead = $ref(false);
|
||||
let meta = $ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
||||
let meta = $ref<Misskey.entities.LiteInstanceMetadata | null>(null);
|
||||
|
||||
os.api('meta', {
|
||||
detail: false,
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkChart from '@/components/MkChart.vue';
|
||||
import MkObjectView from '@/components/MkObjectView.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
|
|
@ -232,7 +232,7 @@ const props = withDefaults(defineProps<{
|
|||
|
||||
let tab = $ref(props.initialTab);
|
||||
let chartSrc = $ref('per-user-notes');
|
||||
let user = $ref<null | misskey.entities.UserDetailed>();
|
||||
let user = $ref<null | Misskey.entities.UserDetailed>();
|
||||
let init = $ref<ReturnType<typeof createFetcher>>();
|
||||
let info = $ref();
|
||||
let ips = $ref(null);
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import { AuthSession } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
session: AuthSession;
|
||||
session: Misskey.entities.AuthSession;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
@ -58,7 +58,6 @@ function accept() {
|
|||
emit('accepted');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { AuthSession } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XForm from './auth.form.vue';
|
||||
import MkSignin from '@/components/MkSignin.vue';
|
||||
import * as os from '@/os';
|
||||
|
|
@ -56,7 +56,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
let state = $ref<'waiting' | 'accepted' | 'fetch-session-error' | 'denied' | null>(null);
|
||||
let session = $ref<AuthSession | null>(null);
|
||||
let session = $ref<Misskey.entities.AuthSession | null>(null);
|
||||
|
||||
function accepted() {
|
||||
state = 'accepted';
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch, provide } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
|
|
@ -41,7 +41,7 @@ const props = defineProps<{
|
|||
clipId: string,
|
||||
}>();
|
||||
|
||||
let clip: misskey.entities.Clip = $ref<misskey.entities.Clip>();
|
||||
let clip: Misskey.entities.Clip = $ref<Misskey.entities.Clip>();
|
||||
let favorited = $ref(false);
|
||||
const pagination = {
|
||||
endpoint: 'clips/notes' as const,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
|
|
@ -101,7 +101,7 @@ let isSensitive = $ref(props.emoji ? props.emoji.isSensitive : false);
|
|||
let localOnly = $ref(props.emoji ? props.emoji.localOnly : false);
|
||||
let roleIdsThatCanBeUsedThisEmojiAsReaction = $ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
||||
let rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
||||
let file = $ref<misskey.entities.DriveFile>();
|
||||
let file = $ref<Misskey.entities.DriveFile>();
|
||||
|
||||
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
||||
rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
import { mainRouter } from '@/router';
|
||||
import { i18n } from '@/i18n';
|
||||
|
|
@ -57,7 +57,7 @@ if (acct.startsWith('https://')) {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
promise = os.api('users/show', Acct.parse(acct));
|
||||
promise = os.api('users/show', Misskey.acct.parse(acct));
|
||||
promise.then(user => {
|
||||
follow(user);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkChart from '@/components/MkChart.vue';
|
||||
import MkObjectView from '@/components/MkObjectView.vue';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
|
|
@ -143,8 +143,8 @@ const props = defineProps<{
|
|||
|
||||
let tab = $ref('overview');
|
||||
let chartSrc = $ref('instance-requests');
|
||||
let meta = $ref<misskey.entities.AdminInstanceMetadata | null>(null);
|
||||
let instance = $ref<misskey.entities.Instance | null>(null);
|
||||
let meta = $ref<Misskey.entities.AdminInstanceMetadata | null>(null);
|
||||
let instance = $ref<Misskey.entities.Instance | null>(null);
|
||||
let suspended = $ref(false);
|
||||
let isBlocked = $ref(false);
|
||||
let faviconUrl = $ref<string | null>(null);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
||||
<template #default="{ items }">
|
||||
<div class="_gaps_s">
|
||||
<MkInviteCode v-for="item in (items as Invite[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
||||
<MkInviteCode v-for="item in (items as Misskey.entities.Invite[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
||||
</div>
|
||||
</template>
|
||||
</MkPagination>
|
||||
|
|
@ -37,7 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, shallowRef } from 'vue';
|
||||
import type { Invite } from 'misskey-js/built/entities';
|
||||
import type * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import * as os from '@/os';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
|
|
@ -127,7 +127,7 @@ async function deleteAntenna() {
|
|||
function addUser() {
|
||||
os.selectUser().then(user => {
|
||||
users = users.trim();
|
||||
users += '\n@' + Acct.toString(user as any);
|
||||
users += '\n@' + Misskey.acct.toString(user as any);
|
||||
users = users.trim();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,18 +28,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onActivated } from 'vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { antennasCache } from '@/cache';
|
||||
import { api } from '@/os';
|
||||
import { onActivated } from 'vue';
|
||||
import { infoImageUrl } from '@/instance';
|
||||
|
||||
const antennas = $computed(() => antennasCache.value.value ?? []);
|
||||
|
||||
function fetch() {
|
||||
antennasCache.fetch(() => api('antennas/list'));
|
||||
antennasCache.fetch();
|
||||
}
|
||||
|
||||
fetch();
|
||||
|
|
@ -62,7 +61,7 @@ definePageMetadata({
|
|||
});
|
||||
|
||||
onActivated(() => {
|
||||
antennasCache.fetch(() => api('antennas/list'));
|
||||
antennasCache.fetch();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import { $i } from '@/account';
|
|||
const items = $computed(() => userListsCache.value.value ?? []);
|
||||
|
||||
function fetch() {
|
||||
userListsCache.fetch(() => os.api('users/lists/list'));
|
||||
userListsCache.fetch();
|
||||
}
|
||||
|
||||
fetch();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os';
|
||||
import { mainRouter } from '@/router';
|
||||
|
|
@ -59,7 +60,6 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import { userListsCache } from '@/cache';
|
||||
import { UserList, UserLite } from 'misskey-js/built/entities';
|
||||
import { $i } from '@/account';
|
||||
import { defaultStore } from '@/store';
|
||||
const {
|
||||
|
|
@ -72,8 +72,8 @@ const props = defineProps<{
|
|||
|
||||
const FETCH_USERS_LIMIT = 20;
|
||||
|
||||
let list = $ref<UserList | null>(null);
|
||||
let users = $ref<UserLite[]>([]);
|
||||
let list = $ref<Misskey.entities.UserList | null>(null);
|
||||
let users = $ref<Misskey.entities.UserLite[]>([]);
|
||||
let queueUserIds = $ref<string[]>([]);
|
||||
let fetching = $ref(true);
|
||||
const isPublic = ref(false);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkRemoteCaution from '@/components/MkRemoteCaution.vue';
|
||||
|
|
@ -61,7 +61,7 @@ const props = defineProps<{
|
|||
noteId: string;
|
||||
}>();
|
||||
|
||||
let note = $ref<null | misskey.entities.Note>();
|
||||
let note = $ref<null | Misskey.entities.Note>();
|
||||
let clips = $ref();
|
||||
let showPrev = $ref(false);
|
||||
let showNext = $ref(false);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
-->
|
||||
<div class="banner">
|
||||
<img v-if="page.eyeCatchingImageId" :src="page.eyeCatchingImage.url"/>
|
||||
<MkMediaImage
|
||||
v-if="page.eyeCatchingImageId"
|
||||
:image="page.eyeCatchingImage"
|
||||
:cover="true"
|
||||
:disableImageLink="true"
|
||||
class="thumbnail"
|
||||
/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<XPage :page="page"/>
|
||||
|
|
@ -56,8 +62,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkContainer :max-height="300" :foldable="true" class="other">
|
||||
<template #icon><i class="ti ti-clock"></i></template>
|
||||
<template #header>{{ i18n.ts.recentPosts }}</template>
|
||||
<MkPagination v-slot="{items}" :pagination="otherPostsPagination">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" :page="page" class="_margin"/>
|
||||
<MkPagination v-slot="{items}" :pagination="otherPostsPagination" :class="$style.relatedPagesRoot" class="_gaps">
|
||||
<MkPagePreview v-for="page in items" :key="page.id" :page="page" :class="$style.relatedPagesItem"/>
|
||||
</MkPagination>
|
||||
</MkContainer>
|
||||
</div>
|
||||
|
|
@ -74,6 +80,7 @@ import XPage from '@/components/page/page.vue';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os';
|
||||
import { url } from '@/config';
|
||||
import MkMediaImage from '@/components/MkMediaImage.vue';
|
||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
|
@ -204,11 +211,14 @@ definePageMetadata(computed(() => page ? {
|
|||
}
|
||||
|
||||
> .banner {
|
||||
> img {
|
||||
> .thumbnail {
|
||||
// TODO: 良い感じのアスペクト比で表示
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
height: auto;
|
||||
aspect-ratio: 3/1;
|
||||
border-radius: var(--radius);
|
||||
overflow: hidden;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
|
@ -279,3 +289,13 @@ definePageMetadata(computed(() => page ? {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style module>
|
||||
.relatedPagesRoot {
|
||||
padding: var(--margin);
|
||||
}
|
||||
|
||||
.relatedPagesItem > article {
|
||||
background-color: var(--panelHighlight) !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSpacer :marginMin="20" :marginMax="28">
|
||||
<div class="_gaps">
|
||||
<div>{{ i18n.ts._2fa.step3Title }}</div>
|
||||
<MkInput v-model="token" autocomplete="one-time-code" type="number"></MkInput>
|
||||
<MkInput v-model="token" autocomplete="one-time-code"></MkInput>
|
||||
<div>{{ i18n.ts._2fa.step3 }}</div>
|
||||
</div>
|
||||
<div class="_buttonsCenter" style="margin-top: 16px;">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #icon><i class="ti ti-shield-lock"></i></template>
|
||||
<template #label>{{ i18n.ts.totp }}</template>
|
||||
<template #caption>{{ i18n.ts.totpDescription }}</template>
|
||||
<template #suffix><i v-if="$i.twoFactorEnabled" class="ti ti-check" style="color: var(--success)"></i></template>
|
||||
|
||||
<div v-if="$i.twoFactorEnabled" class="_gaps_s">
|
||||
<div v-text="i18n.ts._2fa.alreadyRegistered"/>
|
||||
|
|
@ -37,16 +38,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>{{ i18n.ts.securityKeyAndPasskey }}</template>
|
||||
<div class="_gaps_s">
|
||||
<MkInfo>
|
||||
{{ i18n.ts._2fa.securityKeyInfo }}<br>
|
||||
<br>
|
||||
{{ i18n.ts._2fa.chromePasskeyNotSupported }}
|
||||
{{ i18n.ts._2fa.securityKeyInfo }}
|
||||
</MkInfo>
|
||||
|
||||
<MkInfo v-if="!supportsCredentials" warn>
|
||||
<MkInfo v-if="!webAuthnSupported()" warn>
|
||||
{{ i18n.ts._2fa.securityKeyNotSupported }}
|
||||
</MkInfo>
|
||||
|
||||
<MkInfo v-else-if="supportsCredentials && !$i.twoFactorEnabled" warn>
|
||||
<MkInfo v-else-if="webAuthnSupported() && !$i.twoFactorEnabled" warn>
|
||||
{{ i18n.ts._2fa.registerTOTPBeforeKey }}
|
||||
</MkInfo>
|
||||
|
||||
|
|
@ -74,8 +73,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, defineAsyncComponent } from 'vue';
|
||||
import { hostname } from '@/config';
|
||||
import { byteify, hexify, stringify } from '@/scripts/2fa';
|
||||
import { supported as webAuthnSupported, create as webAuthnCreate, parseCreationOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
|
|
@ -93,10 +91,9 @@ withDefaults(defineProps<{
|
|||
first: false,
|
||||
});
|
||||
|
||||
const supportsCredentials = ref(!!navigator.credentials);
|
||||
const usePasswordLessLogin = $computed(() => $i!.usePasswordLessLogin);
|
||||
const usePasswordLessLogin = $computed(() => $i?.usePasswordLessLogin ?? false);
|
||||
|
||||
async function registerTOTP() {
|
||||
async function registerTOTP(): Promise<void> {
|
||||
const password = await os.inputText({
|
||||
title: i18n.ts._2fa.registerTOTP,
|
||||
text: i18n.ts._2fa.passwordToTOTP,
|
||||
|
|
@ -114,7 +111,7 @@ async function registerTOTP() {
|
|||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
function unregisterTOTP() {
|
||||
function unregisterTOTP(): void {
|
||||
os.inputText({
|
||||
title: i18n.ts.password,
|
||||
type: 'password',
|
||||
|
|
@ -132,7 +129,7 @@ function unregisterTOTP() {
|
|||
});
|
||||
}
|
||||
|
||||
function renewTOTP() {
|
||||
function renewTOTP(): void {
|
||||
os.confirm({
|
||||
type: 'question',
|
||||
title: i18n.ts._2fa.renewTOTP,
|
||||
|
|
@ -191,8 +188,10 @@ async function addSecurityKey() {
|
|||
});
|
||||
if (password.canceled) return;
|
||||
|
||||
const challenge: any = await os.apiWithDialog('i/2fa/register-key', {
|
||||
password: password.result,
|
||||
const registrationOptions = parseCreationOptionsFromJSON({
|
||||
publicKey: await os.apiWithDialog('i/2fa/register-key', {
|
||||
password: password.result,
|
||||
}),
|
||||
});
|
||||
|
||||
const name = await os.inputText({
|
||||
|
|
@ -204,26 +203,8 @@ async function addSecurityKey() {
|
|||
});
|
||||
if (name.canceled) return;
|
||||
|
||||
const webAuthnCreation = navigator.credentials.create({
|
||||
publicKey: {
|
||||
challenge: byteify(challenge.challenge, 'base64'),
|
||||
rp: {
|
||||
id: hostname,
|
||||
name: 'Misskey',
|
||||
},
|
||||
user: {
|
||||
id: byteify($i!.id, 'ascii'),
|
||||
name: $i!.username,
|
||||
displayName: $i!.name,
|
||||
},
|
||||
pubKeyCredParams: [{ alg: -7, type: 'public-key' }],
|
||||
timeout: 60000,
|
||||
attestation: 'direct',
|
||||
},
|
||||
}) as Promise<PublicKeyCredential & { response: AuthenticatorAttestationResponse; } | null>;
|
||||
|
||||
const credential = await os.promiseDialog(
|
||||
webAuthnCreation,
|
||||
webAuthnCreate(registrationOptions),
|
||||
null,
|
||||
() => {}, // ユーザーのキャンセルはrejectなのでエラーダイアログを出さない
|
||||
i18n.ts._2fa.tapSecurityKey,
|
||||
|
|
@ -233,10 +214,7 @@ async function addSecurityKey() {
|
|||
await os.apiWithDialog('i/2fa/key-done', {
|
||||
password: password.result,
|
||||
name: name.result,
|
||||
challengeId: challenge.challengeId,
|
||||
// we convert each 16 bits to a string to serialise
|
||||
clientDataJSON: stringify(credential.response.clientDataJSON),
|
||||
attestationObject: hexify(credential.response.attestationObject),
|
||||
credential: credential.toJSON(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
|
||||
<MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch>
|
||||
<MkSwitch v-model="largeNoteReactions">{{ i18n.ts.largeNoteReactions }}</MkSwitch>
|
||||
<MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch>
|
||||
<MkSwitch v-model="advancedMfm">{{ i18n.ts.enableAdvancedMfm }}</MkSwitch>
|
||||
<MkSwitch v-if="advancedMfm" v-model="animatedMfm">{{ i18n.ts.enableAnimatedMfm }}</MkSwitch>
|
||||
<MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch>
|
||||
<MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch>
|
||||
<MkSwitch v-model="useReactionPickerForContextMenu">{{ i18n.ts.useReactionPickerForContextMenu }}</MkSwitch>
|
||||
<MkRadios v-model="reactionsDisplaySize">
|
||||
<template #label>{{ i18n.ts.reactionsDisplaySize }}</template>
|
||||
<option value="small">{{ i18n.ts.small }}</option>
|
||||
<option value="medium">{{ i18n.ts.medium }}</option>
|
||||
<option value="large">{{ i18n.ts.large }}</option>
|
||||
</MkRadios>
|
||||
</div>
|
||||
|
||||
<MkSelect v-model="instanceTicker">
|
||||
|
|
@ -90,6 +95,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<option value="vertical"><i class="ti ti-carousel-vertical"></i> {{ i18n.ts.vertical }}</option>
|
||||
<option value="horizontal"><i class="ti ti-carousel-horizontal"></i> {{ i18n.ts.horizontal }}</option>
|
||||
</MkRadios>
|
||||
|
||||
<MkButton @click="testNotification('client')">{{ i18n.ts._notification.checkNotificationBehavior }}</MkButton>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
|
|
@ -185,6 +192,7 @@ import { unisonReload } from '@/scripts/unison-reload';
|
|||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { testNotification } from '@/scripts/test-notification';
|
||||
|
||||
const lang = ref(miLocalStorage.getItem('lang'));
|
||||
const fontSize = ref(miLocalStorage.getItem('fontSize'));
|
||||
|
|
@ -204,7 +212,7 @@ const overridedDeviceKind = computed(defaultStore.makeGetterSetter('overridedDev
|
|||
const serverDisconnectedBehavior = computed(defaultStore.makeGetterSetter('serverDisconnectedBehavior'));
|
||||
const showNoteActionsOnlyHover = computed(defaultStore.makeGetterSetter('showNoteActionsOnlyHover'));
|
||||
const showClipButtonInNoteFooter = computed(defaultStore.makeGetterSetter('showClipButtonInNoteFooter'));
|
||||
const largeNoteReactions = computed(defaultStore.makeGetterSetter('largeNoteReactions'));
|
||||
const reactionsDisplaySize = computed(defaultStore.makeGetterSetter('reactionsDisplaySize'));
|
||||
const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes'));
|
||||
const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v));
|
||||
const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal'));
|
||||
|
|
@ -264,6 +272,7 @@ watch([
|
|||
instanceTicker,
|
||||
overridedDeviceKind,
|
||||
mediaListWithOneImageAppearance,
|
||||
reactionsDisplaySize,
|
||||
], async () => {
|
||||
await reloadAsk();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { toString } from 'misskey-js/built/acct';
|
||||
import { UserDetailed } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import FormInfo from '@/components/MkInfo.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
|
@ -73,7 +72,7 @@ import { $i } from '@/account';
|
|||
import { unisonReload } from '@/scripts/unison-reload';
|
||||
|
||||
const moveToAccount = ref('');
|
||||
const movedTo = ref<UserDetailed>();
|
||||
const movedTo = ref<Misskey.entities.UserDetailed>();
|
||||
const accountAliases = ref(['']);
|
||||
|
||||
async function init() {
|
||||
|
|
@ -85,7 +84,7 @@ async function init() {
|
|||
|
||||
if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) {
|
||||
const alsoKnownAs = await os.api('users/show', { userIds: $i.alsoKnownAs });
|
||||
accountAliases.value = (alsoKnownAs && alsoKnownAs.length > 0) ? alsoKnownAs.map(user => `@${toString(user)}`) : [''];
|
||||
accountAliases.value = (alsoKnownAs && alsoKnownAs.length > 0) ? alsoKnownAs.map(user => `@${Misskey.acct.toString(user)}`) : [''];
|
||||
} else {
|
||||
accountAliases.value = [''];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<FormLink @click="readAllUnreadNotes">{{ i18n.ts.markAsReadAllUnreadNotes }}</FormLink>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<div class="_gaps_m">
|
||||
<FormLink @click="testNotification('server')">{{ i18n.ts._notification.sendTestNotification }}</FormLink>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts.pushNotification }}</template>
|
||||
|
||||
|
|
@ -41,6 +46,7 @@ import { i18n } from '@/i18n';
|
|||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue';
|
||||
import { notificationTypes } from '@/const';
|
||||
import { testNotification } from '@/scripts/test-notification';
|
||||
|
||||
let allowButton = $shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
|
||||
let pushRegistrationInServer = $computed(() => allowButton?.pushRegistrationInServer);
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
// SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html
|
||||
|
||||
import { } from 'vue';
|
||||
import { noteVisibilities } from 'misskey-js';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkPostForm from '@/components/MkPostForm.vue';
|
||||
|
|
@ -45,7 +43,7 @@ import { i18n } from '@/i18n';
|
|||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const localOnlyQuery = urlParams.get('localOnly');
|
||||
const visibilityQuery = urlParams.get('visibility') as typeof noteVisibilities[number];
|
||||
const visibilityQuery = urlParams.get('visibility') as typeof Misskey.noteVisibilities[number];
|
||||
|
||||
let state = $ref('fetching' as 'fetching' | 'writing' | 'posted');
|
||||
let title = $ref(urlParams.get('title'));
|
||||
|
|
@ -54,7 +52,7 @@ const url = urlParams.get('url');
|
|||
let initialText = $ref<string | undefined>();
|
||||
let reply = $ref<Misskey.entities.Note | undefined>();
|
||||
let renote = $ref<Misskey.entities.Note | undefined>();
|
||||
let visibility = $ref(noteVisibilities.includes(visibilityQuery) ? visibilityQuery : undefined);
|
||||
let visibility = $ref(Misskey.noteVisibilities.includes(visibilityQuery) ? visibilityQuery : undefined);
|
||||
let localOnly = $ref(localOnlyQuery === '0' ? false : localOnlyQuery === '1' ? true : undefined);
|
||||
let files = $ref([] as Misskey.entities.DriveFile[]);
|
||||
let visibleUsers = $ref([] as Misskey.entities.User[]);
|
||||
|
|
@ -74,7 +72,7 @@ async function init() {
|
|||
await Promise.all(
|
||||
[
|
||||
...(visibleUserIds ? visibleUserIds.split(',').map(userId => ({ userId })) : []),
|
||||
...(visibleAccts ? visibleAccts.split(',').map(Acct.parse) : []),
|
||||
...(visibleAccts ? visibleAccts.split(',').map(Misskey.acct.parse) : []),
|
||||
]
|
||||
// TypeScriptの指示通りに変換する
|
||||
.map(q => 'username' in q ? { username: q.username, host: q.host === null ? undefined : q.host } : q)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ import { i18n } from '@/i18n';
|
|||
import { instance } from '@/instance';
|
||||
import { $i } from '@/account';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { antennasCache, userListsCache } from '@/cache';
|
||||
|
||||
provide('shouldOmitHeaderTitle', true);
|
||||
|
||||
|
|
@ -68,7 +70,7 @@ function top(): void {
|
|||
}
|
||||
|
||||
async function chooseList(ev: MouseEvent): Promise<void> {
|
||||
const lists = await os.api('users/lists/list');
|
||||
const lists = await userListsCache.fetch();
|
||||
const items = lists.map(list => ({
|
||||
type: 'link' as const,
|
||||
text: list.name,
|
||||
|
|
@ -78,7 +80,7 @@ async function chooseList(ev: MouseEvent): Promise<void> {
|
|||
}
|
||||
|
||||
async function chooseAntenna(ev: MouseEvent): Promise<void> {
|
||||
const antennas = await os.api('antennas/list');
|
||||
const antennas = await antennasCache.fetch();
|
||||
const items = antennas.map(antenna => ({
|
||||
type: 'link' as const,
|
||||
text: antenna.name,
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkAchievements from '@/components/MkAchievements.vue';
|
||||
import { claimAchievement } from '@/scripts/achievements';
|
||||
import { $i } from '@/account';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
let timer: number | null;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Chart, ChartDataset } from 'chart.js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
|||
initChart();
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, nextTick, watch } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip';
|
||||
|
|
@ -26,7 +26,7 @@ initChart();
|
|||
|
||||
const props = defineProps<{
|
||||
src: string;
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const rootEl = $shallowRef<HTMLDivElement>(null);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Chart, ChartDataset } from 'chart.js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
|||
initChart();
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Chart, ChartDataset } from 'chart.js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
|||
initChart();
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XHeatmap from './activity.heatmap.vue';
|
||||
import XPv from './activity.pv.vue';
|
||||
import XNotes from './activity.notes.vue';
|
||||
|
|
@ -35,7 +35,7 @@ import XFollowing from './activity.following.vue';
|
|||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkFlashPreview from '@/components/MkFlashPreview.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkUserInfo from '@/components/MkUserInfo.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
type: 'following' | 'followers';
|
||||
}>();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XFollowList from './follow-list.vue';
|
||||
import * as os from '@/os';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
|
@ -32,13 +31,13 @@ const props = withDefaults(defineProps<{
|
|||
}>(), {
|
||||
});
|
||||
|
||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
||||
let user = $ref<null | Misskey.entities.UserDetailed>(null);
|
||||
let error = $ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
if (props.acct == null) return;
|
||||
user = null;
|
||||
os.api('users/show', Acct.parse(props.acct)).then(u => {
|
||||
os.api('users/show', Misskey.acct.parse(props.acct)).then(u => {
|
||||
user = u;
|
||||
}).catch(err => {
|
||||
error = err;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XFollowList from './follow-list.vue';
|
||||
import * as os from '@/os';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
|
@ -32,13 +31,13 @@ const props = withDefaults(defineProps<{
|
|||
}>(), {
|
||||
});
|
||||
|
||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
||||
let user = $ref<null | Misskey.entities.UserDetailed>(null);
|
||||
let error = $ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
if (props.acct == null) return;
|
||||
user = null;
|
||||
os.api('users/show', Acct.parse(props.acct)).then(u => {
|
||||
os.api('users/show', Misskey.acct.parse(props.acct)).then(u => {
|
||||
user = u;
|
||||
}).catch(err => {
|
||||
error = err;
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>(), {
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
||||
import calcAge from 's-age';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkNote from '@/components/MkNote.vue';
|
||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||
import MkAccountMoved from '@/components/MkAccountMoved.vue';
|
||||
|
|
@ -171,7 +171,7 @@ const XPhotos = defineAsyncComponent(() => import('./index.photos.vue'));
|
|||
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: Misskey.entities.UserDetailed;
|
||||
/** Test only; MkNotes currently causes problems in vitest */
|
||||
disableNotes: boolean;
|
||||
}>(), {
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import MkChart from '@/components/MkChart.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
limit?: number;
|
||||
}>(), {
|
||||
limit: 50,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy';
|
||||
import { notePage } from '@/filters/note';
|
||||
import * as os from '@/os';
|
||||
|
|
@ -36,16 +36,16 @@ import { defaultStore } from '@/store';
|
|||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: Misskey.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
let fetching = $ref(true);
|
||||
let images = $ref<{
|
||||
note: misskey.entities.Note;
|
||||
file: misskey.entities.DriveFile;
|
||||
note: Misskey.entities.Note;
|
||||
file: Misskey.entities.DriveFile;
|
||||
}[]>([]);
|
||||
|
||||
function thumbnail(image: misskey.entities.DriveFile): string {
|
||||
function thumbnail(image: Misskey.entities.DriveFile): string {
|
||||
return defaultStore.state.disableShowingAnimatedImages
|
||||
? getStaticImageUrl(image.url)
|
||||
: image.thumbnailUrl;
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkTab from '@/components/MkTab.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: Misskey.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
const include = ref<string | null>(null);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, computed, watch } from 'vue';
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { acct as getAcct } from '@/filters/user';
|
||||
import * as os from '@/os';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
|
@ -54,13 +53,13 @@ const props = withDefaults(defineProps<{
|
|||
});
|
||||
|
||||
let tab = $ref(props.page);
|
||||
let user = $ref<null | misskey.entities.UserDetailed>(null);
|
||||
let user = $ref<null | Misskey.entities.UserDetailed>(null);
|
||||
let error = $ref(null);
|
||||
|
||||
function fetchUser(): void {
|
||||
if (props.acct == null) return;
|
||||
user = null;
|
||||
os.api('users/show', Acct.parse(props.acct)).then(u => {
|
||||
os.api('users/show', Misskey.acct.parse(props.acct)).then(u => {
|
||||
user = u;
|
||||
}).catch(err => {
|
||||
error = err;
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import {} from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkStickyContainer from '@/components/global/MkStickyContainer.vue';
|
||||
import MkSpacer from '@/components/global/MkSpacer.vue';
|
||||
import MkAvatars from '@/components/MkAvatars.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.UserDetailed;
|
||||
user: Misskey.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagePreview from '@/components/MkPagePreview.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkNote from '@/components/MkNote.vue';
|
||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
user: misskey.entities.User;
|
||||
user: Misskey.entities.User;
|
||||
}>();
|
||||
|
||||
const pagination = {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import { Instance } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XTimeline from './welcome.timeline.vue';
|
||||
import MarqueeText from '@/components/MkMarquee.vue';
|
||||
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
||||
|
|
@ -47,7 +47,7 @@ import number from '@/filters/number';
|
|||
import MkNumber from '@/components/MkNumber.vue';
|
||||
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
||||
|
||||
let meta = $ref<Instance>();
|
||||
let meta = $ref<Misskey.entities.Instance>();
|
||||
let instances = $ref<any[]>();
|
||||
|
||||
os.api('meta', { detail: true }).then(_meta => {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Note } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { onUpdated } from 'vue';
|
||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||
import MkMediaList from '@/components/MkMediaList.vue';
|
||||
|
|
@ -36,7 +36,7 @@ import * as os from '@/os';
|
|||
import { getScrollContainer } from '@/scripts/scroll';
|
||||
import { $i } from '@/account';
|
||||
|
||||
let notes = $ref<Note[]>([]);
|
||||
let notes = $ref<Misskey.entities.Note[]>([]);
|
||||
let isScrolling = $ref(false);
|
||||
let scrollEl = $shallowRef<HTMLElement>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue