Merge branch 'develop' into img-max

This commit is contained in:
tamaina 2023-04-13 12:47:16 +00:00
commit 2cc7f5c322
55 changed files with 1096 additions and 317 deletions

View file

@ -12,7 +12,7 @@
-->
## 13.x.x (unreleased)
## 13.11.3
### General
- 指定したロールを持つユーザーのノートのみが流れるロールタイムラインを追加
@ -23,13 +23,14 @@
- カスタム絵文字でリアクションできないことがある問題を修正
### Client
-
- チャンネルのピン留めされたノートの順番が正しくない問題を修正
### Server
- フォローインポートなどでの大量のフォロー等操作をキューイングするように #10544 @nmkj-io
- Misskey Webでのサーバーサイドエラー画面を改善
- Misskey Webでのサーバーサイドエラーのログが残るように
- ノート作成時のアンテナ追加パフォーマンスを改善
- フォローインポートなどでの大量のフォロー等操作をキューイングするように #10544 @nmkj-io
- アンテナとロールTLのuntil/sinceプロパティが動くように
## 13.11.2

View file

@ -245,7 +245,6 @@ You can override the default story by creating a impl story file (`MyComponent.s
```ts
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-duplicates */
import { StoryObj } from '@storybook/vue3';
import MyComponent from './MyComponent.vue';
export const Default = {

View file

@ -20,6 +20,7 @@ noNotes: "Keine Notizen gefunden"
noNotifications: "Keine Benachrichtigungen gefunden"
instance: "Instanz"
settings: "Einstellungen"
notificationSettings: "Benachrichtigungseinstellungen"
basicSettings: "Allgemeine Einstellungen"
otherSettings: "Weitere Einstellungen"
openInWindow: "In einem Fenster öffnen"
@ -1407,6 +1408,8 @@ _channel:
following: "Gefolgt"
usersCount: "{n} Teilnehmer"
notesCount: "{n} Notizen"
nameAndDescription: "Name und Beschreibung"
nameOnly: "Nur Name"
_menuDisplay:
sideFull: "Seitlich"
sideIcon: "Seitlich (Icons)"
@ -1887,6 +1890,7 @@ _deck:
channel: "Kanal"
mentions: "Erwähnungen"
direct: "Direktnachrichten"
roleTimeline: "Rollenchronik"
_dialog:
charactersExceeded: "Maximallänge überschritten! Momentan {current} von {max}"
charactersBelow: "Minimallänge unterschritten! Momentan {current} von {min}"

View file

@ -20,6 +20,7 @@ noNotes: "No notes"
noNotifications: "No notifications"
instance: "Instance"
settings: "Settings"
notificationSettings: "Notification Settings"
basicSettings: "Basic Settings"
otherSettings: "Other Settings"
openInWindow: "Open in window"
@ -1407,6 +1408,8 @@ _channel:
following: "Followed"
usersCount: "{n} Participants"
notesCount: "{n} Notes"
nameAndDescription: "Name and description"
nameOnly: "Name only"
_menuDisplay:
sideFull: "Side"
sideIcon: "Side (Icons)"
@ -1887,6 +1890,7 @@ _deck:
channel: "Channel"
mentions: "Mentions"
direct: "Direct notes"
roleTimeline: "Role Timeline"
_dialog:
charactersExceeded: "You've exceeded the maximum character limit! Currently at {current} of {max}."
charactersBelow: "You're below the minimum character limit! Currently at {current} of {min}."

View file

@ -20,6 +20,7 @@ noNotes: "Nessuna nota!"
noNotifications: "Nessuna notifica"
instance: "Istanza"
settings: "Impostazioni"
notificationSettings: "Preferenze di notifica"
basicSettings: "Impostazioni generali"
otherSettings: "Altre impostazioni"
openInWindow: "Apri in una finestra"
@ -786,7 +787,7 @@ gallery: "Galleria"
recentPosts: "Le più recenti"
popularPosts: "Le più visualizzate"
shareWithNote: "Condividere in nota"
ads: "Pubblicità"
ads: "Banner"
expiration: "Scadenza"
startingperiod: "Periodo di inizio"
memo: "Promemoria"
@ -991,6 +992,7 @@ largeNoteReactions: "Ingrandisci le reazioni"
noteIdOrUrl: "ID della Nota o URL"
accountMigration: "Migrazione del profilo"
accountMoved: "Questo profilo ha migrato altrove:"
forceShowAds: "Mostra sempre i banner"
_accountMigration:
moveTo: "Migrare questo profilo verso un un altro"
moveToLabel: "Profilo verso cui migrare"
@ -1406,6 +1408,8 @@ _channel:
following: "Seguiti"
usersCount: "{n} partecipanti"
notesCount: "{n} note"
nameAndDescription: "Nome e descrizione"
nameOnly: "Solo il nome"
_menuDisplay:
sideFull: "Laterale"
sideIcon: "Laterale (solo icone)"

View file

@ -996,6 +996,8 @@ noteIdOrUrl: "ートIDまたはURL"
accountMigration: "アカウントの引っ越し"
accountMoved: "このユーザーは新しいアカウントに引っ越しました:"
forceShowAds: "常に広告を表示する"
addMemo: "メモを追加"
editMemo: "メモを編集"
_accountMigration:
moveTo: "このアカウントを新しいアカウントに引っ越す"

View file

@ -20,6 +20,7 @@ noNotes: "ノートはあらへん"
noNotifications: "通知はあらへん"
instance: "サーバー"
settings: "設定"
notificationSettings: "通知の設定"
basicSettings: "基本設定"
otherSettings: "ほかの設定"
openInWindow: "ウィンドウで開くで"
@ -1407,6 +1408,8 @@ _channel:
following: "フォロー中やで"
usersCount: "{n}人が参加中やで"
notesCount: "{n}こ投稿があるで"
nameAndDescription: "名前と説明"
nameOnly: "名前だけ"
_menuDisplay:
sideFull: "横"
sideIcon: "横(アイコン)"
@ -1887,6 +1890,7 @@ _deck:
channel: "チャンネル"
mentions: "あんた宛て"
direct: "ダイレクト"
roleTimeline: "ロールタイムライン"
_dialog:
charactersExceeded: "最大の文字数を上回っとるで!今は {current} / 最大でも {max}"
charactersBelow: "最小の文字数を下回っとるで!今は {current} / 最低でも {min}"

View file

@ -20,6 +20,7 @@ noNotes: "没有帖文"
noNotifications: "无通知"
instance: "服务器"
settings: "设置"
notificationSettings: "通知设置"
basicSettings: "基本设置"
otherSettings: "其他设置"
openInWindow: "在新窗口中打开"
@ -1407,6 +1408,8 @@ _channel:
following: "正在关注"
usersCount: "有{n}人参与"
notesCount: "有{n}个帖子"
nameAndDescription: "名称与描述"
nameOnly: "仅名称"
_menuDisplay:
sideFull: "横向"
sideIcon: "横向(图标)"
@ -1887,6 +1890,7 @@ _deck:
channel: "频道"
mentions: "提及"
direct: "指定用户"
roleTimeline: "角色时间线"
_dialog:
charactersExceeded: "已经超过了最大字符数! 当前字符数 {current} / 限制字符数 {max}"
charactersBelow: "低于最小字符数!当前字符数 {current} / 限制字符数 {min}"

View file

@ -20,6 +20,7 @@ noNotes: "無貼文。"
noNotifications: "沒有通知"
instance: "實例"
settings: "設定"
notificationSettings: "通知選項"
basicSettings: "基本設定"
otherSettings: "其他設定"
openInWindow: "在新視窗開啟"
@ -506,6 +507,7 @@ objectStorageUseSSLDesc: "如果不使用https進行API連接請關閉"
objectStorageUseProxy: "使用網路代理"
objectStorageUseProxyDesc: "如果不使用代理進行API連接請關閉"
objectStorageSetPublicRead: "上傳時設定為\"public-read\""
s3ForcePathStyleDesc: "啟用 s3ForcePathStyle 會強制將儲存槽名稱指定為 URL 中路徑的一部分,而不是主機名。 使用自託管 Minio 之類的可能需要啟用。"
serverLogs: "伺服器日誌"
deleteAll: "刪除所有記錄"
showFixedPostForm: "於時間軸頁頂顯示「發送貼文」方框"
@ -560,7 +562,7 @@ inboxUrl: "收件夾URL"
addedRelays: "已加入的中繼"
serviceworkerInfo: "您需要啟用推送通知"
deletedNote: "已删除的貼文"
invisibleNote: "隱藏的貼文"
invisibleNote: "私密的貼文"
enableInfiniteScroll: "啟用自動滾動頁面模式"
visibility: "可見性"
poll: "投票"
@ -919,6 +921,7 @@ pushNotificationNotSupported: "瀏覽器或實例不支援推播通知"
sendPushNotificationReadMessage: "通知與訊息如果已讀的話,就將推播通知刪除"
sendPushNotificationReadMessageCaption: "「{emptyPushNotificationMessage}」通知將立刻顯示。可能會增加設備的電池消耗。"
windowMaximize: "最大化"
windowMinimize: "最小化"
windowRestore: "復原"
caption: "標題"
loggedInAsBot: "以機器人帳戶登入中"
@ -960,6 +963,9 @@ copyErrorInfo: "複製錯誤資訊"
joinThisServer: "在此伺服器上註冊"
exploreOtherServers: "探索其他伺服器"
letsLookAtTimeline: "看看時間軸"
disableFederationConfirm: "要停止聯邦功能嗎?"
disableFederationConfirmWarn: "即使停止了聯邦功能,貼文也不會變成私密的。在大部分的情況下,沒有必要停止聯邦功能。"
disableFederationOk: "停止聯邦功能"
invitationRequiredToRegister: "目前這個伺服器為邀請制,必須擁有邀請碼才能註冊。"
emailNotSupported: "這個伺服器不支援寄送郵件"
postToTheChannel: "發布到頻道"
@ -985,6 +991,7 @@ showClipButtonInNoteFooter: "將摘錄添加至貼文"
largeNoteReactions: "將貼文的反應放大顯示"
noteIdOrUrl: "貼文ID或URL"
accountMigration: "遷移帳戶"
accountMoved: "這個使用者已遷移至新的帳戶:"
forceShowAds: "總是顯示廣告"
_accountMigration:
moveTo: "將這個帳戶遷移至新的帳戶"
@ -1401,6 +1408,8 @@ _channel:
following: "關注中"
usersCount: "有{n}人參與"
notesCount: "有{n}個貼文"
nameAndDescription: "名稱與說明"
nameOnly: "僅名稱"
_menuDisplay:
sideFull: "側向"
sideIcon: "側向(圖示)"
@ -1881,6 +1890,7 @@ _deck:
channel: "頻道"
mentions: "提及"
direct: "指定使用者"
roleTimeline: "角色時間軸"
_dialog:
charactersExceeded: "已超過最大字數!現在 {current} / 限制 {max}"
charactersBelow: "低於最少字數!現在 {current} / 限制 {max}"

View file

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "13.11.2",
"version": "13.11.3",
"codename": "nasubi",
"repository": {
"type": "git",

View file

@ -0,0 +1,18 @@
export class UserMemo1680702787050 {
name = 'UserMemo1680702787050'
async up(queryRunner) {
await queryRunner.query(`CREATE TABLE "user_memo" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "targetUserId" character varying(32) NOT NULL, "memo" character varying(2048) NOT NULL, CONSTRAINT "PK_e9aaa58f7d3699a84d79078f4d9" PRIMARY KEY ("id")); COMMENT ON COLUMN "user_memo"."userId" IS 'The ID of author.'; COMMENT ON COLUMN "user_memo"."targetUserId" IS 'The ID of target user.'; COMMENT ON COLUMN "user_memo"."memo" IS 'Memo.'`);
await queryRunner.query(`CREATE INDEX "IDX_650b49c5639b5840ee6a2b8f83" ON "user_memo" ("userId") `);
await queryRunner.query(`CREATE INDEX "IDX_66ac4a82894297fd09ba61f3d3" ON "user_memo" ("targetUserId") `);
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_faef300913c738265638ba3ebc" ON "user_memo" ("userId", "targetUserId") `);
await queryRunner.query(`ALTER TABLE "user_memo" ADD CONSTRAINT "FK_650b49c5639b5840ee6a2b8f83e" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "user_memo" ADD CONSTRAINT "FK_66ac4a82894297fd09ba61f3d35" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_memo" DROP CONSTRAINT "FK_66ac4a82894297fd09ba61f3d35"`);
await queryRunner.query(`ALTER TABLE "user_memo" DROP CONSTRAINT "FK_650b49c5639b5840ee6a2b8f83e"`);
await queryRunner.query(`DROP TABLE "user_memo"`);
}
}

View file

@ -49,7 +49,7 @@ export class CustomEmojiService {
if (!Array.isArray(JSON.parse(value))) return undefined; // 古いバージョンの壊れたキャッシュが残っていることがある(そのうち消す)
return new Map(JSON.parse(value).map((x: Serialized<Emoji>) => [x.name, {
...x,
updatedAt: x.updatedAt && new Date(x.updatedAt),
updatedAt: x.updatedAt ? new Date(x.updatedAt) : null,
}]));
},
});

View file

@ -396,8 +396,9 @@ export class DriveService {
);
}
// Expire oldest file (without avatar or banner) of remote user
@bindThis
private async deleteOldFile(user: RemoteUser) {
private async expireOldFile(user: RemoteUser, driveCapacity: number) {
const q = this.driveFilesRepository.createQueryBuilder('file')
.where('file.userId = :userId', { userId: user.id })
.andWhere('file.isLink = FALSE');
@ -410,12 +411,17 @@ export class DriveService {
q.andWhere('file.id != :bannerId', { bannerId: user.bannerId });
}
//This selete is hard coded, be careful if change database schema
q.addSelect('SUM("file"."size") OVER (ORDER BY "file"."id" DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)', 'acc_usage');
q.orderBy('file.id', 'ASC');
const oldFile = await q.getOne();
const fileList = await q.getRawMany();
const exceedFileIds = fileList.filter((x: any) => x.acc_usage > driveCapacity).map((x: any) => x.file_id);
if (oldFile) {
this.deleteFile(oldFile, true);
for (const fileId of exceedFileIds) {
const file = await this.driveFilesRepository.findOneBy({ id: fileId });
if (file == null) continue;
this.deleteFile(file, true);
}
}
@ -489,22 +495,19 @@ export class DriveService {
//#region Check drive usage
if (user && !isLink) {
const usage = await this.driveFileEntityService.calcDriveUsageOf(user);
const isLocalUser = this.userEntityService.isLocalUser(user);
const policies = await this.roleService.getUserPolicies(user.id);
const driveCapacity = 1024 * 1024 * policies.driveCapacityMb;
this.registerLogger.debug('drive capacity override applied');
this.registerLogger.debug(`overrideCap: ${driveCapacity}bytes, usage: ${usage}bytes, u+s: ${usage + info.size}bytes`);
this.registerLogger.debug(`drive usage is ${usage} (max: ${driveCapacity})`);
// If usage limit exceeded
if (usage + info.size > driveCapacity) {
if (this.userEntityService.isLocalUser(user)) {
if (driveCapacity < usage + info.size) {
if (isLocalUser) {
throw new IdentifiableError('c6244ed2-a39a-4e1c-bf93-f0fbd7764fa6', 'No free space.');
} else {
// (アバターまたはバナーを含まず)最も古いファイルを削除する
this.deleteOldFile(await this.usersRepository.findOneByOrFail({ id: user.id }) as RemoteUser);
}
await this.expireOldFile(await this.usersRepository.findOneByOrFail({ id: user.id }) as RemoteUser, driveCapacity - info.size);
}
}
//#endregion

View file

@ -84,7 +84,7 @@ export class ChannelEntityService {
} : {}),
...(detailed ? {
pinnedNotes: await this.noteEntityService.packMany(pinnedNotes, me),
pinnedNotes: (await this.noteEntityService.packMany(pinnedNotes, me)).sort((a, b) => channel.pinnedNoteIds.indexOf(a.id) - channel.pinnedNoteIds.indexOf(b.id)),
} : {}),
};
}

View file

@ -12,7 +12,7 @@ import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js';
import type { Instance } from '@/models/entities/Instance.js';
import type { LocalUser, RemoteUser, User } from '@/models/entities/User.js';
import { birthdaySchema, descriptionSchema, localUsernameSchema, locationSchema, nameSchema, passwordSchema } from '@/models/entities/User.js';
import type { UsersRepository, UserSecurityKeysRepository, FollowingsRepository, FollowRequestsRepository, BlockingsRepository, MutingsRepository, DriveFilesRepository, NoteUnreadsRepository, ChannelFollowingsRepository, UserNotePiningsRepository, UserProfilesRepository, InstancesRepository, AnnouncementReadsRepository, AnnouncementsRepository, PagesRepository, UserProfile, RenoteMutingsRepository } from '@/models/index.js';
import type { UsersRepository, UserSecurityKeysRepository, FollowingsRepository, FollowRequestsRepository, BlockingsRepository, MutingsRepository, DriveFilesRepository, NoteUnreadsRepository, ChannelFollowingsRepository, UserNotePiningsRepository, UserProfilesRepository, InstancesRepository, AnnouncementReadsRepository, AnnouncementsRepository, PagesRepository, UserProfile, RenoteMutingsRepository, UserMemoRepository } from '@/models/index.js';
import { bindThis } from '@/decorators.js';
import { RoleService } from '@/core/RoleService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
@ -113,6 +113,9 @@ export class UserEntityService implements OnModuleInit {
@Inject(DI.pagesRepository)
private pagesRepository: PagesRepository,
@Inject(DI.userMemosRepository)
private userMemosRepository: UserMemoRepository,
//private noteEntityService: NoteEntityService,
//private driveFileEntityService: DriveFileEntityService,
@ -409,6 +412,10 @@ export class UserEntityService implements OnModuleInit {
isAdministrator: role.isAdministrator,
displayOrder: role.displayOrder,
}))),
memo: meId == null ? null : await this.userMemosRepository.findOneBy({
userId: meId,
targetUserId: user.id,
}).then(row => row?.memo ?? null),
} : {}),
...(opts.detail && isMe ? {

View file

@ -70,5 +70,6 @@ export const DI = {
roleAssignmentsRepository: Symbol('roleAssignmentsRepository'),
flashsRepository: Symbol('flashsRepository'),
flashLikesRepository: Symbol('flashLikesRepository'),
userMemosRepository: Symbol('userMemosRepository'),
//#endregion
};

View file

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import { User, Note, Announcement, AnnouncementRead, App, NoteFavorite, NoteThreadMuting, NoteReaction, NoteUnread, Poll, PollVote, UserProfile, UserKeypair, UserPending, AttestationChallenge, UserSecurityKey, UserPublickey, UserList, UserListJoining, UserNotePining, UserIp, UsedUsername, Following, FollowRequest, Instance, Emoji, DriveFile, DriveFolder, Meta, Muting, RenoteMuting, Blocking, SwSubscription, Hashtag, AbuseUserReport, RegistrationTicket, AuthSession, AccessToken, Signin, Page, PageLike, GalleryPost, GalleryLike, ModerationLog, Clip, ClipNote, Antenna, PromoNote, PromoRead, Relay, MutedNote, Channel, ChannelFollowing, ChannelFavorite, RegistryItem, Webhook, Ad, PasswordResetRequest, RetentionAggregation, FlashLike, Flash, Role, RoleAssignment, ClipFavorite } from './index.js';
import { User, Note, Announcement, AnnouncementRead, App, NoteFavorite, NoteThreadMuting, NoteReaction, NoteUnread, Poll, PollVote, UserProfile, UserKeypair, UserPending, AttestationChallenge, UserSecurityKey, UserPublickey, UserList, UserListJoining, UserNotePining, UserIp, UsedUsername, Following, FollowRequest, Instance, Emoji, DriveFile, DriveFolder, Meta, Muting, RenoteMuting, Blocking, SwSubscription, Hashtag, AbuseUserReport, RegistrationTicket, AuthSession, AccessToken, Signin, Page, PageLike, GalleryPost, GalleryLike, ModerationLog, Clip, ClipNote, Antenna, PromoNote, PromoRead, Relay, MutedNote, Channel, ChannelFollowing, ChannelFavorite, RegistryItem, Webhook, Ad, PasswordResetRequest, RetentionAggregation, FlashLike, Flash, Role, RoleAssignment, ClipFavorite, UserMemo } from './index.js';
import type { DataSource } from 'typeorm';
import type { Provider } from '@nestjs/common';
@ -388,6 +388,12 @@ const $roleAssignmentsRepository: Provider = {
inject: [DI.db],
};
const $userMemosRepository: Provider = {
provide: DI.userMemosRepository,
useFactory: (db: DataSource) => db.getRepository(UserMemo),
inject: [DI.db],
};
@Module({
imports: [
],
@ -456,6 +462,7 @@ const $roleAssignmentsRepository: Provider = {
$roleAssignmentsRepository,
$flashsRepository,
$flashLikesRepository,
$userMemosRepository,
],
exports: [
$usersRepository,
@ -522,6 +529,7 @@ const $roleAssignmentsRepository: Provider = {
$roleAssignmentsRepository,
$flashsRepository,
$flashLikesRepository,
$userMemosRepository,
],
})
export class RepositoryModule {}

View file

@ -0,0 +1,42 @@
import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
import { id } from '../id.js';
import { User } from './User.js';
@Entity()
@Index(['userId', 'targetUserId'], { unique: true })
export class UserMemo {
@PrimaryColumn(id())
public id: string;
@Index()
@Column({
...id(),
comment: 'The ID of author.',
})
public userId: User['id'];
@ManyToOne(type => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
public user: User | null;
@Index()
@Column({
...id(),
comment: 'The ID of target user.',
})
public targetUserId: User['id'];
@ManyToOne(type => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
public targetUser: User | null;
@Column('varchar', {
length: 2048,
comment: 'Memo.',
})
public memo: string;
}

View file

@ -55,6 +55,7 @@ import { UserPending } from '@/models/entities/UserPending.js';
import { UserProfile } from '@/models/entities/UserProfile.js';
import { UserPublickey } from '@/models/entities/UserPublickey.js';
import { UserSecurityKey } from '@/models/entities/UserSecurityKey.js';
import { UserMemo } from '@/models/entities/UserMemo.js';
import { Webhook } from '@/models/entities/Webhook.js';
import { Channel } from '@/models/entities/Channel.js';
import { RetentionAggregation } from '@/models/entities/RetentionAggregation.js';
@ -129,6 +130,7 @@ export {
RoleAssignment,
Flash,
FlashLike,
UserMemo,
};
export type AbuseUserReportsRepository = Repository<AbuseUserReport>;
@ -195,3 +197,4 @@ export type RolesRepository = Repository<Role>;
export type RoleAssignmentsRepository = Repository<RoleAssignment>;
export type FlashsRepository = Repository<Flash>;
export type FlashLikesRepository = Repository<FlashLike>;
export type UserMemoRepository = Repository<UserMemo>;

View file

@ -250,6 +250,10 @@ export const packedUserDetailedNotMeOnlySchema = {
type: 'boolean',
nullable: false, optional: true,
},
memo: {
type: 'string',
nullable: false, optional: true,
},
//#endregion
},
} as const;

View file

@ -70,6 +70,7 @@ import { Role } from '@/models/entities/Role.js';
import { RoleAssignment } from '@/models/entities/RoleAssignment.js';
import { Flash } from '@/models/entities/Flash.js';
import { FlashLike } from '@/models/entities/FlashLike.js';
import { UserMemo } from '@/models/entities/UserMemo.js';
import { Config } from '@/config.js';
import MisskeyLogger from '@/logger.js';
@ -183,6 +184,7 @@ export const entities = [
RoleAssignment,
Flash,
FlashLike,
UserMemo,
...charts,
];

View file

@ -330,6 +330,7 @@ import * as ep___users_search from './endpoints/users/search.js';
import * as ep___users_show from './endpoints/users/show.js';
import * as ep___users_stats from './endpoints/users/stats.js';
import * as ep___users_achievements from './endpoints/users/achievements.js';
import * as ep___users_updateMemo from './endpoints/users/update-memo.js';
import * as ep___fetchRss from './endpoints/fetch-rss.js';
import * as ep___retention from './endpoints/retention.js';
import { GetterService } from './GetterService.js';
@ -665,6 +666,7 @@ const $users_search: Provider = { provide: 'ep:users/search', useClass: ep___use
const $users_show: Provider = { provide: 'ep:users/show', useClass: ep___users_show.default };
const $users_stats: Provider = { provide: 'ep:users/stats', useClass: ep___users_stats.default };
const $users_achievements: Provider = { provide: 'ep:users/achievements', useClass: ep___users_achievements.default };
const $users_updateMemo: Provider = { provide: 'ep:users/update-memo', useClass: ep___users_updateMemo.default };
const $fetchRss: Provider = { provide: 'ep:fetch-rss', useClass: ep___fetchRss.default };
const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention.default };
@ -1004,6 +1006,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
$users_show,
$users_stats,
$users_achievements,
$users_updateMemo,
$fetchRss,
$retention,
],
@ -1335,6 +1338,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
$users_show,
$users_stats,
$users_achievements,
$users_updateMemo,
$fetchRss,
$retention,
],

View file

@ -330,6 +330,7 @@ import * as ep___users_search from './endpoints/users/search.js';
import * as ep___users_show from './endpoints/users/show.js';
import * as ep___users_stats from './endpoints/users/stats.js';
import * as ep___users_achievements from './endpoints/users/achievements.js';
import * as ep___users_updateMemo from './endpoints/users/update-memo.js';
import * as ep___fetchRss from './endpoints/fetch-rss.js';
import * as ep___retention from './endpoints/retention.js';
@ -663,6 +664,7 @@ const eps = [
['users/show', ep___users_show],
['users/stats', ep___users_stats],
['users/achievements', ep___users_achievements],
['users/update-memo', ep___users_updateMemo],
['fetch-rss', ep___fetchRss],
['retention', ep___retention],
];

View file

@ -76,18 +76,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchAntenna);
}
const limit = ps.limit + (ps.untilId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const noteIdsRes = await this.redisClient.xrevrange(
`antennaTimeline:${antenna.id}`,
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : '+',
'-',
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+',
ps.sinceId ? this.idService.parse(ps.sinceId).date.getTime() : ps.sinceDate ?? '-',
'COUNT', limit);
if (noteIdsRes.length === 0) {
return [];
}
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId);
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId && x !== ps.sinceId);
if (noteIds.length === 0) {
return [];

View file

@ -71,18 +71,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchRole);
}
const limit = ps.limit + (ps.untilId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const noteIdsRes = await this.redisClient.xrevrange(
`roleTimeline:${role.id}`,
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : '+',
'-',
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+',
ps.sinceId ? this.idService.parse(ps.sinceId).date.getTime() : ps.sinceDate ?? '-',
'COUNT', limit);
if (noteIdsRes.length === 0) {
return [];
}
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId);
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId && x !== ps.sinceId);
if (noteIds.length === 0) {
return [];

View file

@ -41,8 +41,6 @@ export const paramDef = {
],
} as const;
// TODO: avatar,bannerをJOINしたいけどエラーになる
// eslint-disable-next-line import/no-default-export
@Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> {

View file

@ -0,0 +1,85 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { IdService } from '@/core/IdService.js';
import type { UserMemoRepository } from '@/models/index.js';
import { DI } from '@/di-symbols.js';
import { GetterService } from '@/server/api/GetterService.js';
import { ApiError } from '../../error.js';
export const meta = {
tags: ['account'],
requireCredential: true,
kind: 'write:account',
errors: {
noSuchUser: {
message: 'No such user.',
code: 'NO_SUCH_USER',
id: '6fef56f3-e765-4957-88e5-c6f65329b8a5',
},
},
} as const;
export const paramDef = {
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id' },
memo: {
type: 'string',
nullable: true,
description: 'A personal memo for the target user. If null or empty, delete the memo.',
},
},
required: ['userId', 'memo'],
} as const;
// eslint-disable-next-line import/no-default-export
@Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> {
constructor(
@Inject(DI.userMemosRepository)
private userMemosRepository: UserMemoRepository,
private getterService: GetterService,
private idService: IdService,
) {
super(meta, paramDef, async (ps, me) => {
// Get target
const target = await this.getterService.getUser(ps.userId).catch(err => {
if (err.id === '15348ddd-432d-49c2-8a5a-8069753becff') throw new ApiError(meta.errors.noSuchUser);
throw err;
});
// 引数がnullか空文字であれば、パーソナルメモを削除する
if (ps.memo === '' || ps.memo == null) {
await this.userMemosRepository.delete({
userId: me.id,
targetUserId: target.id,
});
return;
}
// 以前に作成されたパーソナルメモがあるかどうか確認
const previousMemo = await this.userMemosRepository.findOneBy({
userId: me.id,
targetUserId: target.id,
});
if (!previousMemo) {
await this.userMemosRepository.insert({
id: this.idService.genId(),
userId: me.id,
targetUserId: target.id,
memo: ps.memo,
});
} else {
await this.userMemosRepository.update(previousMemo.id, {
userId: me.id,
targetUserId: target.id,
memo: ps.memo,
});
}
});
}
}

