(update) misskey-js at v2023.2.0-beta.3

This commit is contained in:
kakkokari-gtyih 2024-01-23 09:06:54 +09:00
parent ce6b4fe18c
commit 574ab894b8
6 changed files with 673 additions and 99 deletions

View File

@ -40,10 +40,11 @@ import ReplyIco from 'bi/arrow-return-left.svg';
import RenoteIco from 'bi/repeat.svg'; import RenoteIco from 'bi/repeat.svg';
import ReactionIco from 'bi/plus-lg.svg'; import ReactionIco from 'bi/plus-lg.svg';
import MoreIco from 'bi/three-dots.svg'; import MoreIco from 'bi/three-dots.svg';
import type { HTMLAttributes } from 'nuxt/dist/app/compat/capi';
withDefaults(defineProps<{ withDefaults(defineProps<{
avatar?: string; avatar?: string;
decorations?: (Omit<Misskey.entities.User['avatarDecorations'][number], 'id'> & { offsetX?: number; offsetY?: number; })[]; decorations?: (Omit<Misskey.entities.User['avatarDecorations'][number], 'id'>)[];
reactions?: { reactions?: {
name: string; name: string;
url?: string; url?: string;
@ -53,7 +54,7 @@ withDefaults(defineProps<{
avatar: '/img/docs/fukidashi/doya_ai.webp', avatar: '/img/docs/fukidashi/doya_ai.webp',
}); });
function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'> & { offsetX?: number; offsetY?: number; }): HTMLAttributes['style'] { function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'>): HTMLAttributes['style'] {
const angle = decoration.angle ?? 0; const angle = decoration.angle ?? 0;
const rotate = angle === 0 ? undefined : `${angle * 360}deg`; const rotate = angle === 0 ? undefined : `${angle * 360}deg`;
const scaleX = decoration.flipH ? -1 : 1; const scaleX = decoration.flipH ? -1 : 1;

View File

@ -23,15 +23,16 @@
<script setup lang="ts"> <script setup lang="ts">
import type * as Misskey from 'misskey-js'; import type * as Misskey from 'misskey-js';
import type { HTMLAttributes } from 'nuxt/dist/app/compat/capi';
withDefaults(defineProps<{ withDefaults(defineProps<{
avatar?: string; avatar?: string;
decorations?: (Omit<Misskey.entities.User['avatarDecorations'][number], 'id'> & { offsetX?: number; offsetY?: number; })[]; decorations?: (Omit<Misskey.entities.User['avatarDecorations'][number], 'id'>)[];
}>(), { }>(), {
avatar: '/img/docs/fukidashi/doya_ai.webp', avatar: '/img/docs/fukidashi/doya_ai.webp',
}); });
function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'> & { offsetX?: number; offsetY?: number; }): HTMLAttributes['style'] { function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'>): HTMLAttributes['style'] {
const angle = decoration.angle ?? 0; const angle = decoration.angle ?? 0;
const rotate = angle === 0 ? undefined : `${angle * 360}deg`; const rotate = angle === 0 ? undefined : `${angle * 360}deg`;
const scaleX = decoration.flipH ? -1 : 1; const scaleX = decoration.flipH ? -1 : 1;

View File

@ -374,3 +374,52 @@ _api:
"write:flash": "Playを操作する" "write:flash": "Playを操作する"
"read:flash-likes": "Playのいいねを見る" "read:flash-likes": "Playのいいねを見る"
"write:flash-likes": "Playのいいねを操作する" "write:flash-likes": "Playのいいねを操作する"
"read:admin:abuse-user-reports": "ユーザーからの通報を見る"
"write:admin:delete-account": "ユーザーアカウントを削除する"
"write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する"
"read:admin:index-stats": "データベースインデックスに関する情報を見る"
"read:admin:table-stats": "データベーステーブルに関する情報を見る"
"read:admin:user-ips": "ユーザーのIPアドレスを見る"
"read:admin:meta": "インスタンスのメタデータを見る"
"write:admin:reset-password": "ユーザーのパスワードをリセットする"
"write:admin:resolve-abuse-user-report": "ユーザーからの通報を解決する"
"write:admin:send-email": "メールを送る"
"read:admin:server-info": "サーバーの情報を見る"
"read:admin:show-moderation-log": "モデレーションログを見る"
"read:admin:show-user": "ユーザーのプライベートな情報を見る"
"read:admin:show-users": "ユーザーのプライベートな情報を見る"
"write:admin:suspend-user": "ユーザーを凍結する"
"write:admin:unset-user-avatar": "ユーザーのアバターを削除する"
"write:admin:unset-user-banner": "ユーザーのバーナーを削除する"
"write:admin:unsuspend-user": "ユーザーの凍結を解除する"
"write:admin:meta": "インスタンスのメタデータを操作する"
"write:admin:user-note": "モデレーションノートを操作する"
"write:admin:roles": "ロールを操作する"
"read:admin:roles": "ロールを見る"
"write:admin:relays": "リレーを操作する"
"read:admin:relays": "リレーを見る"
"write:admin:invite-codes": "招待コードを操作する"
"read:admin:invite-codes": "招待コードを見る"
"write:admin:announcements": "お知らせを操作する"
"read:admin:announcements": "お知らせを見る"
"write:admin:avatar-decorations": "アバターデコレーションを操作する"
"read:admin:avatar-decorations": "アバターデコレーションを見る"
"write:admin:federation": "連合に関する情報を操作する"
"write:admin:account": "ユーザーアカウントを操作する"
"read:admin:account": "ユーザーに関する情報を見る"
"write:admin:emoji": "絵文字を操作する"
"read:admin:emoji": "絵文字を見る"
"write:admin:queue": "ジョブキューを操作する"
"read:admin:queue": "ジョブキューに関する情報を見る"
"write:admin:promo": "プロモーションノートを操作する"
"write:admin:drive": "ユーザーのドライブを操作する"
"read:admin:drive": "ユーザーのドライブの関する情報を見る"
"read:admin:stream": "管理者用のWebsocket APIを使う"
"write:admin:ad": "広告を操作する"
"read:admin:ad": "広告を見る"
"write:invite-codes": "招待コードを作成する"
"read:invite-codes": "招待コードを取得する"
"write:clip-favorite": "クリップのいいねを操作する"
"read:clip-favorite": "クリップのいいねを見る"
"read:federation": "連合に関する情報を取得する"
"write:report-abuse": "違反を報告する"

View File

@ -25,7 +25,7 @@
"github-markdown-css": "^5.5.0", "github-markdown-css": "^5.5.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"mfm-js": "^0.23.3", "mfm-js": "^0.23.3",
"misskey-js": "^0.0.16", "misskey-js": "2024.2.0-beta.3",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"nuxt": "^3.9.0", "nuxt": "^3.9.0",
"postcss": "^8.4.32", "postcss": "^8.4.32",

View File

@ -118,10 +118,10 @@ const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const avatar = ref('/img/docs/fukidashi/doya_ai.webp'); const avatar = ref('/img/docs/fukidashi/doya_ai.webp');
const decorations = ref<(Misskey.entities.User['avatarDecorations'][number] & { offsetX?: number; offsetY?: number; overlayTemplate?: boolean; })[]>([ const decorations = ref<(Misskey.entities.User['avatarDecorations'][number] & { overlayTemplate?: boolean; })[]>([
]); ]);
function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'> & { offsetX?: number; offsetY?: number; }): HTMLAttributes['style'] { function getStyle(decoration: Omit<Misskey.entities.User['avatarDecorations'][number], 'id'>): HTMLAttributes['style'] {
const angle = decoration.angle ?? 0; const angle = decoration.angle ?? 0;
const rotate = angle === 0 ? undefined : `${angle * 360}deg`; const rotate = angle === 0 ? undefined : `${angle * 360}deg`;
const scaleX = decoration.flipH ? -1 : 1; const scaleX = decoration.flipH ? -1 : 1;

File diff suppressed because it is too large Load Diff