View file

@ -849,4 +849,84 @@ describe('Endpoints', () => {
assert.strictEqual(res.body.error.code, 'URL_PREVIEW_FAILED');
});
});
describe('パーソナルメモ機能のテスト', () => {
test('他者に関するメモを更新できる', async () => {
const memo = '10月まで低浮上とのこと。';
const res1 = await api('/users/update-memo', {
memo,
userId: bob.id,
}, alice);
const res2 = await api('/users/show', {
userId: bob.id,
}, alice);
assert.strictEqual(res1.status, 204);
assert.strictEqual(res2.body?.memo, memo);
});
test('自分に関するメモを更新できる', async () => {
const memo = 'チケットを月末までに買う。';
const res1 = await api('/users/update-memo', {
memo,
userId: alice.id,
}, alice);
const res2 = await api('/users/show', {
userId: alice.id,
}, alice);
assert.strictEqual(res1.status, 204);
assert.strictEqual(res2.body?.memo, memo);
});
test('メモを削除できる', async () => {
const memo = '10月まで低浮上とのこと。';
await api('/users/update-memo', {
memo,
userId: bob.id,
}, alice);
await api('/users/update-memo', {
memo: '',
userId: bob.id,
}, alice);
const res = await api('/users/show', {
userId: bob.id,
}, alice);
assert.strictEqual('memo' in res.body, false);
});
test('メモは個人ごとに独立して保存される', async () => {
const memoAliceToBob = '10月まで低浮上とのこと。';
const memoCarolToBob = '例の件について今度問いただす。';
await Promise.all([
api('/users/update-memo', {
memo: memoAliceToBob,
userId: bob.id,
}, alice),
api('/users/update-memo', {
memo: memoCarolToBob,
userId: bob.id,
}, carol),
]);
const [resAlice, resCarol] = await Promise.all([
api('/users/show', {
userId: bob.id,
}, alice),
api('/users/show', {
userId: bob.id,
}, carol),
]);
assert.strictEqual(resAlice.body.memo, memoAliceToBob);
assert.strictEqual(resCarol.body.memo, memoCarolToBob);
});
});
});

View file

@ -118,7 +118,7 @@ function toStories(component: string): string {
.replace(/[-.]|^(?=\d)/g, '_')
.replace(/(?<=^[^A-Z_]*$)/, '_')}
/> as estree.Identifier;
const parameters = (
const parameters =
<object-expression
properties={[
<property
@ -137,9 +137,8 @@ function toStories(component: string): string {
]
: []),
]}
/>
) as estree.ObjectExpression;
const program = (
/> as estree.ObjectExpression;
const program =
<program
body={[
<import-declaration
@ -379,11 +378,11 @@ function toStories(component: string): string {
declaration={(<identifier name='meta' />) as estree.Identifier}
/> as estree.ExportDefaultDeclaration,
]}
/>
) as estree.Program;
/> as estree.Program;
return format(
'/* eslint-disable @typescript-eslint/explicit-function-return-type */\n' +
'/* eslint-disable import/no-default-export */\n' +
'/* eslint-disable import/no-duplicates */\n' +
generate(program, { generator }) +
(hasImplStories ? readFileSync(`${implStories}.ts`, 'utf-8') : ''),
{
@ -397,6 +396,7 @@ function toStories(component: string): string {
// glob('src/{components,pages,ui,widgets}/**/*.vue')
Promise.all([
glob('src/components/global/*.vue'),
glob('src/components/Mk{A,B}*.vue'),
glob('src/components/MkGalleryPostPreview.vue'),
glob('src/pages/user/home.vue'),
])

View file

@ -8,6 +8,16 @@ export const onUnhandledRequest = ((req, print) => {
}) satisfies SharedOptions['onUnhandledRequest'];
export const commonHandlers = [
rest.get('/fluent-emoji/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/fluent-emojis/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/twemoji/:codepoints.svg', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://unpkg.com/@discordapp/twemoji@14.1.2/dist/svg/${codepoints}.svg`).then((response) => response.blob());

View file

@ -1,3 +1,5 @@
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@2.12.0/tabler-icons.min.css">
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
<style>

View file

@ -0,0 +1,84 @@
{
"Storybook Story Impl File": {
"scope": "typescript",
"prefix": "storyimpl",
"body": [
"/* eslint-disable @typescript-eslint/explicit-function-return-type */",
"import { StoryObj } from '@storybook/vue3';",
"import $1 from './$1.vue';",
"export const Default = {",
"\trender(args) {",
"\t\treturn {",
"\t\t\tcomponents: {",
"\t\t\t\t$1,",
"\t\t\t},",
"\t\t\tsetup() {",
"\t\t\t\treturn {",
"\t\t\t\t\targs,",
"\t\t\t\t};",
"\t\t\t},",
"\t\t\tcomputed: {",
"\t\t\t\tprops() {",
"\t\t\t\t\treturn {",
"\t\t\t\t\t\t...this.args,",
"\t\t\t\t\t};",
"\t\t\t\t},",
"\t\t\t},",
"\t\t\ttemplate: '<$1 v-bind=\"props\" />',",
"\t\t};",
"\t},",
"\targs: {",
"\t\t$2",
"\t},",
"\tparameters: {",
"\t\tlayout: 'centered',",
"\t},",
"} satisfies StoryObj<typeof $1>;",
""
]
},
"Storybook Story Impl File (w/ events)": {
"scope": "typescript",
"prefix": "storyimplevent",
"body": [
"/* eslint-disable @typescript-eslint/explicit-function-return-type */",
"import { action } from '@storybook/addon-actions';",
"import { StoryObj } from '@storybook/vue3';",
"import $1 from './$1.vue';",
"export const Default = {",
"\trender(args) {",
"\t\treturn {",
"\t\t\tcomponents: {",
"\t\t\t\t$1,",
"\t\t\t},",
"\t\t\tsetup() {",
"\t\t\t\treturn {",
"\t\t\t\t\targs,",
"\t\t\t\t};",
"\t\t\t},",
"\t\t\tcomputed: {",
"\t\t\t\tprops() {",
"\t\t\t\t\treturn {",
"\t\t\t\t\t\t...this.args,",
"\t\t\t\t\t};",
"\t\t\t\t},",
"\t\t\t\tevents() {",
"\t\t\t\t\treturn {",
"\t\t\t\t\t\t$3",
"\t\t\t\t\t};",
"\t\t\t\t},",
"\t\t\t},",
"\t\t\ttemplate: '<$1 v-bind=\"props\" v-on=\"events\" />',",
"\t\t};",
"\t},",
"\targs: {",
"\t\t$2",
"\t},",
"\tparameters: {",
"\t\tlayout: 'centered',",
"\t},",
"} satisfies StoryObj<typeof $1>;",
""
]
}
}

View file

@ -74,6 +74,7 @@
"vuedraggable": "next"
},
"devDependencies": {
"@storybook/addon-actions": "7.0.2",
"@storybook/addon-essentials": "7.0.2",
"@storybook/addon-interactions": "7.0.2",
"@storybook/addon-links": "7.0.2",

View file

@ -0,0 +1,49 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { StoryObj } from '@storybook/vue3';
import { rest } from 'msw';
import { abuseUserReport } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAbuseReport from './MkAbuseReport.vue';
export const Default = {
render(args) {
return {
components: {
MkAbuseReport,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
events() {
return {
resolved: action('resolved'),
};
},
},
template: '<MkAbuseReport v-bind="props" v-on="events" />',
};
},
args: {
report: abuseUserReport(),
},
parameters: {
layout: 'fullscreen',
msw: {
handlers: [
...commonHandlers,
rest.post('/api/admin/resolve-abuse-user-report', async (req, res, ctx) => {
action('POST /api/admin/resolve-abuse-user-report')(await req.json());
return res(ctx.json({}));
}),
],
},
},
} satisfies StoryObj<typeof MkAbuseReport>;

View file

@ -0,0 +1,49 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { StoryObj } from '@storybook/vue3';
import { rest } from 'msw';
import { userDetailed } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAbuseReportWindow from './MkAbuseReportWindow.vue';
export const Default = {
render(args) {
return {
components: {
MkAbuseReportWindow,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
events() {
return {
'closed': action('closed'),
};
},
},
template: '<MkAbuseReportWindow v-bind="props" v-on="events" />',
};
},
args: {
user: userDetailed(),
},
parameters: {
layout: 'centered',
msw: {
handlers: [
...commonHandlers,
rest.post('/api/users/report-abuse', async (req, res, ctx) => {
action('POST /api/users/report-abuse')(await req.json());
return res(ctx.json({}));
}),
],
},
},
} satisfies StoryObj<typeof MkAbuseReportWindow>;

View file

@ -0,0 +1,33 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import { userDetailed } from '../../.storybook/fakes';
import MkAccountMoved from './MkAccountMoved.vue';
export const Default = {
render(args) {
return {
components: {
MkAccountMoved,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
},
template: '<MkAccountMoved v-bind="props" />',
};
},
args: {
username: userDetailed().username,
host: userDetailed().host,
},
parameters: {
layout: 'centered',
},
} satisfies StoryObj<typeof MkAccountMoved>;

View file

@ -2,7 +2,7 @@
<div :class="$style.root">
<i class="ti ti-plane-departure" style="margin-right: 8px;"></i>
{{ i18n.ts.accountMoved }}
<MkMention :class="$style.link" :username="acct" :host="host ?? localHost"/>
<MkMention :class="$style.link" :username="username" :host="host ?? localHost"/>
</div>
</template>
@ -12,7 +12,7 @@ import { i18n } from '@/i18n';
import { host as localHost } from '@/config';
defineProps<{
acct: string;
username: string;
host: string;
}>();
</script>

View file

@ -0,0 +1,56 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import { rest } from 'msw';
import { userDetailed } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAchievements from './MkAchievements.vue';
import { ACHIEVEMENT_TYPES } from '@/scripts/achievements';
export const Empty = {
render(args) {
return {
components: {
MkAchievements,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
},
template: '<MkAchievements v-bind="props" />',
};
},
args: {
user: userDetailed(),
},
parameters: {
layout: 'fullscreen',
msw: {
handlers: [
...commonHandlers,
rest.post('/api/users/achievements', (req, res, ctx) => {
return res(ctx.json([]));
}),
],
},
},
} satisfies StoryObj<typeof MkAchievements>;
export const All = {
...Empty,
parameters: {
msw: {
handlers: [
...commonHandlers,
rest.post('/api/users/achievements', (req, res, ctx) => {
return res(ctx.json(ACHIEVEMENT_TYPES.map((name) => ({ name, unlockedAt: 0 }))));
}),
],
},
},
} satisfies StoryObj<typeof MkAchievements>;

View file

@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import MkAnalogClock from './MkAnalogClock.vue';
import isChromatic from 'chromatic';
export const Default = {
render(args) {
return {
@ -22,6 +23,14 @@ export const Default = {
template: '<MkAnalogClock v-bind="props" />',
};
},
args: {
now: isChromatic() ? () => new Date('2023-01-01T10:10:30') : undefined,
},
decorators: [
() => ({
template: '<div style="container-type:inline-size;height:100%"><div style="height:100cqmin;margin:auto;width:100cqmin"><story/></div></div>',
}),
],
parameters: {
layout: 'fullscreen',
},

View file

@ -99,6 +99,7 @@ const props = withDefaults(defineProps<{
graduations?: 'none' | 'dots' | 'numbers';
fadeGraduations?: boolean;
sAnimation?: 'none' | 'elastic' | 'easeOut';
now?: () => Date;
}>(), {
numbers: false,
thickness: 0.1,
@ -107,6 +108,7 @@ const props = withDefaults(defineProps<{
graduations: 'dots',
fadeGraduations: true,
sAnimation: 'elastic',
now: () => new Date(),
});
const graduationsMajor = computed(() => {
@ -145,11 +147,17 @@ let disableSAnimate = $ref(false);
let sOneRound = false;
function tick() {
const now = new Date();
now.setMinutes(now.getMinutes() + (new Date().getTimezoneOffset() + props.offset));
const now = props.now();
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + props.offset);
const previousS = s;
const previousM = m;
const previousH = h;
s = now.getSeconds();
m = now.getMinutes();
h = now.getHours();
if (previousS === s && previousM === m && previousH === h) {
return;
}
hAngle = Math.PI * (h % (props.twentyfour ? 24 : 12) + (m + s / 60) / 60) / (props.twentyfour ? 12 : 6);
mAngle = Math.PI * (m + s / 60) / 30;
if (sOneRound) { // (59->0)

View file

@ -0,0 +1,2 @@
import MkAsUi from './MkAsUi.vue';
void MkAsUi;

View file

@ -0,0 +1,176 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { expect } from '@storybook/jest';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3';
import { rest } from 'msw';
import { userDetailed } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAutocomplete from './MkAutocomplete.vue';
import MkInput from './MkInput.vue';
import { tick } from '@/scripts/test-utils';
const common = {
render(args) {
return {
components: {
MkAutocomplete,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
events() {
return {
open: action('open'),
closed: action('closed'),
};
},
},
template: '<MkAutocomplete v-bind="props" v-on="events" :textarea="textarea" />',
};
},
args: {
close: action('close'),
x: 0,
y: 0,
},
decorators: [
(_, context) => ({
components: {
MkInput,
},
data() {
return {
q: context.args.q,
textarea: null,
};
},
methods: {
inputMounted() {
this.textarea = this.$refs.input.$refs.inputEl;
},
},
template: '<MkInput v-model="q" ref="input" @vue:mounted="inputMounted"/><story v-if="textarea" :q="q" :textarea="textarea"/>',
}),
],
parameters: {
controls: {
exclude: ['textarea'],
},
layout: 'centered',
chromatic: {
// FIXME: flaky
disableSnapshot: true,
},
},
} satisfies StoryObj<typeof MkAutocomplete>;
export const User = {
...common,
args: {
...common.args,
type: 'user',
},
async play({ canvasElement }) {
const canvas = within(canvasElement);
const input = canvas.getByRole('combobox');
await waitFor(() => userEvent.hover(input));
await waitFor(() => userEvent.click(input));
await waitFor(() => userEvent.type(input, 'm'));
await waitFor(async () => {
await userEvent.type(input, ' ', { delay: 256 });
await tick();
return await expect(canvas.getByRole('list')).toBeInTheDocument();
}, { timeout: 16384 });
},
parameters: {
...common.parameters,
msw: {
handlers: [
...commonHandlers,
rest.post('/api/users/search-by-username-and-host', (req, res, ctx) => {
return res(ctx.json([
userDetailed('44', 'mizuki', 'misskey-hub.net', 'Mizuki'),
userDetailed('49', 'momoko', 'misskey-hub.net', 'Momoko'),
]));
}),
],
},
},
};
export const Hashtag = {
...common,
args: {
...common.args,
type: 'hashtag',
},
async play({ canvasElement }) {
const canvas = within(canvasElement);
const input = canvas.getByRole('combobox');
await waitFor(() => userEvent.hover(input));
await waitFor(() => userEvent.click(input));
await waitFor(() => userEvent.type(input, '気象'));
await waitFor(async () => {
await userEvent.type(input, ' ', { delay: 256 });
await tick();
return await expect(canvas.getByRole('list')).toBeInTheDocument();
}, { interval: 256, timeout: 16384 });
},
parameters: {
...common.parameters,
msw: {
handlers: [
...commonHandlers,
rest.post('/api/hashtags/search', (req, res, ctx) => {
return res(ctx.json([
'気象警報注意報',
'気象警報',
'気象情報',
]));
}),
],
},
},
};
export const Emoji = {
...common,
args: {
...common.args,
type: 'emoji',
},
async play({ canvasElement }) {
const canvas = within(canvasElement);
const input = canvas.getByRole('combobox');
await waitFor(() => userEvent.hover(input));
await waitFor(() => userEvent.click(input));
await waitFor(() => userEvent.type(input, 'smile'));
await waitFor(async () => {
await userEvent.type(input, ' ', { delay: 256 });
await tick();
return await expect(canvas.getByRole('list')).toBeInTheDocument();
}, { interval: 256, timeout: 16384 });
},
} satisfies StoryObj<typeof MkAutocomplete>;
export const MfmTag = {
...common,
args: {
...common.args,
type: 'mfmTag',
},
async play({ canvasElement }) {
const canvas = within(canvasElement);
const input = canvas.getByRole('combobox');
await waitFor(() => userEvent.hover(input));
await waitFor(() => userEvent.click(input));
await waitFor(async () => {
await tick();
return await expect(canvas.getByRole('list')).toBeInTheDocument();
}, { interval: 256, timeout: 16384 });
},
} satisfies StoryObj<typeof MkAutocomplete>;

View file

@ -0,0 +1,46 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import { rest } from 'msw';
import { userDetailed } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAvatars from './MkAvatars.vue';
export const Default = {
render(args) {
return {
components: {
MkAvatars,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
},
template: '<MkAvatars v-bind="props" />',
};
},
args: {
userIds: ['17', '20', '18'],
},
parameters: {
layout: 'centered',
msw: {
handlers: [
...commonHandlers,
rest.post('/api/users/show', (req, res, ctx) => {
return res(ctx.json([
userDetailed('17'),
userDetailed('20'),
userDetailed('18'),
]));
}),
],
},
},
} satisfies StoryObj<typeof MkAvatars>;

View file

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
/* eslint-disable import/no-duplicates */
import { action } from '@storybook/addon-actions';
import { StoryObj } from '@storybook/vue3';
import MkButton from './MkButton.vue';
export const Default = {
@ -20,11 +20,60 @@ export const Default = {
...this.args,
};
},
events() {
return {
click: action('click'),
};
},
},
template: '<MkButton v-bind="props">Text</MkButton>',
template: '<MkButton v-bind="props" v-on="events">Text</MkButton>',
};
},
args: {
},
parameters: {
layout: 'centered',
},
} satisfies StoryObj<typeof MkButton>;
export const Primary = {
...Default,
args: {
...Default.args,
primary: true,
},
} satisfies StoryObj<typeof MkButton>;
export const Gradate = {
...Default,
args: {
...Default.args,
gradate: true,
},
} satisfies StoryObj<typeof MkButton>;
export const Rounded = {
...Default,
args: {
...Default.args,
rounded: true,
},
} satisfies StoryObj<typeof MkButton>;
export const Danger = {
...Default,
args: {
...Default.args,
danger: true,
},
} satisfies StoryObj<typeof MkButton>;
export const Small = {
...Default,
args: {
...Default.args,
small: true,
},
} satisfies StoryObj<typeof MkButton>;
export const Large = {
...Default,
args: {
...Default.args,
large: true,
},
} satisfies StoryObj<typeof MkButton>;

View file

@ -484,6 +484,11 @@ function showReactions(): void {
}
}
.footer {
position: relative;
z-index: 1;
}
&:hover > .article > .main > .footer > .footerButton {
opacity: 1;
}

View file

@ -900,27 +900,28 @@ defineExpose({
}
.headerLeft {
display: grid;
grid-template-columns: repeat(2, minmax(36px, 50px));
grid-template-rows: minmax(40px, 100%);
display: flex;
flex: 0 1 100px;
}
.cancel {
padding: 0;
font-size: 1em;
height: 100%;
flex: 0 1 50px;
}
.account {
height: 100%;
display: inline-flex;
vertical-align: bottom;
flex: 0 1 50px;
}
.avatar {
width: 28px;
height: 28px;
margin: auto 0;
margin: auto;
}
.headerRight {

View file

@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { expect } from '@storybook/jest';
import { waitFor } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3';
@ -20,14 +21,21 @@ export const Default = {
...this.args,
};
},
events() {
return {
retry: action('retry'),
};
},
},
template: '<MkError v-bind="props" />',
template: '<MkError v-bind="props" v-on="events" />',
};
},
async play({ canvasElement }) {
await expect(canvasElement.firstElementChild).not.toBeNull();
await waitFor(async () => expect(canvasElement.firstElementChild?.classList).not.toContain('_transition_zoom-enter-active'));
},
args: {
},
parameters: {
layout: 'centered',
},

View file

@ -1,21 +1,22 @@
import { miLocalStorage } from "./local-storage";
import { miLocalStorage } from './local-storage';
const address = new URL(location.href);
const siteName = (document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement)?.content;
const siteName = document.querySelector<HTMLMetaElement>('meta[property="og:site_name"]')?.content;
export const host = address.host;
export const hostname = address.hostname;
export const url = address.origin;
export const apiUrl = url + '/api';
export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming';
export const lang = miLocalStorage.getItem('lang');
export const lang = miLocalStorage.getItem('lang') ?? 'en-US';
export const langs = _LANGS_;
export let locale = JSON.parse(miLocalStorage.getItem('locale'));
const preParseLocale = miLocalStorage.getItem('locale');
export let locale = preParseLocale ? JSON.parse(preParseLocale) : null;
export const version = _VERSION_;
export const instanceName = siteName === 'Misskey' ? host : siteName;
export const ui = miLocalStorage.getItem('ui');
export const debug = miLocalStorage.getItem('debug') === 'true';
export function updateLocale(newLocale) {
export function updateLocale(newLocale): void {
locale = newLocale;
}

View file

@ -6,18 +6,6 @@ import 'vite/modulepreload-polyfill';
import '@/style.scss';
//#region account indexedDB migration
import { set } from '@/scripts/idb-proxy';
{
const accounts = miLocalStorage.getItem('accounts');
if (accounts) {
set('accounts', JSON.parse(accounts));
miLocalStorage.removeItem('accounts');
}
}
//#endregion
import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue';
import { compareVersions } from 'compare-versions';
import JSON5 from 'json5';
@ -42,11 +30,11 @@ import { reloadChannel } from '@/scripts/unison-reload';
import { reactionPicker } from '@/scripts/reaction-picker';
import { getUrlWithoutLoginId } from '@/scripts/login-id';
import { getAccountFromId } from '@/scripts/get-account-from-id';
import { deckStore } from './ui/deck/deck-store';
import { miLocalStorage } from './local-storage';
import { claimAchievement, claimedAchievements } from './scripts/achievements';
import { fetchCustomEmojis } from './custom-emojis';
import { mainRouter } from './router';
import { deckStore } from '@/ui/deck/deck-store';
import { miLocalStorage } from '@/local-storage';
import { claimAchievement, claimedAchievements } from '@/scripts/achievements';
import { fetchCustomEmojis } from '@/custom-emojis';
import { mainRouter } from '@/router';
console.info(`Misskey v${version}`);
@ -55,7 +43,9 @@ if (_DEV_) {
console.info(`vue ${vueVersion}`);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).$i = $i;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).$store = defaultStore;
window.addEventListener('error', event => {
@ -184,7 +174,7 @@ fetchInstanceMetaPromise.then(() => {
try {
await fetchCustomEmojis();
} catch (err) {}
} catch (err) { /* empty */ }
const app = createApp(
new URLSearchParams(window.location.search).has('zen') ? defineAsyncComponent(() => import('@/ui/zen.vue')) :
@ -212,20 +202,20 @@ await deckStore.ready;
// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210
// なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する
const rootEl = (() => {
const rootEl = ((): HTMLElement => {
const MISSKEY_MOUNT_DIV_ID = 'misskey_app';
const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID);
const currentRoot = document.getElementById(MISSKEY_MOUNT_DIV_ID);
if (currentEl) {
if (currentRoot) {
console.warn('multiple import detected');
return currentEl;
return currentRoot;
}
const rootEl = document.createElement('div');
rootEl.id = MISSKEY_MOUNT_DIV_ID;
document.body.appendChild(rootEl);
return rootEl;
const root = document.createElement('div');
root.id = MISSKEY_MOUNT_DIV_ID;
document.body.appendChild(root);
return root;
})();
app.mount(rootEl);
@ -256,8 +246,7 @@ if (lastVersion !== version) {
popup(defineAsyncComponent(() => import('@/components/MkUpdated.vue')), {}, {}, 'closed');
}
}
} catch (err) {
}
} catch (err) { /* empty */ }
}
await defaultStore.ready;

View file

@ -24,6 +24,7 @@ type Keys =
'customCss' |
'message_drafts' |
'scratchpad' |
'debug' |
`miux:${string}` |
`ui:folder:${string}` |
`themes:${string}` |
@ -32,7 +33,7 @@ type Keys =
'emojis' // DEPRECATED, stored in indexeddb (13.9.0~);
export const miLocalStorage = {
getItem: (key: Keys) => window.localStorage.getItem(key),
setItem: (key: Keys, value: string) => window.localStorage.setItem(key, value),
removeItem: (key: Keys) => window.localStorage.removeItem(key),
getItem: (key: Keys): string | null => window.localStorage.getItem(key),
setItem: (key: Keys, value: string): void => window.localStorage.setItem(key, value),
removeItem: (key: Keys): void => window.localStorage.removeItem(key),
};

View file

@ -218,6 +218,7 @@ const patrons = [
'Ebise Lutica',
'巣黒るい@リスケモ男の娘VTuber!',
'ふぇいぽむ',
'依古田イコ',
];
let thereIsTreasure = $ref($i && !claimedAchievements.includes('foundTreasure'));

View file

@ -65,7 +65,7 @@ const props = defineProps<{
}>();
let key = $ref('');
let tab = $ref('search');
let tab = $ref('featured');
let searchQuery = $ref('');
let searchType = $ref('nameAndDescription');
let channelPagination = $ref();

View file

@ -7,7 +7,7 @@
<!-- <div class="punished" v-if="user.isSilenced"><i class="ti ti-alert-triangle" style="margin-right: 8px;"></i> {{ i18n.ts.userSilenced }}</div> -->
<div class="profile _gaps">
<MkAccountMoved v-if="user.movedToUri" :host="user.movedToUri.host" :acct="user.movedToUri.username"/>
<MkAccountMoved v-if="user.movedToUri" :host="user.movedToUri.host" :username="user.movedToUri.username"/>
<MkRemoteCaution v-if="user.host != null" :href="user.url ?? user.uri!" class="warn"/>
<div :key="user.id" class="main _panel">
@ -21,6 +21,9 @@
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ti ti-shield"></i></span>
<span v-if="user.isLocked" :title="i18n.ts.isLocked"><i class="ti ti-lock"></i></span>
<span v-if="user.isBot" :title="i18n.ts.isBot"><i class="ti ti-robot"></i></span>
<button v-if="!isEditingMemo && !memoDraft" class="_button add-note-button" @click="showMemoTextarea">
<i class="ti ti-edit"/> {{ i18n.ts.addMemo }}
</button>
</div>
</div>
<span v-if="$i && $i.id != user.id && user.isFollowed" class="followed">{{ i18n.ts.followsYou }}</span>
@ -39,6 +42,17 @@
<span v-if="user.isBot" :title="i18n.ts.isBot"><i class="ti ti-robot"></i></span>
</div>
</div>
<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>
<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 }">
<img v-if="role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="role.iconUrl"/>
@ -113,7 +127,7 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, computed, onMounted, onUnmounted } from 'vue';
import { defineAsyncComponent, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
import calcAge from 's-age';
import * as misskey from 'misskey-js';
import MkNote from '@/components/MkNote.vue';
@ -133,6 +147,7 @@ import { $i } from '@/account';
import { dateString } from '@/filters/date';
import { confetti } from '@/scripts/confetti';
import MkNotes from '@/components/MkNotes.vue';
import { api } from '@/os';
const XPhotos = defineAsyncComponent(() => import('./index.photos.vue'));
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
@ -151,6 +166,10 @@ let parallaxAnimationId = $ref<null | number>(null);
let narrow = $ref<null | boolean>(null);
let rootEl = $ref<null | HTMLElement>(null);
let bannerEl = $ref<null | HTMLElement>(null);
let memoTextareaEl = $ref<null | HTMLElement>(null);
let memoDraft = $ref(props.user.memo);
let isEditingMemo = $ref(false);
const pagination = {
endpoint: 'users/notes' as const,
@ -193,6 +212,31 @@ function parallax() {
banner.style.backgroundPosition = `center calc(50% - ${pos}px)`;
}
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;
});
onMounted(() => {
window.requestAnimationFrame(parallaxLoop);
narrow = rootEl!.clientWidth < 1000;
@ -208,6 +252,9 @@ onMounted(() => {
});
}
}
nextTick(() => {
adjustMemoTextarea();
});
});
onUnmounted(() => {
@ -323,6 +370,16 @@ onUnmounted(() => {
font-weight: bold;
}
}
> .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%;
}
}
}
}
@ -369,6 +426,38 @@ onUnmounted(() => {
}
}
> .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;
}
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;
}
}
> .description {
padding: 24px 24px 24px 154px;
font-size: 0.95em;
@ -504,6 +593,10 @@ onUnmounted(() => {
justify-content: center;
}
> .memo {
margin: 16px 16px 0 16px;
}
> .description {
padding: 16px;
text-align: center;

View file

@ -98,6 +98,27 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router
});
}
async function editMemo(): Promise<void> {
const userDetailed = await os.api('users/show', {
userId: user.id,
});
const { canceled, result } = await os.form(i18n.ts.editMemo, {
memo: {
type: 'string',
required: true,
multiline: true,
label: i18n.ts.memo,
default: userDetailed.memo,
},
});
if (canceled) return;
os.apiWithDialog('users/update-memo', {
memo: result.memo,
userId: user.id,
});
}
let menu = [{
icon: 'ti ti-at',
text: i18n.ts.copyUsername,
@ -123,6 +144,12 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router
os.post({ specified: user, initialText: `@${user.username} ` });
},
}, null, {
icon: 'ti ti-pencil',
text: i18n.ts.editMemo,
action: () => {
editMemo();
},
}, {
type: 'parent',
icon: 'ti ti-list',
text: i18n.ts.addToList,

View file

@ -763,6 +763,9 @@ importers:
specifier: next
version: 4.1.0(vue@3.2.47)
devDependencies:
'@storybook/addon-actions':
specifier: 7.0.2
version: 7.0.2(react-dom@18.2.0)(react@18.2.0)
'@storybook/addon-essentials':
specifier: 7.0.2
version: 7.0.2(react-dom@18.2.0)(react@18.2.0)
@ -2039,11 +2042,6 @@ packages:
'@babel/highlight': 7.18.6
dev: true
/@babel/compat-data@7.20.10:
resolution: {integrity: sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==}
engines: {node: '>=6.9.0'}
dev: true
/@babel/compat-data@7.21.4:
resolution: {integrity: sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==}
engines: {node: '>=6.9.0'}
@ -2056,13 +2054,13 @@ packages:
'@ampproject/remapping': 2.2.0
'@babel/code-frame': 7.18.6
'@babel/generator': 7.21.3
'@babel/helper-compilation-targets': 7.20.7(@babel/core@7.21.3)
'@babel/helper-compilation-targets': 7.21.4(@babel/core@7.21.3)
'@babel/helper-module-transforms': 7.21.2
'@babel/helpers': 7.21.0
'@babel/parser': 7.21.3
'@babel/template': 7.20.7
'@babel/traverse': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
convert-source-map: 1.9.0
debug: 4.3.4(supports-color@8.1.1)
gensync: 1.0.0-beta.2
@ -2076,7 +2074,7 @@ packages:
resolution: {integrity: sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.21.3
'@babel/types': 7.21.4
'@jridgewell/gen-mapping': 0.3.2
'@jridgewell/trace-mapping': 0.3.17
jsesc: 2.5.2
@ -2097,20 +2095,6 @@ packages:
'@babel/types': 7.21.4
dev: true
/@babel/helper-compilation-targets@7.20.7(@babel/core@7.21.3):
resolution: {integrity: sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/compat-data': 7.20.10
'@babel/core': 7.21.3
'@babel/helper-validator-option': 7.21.0
browserslist: 4.21.5
lru-cache: 5.1.1
semver: 6.3.0
dev: true
/@babel/helper-compilation-targets@7.21.4(@babel/core@7.21.3):
resolution: {integrity: sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==}
engines: {node: '>=6.9.0'}
@ -2347,7 +2331,7 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
'@babel/types': 7.21.3
'@babel/types': 7.21.4
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.21.3):
resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==}
@ -3052,7 +3036,7 @@ packages:
'@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.20.2
'@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.21.3)
'@babel/types': 7.21.3
'@babel/types': 7.21.4
dev: true
/@babel/plugin-transform-regenerator@7.20.5(@babel/core@7.21.3):
@ -3163,92 +3147,6 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: true
/@babel/preset-env@7.20.2(@babel/core@7.21.3):
resolution: {integrity: sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.20.10
'@babel/core': 7.21.3
'@babel/helper-compilation-targets': 7.20.7(@babel/core@7.21.3)
'@babel/helper-plugin-utils': 7.20.2
'@babel/helper-validator-option': 7.21.0
'@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-class-static-block': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-proposal-dynamic-import': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-proposal-json-strings': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-logical-assignment-operators': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-private-property-in-object': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.3)
'@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.21.3)
'@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.21.3)
'@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-import-assertions': 7.20.0(@babel/core@7.21.3)
'@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.3)
'@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.3)
'@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.3)
'@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.21.3)
'@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.21.3)
'@babel/plugin-transform-arrow-functions': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-transform-async-to-generator': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-transform-block-scoped-functions': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-block-scoping': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-transform-classes': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-transform-computed-properties': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-transform-destructuring': 7.21.3(@babel/core@7.21.3)
'@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-duplicate-keys': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-transform-exponentiation-operator': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-for-of': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-transform-function-name': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-transform-literals': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-transform-member-expression-literals': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-modules-amd': 7.20.11(@babel/core@7.21.3)
'@babel/plugin-transform-modules-commonjs': 7.21.2(@babel/core@7.21.3)
'@babel/plugin-transform-modules-systemjs': 7.20.11(@babel/core@7.21.3)
'@babel/plugin-transform-modules-umd': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-named-capturing-groups-regex': 7.20.5(@babel/core@7.21.3)
'@babel/plugin-transform-new-target': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-object-super': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-parameters': 7.21.3(@babel/core@7.21.3)
'@babel/plugin-transform-property-literals': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-regenerator': 7.20.5(@babel/core@7.21.3)
'@babel/plugin-transform-reserved-words': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-shorthand-properties': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-spread': 7.20.7(@babel/core@7.21.3)
'@babel/plugin-transform-sticky-regex': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-transform-template-literals': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-transform-typeof-symbol': 7.18.9(@babel/core@7.21.3)
'@babel/plugin-transform-unicode-escapes': 7.18.10(@babel/core@7.21.3)
'@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.21.3)
'@babel/preset-modules': 0.1.5(@babel/core@7.21.3)
'@babel/types': 7.21.3
babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.3)
babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.3)
babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.3)
core-js-compat: 3.29.1
semver: 6.3.0
transitivePeerDependencies:
- supports-color
dev: true
/@babel/preset-env@7.21.4(@babel/core@7.21.3):
resolution: {integrity: sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==}
engines: {node: '>=6.9.0'}
@ -3432,14 +3330,6 @@ packages:
- supports-color
dev: true
/@babel/types@7.21.3:
resolution: {integrity: sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-string-parser': 7.19.4
'@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
/@babel/types@7.21.4:
resolution: {integrity: sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==}
engines: {node: '>=6.9.0'}
@ -5518,17 +5408,6 @@ packages:
- supports-color
dev: true
/@storybook/channel-postmessage@7.0.0:
resolution: {integrity: sha512-Sy3oHL/xDRjUiHnM0ncnkbOE5pK3O72MjOoiLJX4FCI90w03KM4+F/N0eU2cXl6yXHuCyI5eJisEzQxTNsaJiw==}
dependencies:
'@storybook/channels': 7.0.0
'@storybook/client-logger': 7.0.0
'@storybook/core-events': 7.0.0
'@storybook/global': 5.0.0
qs: 6.11.1
telejson: 7.0.4
dev: true
/@storybook/channel-postmessage@7.0.2:
resolution: {integrity: sha512-SZ/KqnZcx10W9hJbrzBKcP9dmgaeTaXugUhcgw1IkmjKWdsKazqFZCPwQWZZKAmhO4wYbyYOhkz3wfSIeB4mFw==}
dependencies:
@ -5549,10 +5428,6 @@ packages:
telejson: 7.0.4
dev: true
/@storybook/channels@7.0.0:
resolution: {integrity: sha512-adPIkvL4q37dGTWCpSzV8ETLdkxsg7BAgzeT9pustZJjRIZqAHGUAm7krDtGT7jbV4dU0Zw0VpUrnmyfxIkOKQ==}
dev: true
/@storybook/channels@7.0.2:
resolution: {integrity: sha512-qkI8mFy9c8mxN2f01etayKhCaauL6RAsxRzbX1/pKj6UqhHWqqUbtHwymrv4hG5qDYjV1e9pd7ae5eNF8Kui0g==}
dev: true
@ -5562,7 +5437,7 @@ packages:
hasBin: true
dependencies:
'@babel/core': 7.21.3
'@babel/preset-env': 7.20.2(@babel/core@7.21.3)
'@babel/preset-env': 7.21.4(@babel/core@7.21.3)
'@ndelangen/get-tarball': 3.0.7
'@storybook/codemod': 7.0.2
'@storybook/core-common': 7.0.2
@ -5586,7 +5461,7 @@ packages:
get-port: 5.1.1
giget: 1.1.2
globby: 11.1.0
jscodeshift: 0.14.0(@babel/preset-env@7.20.2)
jscodeshift: 0.14.0(@babel/preset-env@7.21.4)
leven: 3.1.0
prettier: 2.8.7
prompts: 2.4.2
@ -5606,12 +5481,6 @@ packages:
- utf-8-validate
dev: true
/@storybook/client-logger@7.0.0:
resolution: {integrity: sha512-wRZZiPta37DFc8SVZ8Q3ZqyTrs5qgO6bcCuVDRLQAcO0Oz4xKEVPEVfVVxSPZU/+p2ypqdBBCP2pdL/Jy86AJg==}
dependencies:
'@storybook/global': 5.0.0
dev: true
/@storybook/client-logger@7.0.2:
resolution: {integrity: sha512-rv7W2BhzIQHbFpUM5/CP/acS6T5lTmaxT0MbZ9n+9h++9QQU/cFOdkZgSUbLVAb1AeUGoLsk0HYzcqPpV35Xsw==}
dependencies:
@ -5623,7 +5492,7 @@ packages:
dependencies:
'@babel/core': 7.21.3
'@babel/preset-env': 7.21.4(@babel/core@7.21.3)
'@babel/types': 7.21.3
'@babel/types': 7.21.4
'@storybook/csf': 0.1.0
'@storybook/csf-tools': 7.0.2
'@storybook/node-logger': 7.0.2
@ -5689,10 +5558,6 @@ packages:
- supports-color
dev: true
/@storybook/core-events@7.0.0:
resolution: {integrity: sha512-pxzNmgEI1p90bHyAYABHDDtB2XM5pffq6CqIHboK6aSCux7Cdc16IjOYq6BJIhCKaaI+qQHaFLR4JfaFAsxwQQ==}
dev: true
/@storybook/core-events@7.0.2:
resolution: {integrity: sha512-1DCHCwHRL3+rlvnVVc/BCfReP31XaT2WYgcLeGTmkX1E43Po1MkgcM7PnJPSaa9POvSqZ+6YLZv5Bs1SXbufow==}
dev: true
@ -5764,7 +5629,7 @@ packages:
'@babel/generator': 7.21.3
'@babel/parser': 7.21.3
'@babel/traverse': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
'@storybook/csf': 0.1.0
'@storybook/types': 7.0.2
fs-extra: 11.1.0
@ -5774,12 +5639,6 @@ packages:
- supports-color
dev: true
/@storybook/csf@0.0.2-next.11:
resolution: {integrity: sha512-xGt0YSVxZb43sKmEf1GIQD8xEbo+c+S6khDEL7Qu/pYA0gh5z3WUuhOlovnelYj/YJod+XRsfVvk23AaRfUJ4Q==}
dependencies:
type-fest: 2.19.0
dev: true
/@storybook/csf@0.1.0:
resolution: {integrity: sha512-uk+jMXCZ8t38jSTHk2o5btI+aV2Ksbvl6DoOv3r6VaCM1KZqeuMwtwywIQdflkA8/6q/dKT8z8L+g8hC4GC3VQ==}
dependencies:
@ -5814,16 +5673,6 @@ packages:
resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==}
dev: true
/@storybook/instrumenter@7.0.0:
resolution: {integrity: sha512-A7jBrV7VM3OxRgall8rpjagy3VC78A/OV1g1aYVVLpAF/+Odj+MeHHF179+fR6JBLnBgukNfsG7/ZHHGs0gL5Q==}
dependencies:
'@storybook/channels': 7.0.0
'@storybook/client-logger': 7.0.0
'@storybook/core-events': 7.0.0
'@storybook/global': 5.0.0
'@storybook/preview-api': 7.0.0
dev: true
/@storybook/instrumenter@7.0.2:
resolution: {integrity: sha512-zr9/fuaYtGVUtcL8XgjA4Iq5jtzdcqQyOSH4XLXtz6JtSad3lkRagbJo2Vzbw7dO/4vzjfTMxEzvWjUuPxLOhA==}
dependencies:
@ -5838,7 +5687,7 @@ packages:
resolution: {integrity: sha512-TmybnEXlv5Fu2/Hq4nRj7alS9mw4CasLR0RDwaAzS+Vpvu1TC4+j9rh+b1BHtmWebbJh0JMT6mgzPqOyJdgtQA==}
dependencies:
'@storybook/expect': 27.5.2-0
'@storybook/instrumenter': 7.0.0
'@storybook/instrumenter': 7.0.2
'@testing-library/jest-dom': 5.16.5
jest-mock: 27.5.1
dev: true
@ -5889,26 +5738,6 @@ packages:
resolution: {integrity: sha512-Hhiu3+N3ZDcbrhOCBJTDJbn/mC4l0v3ziyAP3yalq/2ZR9R5kfsEHHakKmswsKKV+ey0gNGijFTy3soU5oSs+A==}
dev: true
/@storybook/preview-api@7.0.0:
resolution: {integrity: sha512-Q0IYYH1gOmx42ClYlQfQPjuERBWM3Ey+3DFsLQaraKXDdgZ9wN7jPNuS7wxuUNylT0oa/3WjxT7qNfiGw8JtBw==}
dependencies:
'@storybook/channel-postmessage': 7.0.0
'@storybook/channels': 7.0.0
'@storybook/client-logger': 7.0.0
'@storybook/core-events': 7.0.0
'@storybook/csf': 0.0.2-next.11
'@storybook/global': 5.0.0
'@storybook/types': 7.0.0
'@types/qs': 6.9.7
dequal: 2.0.3
lodash: 4.17.21
memoizerific: 1.11.3
qs: 6.11.1
synchronous-promise: 2.0.17
ts-dedent: 2.2.0
util-deprecate: 1.0.2
dev: true
/@storybook/preview-api@7.0.2:
resolution: {integrity: sha512-QAlJM/r92+dQe/kB7MTTR9b/1mt9UJjxNjazGdEWipA/nw23kOF3o/hBcvKwBYkit4zGYsX70H+vuzW8hCo/lA==}
dependencies:
@ -6078,15 +5907,6 @@ packages:
react-dom: 18.2.0(react@18.2.0)
dev: true
/@storybook/types@7.0.0:
resolution: {integrity: sha512-eCMW/xTVMswgD/58itibw8s8f2hZ7tciT3saRdGCymg9tPUhMC/9eGIIUSr/C+xfnCJEZm6J6DgEUo1xlifonw==}
dependencies:
'@storybook/channels': 7.0.0
'@types/babel__core': 7.20.0
'@types/express': 4.17.17
file-system-cache: 2.0.2
dev: true
/@storybook/types@7.0.2:
resolution: {integrity: sha512-0OCt/kAexa8MCcljxA+yZxGMn0n2U2Ync0KxotItqNbKBKVkaLQUls0+IXTWSCpC/QJvNZ049jxUHHanNi/96w==}
dependencies:
@ -6544,7 +6364,7 @@ packages:
resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==}
dependencies:
'@babel/parser': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
'@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1
'@types/babel__traverse': 7.18.3
@ -6553,20 +6373,20 @@ packages:
/@types/babel__generator@7.6.4:
resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==}
dependencies:
'@babel/types': 7.21.3
'@babel/types': 7.21.4
dev: true
/@types/babel__template@7.4.1:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies:
'@babel/parser': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
dev: true
/@types/babel__traverse@7.18.3:
resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==}
dependencies:
'@babel/types': 7.21.3
'@babel/types': 7.21.4
dev: true
/@types/bcryptjs@2.4.2:
@ -10845,7 +10665,7 @@ packages:
engines: {node: '>=8.3.0'}
dependencies:
'@babel/traverse': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
c8: 7.13.0
transitivePeerDependencies:
- supports-color
@ -13821,36 +13641,6 @@ packages:
resolution: {integrity: sha512-lJH6tJ77V8Nzd5QWRkFYCLc13a3vADkh3r/Fi8HupZGWk2OVVDfnZP8V/VgQgZ+lzW0kG2UGb5hFgt3V3ndotQ==}
engines: {node: '>=0.1.90'}
/jscodeshift@0.14.0(@babel/preset-env@7.20.2):
resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==}
hasBin: true
peerDependencies:
'@babel/preset-env': ^7.1.6
dependencies:
'@babel/core': 7.21.3
'@babel/parser': 7.21.3
'@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.3)
'@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.21.3)
'@babel/plugin-transform-modules-commonjs': 7.21.2(@babel/core@7.21.3)
'@babel/preset-env': 7.20.2(@babel/core@7.21.3)
'@babel/preset-flow': 7.18.6(@babel/core@7.21.3)
'@babel/preset-typescript': 7.21.0(@babel/core@7.21.3)
'@babel/register': 7.21.0(@babel/core@7.21.3)
babel-core: 7.0.0-bridge.0(@babel/core@7.21.3)
chalk: 4.1.2
flow-parser: 0.202.0
graceful-fs: 4.2.11
micromatch: 4.0.5
neo-async: 2.6.2
node-dir: 0.1.17
recast: 0.21.5
temp: 0.8.4
write-file-atomic: 2.4.3
transitivePeerDependencies:
- supports-color
dev: true
/jscodeshift@0.14.0(@babel/preset-env@7.21.4):
resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==}
hasBin: true
@ -19719,7 +19509,7 @@ packages:
resolution: {integrity: sha512-jbOf7ByE3Zvtuk+429Jorl+eIeh2aB2Fx1GUo3xJd1aByJWE8KDlSEa6b11PB1ze8f0sRUBraRDinICCk0KY7g==}
dependencies:
'@babel/parser': 7.21.3
'@babel/types': 7.21.3
'@babel/types': 7.21.4
'@vue/compiler-dom': 3.2.47
'@vue/compiler-sfc': 3.2.47
ast-types: 0.14.2